@queuedash/ui 3.4.0 → 3.6.0

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.
Files changed (34) hide show
  1. package/dist/main.js +18 -13
  2. package/dist/main.mjs +10069 -7925
  3. package/dist/src/App.d.ts.map +1 -1
  4. package/dist/src/components/ActionMenu.d.ts.map +1 -1
  5. package/dist/src/components/AddJobModal.d.ts.map +1 -1
  6. package/dist/src/components/Alert.d.ts.map +1 -1
  7. package/dist/src/components/Button.d.ts.map +1 -1
  8. package/dist/src/components/Checkbox.d.ts.map +1 -1
  9. package/dist/src/components/ErrorCard.d.ts.map +1 -1
  10. package/dist/src/components/JobActionMenu.d.ts.map +1 -1
  11. package/dist/src/components/JobModal.d.ts.map +1 -1
  12. package/dist/src/components/JobOptionTag.d.ts.map +1 -1
  13. package/dist/src/components/JobTable.d.ts.map +1 -1
  14. package/dist/src/components/QueueActionMenu.d.ts.map +1 -1
  15. package/dist/src/components/QueueStatusTabs.d.ts.map +1 -1
  16. package/dist/src/components/SchedulerActionMenu.d.ts +9 -0
  17. package/dist/src/components/SchedulerActionMenu.d.ts.map +1 -0
  18. package/dist/src/components/SchedulerModal.d.ts +9 -0
  19. package/dist/src/components/SchedulerModal.d.ts.map +1 -0
  20. package/dist/src/components/SchedulerTable.d.ts +6 -0
  21. package/dist/src/components/SchedulerTable.d.ts.map +1 -0
  22. package/dist/src/components/Skeleton.d.ts.map +1 -1
  23. package/dist/src/components/TableRow.d.ts +10 -0
  24. package/dist/src/components/TableRow.d.ts.map +1 -0
  25. package/dist/src/components/Tooltip.d.ts.map +1 -1
  26. package/dist/src/pages/HomePage.d.ts.map +1 -1
  27. package/dist/src/pages/QueuePage.d.ts.map +1 -1
  28. package/dist/src/utils/trpc.d.ts +207 -8
  29. package/dist/src/utils/trpc.d.ts.map +1 -1
  30. package/dist/styles.css +34 -0
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +33 -31
  33. package/dist/src/components/JobTableRow.d.ts +0 -9
  34. package/dist/src/components/JobTableRow.d.ts.map +0 -1
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Il=e=>{throw TypeError(e)};var Go=(e,t,n)=>t.has(e)||Il("Cannot "+n);var w=(e,t,n)=>(Go(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?Il("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),N=(e,t,n,r)=>(Go(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),G=(e,t,n)=>(Go(e,t,"access private method"),n);var xi=(e,t,n,r)=>({set _(i){N(e,t,i,n)},get _(){return w(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),Rn=require("react-dom");function X1(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const S=X1(c);function J1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var id={exports:{}},Mo={};/**
1
+ "use strict";var cu=e=>{throw TypeError(e)};var Sa=(e,t,n)=>t.has(e)||cu("Cannot "+n);var C=(e,t,n)=>(Sa(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?cu("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),B=(e,t,n,r)=>(Sa(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),G=(e,t,n)=>(Sa(e,t,"access private method"),n);var Ki=(e,t,n,r)=>({set _(i){B(e,t,i,n)},get _(){return C(e,t,r)}});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),Lr=require("react-dom");function Hg(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $=Hg(d);function Id(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nd={exports:{}},Yo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,8 +6,8 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var eg=Symbol.for("react.transitional.element"),tg=Symbol.for("react.fragment");function od(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:eg,type:e,key:r,ref:t!==void 0?t:null,props:n}}Mo.Fragment=tg;Mo.jsx=od;Mo.jsxs=od;id.exports=Mo;var v=id.exports,Mn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},wn=typeof window>"u"||"Deno"in globalThis;function qe(){}function ng(e,t){return typeof e=="function"?e(t):e}function La(e){return typeof e=="number"&&e>=0&&e!==1/0}function ad(e,t){return Math.max(e+(t||0)-Date.now(),0)}function qn(e,t){return typeof e=="function"?e(t):e}function et(e,t){return typeof e=="function"?e(t):e}function Nl(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==Bs(a,t.options))return!1}else if(!Ur(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function jl(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(en(t.options.mutationKey)!==en(o))return!1}else if(!Ur(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Bs(e,t){return((t==null?void 0:t.queryKeyHashFn)||en)(e)}function en(e){return JSON.stringify(e,(t,n)=>Aa(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Ur(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Ur(e[n],t[n])):!1}function Hs(e,t){if(e===t)return e;const n=_l(e)&&_l(t);if(n||Aa(e)&&Aa(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let l=0;for(let u=0;u<a;u++){const d=n?u:o[u];(!n&&r.includes(d)||n)&&e[d]===void 0&&t[d]===void 0?(s[d]=void 0,l++):(s[d]=Hs(e[d],t[d]),s[d]===e[d]&&e[d]!==void 0&&l++)}return i===a&&l===i?e:s}return t}function Xi(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _l(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Aa(e){if(!Kl(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Kl(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Kl(e){return Object.prototype.toString.call(e)==="[object Object]"}function rg(e){return new Promise(t=>{setTimeout(t,e)})}function Ia(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Hs(e,t):t}function ig(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function og(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ie=Symbol();function sd(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ie?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var dn,jt,Gn,Kc,ag=(Kc=class extends Mn{constructor(){super();z(this,dn);z(this,jt);z(this,Gn);N(this,Gn,t=>{if(!wn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){w(this,jt)||this.setEventListener(w(this,Gn))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,jt))==null||t.call(this),N(this,jt,void 0))}setEventListener(t){var n;N(this,Gn,t),(n=w(this,jt))==null||n.call(this),N(this,jt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){w(this,dn)!==t&&(N(this,dn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof w(this,dn)=="boolean"?w(this,dn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},dn=new WeakMap,jt=new WeakMap,Gn=new WeakMap,Kc),Vs=new ag,Qn,_t,Yn,Bc,sg=(Bc=class extends Mn{constructor(){super();z(this,Qn,!0);z(this,_t);z(this,Yn);N(this,Yn,t=>{if(!wn&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){w(this,_t)||this.setEventListener(w(this,Yn))}onUnsubscribe(){var t;this.hasListeners()||((t=w(this,_t))==null||t.call(this),N(this,_t,void 0))}setEventListener(t){var n;N(this,Yn,t),(n=w(this,_t))==null||n.call(this),N(this,_t,t(this.setOnline.bind(this)))}setOnline(t){w(this,Qn)!==t&&(N(this,Qn,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return w(this,Qn)}},Qn=new WeakMap,_t=new WeakMap,Yn=new WeakMap,Bc),Ji=new sg;function Na(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function lg(e){return Math.min(1e3*2**e,3e4)}function ld(e){return(e??"online")==="online"?Ji.isOnline():!0}var ud=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Qo(e){return e instanceof ud}function cd(e){let t=!1,n=0,r=!1,i;const o=Na(),a=m=>{var b;r||(g(new ud(m)),(b=e.abort)==null||b.call(e))},s=()=>{t=!0},l=()=>{t=!1},u=()=>Vs.isFocused()&&(e.networkMode==="always"||Ji.isOnline())&&e.canRun(),d=()=>ld(e.networkMode)&&e.canRun(),h=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),o.resolve(m))},g=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),o.reject(m))},f=()=>new Promise(m=>{var b;i=$=>{(r||u())&&m($)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch($){m=Promise.reject($)}Promise.resolve(m).then(h).catch($=>{var k;if(r)return;const x=e.retry??(wn?0:3),E=e.retryDelay??lg,M=typeof E=="function"?E(n,$):E,C=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,$);if(t||!C){g($);return}n++,(k=e.onFail)==null||k.call(e,n,$),rg(M).then(()=>u()?void 0:f()).then(()=>{t?g($):p()})})};return{promise:o,cancel:a,continue:()=>(i==null||i(),o),cancelRetry:s,continueRetry:l,canStart:d,start:()=>(d()?p():f().then(p),o)}}function ug(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var ge=ug(),fn,Hc,dd=(Hc=class{constructor(){z(this,fn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),La(this.gcTime)&&N(this,fn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(wn?1/0:5*60*1e3))}clearGcTimeout(){w(this,fn)&&(clearTimeout(w(this,fn)),N(this,fn,void 0))}},fn=new WeakMap,Hc),Zn,Xn,Ve,Ee,ni,hn,Xe,Ct,Vc,cg=(Vc=class extends dd{constructor(t){super();z(this,Xe);z(this,Zn);z(this,Xn);z(this,Ve);z(this,Ee);z(this,ni);z(this,hn);N(this,hn,!1),N(this,ni,t.defaultOptions),this.setOptions(t.options),this.observers=[],N(this,Ve,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,N(this,Zn,dg(this.options)),this.state=t.state??w(this,Zn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=w(this,Ee))==null?void 0:t.promise}setOptions(t){this.options={...w(this,ni),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&w(this,Ve).remove(this)}setData(t,n){const r=Ia(this.state.data,t,this.options);return G(this,Xe,Ct).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){G(this,Xe,Ct).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=w(this,Ee))==null?void 0:r.promise;return(i=w(this,Ee))==null||i.cancel(t),n?n.then(qe).catch(qe):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(w(this,Zn))}isActive(){return this.observers.some(t=>et(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ie||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!ad(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,Ee))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=w(this,Ee))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),w(this,Ve).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(w(this,Ee)&&(w(this,hn)?w(this,Ee).cancel({revert:!0}):w(this,Ee).cancelRetry()),this.scheduleGc()),w(this,Ve).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||G(this,Xe,Ct).call(this,{type:"invalidate"})}fetch(t,n){var l,u,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(w(this,Ee))return w(this,Ee).continueRetry(),w(this,Ee).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(g=>g.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(N(this,hn,!0),r.signal)})},o=()=>{const h=sd(this.options,n),g={queryKey:this.queryKey,meta:this.meta};return i(g),N(this,hn,!1),this.options.persister?this.options.persister(h,g,this):h(g)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(a),(l=this.options.behavior)==null||l.onFetch(a,this),N(this,Xn,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&G(this,Xe,Ct).call(this,{type:"fetch",meta:(d=a.fetchOptions)==null?void 0:d.meta});const s=h=>{var g,f,p,m;Qo(h)&&h.silent||G(this,Xe,Ct).call(this,{type:"error",error:h}),Qo(h)||((f=(g=w(this,Ve).config).onError)==null||f.call(g,h,this),(m=(p=w(this,Ve).config).onSettled)==null||m.call(p,this.state.data,h,this)),this.scheduleGc()};return N(this,Ee,cd({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var g,f,p,m;if(h===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(b){s(b);return}(f=(g=w(this,Ve).config).onSuccess)==null||f.call(g,h,this),(m=(p=w(this,Ve).config).onSettled)==null||m.call(p,h,this.state.error,this),this.scheduleGc()},onError:s,onFail:(h,g)=>{G(this,Xe,Ct).call(this,{type:"failed",failureCount:h,error:g})},onPause:()=>{G(this,Xe,Ct).call(this,{type:"pause"})},onContinue:()=>{G(this,Xe,Ct).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),w(this,Ee).start()}},Zn=new WeakMap,Xn=new WeakMap,Ve=new WeakMap,Ee=new WeakMap,ni=new WeakMap,hn=new WeakMap,Xe=new WeakSet,Ct=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...fd(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return Qo(i)&&i.revert&&w(this,Xn)?{...w(this,Xn),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ge.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),w(this,Ve).notify({query:this,type:"updated",action:t})})},Vc);function fd(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ld(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dg(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var dt,zc,fg=(zc=class extends Mn{constructor(t={}){super();z(this,dt);this.config=t,N(this,dt,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??Bs(i,n);let a=this.get(o);return a||(a=new cg({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){w(this,dt).has(t.queryHash)||(w(this,dt).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=w(this,dt).get(t.queryHash);n&&(t.destroy(),n===t&&w(this,dt).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return w(this,dt).get(t)}getAll(){return[...w(this,dt).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Nl(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Nl(t,r)):n}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},dt=new WeakMap,zc),ft,Pe,gn,ht,It,Uc,hg=(Uc=class extends dd{constructor(t){super();z(this,ht);z(this,ft);z(this,Pe);z(this,gn);this.mutationId=t.mutationId,N(this,Pe,t.mutationCache),N(this,ft,[]),this.state=t.state||hd(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){w(this,ft).includes(t)||(w(this,ft).push(t),this.clearGcTimeout(),w(this,Pe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){N(this,ft,w(this,ft).filter(n=>n!==t)),this.scheduleGc(),w(this,Pe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){w(this,ft).length||(this.state.status==="pending"?this.scheduleGc():w(this,Pe).remove(this))}continue(){var t;return((t=w(this,gn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,a,s,l,u,d,h,g,f,p,m,b,$,x,E,M,C,k,F;N(this,gn,cd({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(y,D)=>{G(this,ht,It).call(this,{type:"failed",failureCount:y,error:D})},onPause:()=>{G(this,ht,It).call(this,{type:"pause"})},onContinue:()=>{G(this,ht,It).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>w(this,Pe).canRun(this)}));const n=this.state.status==="pending",r=!w(this,gn).canStart();try{if(!n){G(this,ht,It).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=w(this,Pe).config).onMutate)==null?void 0:o.call(i,t,this));const D=await((s=(a=this.options).onMutate)==null?void 0:s.call(a,t));D!==this.state.context&&G(this,ht,It).call(this,{type:"pending",context:D,variables:t,isPaused:r})}const y=await w(this,gn).start();return await((u=(l=w(this,Pe).config).onSuccess)==null?void 0:u.call(l,y,t,this.state.context,this)),await((h=(d=this.options).onSuccess)==null?void 0:h.call(d,y,t,this.state.context)),await((f=(g=w(this,Pe).config).onSettled)==null?void 0:f.call(g,y,null,this.state.variables,this.state.context,this)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,y,null,t,this.state.context)),G(this,ht,It).call(this,{type:"success",data:y}),y}catch(y){try{throw await(($=(b=w(this,Pe).config).onError)==null?void 0:$.call(b,y,t,this.state.context,this)),await((E=(x=this.options).onError)==null?void 0:E.call(x,y,t,this.state.context)),await((C=(M=w(this,Pe).config).onSettled)==null?void 0:C.call(M,void 0,y,this.state.variables,this.state.context,this)),await((F=(k=this.options).onSettled)==null?void 0:F.call(k,void 0,y,t,this.state.context)),y}finally{G(this,ht,It).call(this,{type:"error",error:y})}}finally{w(this,Pe).runNext(this)}}},ft=new WeakMap,Pe=new WeakMap,gn=new WeakMap,ht=new WeakSet,It=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ge.batch(()=>{w(this,ft).forEach(r=>{r.onMutationUpdate(t)}),w(this,Pe).notify({mutation:this,type:"updated",action:t})})},Uc);function hd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fe,ri,qc,gg=(qc=class extends Mn{constructor(t={}){super();z(this,Fe);z(this,ri);this.config=t,N(this,Fe,new Map),N(this,ri,Date.now())}build(t,n,r){const i=new hg({mutationCache:this,mutationId:++xi(this,ri)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Ci(t),r=w(this,Fe).get(n)??[];r.push(t),w(this,Fe).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Ci(t);if(w(this,Fe).has(n)){const i=(r=w(this,Fe).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?w(this,Fe).delete(n):w(this,Fe).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=w(this,Fe).get(Ci(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=w(this,Fe).get(Ci(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...w(this,Fe).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>jl(n,r))}findAll(t={}){return this.getAll().filter(n=>jl(t,n))}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ge.batch(()=>Promise.all(t.map(n=>n.continue().catch(qe))))}},Fe=new WeakMap,ri=new WeakMap,qc);function Ci(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function eo(e){return{onFetch:(t,n)=>{var d,h,g,f,p;const r=t.options,i=(g=(h=(d=t.fetchOptions)==null?void 0:d.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],a=((p=t.state.data)==null?void 0:p.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},$=sd(t.options,t.fetchOptions),x=async(E,M,C)=>{if(m)return Promise.reject();if(M==null&&E.pages.length)return Promise.resolve(E);const k={queryKey:t.queryKey,pageParam:M,direction:C?"backward":"forward",meta:t.options.meta};b(k);const F=await $(k),{maxPages:y}=t.options,D=C?og:ig;return{pages:D(E.pages,F,y),pageParams:D(E.pageParams,M,y)}};if(i&&o.length){const E=i==="backward",M=E?gd:ja,C={pages:o,pageParams:a},k=M(r,C);s=await x(C,k,E)}else{const E=e??o.length;do{const M=l===0?a[0]??r.initialPageParam:ja(r,s);if(l>0&&M==null)break;s=await x(s,M),l++}while(l<E)}return s};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function ja(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function gd(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function pg(e,t){return t?ja(e,t)!=null:!1}function mg(e,t){return!t||!e.getPreviousPageParam?!1:gd(e,t)!=null}var he,Kt,Bt,Jn,er,Ht,tr,nr,Wc,bg=(Wc=class{constructor(e={}){z(this,he);z(this,Kt);z(this,Bt);z(this,Jn);z(this,er);z(this,Ht);z(this,tr);z(this,nr);N(this,he,e.queryCache||new fg),N(this,Kt,e.mutationCache||new gg),N(this,Bt,e.defaultOptions||{}),N(this,Jn,new Map),N(this,er,new Map),N(this,Ht,0)}mount(){xi(this,Ht)._++,w(this,Ht)===1&&(N(this,tr,Vs.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,he).onFocus())})),N(this,nr,Ji.subscribe(async e=>{e&&(await this.resumePausedMutations(),w(this,he).onOnline())})))}unmount(){var e,t;xi(this,Ht)._--,w(this,Ht)===0&&((e=w(this,tr))==null||e.call(this),N(this,tr,void 0),(t=w(this,nr))==null||t.call(this),N(this,nr,void 0))}isFetching(e){return w(this,he).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return w(this,Kt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,he).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=w(this,he).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qn(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return w(this,he).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=w(this,he).get(r.queryHash),o=i==null?void 0:i.state.data,a=ng(t,o);if(a!==void 0)return w(this,he).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ge.batch(()=>w(this,he).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=w(this,he).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=w(this,he);ge.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=w(this,he),r={type:"active",...e};return ge.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ge.batch(()=>w(this,he).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(qe).catch(qe)}invalidateQueries(e,t={}){return ge.batch(()=>{if(w(this,he).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const n={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ge.batch(()=>w(this,he).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(qe)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(qe)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=w(this,he).build(this,t);return n.isStaleByTime(qn(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(qe).catch(qe)}fetchInfiniteQuery(e){return e.behavior=eo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(qe).catch(qe)}ensureInfiniteQueryData(e){return e.behavior=eo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ji.isOnline()?w(this,Kt).resumePausedMutations():Promise.resolve()}getQueryCache(){return w(this,he)}getMutationCache(){return w(this,Kt)}getDefaultOptions(){return w(this,Bt)}setDefaultOptions(e){N(this,Bt,e)}setQueryDefaults(e,t){w(this,Jn).set(en(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...w(this,Jn).values()],n={};return t.forEach(r=>{Ur(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){w(this,er).set(en(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...w(this,er).values()];let n={};return t.forEach(r=>{Ur(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...w(this,Bt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bs(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ie&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...w(this,Bt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){w(this,he).clear(),w(this,Kt).clear()}},he=new WeakMap,Kt=new WeakMap,Bt=new WeakMap,Jn=new WeakMap,er=new WeakMap,Ht=new WeakMap,tr=new WeakMap,nr=new WeakMap,Wc),ke,J,ii,Re,pn,rr,Vt,gt,oi,ir,or,mn,bn,zt,ar,te,Ir,_a,Ka,Ba,Ha,Va,za,Ua,pd,Gc,li=(Gc=class extends Mn{constructor(t,n){super();z(this,te);z(this,ke);z(this,J);z(this,ii);z(this,Re);z(this,pn);z(this,rr);z(this,Vt);z(this,gt);z(this,oi);z(this,ir);z(this,or);z(this,mn);z(this,bn);z(this,zt);z(this,ar,new Set);this.options=n,N(this,ke,t),N(this,gt,null),N(this,Vt,Na()),this.options.experimental_prefetchInRender||w(this,Vt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(w(this,J).addObserver(this),Bl(w(this,J),this.options)?G(this,te,Ir).call(this):this.updateResult(),G(this,te,Ha).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qa(w(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qa(w(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,G(this,te,Va).call(this),G(this,te,za).call(this),w(this,J).removeObserver(this)}setOptions(t,n){const r=this.options,i=w(this,J);if(this.options=w(this,ke).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof et(this.options.enabled,w(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");G(this,te,Ua).call(this),w(this,J).setOptions(this.options),r._defaulted&&!Xi(this.options,r)&&w(this,ke).getQueryCache().notify({type:"observerOptionsUpdated",query:w(this,J),observer:this});const o=this.hasListeners();o&&Hl(w(this,J),i,this.options,r)&&G(this,te,Ir).call(this),this.updateResult(n),o&&(w(this,J)!==i||et(this.options.enabled,w(this,J))!==et(r.enabled,w(this,J))||qn(this.options.staleTime,w(this,J))!==qn(r.staleTime,w(this,J)))&&G(this,te,_a).call(this);const a=G(this,te,Ka).call(this);o&&(w(this,J)!==i||et(this.options.enabled,w(this,J))!==et(r.enabled,w(this,J))||a!==w(this,zt))&&G(this,te,Ba).call(this,a)}getOptimisticResult(t){const n=w(this,ke).getQueryCache().build(w(this,ke),t),r=this.createResult(n,t);return yg(this,r)&&(N(this,Re,r),N(this,rr,this.options),N(this,pn,w(this,J).state)),r}getCurrentResult(){return w(this,Re)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){w(this,ar).add(t)}getCurrentQuery(){return w(this,J)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=w(this,ke).defaultQueryOptions(t),r=w(this,ke).getQueryCache().build(w(this,ke),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return G(this,te,Ir).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),w(this,Re)))}createResult(t,n){var y;const r=w(this,J),i=this.options,o=w(this,Re),a=w(this,pn),s=w(this,rr),u=t!==r?t.state:w(this,ii),{state:d}=t;let h={...d},g=!1,f;if(n._optimisticResults){const D=this.hasListeners(),P=!D&&Bl(t,n),T=D&&Hl(t,r,n,i);(P||T)&&(h={...h,...fd(d.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:b}=h;if(n.select&&h.data!==void 0)if(o&&h.data===(a==null?void 0:a.data)&&n.select===w(this,oi))f=w(this,ir);else try{N(this,oi,n.select),f=n.select(h.data),f=Ia(o==null?void 0:o.data,f,n),N(this,ir,f),N(this,gt,null)}catch(D){N(this,gt,D)}else f=h.data;if(n.placeholderData!==void 0&&f===void 0&&b==="pending"){let D;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))D=o.data;else if(D=typeof n.placeholderData=="function"?n.placeholderData((y=w(this,or))==null?void 0:y.state.data,w(this,or)):n.placeholderData,n.select&&D!==void 0)try{D=n.select(D),N(this,gt,null)}catch(P){N(this,gt,P)}D!==void 0&&(b="success",f=Ia(o==null?void 0:o.data,D,n),g=!0)}w(this,gt)&&(p=w(this,gt),f=w(this,ir),m=Date.now(),b="error");const $=h.fetchStatus==="fetching",x=b==="pending",E=b==="error",M=x&&$,C=f!==void 0,F={status:b,fetchStatus:h.fetchStatus,isPending:x,isSuccess:b==="success",isError:E,isInitialLoading:M,isLoading:M,data:f,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,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:$,isRefetching:$&&!x,isLoadingError:E&&!C,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:E&&C,isStale:zs(t,n),refetch:this.refetch,promise:w(this,Vt)};if(this.options.experimental_prefetchInRender){const D=L=>{F.status==="error"?L.reject(F.error):F.data!==void 0&&L.resolve(F.data)},P=()=>{const L=N(this,Vt,F.promise=Na());D(L)},T=w(this,Vt);switch(T.status){case"pending":t.queryHash===r.queryHash&&D(T);break;case"fulfilled":(F.status==="error"||F.data!==T.value)&&P();break;case"rejected":(F.status!=="error"||F.error!==T.reason)&&P();break}}return F}updateResult(t){const n=w(this,Re),r=this.createResult(w(this,J),this.options);if(N(this,pn,w(this,J).state),N(this,rr,this.options),w(this,pn).data!==void 0&&N(this,or,w(this,J)),Xi(r,n))return;N(this,Re,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!w(this,ar).size)return!0;const l=new Set(s??w(this,ar));return this.options.throwOnError&&l.add("error"),Object.keys(w(this,Re)).some(u=>{const d=u;return w(this,Re)[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),G(this,te,pd).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&G(this,te,Ha).call(this)}},ke=new WeakMap,J=new WeakMap,ii=new WeakMap,Re=new WeakMap,pn=new WeakMap,rr=new WeakMap,Vt=new WeakMap,gt=new WeakMap,oi=new WeakMap,ir=new WeakMap,or=new WeakMap,mn=new WeakMap,bn=new WeakMap,zt=new WeakMap,ar=new WeakMap,te=new WeakSet,Ir=function(t){G(this,te,Ua).call(this);let n=w(this,J).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(qe)),n},_a=function(){G(this,te,Va).call(this);const t=qn(this.options.staleTime,w(this,J));if(wn||w(this,Re).isStale||!La(t))return;const r=ad(w(this,Re).dataUpdatedAt,t)+1;N(this,mn,setTimeout(()=>{w(this,Re).isStale||this.updateResult()},r))},Ka=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(w(this,J)):this.options.refetchInterval)??!1},Ba=function(t){G(this,te,za).call(this),N(this,zt,t),!(wn||et(this.options.enabled,w(this,J))===!1||!La(w(this,zt))||w(this,zt)===0)&&N(this,bn,setInterval(()=>{(this.options.refetchIntervalInBackground||Vs.isFocused())&&G(this,te,Ir).call(this)},w(this,zt)))},Ha=function(){G(this,te,_a).call(this),G(this,te,Ba).call(this,G(this,te,Ka).call(this))},Va=function(){w(this,mn)&&(clearTimeout(w(this,mn)),N(this,mn,void 0))},za=function(){w(this,bn)&&(clearInterval(w(this,bn)),N(this,bn,void 0))},Ua=function(){const t=w(this,ke).getQueryCache().build(w(this,ke),this.options);if(t===w(this,J))return;const n=w(this,J);N(this,J,t),N(this,ii,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},pd=function(t){ge.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(w(this,Re))}),w(this,ke).getQueryCache().notify({query:w(this,J),type:"observerResultsUpdated"})})},Gc);function vg(e,t){return et(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Bl(e,t){return vg(e,t)||e.state.data!==void 0&&qa(e,t,t.refetchOnMount)}function qa(e,t,n){if(et(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&zs(e,t)}return!1}function Hl(e,t,n,r){return(e!==t||et(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&zs(e,n)}function zs(e,t){return et(t.enabled,e)!==!1&&e.isStaleByTime(qn(t.staleTime,e))}function yg(e,t){return!Xi(e.getCurrentResult(),t)}function Vl(e,t){return e.filter(n=>!t.includes(n))}function wg(e,t,n){const r=e.slice(0);return r[t]=n,r}var sr,ze,vn,lr,Ue,Ut,ai,si,Ce,Wa,Ga,zi,Qa,Ya,Qc,xg=(Qc=class extends Mn{constructor(t,n,r){super();z(this,Ce);z(this,sr);z(this,ze);z(this,vn);z(this,lr);z(this,Ue);z(this,Ut);z(this,ai);z(this,si);N(this,sr,t),N(this,lr,r),N(this,vn,[]),N(this,Ue,[]),N(this,ze,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&w(this,Ue).forEach(t=>{t.subscribe(n=>{G(this,Ce,Qa).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,w(this,Ue).forEach(t=>{t.destroy()})}setQueries(t,n,r){N(this,vn,t),N(this,lr,n),ge.batch(()=>{const i=w(this,Ue),o=G(this,Ce,zi).call(this,w(this,vn));o.forEach(u=>u.observer.setOptions(u.defaultedQueryOptions,r));const a=o.map(u=>u.observer),s=a.map(u=>u.getCurrentResult()),l=a.some((u,d)=>u!==i[d]);i.length===a.length&&!l||(N(this,Ue,a),N(this,ze,s),this.hasListeners()&&(Vl(i,a).forEach(u=>{u.destroy()}),Vl(a,i).forEach(u=>{u.subscribe(d=>{G(this,Ce,Qa).call(this,u,d)})}),G(this,Ce,Ya).call(this)))})}getCurrentResult(){return w(this,ze)}getQueries(){return w(this,Ue).map(t=>t.getCurrentQuery())}getObservers(){return w(this,Ue)}getOptimisticResult(t,n){const i=G(this,Ce,zi).call(this,t).map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[i,o=>G(this,Ce,Ga).call(this,o??i,n),()=>G(this,Ce,Wa).call(this,i,t)]}},sr=new WeakMap,ze=new WeakMap,vn=new WeakMap,lr=new WeakMap,Ue=new WeakMap,Ut=new WeakMap,ai=new WeakMap,si=new WeakMap,Ce=new WeakSet,Wa=function(t,n){const r=G(this,Ce,zi).call(this,n);return r.map((i,o)=>{const a=t[o];return i.defaultedQueryOptions.notifyOnChangeProps?a:i.observer.trackResult(a,s=>{r.forEach(l=>{l.observer.trackProp(s)})})})},Ga=function(t,n){return n?((!w(this,Ut)||w(this,ze)!==w(this,si)||n!==w(this,ai))&&(N(this,ai,n),N(this,si,w(this,ze)),N(this,Ut,Hs(w(this,Ut),n(t)))),w(this,Ut)):t},zi=function(t){const n=new Map(w(this,Ue).map(i=>[i.options.queryHash,i])),r=[];return t.forEach(i=>{const o=w(this,sr).defaultQueryOptions(i),a=n.get(o.queryHash);a?r.push({defaultedQueryOptions:o,observer:a}):r.push({defaultedQueryOptions:o,observer:new li(w(this,sr),o)})}),r},Qa=function(t,n){const r=w(this,Ue).indexOf(t);r!==-1&&(N(this,ze,wg(w(this,ze),r,n)),G(this,Ce,Ya).call(this))},Ya=function(){var t;if(this.hasListeners()){const n=w(this,Ut),r=G(this,Ce,Ga).call(this,G(this,Ce,Wa).call(this,w(this,ze),w(this,vn)),(t=w(this,lr))==null?void 0:t.combine);n!==r&&ge.batch(()=>{this.listeners.forEach(i=>{i(w(this,ze))})})}},Qc),md=class extends li{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:eo()},t)}getOptimisticResult(e){return e.behavior=eo(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var p,m;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:s}=r,l=(m=(p=n.fetchMeta)==null?void 0:p.fetchMore)==null?void 0:m.direction,u=a&&l==="forward",d=i&&l==="forward",h=a&&l==="backward",g=i&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:pg(t,n.data),hasPreviousPage:mg(t,n.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:h,isFetchingPreviousPage:g,isRefetchError:s&&!u&&!h,isRefetching:o&&!d&&!g}}},qt,Wt,De,St,Rt,Ui,Za,Yc,Cg=(Yc=class extends Mn{constructor(n,r){super();z(this,Rt);z(this,qt);z(this,Wt);z(this,De);z(this,St);N(this,qt,n),this.setOptions(r),this.bindMethods(),G(this,Rt,Ui).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=w(this,qt).defaultMutationOptions(n),Xi(this.options,r)||w(this,qt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:w(this,De),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&en(r.mutationKey)!==en(this.options.mutationKey)?this.reset():((i=w(this,De))==null?void 0:i.state.status)==="pending"&&w(this,De).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=w(this,De))==null||n.removeObserver(this)}onMutationUpdate(n){G(this,Rt,Ui).call(this),G(this,Rt,Za).call(this,n)}getCurrentResult(){return w(this,Wt)}reset(){var n;(n=w(this,De))==null||n.removeObserver(this),N(this,De,void 0),G(this,Rt,Ui).call(this),G(this,Rt,Za).call(this)}mutate(n,r){var i;return N(this,St,r),(i=w(this,De))==null||i.removeObserver(this),N(this,De,w(this,qt).getMutationCache().build(w(this,qt),this.options)),w(this,De).addObserver(this),w(this,De).execute(n)}},qt=new WeakMap,Wt=new WeakMap,De=new WeakMap,St=new WeakMap,Rt=new WeakSet,Ui=function(){var r;const n=((r=w(this,De))==null?void 0:r.state)??hd();N(this,Wt,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Za=function(n){ge.batch(()=>{var r,i,o,a,s,l,u,d;if(w(this,St)&&this.hasListeners()){const h=w(this,Wt).variables,g=w(this,Wt).context;(n==null?void 0:n.type)==="success"?((i=(r=w(this,St)).onSuccess)==null||i.call(r,n.data,h,g),(a=(o=w(this,St)).onSettled)==null||a.call(o,n.data,null,h,g)):(n==null?void 0:n.type)==="error"&&((l=(s=w(this,St)).onError)==null||l.call(s,n.error,h,g),(d=(u=w(this,St)).onSettled)==null||d.call(u,void 0,n.error,h,g))}this.listeners.forEach(h=>{h(w(this,Wt))})})},Yc),bd=S.createContext(void 0),ui=e=>{const t=S.useContext(bd);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},$g=({client:e,children:t})=>(S.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(bd.Provider,{value:e,children:t})),vd=S.createContext(!1),yd=()=>S.useContext(vd);vd.Provider;function Sg(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Eg=S.createContext(Sg()),wd=()=>S.useContext(Eg);function xd(e,t){return typeof e=="function"?e(...t):!!e}function to(){}var Cd=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},$d=e=>{S.useEffect(()=>{e.clearReset()},[e])},Sd=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&xd(n,[e.error,r]),Us=(e,t)=>t.state.data===void 0,Ed=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},Pd=(e,t)=>e.isLoading&&e.isFetching&&!t,Xa=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,no=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Rd({queries:e,...t},n){const r=ui(n),i=yd(),o=wd(),a=S.useMemo(()=>e.map(p=>{const m=r.defaultQueryOptions(p);return m._optimisticResults=i?"isRestoring":"optimistic",m}),[e,r,i]);a.forEach(p=>{Ed(p),Cd(p,o)}),$d(o);const[s]=S.useState(()=>new xg(r,a,t)),[l,u,d]=s.getOptimisticResult(a,t.combine);S.useSyncExternalStore(S.useCallback(p=>i?to:s.subscribe(ge.batchCalls(p)),[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),S.useEffect(()=>{s.setQueries(a,t,{listeners:!1})},[a,t,s]);const g=l.some((p,m)=>Xa(a[m],p))?l.flatMap((p,m)=>{const b=a[m];if(b){const $=new li(r,b);if(Xa(b,p))return no(b,$,o);Pd(p,i)&&no(b,$,o)}return[]}):[];if(g.length>0)throw Promise.all(g);const f=l.find((p,m)=>{const b=a[m];return b&&Sd({result:p,errorResetBoundary:o,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash)})});if(f!=null&&f.error)throw f.error;return u(d())}function ko(e,t,n){var d,h,g,f,p;const r=ui(n),i=yd(),o=wd(),a=r.defaultQueryOptions(e);(h=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,a),a._optimisticResults=i?"isRestoring":"optimistic",Ed(a),Cd(a,o),$d(o);const s=!r.getQueryCache().get(a.queryHash),[l]=S.useState(()=>new t(r,a)),u=l.getOptimisticResult(a);if(S.useSyncExternalStore(S.useCallback(m=>{const b=i?to:l.subscribe(ge.batchCalls(m));return l.updateResult(),b},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),S.useEffect(()=>{l.setOptions(a,{listeners:!1})},[a,l]),Xa(a,u))throw no(a,l,o);if(Sd({result:u,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw u.error;if((f=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_afterQuery)==null||f.call(g,a,u),a.experimental_prefetchInRender&&!wn&&Pd(u,i)){const m=s?no(a,l,o):(p=r.getQueryCache().get(a.queryHash))==null?void 0:p.promise;m==null||m.catch(to).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?u:l.trackResult(u)}function Pg(e,t){return ko(e,li,t)}function Rg(e,t){return ko({...e,enabled:!0,suspense:!0,throwOnError:Us,placeholderData:void 0},li,t)}function Mg(e,t){return ko({...e,enabled:!0,suspense:!0,throwOnError:Us},md,t)}function kg(e,t){return Rd({...e,queries:e.queries.map(n=>({...n,suspense:!0,throwOnError:Us,enabled:!0,placeholderData:void 0}))},t)}function Dg(e,t){const n=ui(t);n.getQueryState(e.queryKey)||n.prefetchQuery(e)}function Tg(e,t){const n=ui(t);n.getQueryState(e.queryKey)||n.prefetchInfiniteQuery(e)}function Og(e,t){const n=ui(t),[r]=S.useState(()=>new Cg(n,e));S.useEffect(()=>{r.setOptions(e)},[r,e]);const i=S.useSyncExternalStore(S.useCallback(a=>r.subscribe(ge.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=S.useCallback((a,s)=>{r.mutate(a,s).catch(to)},[r]);if(i.error&&xd(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function Fg(e,t){return ko(e,md,t)}function qs(e){const t={subscribe(n){let r=null,i=!1,o=!1,a=!1;function s(){if(r===null){a=!0;return}o||(o=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(l){var u;i||(u=n.next)==null||u.call(n,l)},error(l){var u;i||(i=!0,(u=n.error)==null||u.call(n,l),s())},complete(){var l;i||(i=!0,(l=n.complete)==null||l.call(n),s())}}),a&&s(),{unsubscribe:s}},pipe(...n){return n.reduce(Lg,t)}};return t}function Lg(e,t){return t(e)}function Ag(e){const t=new AbortController;return new Promise((r,i)=>{let o=!1;function a(){o||(o=!0,s.unsubscribe())}t.signal.addEventListener("abort",()=>{i(t.signal.reason)});const s=e.subscribe({next(l){o=!0,r(l),a()},error(l){i(l)},complete(){t.abort(),a()}})})}function Ig(e){return t=>{let n=0,r=null;const i=[];function o(){r||(r=t.subscribe({next(s){var l;for(const u of i)(l=u.next)==null||l.call(u,s)},error(s){var l;for(const u of i)(l=u.error)==null||l.call(u,s)},complete(){var s;for(const l of i)(s=l.complete)==null||s.call(l)}}))}function a(){if(n===0&&r){const s=r;r=null,s.unsubscribe()}}return qs(s=>(n++,i.push(s),o(),{unsubscribe(){n--,a();const l=i.findIndex(u=>u===s);l>-1&&i.splice(l,1)}}))}}function Ng(e){return qs(t=>{function n(i=0,o=e.op){const a=e.links[i];if(!a)throw new Error("No more links to execute - did you forget to add an ending link?");return a({op:o,next(l){return n(i+1,l)}})}return n().subscribe(t)})}const Md=()=>{},zl=e=>{Object.freeze&&Object.freeze(e)};function kd(e,t,n){var r,i;const o=t.join(".");return(r=n)[i=o]??(r[i]=new Proxy(Md,{get(a,s){if(!(typeof s!="string"||s==="then"))return kd(e,[...t,s],n)},apply(a,s,l){const u=t[t.length-1];let d={args:l,path:t};return u==="call"?d={args:l.length>=2?[l[1]]:[],path:t.slice(0,-1)}:u==="apply"&&(d={args:l.length>=2?l[1]:[],path:t.slice(0,-1)}),zl(d.args),zl(d.path),e(d)}})),n[o]}const Do=e=>kd(e,[],Object.create(null)),Ws=e=>new Proxy(Md,{get(t,n){if(!(typeof n!="string"||n==="then"))return e(n)}});function xn(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}const jg=typeof Symbol=="function"&&!!Symbol.asyncIterator;function Dd(e){return jg&&xn(e)&&Symbol.asyncIterator in e}var Ul,ql;(Ul=Symbol).dispose??(Ul.dispose=Symbol());(ql=Symbol).asyncDispose??(ql.asyncDispose=Symbol());function _g(e,t){if("error"in e){const r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)}}}}class Yo extends Error{constructor(){super("Unable to transform response from server")}}function Kg(e,t){let n;try{n=_g(e,t)}catch{throw new Yo}if(!n.ok&&(!xn(n.error.error)||typeof n.error.error.code!="number"))throw new Yo;if(n.ok&&!xn(n.result))throw new Yo;return n}var Zc,Xc,Jc,ed,td,nd;typeof window>"u"||"Deno"in window||((Xc=(Zc=globalThis.process)==null?void 0:Zc.env)==null?void 0:Xc.NODE_ENV)==="test"||(ed=(Jc=globalThis.process)==null?void 0:Jc.env)!=null&&ed.JEST_WORKER_ID||(nd=(td=globalThis.process)==null?void 0:td.env)!=null&&nd.VITEST_WORKER_ID;function $i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bg(e){return e instanceof Yt||e instanceof Error&&e.name==="TRPCClientError"}function Hg(e){return xn(e)&&xn(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function Vg(e,t){return typeof e=="string"?e:xn(e)&&typeof e.message=="string"?e.message:t}class Yt extends Error{static from(t,n={}){const r=t;return Bg(r)?(n.meta&&(r.meta={...r.meta,...n.meta}),r):Hg(r)?new Yt(r.error.message,{...n,result:r}):new Yt(Vg(r,"Unknown error"),{...n,cause:r})}constructor(t,n){var i,o;const r=n==null?void 0:n.cause;super(t,{cause:r}),$i(this,"cause",void 0),$i(this,"shape",void 0),$i(this,"data",void 0),$i(this,"meta",void 0),this.meta=n==null?void 0:n.meta,this.cause=r,this.shape=(i=n==null?void 0:n.result)==null?void 0:i.error,this.data=(o=n==null?void 0:n.result)==null?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,Yt.prototype)}}function Zo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Td{$request(t){return Ng({links:this.links,op:{...t,context:t.context??{},id:++this.requestId}}).pipe(Ig())}async requestAsPromise(t){try{const n=this.$request(t);return(await Ag(n)).result.data}catch(n){throw Yt.from(n)}}query(t,n,r){return this.requestAsPromise({type:"query",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}mutation(t,n,r){return this.requestAsPromise({type:"mutation",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}subscription(t,n,r){return this.$request({type:"subscription",path:t,input:n,context:r.context,signal:r.signal}).subscribe({next(o){var a,s,l,u;switch(o.result.type){case"state":{(a=r.onConnectionStateChange)==null||a.call(r,o.result);break}case"started":{(s=r.onStarted)==null||s.call(r,{context:o.context});break}case"stopped":{(l=r.onStopped)==null||l.call(r);break}case"data":case void 0:{(u=r.onData)==null||u.call(r,o.result.data);break}}},error(o){var a;(a=r.onError)==null||a.call(r,o)},complete(){var o;(o=r.onComplete)==null||o.call(r)}})}constructor(t){Zo(this,"links",void 0),Zo(this,"runtime",void 0),Zo(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(n=>n(this.runtime))}}function zg(e){return new Td(e)}const Ug={query:"query",mutate:"mutation",subscribe:"subscription"},qg=e=>Ug[e];function Wg(e){const t=Do(({path:n,args:r})=>{const i=[...n],o=qg(i.pop()),a=i.join(".");return e[o](a,...r)});return Ws(n=>e.hasOwnProperty(n)?e[n]:n==="__untypedClient"?e:t[n])}function Gg(e){return e.__untypedClient}const Wl=e=>typeof e=="function";function Qg(e){if(e)return e;if(typeof window<"u"&&Wl(window.fetch))return window.fetch;if(typeof globalThis<"u"&&Wl(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const Gl=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function Ql(e){let t=null,n=null;const r=()=>{clearTimeout(n),n=null,t=null};function i(s){var d,h;const l=[[]];let u=0;for(;;){const g=s[u];if(!g)break;const f=l[l.length-1];if(g.aborted){(d=g.reject)==null||d.call(g,new Error("Aborted")),u++;continue}if(e.validate(f.concat(g).map(m=>m.key))){f.push(g),u++;continue}if(f.length===0){(h=g.reject)==null||h.call(g,new Error("Input is too big for a single dispatch")),u++;continue}l.push([])}return l}function o(){const s=i(t);r();for(const l of s){if(!l.length)continue;const u={items:l};for(const h of l)h.batch=u;e.fetch(u.items.map(h=>h.key)).then(async h=>{var g;await Promise.all(h.map(async(f,p)=>{var b,$;const m=u.items[p];try{const x=await Promise.resolve(f);(b=m.resolve)==null||b.call(m,x)}catch(x){($=m.reject)==null||$.call(m,x)}m.batch=null,m.reject=null,m.resolve=null}));for(const f of u.items)(g=f.reject)==null||g.call(f,new Error("Missing result")),f.batch=null}).catch(h=>{var g;for(const f of u.items)(g=f.reject)==null||g.call(f,h),f.batch=null})}}function a(s){const l={aborted:!1,key:s,batch:null,resolve:Gl,reject:Gl},u=new Promise((d,h)=>{l.reject=h,l.resolve=d,t||(t=[]),t.push(l)});return n||(n=setTimeout(o)),u}return{load:a}}function Yg(...e){const t=new AbortController,n=e.length;let r=0;const i=()=>{++r===n&&t.abort()};for(const o of e)o!=null&&o.aborted?i():o==null||o.addEventListener("abort",i,{once:!0});return t.signal}function Zg(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}function Xg(e){return{url:e.url.toString(),fetch:e.fetch,transformer:Zg(e.transformer),methodOverride:e.methodOverride}}function Jg(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[n]=r}return t}const ep={query:"GET",mutation:"POST",subscription:"PATCH"};function Od(e){return"input"in e?e.transformer.input.serialize(e.input):Jg(e.inputs.map(t=>e.transformer.input.serialize(t)))}const Fd=e=>{const t=e.url.split("?");let r=t[0].replace(/\/$/,"")+"/"+e.path;const i=[];if(t[1]&&i.push(t[1]),"inputs"in e&&i.push("batch=1"),e.type==="query"||e.type==="subscription"){const o=Od(e);o!==void 0&&e.methodOverride!=="POST"&&i.push(`input=${encodeURIComponent(JSON.stringify(o))}`)}return i.length&&(r+="?"+i.join("&")),r},tp=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=Od(e);return t!==void 0?JSON.stringify(t):void 0},np=e=>ap({...e,contentTypeHeader:"application/json",getUrl:Fd,getBody:tp});class rp extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}}const ip=e=>{var t;if(e!=null&&e.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new rp};async function op(e){ip(e.signal);const t=e.getUrl(e),n=e.getBody(e),{type:r}=e,i=await(async()=>{const a=await e.headers();return Symbol.iterator in a?Object.fromEntries(a):a})(),o={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0,...i};return Qg(e.fetch)(t,{method:e.methodOverride??ep[r],signal:e.signal,body:n,headers:o})}async function ap(e){const t={},n=await op(e);t.response=n;const r=await n.json();return t.responseJSON=r,{json:r,meta:t}}function sp(e){const t=Xg(e),n=e.maxURLLength??1/0;return()=>{const r=s=>({validate(l){if(n===1/0)return!0;const u=l.map(g=>g.path).join(","),d=l.map(g=>g.input);return Fd({...t,type:s,path:u,inputs:d,signal:null}).length<=n},async fetch(l){const u=l.map(m=>m.path).join(","),d=l.map(m=>m.input),h=Yg(...l.map(m=>m.signal)),g=await np({...t,path:u,inputs:d,type:s,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:l}):e.headers:{}},signal:h});return(Array.isArray(g.json)?g.json:l.map(()=>g.json)).map(m=>({meta:g.meta,json:m}))}}),i=Ql(r("query")),o=Ql(r("mutation")),a={query:i,mutation:o};return({op:s})=>qs(l=>{/* istanbul ignore if -- @preserve */if(s.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const d=a[s.type].load(s);let h;return d.then(g=>{h=g;const f=Kg(g.json,t.transformer.output);if(!f.ok){l.error(Yt.from(f.error,{meta:g.meta}));return}l.next({context:g.meta,result:f.result}),l.complete()}).catch(g=>{l.error(Yt.from(g,{meta:h==null?void 0:h.meta}))}),()=>{}})}}var ro=function(){return ro=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ro.apply(this,arguments)};function lp(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function up(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(d){try{u(r.next(d))}catch(h){a(h)}}function l(d){try{u(r.throw(d))}catch(h){a(h)}}function u(d){d.done?o(d.value):i(d.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function cp(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(d){return l([u,d])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function yn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function ct(e,t,n){const r=e.flatMap(i=>i.split("."));if(!t&&(!n||n==="any"))return r.length?[r]:[];if(n==="infinite"&&xn(t)&&("direction"in t||"cursor"in t)){const{cursor:i,direction:o,...a}=t;return[r,{input:a,type:"infinite"}]}return[r,{...typeof t<"u"&&t!==Ie&&{input:t},...n&&n!=="any"&&{type:n}}]}function qi(e){return ct(e,void 0,"any")}function dp(e){return Do(({path:t,args:n})=>{const r=[...t],i=r.pop();if(i==="useMutation")return e[i](r,...n);if(i==="_def")return{path:r};const[o,...a]=n,s=a[0]||{};return e[i](r,o,s)})}const fp=["client","ssrContext","ssrState","abortOnUnmount"];var rd;const hp=(rd=S.createContext)==null?void 0:rd.call(S,null),gp=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function pp(e){return Do(t=>{const n=[...t.path],r=n.pop(),i=[...t.args],o=i.shift(),a=gp(r),s=ct(n,o,a);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(n,s,i[0]),queryOptions:()=>e.queryOptions(n,s,...i),fetch:()=>e.fetchQuery(s,...i),fetchInfinite:()=>e.fetchInfiniteQuery(s,i[0]),prefetch:()=>e.prefetchQuery(s,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(s,i[0]),ensureData:()=>e.ensureQueryData(s,...i),invalidate:()=>e.invalidateQueries(s,...i),reset:()=>e.resetQueries(s,...i),refetch:()=>e.refetchQueries(s,...i),cancel:()=>e.cancelQuery(s,...i),setData:()=>{e.setQueryData(s,i[0],i[1])},setQueriesData:()=>e.setQueriesData(s,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(s,i[0],i[1])},getData:()=>e.getQueryData(s),getInfiniteData:()=>e.getInfiniteQueryData(s),setMutationDefaults:()=>e.setMutationDefaults(qi(n),o),getMutationDefaults:()=>e.getMutationDefaults(qi(n)),isMutating:()=>e.isMutating({mutationKey:qi(n)})}[r]()})}function mp(e){const t=Wg(e.client),n=pp(e);return Ws(r=>{const i=r;return i==="client"?t:fp.includes(i)?e[i]:n[r]})}function Me(e,t,n){var o;const r=e[0];let i=(o=e[1])==null?void 0:o.input;return n&&(i={...i??{},...n.pageParam?{cursor:n.pageParam}:{},direction:n.direction}),[r.join("."),i,t==null?void 0:t.trpc]}function Ja(e){return{path:e.path.join(".")}}function Pr(e){const t=Ja(e);return S.useMemo(()=>t,[t])}async function Ld(e,t,n){const i=t.getQueryCache().build(t,{queryKey:n});i.setState({data:[],status:"success"});const o=[];for await(const a of e)o.push(a),i.setState({data:[...o]});return o}function bp(e){const{client:t,queryClient:n}=e,r=t instanceof Td?t:Gg(t);return{infiniteQueryOptions:(i,o,a)=>{var u;const s=((u=o[1])==null?void 0:u.input)===Ie,l=async d=>{var f;const h={...a,trpc:{...a==null?void 0:a.trpc,...(f=a==null?void 0:a.trpc)!=null&&f.abortOnUnmount?{signal:d.signal}:{signal:null}}};return await r.query(...Me(o,h,{direction:d.direction,pageParam:d.pageParam}))};return Object.assign({...a,initialData:a==null?void 0:a.initialData,queryKey:o,queryFn:s?Ie:l,initialPageParam:(a==null?void 0:a.initialCursor)??null},{trpc:Ja({path:i})})},queryOptions:(i,o,a)=>{var u;const s=((u=o[1])==null?void 0:u.input)===Ie,l=async d=>{var f;const h={...a,trpc:{...a==null?void 0:a.trpc,...(f=a==null?void 0:a.trpc)!=null&&f.abortOnUnmount?{signal:d.signal}:{signal:null}}},g=await r.query(...Me(o,h));return Dd(g)?Ld(g,n,o):g};return Object.assign({...a,initialData:a==null?void 0:a.initialData,queryKey:o,queryFn:s?Ie:l},{trpc:Ja({path:i})})},fetchQuery:(i,o)=>n.fetchQuery({...o,queryKey:i,queryFn:()=>r.query(...Me(i,o))}),fetchInfiniteQuery:(i,o)=>n.fetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:a,direction:s})=>r.query(...Me(i,o,{pageParam:a,direction:s})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),prefetchQuery:(i,o)=>n.prefetchQuery({...o,queryKey:i,queryFn:()=>r.query(...Me(i,o))}),prefetchInfiniteQuery:(i,o)=>n.prefetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:a,direction:s})=>r.query(...Me(i,o,{pageParam:a,direction:s})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),ensureQueryData:(i,o)=>n.ensureQueryData({...o,queryKey:i,queryFn:()=>r.query(...Me(i,o))}),invalidateQueries:(i,o,a)=>n.invalidateQueries({...o,queryKey:i},a),resetQueries:(i,o,a)=>n.resetQueries({...o,queryKey:i},a),refetchQueries:(i,o,a)=>n.refetchQueries({...o,queryKey:i},a),cancelQuery:(i,o)=>n.cancelQueries({queryKey:i},o),setQueryData:(i,o,a)=>n.setQueryData(i,o,a),setQueriesData:(i,o,a,s)=>n.setQueriesData({...o,queryKey:i},a,s),getQueryData:i=>n.getQueryData(i),setInfiniteQueryData:(i,o,a)=>n.setQueryData(i,o,a),getInfiniteQueryData:i=>n.getQueryData(i),setMutationDefaults:(i,o)=>{const a=i[0],s=l=>r.mutation(...Me([a,{input:l}],e));return n.setMutationDefaults(i,typeof o=="function"?o({canonicalMutationFn:s}):o)},getMutationDefaults:i=>n.getMutationDefaults(i),isMutating:i=>n.isMutating({...i,exact:!0})}}function Yl(e){return Do(t=>{const n=t.path,r=n.join("."),[i,o]=t.args;return{queryKey:ct(n,i,"query"),queryFn:()=>e.query(r,i,o==null?void 0:o.trpc),...o}})}const Zl=(e,t)=>new Proxy(e,{get(r,i){return t(i),r[i]}});function vp(e){var $,x;const t=((x=($=e==null?void 0:e.overrides)==null?void 0:$.useMutation)==null?void 0:x.onSuccess)??(E=>E.originalFn()),n=(e==null?void 0:e.context)??hp,r=E=>zg(E),i=E=>{const{abortOnUnmount:M=!1,client:C,queryClient:k,ssrContext:F}=E,[y,D]=S.useState(E.ssrState??!1),P=S.useMemo(()=>bp({client:C,queryClient:k}),[C,k]),T=S.useMemo(()=>({abortOnUnmount:M,queryClient:k,client:C,ssrContext:F??null,ssrState:y,...P}),[M,C,P,k,F,y]);return S.useEffect(()=>{D(L=>L?"mounted":!1)},[]),S.createElement(n.Provider,{value:T},E.children)};function o(){const E=S.useContext(n);if(!E)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return E}function a(E,M){var F;const{queryClient:C,ssrState:k}=o();return k&&k!=="mounted"&&((F=C.getQueryCache().find({queryKey:E}))==null?void 0:F.state.status)==="error"?{retryOnMount:!1,...M}:M}function s(E,M,C){var W,B;const k=o(),{abortOnUnmount:F,client:y,ssrState:D,queryClient:P,prefetchQuery:T}=k,L=ct(E,M,"query"),R=P.getQueryDefaults(L),I=M===Ie;typeof window>"u"&&D==="prepass"&&((W=C==null?void 0:C.trpc)==null?void 0:W.ssr)!==!1&&((C==null?void 0:C.enabled)??(R==null?void 0:R.enabled))!==!1&&!I&&!P.getQueryCache().find({queryKey:L})&&T(L,C);const O=a(L,{...R,...C}),K=((B=C==null?void 0:C.trpc)==null?void 0:B.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??F,A=Pg({...O,queryKey:L,queryFn:I?M:async X=>{const q={...O,trpc:{...O==null?void 0:O.trpc,...K?{signal:X.signal}:{signal:null}}},j=await y.query(...Me(L,q));return Dd(j)?Ld(j,P,L):j}},P);return A.trpc=Pr({path:E}),A}function l(E,M,C){var P;const k=o(),F=ct(E,M,"query"),y=M===Ie,D=((P=C==null?void 0:C.trpc)==null?void 0:P.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??k.abortOnUnmount;Dg({...C,queryKey:F,queryFn:y?M:T=>{const L={trpc:{...C==null?void 0:C.trpc,...D?{signal:T.signal}:{}}};return k.client.query(...Me(F,L))}})}function u(E,M,C){var P;const k=o(),F=ct(E,M,"query"),y=((P=C==null?void 0:C.trpc)==null?void 0:P.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??k.abortOnUnmount,D=Rg({...C,queryKey:F,queryFn:T=>{const L={...C,trpc:{...C==null?void 0:C.trpc,...y?{signal:T.signal}:{signal:null}}};return k.client.query(...Me(F,L))}},k.queryClient);return D.trpc=Pr({path:E}),[D.data,D]}function d(E,M){const{client:C,queryClient:k}=o(),F=qi(E),y=k.defaultMutationOptions(k.getMutationDefaults(F)),D=Og({...M,mutationKey:F,mutationFn:P=>C.mutation(...Me([E,{input:P}],M)),onSuccess(...P){return t({originalFn:()=>{var L,R;return((L=M==null?void 0:M.onSuccess)==null?void 0:L.call(M,...P))??((R=y==null?void 0:y.onSuccess)==null?void 0:R.call(y,...P))},queryClient:k,meta:(M==null?void 0:M.meta)??(y==null?void 0:y.meta)??{}})}},k);return D.trpc=Pr({path:E}),D}/* istanbul ignore next -- @preserve */function h(E,M,C){const k=(C==null?void 0:C.enabled)??M!==Ie,F=en(ct(E,M,"any")),{client:y}=o(),D=S.useRef(C);D.current=C;const P=S.useRef(new Set([])),T=S.useCallback(B=>{P.current.add(B)},[]),L=S.useRef(null),R=S.useCallback(()=>{var q;if((q=L.current)==null||q.call(L),W(I),!k)return;let B=!1;const X=y.subscription(E.join("."),M??void 0,{onStarted:()=>{var j,H;B||((H=(j=D.current).onStarted)==null||H.call(j),W(U=>({...U,status:"pending",error:null})))},onData:j=>{var H,U;B||((U=(H=D.current).onData)==null||U.call(H,j),W(_=>({..._,status:"pending",data:j,error:null})))},onError:j=>{var H,U;B||((U=(H=D.current).onError)==null||U.call(H,j),W(_=>({..._,status:"error",error:j})))},onConnectionStateChange:j=>{const H={status:j.state,error:j.error};W(U=>({...U,...H}))}});L.current=()=>{B=!0,X.unsubscribe()}},[F,k]),I=S.useCallback(()=>k?{data:void 0,error:null,status:"connecting",reset:R}:{data:void 0,error:null,status:"idle",reset:R},[k,R]),O=S.useRef(I()),[K,A]=S.useState(Zl(O.current,T));K.reset=R;const W=S.useCallback(B=>{const X=O.current,q=O.current=B(X);let j=!1;for(const H of P.current)if(X[H]!==q[H]){j=!0;break}j&&A(Zl(q,T))},[T]);return S.useEffect(()=>{if(k)return R(),()=>{var B;(B=L.current)==null||B.call(L)}},[R,k]),K}function g(E,M,C){var A,W;const{client:k,ssrState:F,prefetchInfiniteQuery:y,queryClient:D,abortOnUnmount:P}=o(),T=ct(E,M,"infinite"),L=D.getQueryDefaults(T),R=M===Ie;typeof window>"u"&&F==="prepass"&&((A=C==null?void 0:C.trpc)==null?void 0:A.ssr)!==!1&&((C==null?void 0:C.enabled)??(L==null?void 0:L.enabled))!==!1&&!R&&!D.getQueryCache().find({queryKey:T})&&y(T,{...L,...C});const I=a(T,{...L,...C}),O=((W=C==null?void 0:C.trpc)==null?void 0:W.abortOnUnmount)??P,K=Fg({...I,initialPageParam:C.initialCursor??null,persister:C.persister,queryKey:T,queryFn:R?M:B=>{const X={...I,trpc:{...I==null?void 0:I.trpc,...O?{signal:B.signal}:{signal:null}}};return k.query(...Me(T,X,{pageParam:B.pageParam??C.initialCursor,direction:B.direction}))}},D);return K.trpc=Pr({path:E}),K}function f(E,M,C){var L;const k=o(),F=ct(E,M,"infinite"),y=k.queryClient.getQueryDefaults(F),D=M===Ie,P=a(F,{...y,...C}),T=((L=C==null?void 0:C.trpc)==null?void 0:L.abortOnUnmount)??k.abortOnUnmount;Tg({...C,initialPageParam:C.initialCursor??null,queryKey:F,queryFn:D?M:R=>{const I={...P,trpc:{...P==null?void 0:P.trpc,...T?{signal:R.signal}:{}}};return k.client.query(...Me(F,I,{pageParam:R.pageParam??C.initialCursor,direction:R.direction}))}})}function p(E,M,C){var L;const k=o(),F=ct(E,M,"infinite"),y=k.queryClient.getQueryDefaults(F),D=a(F,{...y,...C}),P=((L=C==null?void 0:C.trpc)==null?void 0:L.abortOnUnmount)??k.abortOnUnmount,T=Mg({...C,initialPageParam:C.initialCursor??null,queryKey:F,queryFn:R=>{const I={...D,trpc:{...D==null?void 0:D.trpc,...P?{signal:R.signal}:{}}};return k.client.query(...Me(F,I,{pageParam:R.pageParam??C.initialCursor,direction:R.direction}))}},k.queryClient);return T.trpc=Pr({path:E}),[T.data,T]}return{Provider:i,createClient:r,useContext:o,useUtils:o,useQuery:s,usePrefetchQuery:l,useSuspenseQuery:u,useQueries:E=>{var P;const{ssrState:M,queryClient:C,prefetchQuery:k,client:F}=o(),y=Yl(F),D=E(y);if(typeof window>"u"&&M==="prepass")for(const T of D){const L=T;((P=L.trpc)==null?void 0:P.ssr)!==!1&&!C.getQueryCache().find({queryKey:L.queryKey})&&k(L.queryKey,L)}return Rd({queries:D.map(T=>({...T,queryKey:T.queryKey}))},C)},useSuspenseQueries:E=>{const{queryClient:M,client:C}=o(),k=Yl(C),F=E(k),y=kg({queries:F.map(D=>({...D,queryFn:D.queryFn,queryKey:D.queryKey}))},M);return[y.map(D=>D.data),y]},useMutation:d,useSubscription:h,useInfiniteQuery:g,usePrefetchInfiniteQuery:f,useSuspenseInfiniteQuery:p}}function yp(e){const t=dp(e);return Ws(n=>n==="useContext"||n==="useUtils"?()=>{const r=e.useUtils();return S.useMemo(()=>mp(r),[r])}:e.hasOwnProperty(n)?e[n]:t[n])}function wp(e){const t=vp(e);return yp(t)}var be=wp({overrides:{useMutation:{onSuccess:function(e){return up(this,void 0,void 0,function(){return cp(this,function(t){switch(t.label){case 0:return[4,e.originalFn()];case 1:return t.sent(),[4,e.queryClient.invalidateQueries()];case 2:return t.sent(),[2]}})})}}}}),Gs={};Object.defineProperty(Gs,"__esModule",{value:!0});Gs.parse=Rp;Gs.serialize=Mp;const xp=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,Cp=/^[\u0021-\u003A\u003C-\u007E]*$/,$p=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,Sp=/^[\u0020-\u003A\u003D-\u007E]*$/,Ep=Object.prototype.toString,Pp=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function Rp(e,t){const n=new Pp,r=e.length;if(r<2)return n;const i=(t==null?void 0:t.decode)||kp;let o=0;do{const a=e.indexOf("=",o);if(a===-1)break;const s=e.indexOf(";",o),l=s===-1?r:s;if(a>l){o=e.lastIndexOf(";",a-1)+1;continue}const u=Xl(e,o,a),d=Jl(e,a,u),h=e.slice(u,d);if(n[h]===void 0){let g=Xl(e,a+1,l),f=Jl(e,l,g);const p=i(e.slice(g,f));n[h]=p}o=l+1}while(o<r);return n}function Xl(e,t,n){do{const r=e.charCodeAt(t);if(r!==32&&r!==9)return t}while(++t<n);return n}function Jl(e,t,n){for(;t>n;){const r=e.charCodeAt(--t);if(r!==32&&r!==9)return t+1}return n}function Mp(e,t,n){const r=(n==null?void 0:n.encode)||encodeURIComponent;if(!xp.test(e))throw new TypeError(`argument name is invalid: ${e}`);const i=r(t);if(!Cp.test(i))throw new TypeError(`argument val is invalid: ${t}`);let o=e+"="+i;if(!n)return o;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);o+="; Max-Age="+n.maxAge}if(n.domain){if(!$p.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);o+="; Domain="+n.domain}if(n.path){if(!Sp.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);o+="; Path="+n.path}if(n.expires){if(!Dp(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.partitioned&&(o+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return o}function kp(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function Dp(e){return Ep.call(e)==="[object Date]"}/**
10
- * react-router v7.0.2
9
+ */var Vg=Symbol.for("react.transitional.element"),zg=Symbol.for("react.fragment");function Ad(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:Vg,type:e,key:r,ref:t!==void 0?t:null,props:n}}Yo.Fragment=zg;Yo.jsx=Ad;Yo.jsxs=Ad;Nd.exports=Yo;var y=Nd.exports,jn=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ln=typeof window>"u"||"Deno"in globalThis;function ke(){}function Ug(e,t){return typeof e=="function"?e(t):e}function os(e){return typeof e=="number"&&e>=0&&e!==1/0}function _d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function or(e,t){return typeof e=="function"?e(t):e}function gt(e,t){return typeof e=="function"?e(t):e}function du(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==cl(a,t.options))return!1}else if(!li(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function fu(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(cn(t.options.mutationKey)!==cn(o))return!1}else if(!li(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function cl(e,t){return((t==null?void 0:t.queryKeyHashFn)||cn)(e)}function cn(e){return JSON.stringify(e,(t,n)=>as(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function li(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>li(e[n],t[n])):!1}function dl(e,t){if(e===t)return e;const n=hu(e)&&hu(t);if(n||as(e)&&as(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let l=0;for(let u=0;u<a;u++){const g=n?u:o[u];(!n&&r.includes(g)||n)&&e[g]===void 0&&t[g]===void 0?(s[g]=void 0,l++):(s[g]=dl(e[g],t[g]),s[g]===e[g]&&e[g]!==void 0&&l++)}return i===a&&l===i?e:s}return t}function bo(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function hu(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function as(e){if(!gu(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!gu(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function gu(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wg(e){return new Promise(t=>{setTimeout(t,e)})}function ss(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?dl(e,t):t}function qg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Gg(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ue=Symbol();function jd(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ue?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kd(e,t){return typeof e=="function"?e(...t):!!e}var En,Wt,cr,bd,Qg=(bd=class extends jn{constructor(){super();z(this,En);z(this,Wt);z(this,cr);B(this,cr,t=>{if(!Ln&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,Wt)||this.setEventListener(C(this,cr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Wt))==null||t.call(this),B(this,Wt,void 0))}setEventListener(t){var n;B(this,cr,t),(n=C(this,Wt))==null||n.call(this),B(this,Wt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,En)!==t&&(B(this,En,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,En)=="boolean"?C(this,En):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},En=new WeakMap,Wt=new WeakMap,cr=new WeakMap,bd),fl=new Qg,dr,qt,fr,vd,Yg=(vd=class extends jn{constructor(){super();z(this,dr,!0);z(this,qt);z(this,fr);B(this,fr,t=>{if(!Ln&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){C(this,qt)||this.setEventListener(C(this,fr))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,qt))==null||t.call(this),B(this,qt,void 0))}setEventListener(t){var n;B(this,fr,t),(n=C(this,qt))==null||n.call(this),B(this,qt,t(this.setOnline.bind(this)))}setOnline(t){C(this,dr)!==t&&(B(this,dr,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,dr)}},dr=new WeakMap,qt=new WeakMap,fr=new WeakMap,vd),vo=new Yg;function ls(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function Xg(e){return Math.min(1e3*2**e,3e4)}function Bd(e){return(e??"online")==="online"?vo.isOnline():!0}var Hd=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function $a(e){return e instanceof Hd}function Vd(e){let t=!1,n=0,r=!1,i;const o=ls(),a=m=>{var b;r||(h(new Hd(m)),(b=e.abort)==null||b.call(e))},s=()=>{t=!0},l=()=>{t=!1},u=()=>fl.isFocused()&&(e.networkMode==="always"||vo.isOnline())&&e.canRun(),g=()=>Bd(e.networkMode)&&e.canRun(),c=m=>{var b;r||(r=!0,(b=e.onSuccess)==null||b.call(e,m),i==null||i(),o.resolve(m))},h=m=>{var b;r||(r=!0,(b=e.onError)==null||b.call(e,m),i==null||i(),o.reject(m))},f=()=>new Promise(m=>{var b;i=v=>{(r||u())&&m(v)},(b=e.onPause)==null||b.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(r)return;let m;const b=n===0?e.initialPromise:void 0;try{m=b??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(c).catch(v=>{var R;if(r)return;const w=e.retry??(Ln?0:3),x=e.retryDelay??Xg,k=typeof x=="function"?x(n,v):x,S=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,v);if(t||!S){h(v);return}n++,(R=e.onFail)==null||R.call(e,n,v),Wg(k).then(()=>u()?void 0:f()).then(()=>{t?h(v):p()})})};return{promise:o,cancel:a,continue:()=>(i==null||i(),o),cancelRetry:s,continueRetry:l,canStart:g,start:()=>(g()?p():f().then(p),o)}}var Zg=e=>setTimeout(e,0);function Jg(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=Zg;const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(l=>{n(l)})})})};return{batch:s=>{let l;t++;try{l=s()}finally{t--,t||a()}return l},batchCalls:s=>(...l)=>{o(()=>{s(...l)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var ge=Jg(),Pn,yd,zd=(yd=class{constructor(){z(this,Pn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),os(this.gcTime)&&B(this,Pn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ln?1/0:5*60*1e3))}clearGcTimeout(){C(this,Pn)&&(clearTimeout(C(this,Pn)),B(this,Pn,void 0))}},Pn=new WeakMap,yd),hr,gr,tt,Rn,Me,xi,Mn,dt,Ft,wd,ep=(wd=class extends zd{constructor(t){super();z(this,dt);z(this,hr);z(this,gr);z(this,tt);z(this,Rn);z(this,Me);z(this,xi);z(this,Mn);B(this,Mn,!1),B(this,xi,t.defaultOptions),this.setOptions(t.options),this.observers=[],B(this,Rn,t.client),B(this,tt,C(this,Rn).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,B(this,hr,tp(this.options)),this.state=t.state??C(this,hr),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,Me))==null?void 0:t.promise}setOptions(t){this.options={...C(this,xi),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,tt).remove(this)}setData(t,n){const r=ss(this.state.data,t,this.options);return G(this,dt,Ft).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){G(this,dt,Ft).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=C(this,Me))==null?void 0:r.promise;return(i=C(this,Me))==null||i.cancel(t),n?n.then(ke).catch(ke):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(C(this,hr))}isActive(){return this.observers.some(t=>gt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ue||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!_d(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Me))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,Me))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,tt).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,Me)&&(C(this,Mn)?C(this,Me).cancel({revert:!0}):C(this,Me).cancelRetry()),this.scheduleGc()),C(this,tt).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||G(this,dt,Ft).call(this,{type:"invalidate"})}fetch(t,n){var l,u,g;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,Me))return C(this,Me).continueRetry(),C(this,Me).promise}if(t&&this.setOptions(t),!this.options.queryFn){const c=this.observers.find(h=>h.options.queryFn);c&&this.setOptions(c.options)}const r=new AbortController,i=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(B(this,Mn,!0),r.signal)})},o=()=>{const c=jd(this.options,n),h={client:C(this,Rn),queryKey:this.queryKey,meta:this.meta};return i(h),B(this,Mn,!1),this.options.persister?this.options.persister(c,h,this):c(h)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,Rn),state:this.state,fetchFn:o};i(a),(l=this.options.behavior)==null||l.onFetch(a,this),B(this,gr,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=a.fetchOptions)==null?void 0:u.meta))&&G(this,dt,Ft).call(this,{type:"fetch",meta:(g=a.fetchOptions)==null?void 0:g.meta});const s=c=>{var h,f,p,m;$a(c)&&c.silent||G(this,dt,Ft).call(this,{type:"error",error:c}),$a(c)||((f=(h=C(this,tt).config).onError)==null||f.call(h,c,this),(m=(p=C(this,tt).config).onSettled)==null||m.call(p,this.state.data,c,this)),this.scheduleGc()};return B(this,Me,Vd({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:c=>{var h,f,p,m;if(c===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(c)}catch(b){s(b);return}(f=(h=C(this,tt).config).onSuccess)==null||f.call(h,c,this),(m=(p=C(this,tt).config).onSettled)==null||m.call(p,c,this.state.error,this),this.scheduleGc()},onError:s,onFail:(c,h)=>{G(this,dt,Ft).call(this,{type:"failed",failureCount:c,error:h})},onPause:()=>{G(this,dt,Ft).call(this,{type:"pause"})},onContinue:()=>{G(this,dt,Ft).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),C(this,Me).start()}},hr=new WeakMap,gr=new WeakMap,tt=new WeakMap,Rn=new WeakMap,Me=new WeakMap,xi=new WeakMap,Mn=new WeakMap,dt=new WeakSet,Ft=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ud(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return $a(i)&&i.revert&&C(this,gr)?{...C(this,gr),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ge.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,tt).notify({query:this,type:"updated",action:t})})},wd);function Ud(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Bd(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function tp(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var $t,xd,np=(xd=class extends jn{constructor(t={}){super();z(this,$t);this.config=t,B(this,$t,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??cl(i,n);let a=this.get(o);return a||(a=new ep({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){C(this,$t).has(t.queryHash)||(C(this,$t).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,$t).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,$t).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){ge.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,$t).get(t)}getAll(){return[...C(this,$t).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>du(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>du(t,r)):n}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ge.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){ge.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$t=new WeakMap,xd),Et,Oe,kn,Pt,zt,Cd,rp=(Cd=class extends zd{constructor(t){super();z(this,Pt);z(this,Et);z(this,Oe);z(this,kn);this.mutationId=t.mutationId,B(this,Oe,t.mutationCache),B(this,Et,[]),this.state=t.state||Wd(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Et).includes(t)||(C(this,Et).push(t),this.clearGcTimeout(),C(this,Oe).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){B(this,Et,C(this,Et).filter(n=>n!==t)),this.scheduleGc(),C(this,Oe).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Et).length||(this.state.status==="pending"?this.scheduleGc():C(this,Oe).remove(this))}continue(){var t;return((t=C(this,kn))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,a,s,l,u,g,c,h,f,p,m,b,v,w,x,k,S,R,P,I;const n=()=>{G(this,Pt,zt).call(this,{type:"continue"})};B(this,kn,Vd({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(D,L)=>{G(this,Pt,zt).call(this,{type:"failed",failureCount:D,error:L})},onPause:()=>{G(this,Pt,zt).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Oe).canRun(this)}));const r=this.state.status==="pending",i=!C(this,kn).canStart();try{if(r)n();else{G(this,Pt,zt).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(o=C(this,Oe).config).onMutate)==null?void 0:a.call(o,t,this));const L=await((l=(s=this.options).onMutate)==null?void 0:l.call(s,t));L!==this.state.context&&G(this,Pt,zt).call(this,{type:"pending",context:L,variables:t,isPaused:i})}const D=await C(this,kn).start();return await((g=(u=C(this,Oe).config).onSuccess)==null?void 0:g.call(u,D,t,this.state.context,this)),await((h=(c=this.options).onSuccess)==null?void 0:h.call(c,D,t,this.state.context)),await((p=(f=C(this,Oe).config).onSettled)==null?void 0:p.call(f,D,null,this.state.variables,this.state.context,this)),await((b=(m=this.options).onSettled)==null?void 0:b.call(m,D,null,t,this.state.context)),G(this,Pt,zt).call(this,{type:"success",data:D}),D}catch(D){try{throw await((w=(v=C(this,Oe).config).onError)==null?void 0:w.call(v,D,t,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,D,t,this.state.context)),await((R=(S=C(this,Oe).config).onSettled)==null?void 0:R.call(S,void 0,D,this.state.variables,this.state.context,this)),await((I=(P=this.options).onSettled)==null?void 0:I.call(P,void 0,D,t,this.state.context)),D}finally{G(this,Pt,zt).call(this,{type:"error",error:D})}}finally{C(this,Oe).runNext(this)}}},Et=new WeakMap,Oe=new WeakMap,kn=new WeakMap,Pt=new WeakSet,zt=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,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{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),ge.batch(()=>{C(this,Et).forEach(r=>{r.onMutationUpdate(t)}),C(this,Oe).notify({mutation:this,type:"updated",action:t})})},Cd);function Wd(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var It,ft,Ci,Sd,ip=(Sd=class extends jn{constructor(t={}){super();z(this,It);z(this,ft);z(this,Ci);this.config=t,B(this,It,new Set),B(this,ft,new Map),B(this,Ci,0)}build(t,n,r){const i=new rp({mutationCache:this,mutationId:++Ki(this,Ci)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){C(this,It).add(t);const n=Bi(t);if(typeof n=="string"){const r=C(this,ft).get(n);r?r.push(t):C(this,ft).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,It).delete(t)){const n=Bi(t);if(typeof n=="string"){const r=C(this,ft).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&C(this,ft).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Bi(t);if(typeof n=="string"){const r=C(this,ft).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=Bi(t);if(typeof n=="string"){const i=(r=C(this,ft).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){ge.batch(()=>{C(this,It).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,It).clear(),C(this,ft).clear()})}getAll(){return Array.from(C(this,It))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>fu(n,r))}findAll(t={}){return this.getAll().filter(n=>fu(t,n))}notify(t){ge.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return ge.batch(()=>Promise.all(t.map(n=>n.continue().catch(ke))))}},It=new WeakMap,ft=new WeakMap,Ci=new WeakMap,Sd);function Bi(e){var t;return(t=e.options.scope)==null?void 0:t.id}function yo(e){return{onFetch:(t,n)=>{var g,c,h,f,p;const r=t.options,i=(h=(c=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:c.fetchMore)==null?void 0:h.direction,o=((f=t.state.data)==null?void 0:f.pages)||[],a=((p=t.state.data)==null?void 0:p.pageParams)||[];let s={pages:[],pageParams:[]},l=0;const u=async()=>{let m=!1;const b=x=>{Object.defineProperty(x,"signal",{enumerable:!0,get:()=>(t.signal.aborted?m=!0:t.signal.addEventListener("abort",()=>{m=!0}),t.signal)})},v=jd(t.options,t.fetchOptions),w=async(x,k,S)=>{if(m)return Promise.reject();if(k==null&&x.pages.length)return Promise.resolve(x);const R={client:t.client,queryKey:t.queryKey,pageParam:k,direction:S?"backward":"forward",meta:t.options.meta};b(R);const P=await v(R),{maxPages:I}=t.options,D=S?Gg:qg;return{pages:D(x.pages,P,I),pageParams:D(x.pageParams,k,I)}};if(i&&o.length){const x=i==="backward",k=x?qd:us,S={pages:o,pageParams:a},R=k(r,S);s=await w(S,R,x)}else{const x=e??o.length;do{const k=l===0?a[0]??r.initialPageParam:us(r,s);if(l>0&&k==null)break;s=await w(s,k),l++}while(l<x)}return s};t.options.persister?t.fetchFn=()=>{var m,b;return(b=(m=t.options).persister)==null?void 0:b.call(m,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function us(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function qd(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}function op(e,t){return t?us(e,t)!=null:!1}function ap(e,t){return!t||!e.getPreviousPageParam?!1:qd(e,t)!=null}var he,Gt,Qt,pr,mr,Yt,br,vr,$d,sp=($d=class{constructor(e={}){z(this,he);z(this,Gt);z(this,Qt);z(this,pr);z(this,mr);z(this,Yt);z(this,br);z(this,vr);B(this,he,e.queryCache||new np),B(this,Gt,e.mutationCache||new ip),B(this,Qt,e.defaultOptions||{}),B(this,pr,new Map),B(this,mr,new Map),B(this,Yt,0)}mount(){Ki(this,Yt)._++,C(this,Yt)===1&&(B(this,br,fl.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,he).onFocus())})),B(this,vr,vo.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,he).onOnline())})))}unmount(){var e,t;Ki(this,Yt)._--,C(this,Yt)===0&&((e=C(this,br))==null||e.call(this),B(this,br,void 0),(t=C(this,vr))==null||t.call(this),B(this,vr,void 0))}isFetching(e){return C(this,he).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Gt).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,he).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,he).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(or(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,he).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=C(this,he).get(r.queryHash),o=i==null?void 0:i.state.data,a=Ug(t,o);if(a!==void 0)return C(this,he).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return ge.batch(()=>C(this,he).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,he).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,he);ge.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,he);return ge.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=ge.batch(()=>C(this,he).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ke).catch(ke)}invalidateQueries(e,t={}){return ge.batch(()=>(C(this,he).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=ge.batch(()=>C(this,he).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ke)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ke)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,he).build(this,t);return n.isStaleByTime(or(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ke).catch(ke)}fetchInfiniteQuery(e){return e.behavior=yo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ke).catch(ke)}ensureInfiniteQueryData(e){return e.behavior=yo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return vo.isOnline()?C(this,Gt).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,he)}getMutationCache(){return C(this,Gt)}getDefaultOptions(){return C(this,Qt)}setDefaultOptions(e){B(this,Qt,e)}setQueryDefaults(e,t){C(this,pr).set(cn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,pr).values()],n={};return t.forEach(r=>{li(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,mr).set(cn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,mr).values()],n={};return t.forEach(r=>{li(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Qt).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cl(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ue&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Qt).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,he).clear(),C(this,Gt).clear()}},he=new WeakMap,Gt=new WeakMap,Qt=new WeakMap,pr=new WeakMap,mr=new WeakMap,Yt=new WeakMap,br=new WeakMap,vr=new WeakMap,$d),Ie,J,Si,De,On,yr,Xt,Zt,$i,wr,xr,Dn,Tn,Jt,Cr,ie,Zr,cs,ds,fs,hs,gs,ps,ms,Gd,Ed,Mi=(Ed=class extends jn{constructor(t,n){super();z(this,ie);z(this,Ie);z(this,J);z(this,Si);z(this,De);z(this,On);z(this,yr);z(this,Xt);z(this,Zt);z(this,$i);z(this,wr);z(this,xr);z(this,Dn);z(this,Tn);z(this,Jt);z(this,Cr,new Set);this.options=n,B(this,Ie,t),B(this,Zt,null),B(this,Xt,ls()),this.options.experimental_prefetchInRender||C(this,Xt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,J).addObserver(this),pu(C(this,J),this.options)?G(this,ie,Zr).call(this):this.updateResult(),G(this,ie,hs).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return bs(C(this,J),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return bs(C(this,J),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,G(this,ie,gs).call(this),G(this,ie,ps).call(this),C(this,J).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,J);if(this.options=C(this,Ie).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof gt(this.options.enabled,C(this,J))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");G(this,ie,ms).call(this),C(this,J).setOptions(this.options),n._defaulted&&!bo(this.options,n)&&C(this,Ie).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,J),observer:this});const i=this.hasListeners();i&&mu(C(this,J),r,this.options,n)&&G(this,ie,Zr).call(this),this.updateResult(),i&&(C(this,J)!==r||gt(this.options.enabled,C(this,J))!==gt(n.enabled,C(this,J))||or(this.options.staleTime,C(this,J))!==or(n.staleTime,C(this,J)))&&G(this,ie,cs).call(this);const o=G(this,ie,ds).call(this);i&&(C(this,J)!==r||gt(this.options.enabled,C(this,J))!==gt(n.enabled,C(this,J))||o!==C(this,Jt))&&G(this,ie,fs).call(this,o)}getOptimisticResult(t){const n=C(this,Ie).getQueryCache().build(C(this,Ie),t),r=this.createResult(n,t);return up(this,r)&&(B(this,De,r),B(this,yr,this.options),B(this,On,C(this,J).state)),r}getCurrentResult(){return C(this,De)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),Reflect.get(r,i))})}trackProp(t){C(this,Cr).add(t)}getCurrentQuery(){return C(this,J)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Ie).defaultQueryOptions(t),r=C(this,Ie).getQueryCache().build(C(this,Ie),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return G(this,ie,Zr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,De)))}createResult(t,n){var D;const r=C(this,J),i=this.options,o=C(this,De),a=C(this,On),s=C(this,yr),u=t!==r?t.state:C(this,Si),{state:g}=t;let c={...g},h=!1,f;if(n._optimisticResults){const L=this.hasListeners(),E=!L&&pu(t,n),N=L&&mu(t,r,n,i);(E||N)&&(c={...c,...Ud(g.data,t.options)}),n._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:b}=c;f=c.data;let v=!1;if(n.placeholderData!==void 0&&f===void 0&&b==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData)?(L=o.data,v=!0):L=typeof n.placeholderData=="function"?n.placeholderData((D=C(this,xr))==null?void 0:D.state.data,C(this,xr)):n.placeholderData,L!==void 0&&(b="success",f=ss(o==null?void 0:o.data,L,n),h=!0)}if(n.select&&f!==void 0&&!v)if(o&&f===(a==null?void 0:a.data)&&n.select===C(this,$i))f=C(this,wr);else try{B(this,$i,n.select),f=n.select(f),f=ss(o==null?void 0:o.data,f,n),B(this,wr,f),B(this,Zt,null)}catch(L){B(this,Zt,L)}C(this,Zt)&&(p=C(this,Zt),f=C(this,wr),m=Date.now(),b="error");const w=c.fetchStatus==="fetching",x=b==="pending",k=b==="error",S=x&&w,R=f!==void 0,I={status:b,fetchStatus:c.fetchStatus,isPending:x,isSuccess:b==="success",isError:k,isInitialLoading:S,isLoading:S,data:f,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:k&&!R,isPaused:c.fetchStatus==="paused",isPlaceholderData:h,isRefetchError:k&&R,isStale:hl(t,n),refetch:this.refetch,promise:C(this,Xt)};if(this.options.experimental_prefetchInRender){const L=_=>{I.status==="error"?_.reject(I.error):I.data!==void 0&&_.resolve(I.data)},E=()=>{const _=B(this,Xt,I.promise=ls());L(_)},N=C(this,Xt);switch(N.status){case"pending":t.queryHash===r.queryHash&&L(N);break;case"fulfilled":(I.status==="error"||I.data!==N.value)&&E();break;case"rejected":(I.status!=="error"||I.error!==N.reason)&&E();break}}return I}updateResult(){const t=C(this,De),n=this.createResult(C(this,J),this.options);if(B(this,On,C(this,J).state),B(this,yr,this.options),C(this,On).data!==void 0&&B(this,xr,C(this,J)),bo(n,t))return;B(this,De,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!C(this,Cr).size)return!0;const a=new Set(o??C(this,Cr));return this.options.throwOnError&&a.add("error"),Object.keys(C(this,De)).some(s=>{const l=s;return C(this,De)[l]!==t[l]&&a.has(l)})};G(this,ie,Gd).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&G(this,ie,hs).call(this)}},Ie=new WeakMap,J=new WeakMap,Si=new WeakMap,De=new WeakMap,On=new WeakMap,yr=new WeakMap,Xt=new WeakMap,Zt=new WeakMap,$i=new WeakMap,wr=new WeakMap,xr=new WeakMap,Dn=new WeakMap,Tn=new WeakMap,Jt=new WeakMap,Cr=new WeakMap,ie=new WeakSet,Zr=function(t){G(this,ie,ms).call(this);let n=C(this,J).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ke)),n},cs=function(){G(this,ie,gs).call(this);const t=or(this.options.staleTime,C(this,J));if(Ln||C(this,De).isStale||!os(t))return;const r=_d(C(this,De).dataUpdatedAt,t)+1;B(this,Dn,setTimeout(()=>{C(this,De).isStale||this.updateResult()},r))},ds=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,J)):this.options.refetchInterval)??!1},fs=function(t){G(this,ie,ps).call(this),B(this,Jt,t),!(Ln||gt(this.options.enabled,C(this,J))===!1||!os(C(this,Jt))||C(this,Jt)===0)&&B(this,Tn,setInterval(()=>{(this.options.refetchIntervalInBackground||fl.isFocused())&&G(this,ie,Zr).call(this)},C(this,Jt)))},hs=function(){G(this,ie,cs).call(this),G(this,ie,fs).call(this,G(this,ie,ds).call(this))},gs=function(){C(this,Dn)&&(clearTimeout(C(this,Dn)),B(this,Dn,void 0))},ps=function(){C(this,Tn)&&(clearInterval(C(this,Tn)),B(this,Tn,void 0))},ms=function(){const t=C(this,Ie).getQueryCache().build(C(this,Ie),this.options);if(t===C(this,J))return;const n=C(this,J);B(this,J,t),B(this,Si,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Gd=function(t){ge.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,De))}),C(this,Ie).getQueryCache().notify({query:C(this,J),type:"observerResultsUpdated"})})},Ed);function lp(e,t){return gt(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function pu(e,t){return lp(e,t)||e.state.data!==void 0&&bs(e,t,t.refetchOnMount)}function bs(e,t,n){if(gt(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hl(e,t)}return!1}function mu(e,t,n,r){return(e!==t||gt(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&hl(e,n)}function hl(e,t){return gt(t.enabled,e)!==!1&&e.isStaleByTime(or(t.staleTime,e))}function up(e,t){return!bo(e.getCurrentResult(),t)}function bu(e,t){return e.filter(n=>!t.includes(n))}function cp(e,t,n){const r=e.slice(0);return r[t]=n,r}var Sr,nt,$r,Er,rt,en,Ei,Pi,Ri,Ee,vs,ys,ws,xs,Cs,Pd,dp=(Pd=class extends jn{constructor(t,n,r){super();z(this,Ee);z(this,Sr);z(this,nt);z(this,$r);z(this,Er);z(this,rt);z(this,en);z(this,Ei);z(this,Pi);z(this,Ri,[]);B(this,Sr,t),B(this,Er,r),B(this,$r,[]),B(this,rt,[]),B(this,nt,[]),this.setQueries(n)}onSubscribe(){this.listeners.size===1&&C(this,rt).forEach(t=>{t.subscribe(n=>{G(this,Ee,xs).call(this,t,n)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,C(this,rt).forEach(t=>{t.destroy()})}setQueries(t,n){B(this,$r,t),B(this,Er,n),ge.batch(()=>{const r=C(this,rt),i=G(this,Ee,ws).call(this,C(this,$r));B(this,Ri,i),i.forEach(l=>l.observer.setOptions(l.defaultedQueryOptions));const o=i.map(l=>l.observer),a=o.map(l=>l.getCurrentResult()),s=o.some((l,u)=>l!==r[u]);r.length===o.length&&!s||(B(this,rt,o),B(this,nt,a),this.hasListeners()&&(bu(r,o).forEach(l=>{l.destroy()}),bu(o,r).forEach(l=>{l.subscribe(u=>{G(this,Ee,xs).call(this,l,u)})}),G(this,Ee,Cs).call(this)))})}getCurrentResult(){return C(this,nt)}getQueries(){return C(this,rt).map(t=>t.getCurrentQuery())}getObservers(){return C(this,rt)}getOptimisticResult(t,n){const r=G(this,Ee,ws).call(this,t),i=r.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions));return[i,o=>G(this,Ee,ys).call(this,o??i,n),()=>G(this,Ee,vs).call(this,i,r)]}},Sr=new WeakMap,nt=new WeakMap,$r=new WeakMap,Er=new WeakMap,rt=new WeakMap,en=new WeakMap,Ei=new WeakMap,Pi=new WeakMap,Ri=new WeakMap,Ee=new WeakSet,vs=function(t,n){return n.map((r,i)=>{const o=t[i];return r.defaultedQueryOptions.notifyOnChangeProps?o:r.observer.trackResult(o,a=>{n.forEach(s=>{s.observer.trackProp(a)})})})},ys=function(t,n){return n?((!C(this,en)||C(this,nt)!==C(this,Pi)||n!==C(this,Ei))&&(B(this,Ei,n),B(this,Pi,C(this,nt)),B(this,en,dl(C(this,en),n(t)))),C(this,en)):t},ws=function(t){const n=new Map(C(this,rt).map(i=>[i.options.queryHash,i])),r=[];return t.forEach(i=>{const o=C(this,Sr).defaultQueryOptions(i),a=n.get(o.queryHash);a?r.push({defaultedQueryOptions:o,observer:a}):r.push({defaultedQueryOptions:o,observer:new Mi(C(this,Sr),o)})}),r},xs=function(t,n){const r=C(this,rt).indexOf(t);r!==-1&&(B(this,nt,cp(C(this,nt),r,n)),G(this,Ee,Cs).call(this))},Cs=function(){var t;if(this.hasListeners()){const n=C(this,en),r=G(this,Ee,vs).call(this,C(this,nt),C(this,Ri)),i=G(this,Ee,ys).call(this,r,(t=C(this,Er))==null?void 0:t.combine);n!==i&&ge.batch(()=>{this.listeners.forEach(o=>{o(C(this,nt))})})}},Pd),Qd=class extends Mi{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:yo()})}getOptimisticResult(e){return e.behavior=yo(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var p,m;const{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:o,isError:a,isRefetchError:s}=r,l=(m=(p=n.fetchMeta)==null?void 0:p.fetchMore)==null?void 0:m.direction,u=a&&l==="forward",g=i&&l==="forward",c=a&&l==="backward",h=i&&l==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:op(t,n.data),hasPreviousPage:ap(t,n.data),isFetchNextPageError:u,isFetchingNextPage:g,isFetchPreviousPageError:c,isFetchingPreviousPage:h,isRefetchError:s&&!u&&!c,isRefetching:o&&!g&&!h}}},tn,nn,Ne,Nt,_t,lo,Ss,Rd,fp=(Rd=class extends jn{constructor(n,r){super();z(this,_t);z(this,tn);z(this,nn);z(this,Ne);z(this,Nt);B(this,tn,n),this.setOptions(r),this.bindMethods(),G(this,_t,lo).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=C(this,tn).defaultMutationOptions(n),bo(this.options,r)||C(this,tn).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Ne),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&cn(r.mutationKey)!==cn(this.options.mutationKey)?this.reset():((i=C(this,Ne))==null?void 0:i.state.status)==="pending"&&C(this,Ne).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Ne))==null||n.removeObserver(this)}onMutationUpdate(n){G(this,_t,lo).call(this),G(this,_t,Ss).call(this,n)}getCurrentResult(){return C(this,nn)}reset(){var n;(n=C(this,Ne))==null||n.removeObserver(this),B(this,Ne,void 0),G(this,_t,lo).call(this),G(this,_t,Ss).call(this)}mutate(n,r){var i;return B(this,Nt,r),(i=C(this,Ne))==null||i.removeObserver(this),B(this,Ne,C(this,tn).getMutationCache().build(C(this,tn),this.options)),C(this,Ne).addObserver(this),C(this,Ne).execute(n)}},tn=new WeakMap,nn=new WeakMap,Ne=new WeakMap,Nt=new WeakMap,_t=new WeakSet,lo=function(){var r;const n=((r=C(this,Ne))==null?void 0:r.state)??Wd();B(this,nn,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Ss=function(n){ge.batch(()=>{var r,i,o,a,s,l,u,g;if(C(this,Nt)&&this.hasListeners()){const c=C(this,nn).variables,h=C(this,nn).context;(n==null?void 0:n.type)==="success"?((i=(r=C(this,Nt)).onSuccess)==null||i.call(r,n.data,c,h),(a=(o=C(this,Nt)).onSettled)==null||a.call(o,n.data,null,c,h)):(n==null?void 0:n.type)==="error"&&((l=(s=C(this,Nt)).onError)==null||l.call(s,n.error,c,h),(g=(u=C(this,Nt)).onSettled)==null||g.call(u,void 0,n.error,c,h))}this.listeners.forEach(c=>{c(C(this,nn))})})},Rd),Yd=$.createContext(void 0),ki=e=>{const t=$.useContext(Yd);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},hp=({client:e,children:t})=>($.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),y.jsx(Yd.Provider,{value:e,children:t})),Xd=$.createContext(!1),Zd=()=>$.useContext(Xd);Xd.Provider;function gp(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var pp=$.createContext(gp()),Jd=()=>$.useContext(pp),ef=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},tf=e=>{$.useEffect(()=>{e.clearReset()},[e])},nf=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||Kd(n,[e.error,r])),gl=(e,t)=>t.state.data===void 0,rf=e=>{const t=e.staleTime;e.suspense&&(e.staleTime=typeof t=="function"?(...n)=>Math.max(t(...n),1e3):Math.max(t??1e3,1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},of=(e,t)=>e.isLoading&&e.isFetching&&!t,$s=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,wo=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function af({queries:e,...t},n){const r=ki(n),i=Zd(),o=Jd(),a=$.useMemo(()=>e.map(m=>{const b=r.defaultQueryOptions(m);return b._optimisticResults=i?"isRestoring":"optimistic",b}),[e,r,i]);a.forEach(m=>{rf(m),ef(m,o)}),tf(o);const[s]=$.useState(()=>new dp(r,a,t)),[l,u,g]=s.getOptimisticResult(a,t.combine),c=!i&&t.subscribed!==!1;$.useSyncExternalStore($.useCallback(m=>c?s.subscribe(ge.batchCalls(m)):ke,[s,c]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),$.useEffect(()=>{s.setQueries(a,t)},[a,t,s]);const f=l.some((m,b)=>$s(a[b],m))?l.flatMap((m,b)=>{const v=a[b];if(v){const w=new Mi(r,v);if($s(v,m))return wo(v,w,o);of(m,i)&&wo(v,w,o)}return[]}):[];if(f.length>0)throw Promise.all(f);const p=l.find((m,b)=>{const v=a[b];return v&&nf({result:m,errorResetBoundary:o,throwOnError:v.throwOnError,query:r.getQueryCache().get(v.queryHash),suspense:v.suspense})});if(p!=null&&p.error)throw p.error;return u(g())}function Xo(e,t,n){var c,h,f,p,m;const r=ki(n),i=Zd(),o=Jd(),a=r.defaultQueryOptions(e);(h=(c=r.getDefaultOptions().queries)==null?void 0:c._experimental_beforeQuery)==null||h.call(c,a),a._optimisticResults=i?"isRestoring":"optimistic",rf(a),ef(a,o),tf(o);const s=!r.getQueryCache().get(a.queryHash),[l]=$.useState(()=>new t(r,a)),u=l.getOptimisticResult(a),g=!i&&e.subscribed!==!1;if($.useSyncExternalStore($.useCallback(b=>{const v=g?l.subscribe(ge.batchCalls(b)):ke;return l.updateResult(),v},[l,g]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),$.useEffect(()=>{l.setOptions(a)},[a,l]),$s(a,u))throw wo(a,l,o);if(nf({result:u,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash),suspense:a.suspense}))throw u.error;if((p=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||p.call(f,a,u),a.experimental_prefetchInRender&&!Ln&&of(u,i)){const b=s?wo(a,l,o):(m=r.getQueryCache().get(a.queryHash))==null?void 0:m.promise;b==null||b.catch(ke).finally(()=>{l.updateResult()})}return a.notifyOnChangeProps?u:l.trackResult(u)}function mp(e,t){return Xo(e,Mi,t)}function bp(e,t){return Xo({...e,enabled:!0,suspense:!0,throwOnError:gl,placeholderData:void 0},Mi,t)}function vp(e,t){return Xo({...e,enabled:!0,suspense:!0,throwOnError:gl},Qd,t)}function yp(e,t){return af({...e,queries:e.queries.map(n=>({...n,suspense:!0,throwOnError:gl,enabled:!0,placeholderData:void 0}))},t)}function wp(e,t){const n=ki(t);n.getQueryState(e.queryKey)||n.prefetchQuery(e)}function xp(e,t){const n=ki(t);n.getQueryState(e.queryKey)||n.prefetchInfiniteQuery(e)}function Cp(e,t){const n=ki(t),[r]=$.useState(()=>new fp(n,e));$.useEffect(()=>{r.setOptions(e)},[r,e]);const i=$.useSyncExternalStore($.useCallback(a=>r.subscribe(ge.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=$.useCallback((a,s)=>{r.mutate(a,s).catch(ke)},[r]);if(i.error&&Kd(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}function Sp(e,t){return Xo(e,Qd,t)}function Zo(e){const t={subscribe(n){let r=null,i=!1,o=!1,a=!1;function s(){if(r===null){a=!0;return}o||(o=!0,typeof r=="function"?r():r&&r.unsubscribe())}return r=e({next(l){var u;i||(u=n.next)==null||u.call(n,l)},error(l){var u;i||(i=!0,(u=n.error)==null||u.call(n,l),s())},complete(){var l;i||(i=!0,(l=n.complete)==null||l.call(n),s())}}),a&&s(),{unsubscribe:s}},pipe(...n){return n.reduce($p,t)}};return t}function $p(e,t){return t(e)}function Ep(e){const t=new AbortController;return new Promise((r,i)=>{let o=!1;function a(){o||(o=!0,s.unsubscribe())}t.signal.addEventListener("abort",()=>{i(t.signal.reason)});const s=e.subscribe({next(l){o=!0,r(l),a()},error(l){i(l)},complete(){t.abort(),a()}})})}function Pp(e){return t=>{let n=0,r=null;const i=[];function o(){r||(r=t.subscribe({next(s){var l;for(const u of i)(l=u.next)==null||l.call(u,s)},error(s){var l;for(const u of i)(l=u.error)==null||l.call(u,s)},complete(){var s;for(const l of i)(s=l.complete)==null||s.call(l)}}))}function a(){if(n===0&&r){const s=r;r=null,s.unsubscribe()}}return Zo(s=>(n++,i.push(s),o(),{unsubscribe(){n--,a();const l=i.findIndex(u=>u===s);l>-1&&i.splice(l,1)}}))}}function Rp(e){let t=e;const n=[],r=a=>{t!==void 0&&a.next(t),n.push(a)},i=a=>{n.splice(n.indexOf(a),1)},o=Zo(a=>(r(a),()=>{i(a)}));return o.next=a=>{if(t!==a){t=a;for(const s of n)s.next(a)}},o.get=()=>t,o}function Mp(e){return Zo(t=>{function n(i=0,o=e.op){const a=e.links[i];if(!a)throw new Error("No more links to execute - did you forget to add an ending link?");return a({op:o,next(l){return n(i+1,l)}})}return n().subscribe(t)})}const sf=()=>{},vu=e=>{Object.freeze&&Object.freeze(e)};function lf(e,t,n){var r,i;const o=t.join(".");return(r=n)[i=o]??(r[i]=new Proxy(sf,{get(a,s){if(!(typeof s!="string"||s==="then"))return lf(e,[...t,s],n)},apply(a,s,l){const u=t[t.length-1];let g={args:l,path:t};return u==="call"?g={args:l.length>=2?[l[1]]:[],path:t.slice(0,-1)}:u==="apply"&&(g={args:l.length>=2?l[1]:[],path:t.slice(0,-1)}),vu(g.args),vu(g.path),e(g)}})),n[o]}const Jo=e=>lf(e,[],Object.create(null)),pl=e=>new Proxy(sf,{get(t,n){if(n!=="then")return e(n)}});function In(e){return!!e&&!Array.isArray(e)&&typeof e=="object"}const kp=typeof Symbol=="function"&&!!Symbol.asyncIterator;function uf(e){return kp&&In(e)&&Symbol.asyncIterator in e}function Op(e,t){if("error"in e){const r=t.deserialize(e.error);return{ok:!1,error:{...e,error:r}}}return{ok:!0,result:{...e.result,...(!e.result.type||e.result.type==="data")&&{type:"data",data:t.deserialize(e.result.data)}}}}class Ea extends Error{constructor(){super("Unable to transform response from server")}}function Dp(e,t){let n;try{n=Op(e,t)}catch{throw new Ea}if(!n.ok&&(!In(n.error.error)||typeof n.error.error.code!="number"))throw new Ea;if(n.ok&&!In(n.result))throw new Ea;return n}var yu,wu;(yu=Symbol).dispose??(yu.dispose=Symbol());(wu=Symbol).asyncDispose??(wu.asyncDispose=Symbol());var Md,kd,Od,Dd,Td,Fd;typeof window>"u"||"Deno"in window||((kd=(Md=globalThis.process)==null?void 0:Md.env)==null?void 0:kd.NODE_ENV)==="test"||(Dd=(Od=globalThis.process)==null?void 0:Od.env)!=null&&Dd.JEST_WORKER_ID||(Fd=(Td=globalThis.process)==null?void 0:Td.env)!=null&&Fd.VITEST_WORKER_ID;function Hi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tp(e){return e instanceof an||e instanceof Error&&e.name==="TRPCClientError"}function Fp(e){return In(e)&&In(e.error)&&typeof e.error.code=="number"&&typeof e.error.message=="string"}function Lp(e,t){return typeof e=="string"?e:In(e)&&typeof e.message=="string"?e.message:t}class an extends Error{static from(t,n={}){const r=t;return Tp(r)?(n.meta&&(r.meta={...r.meta,...n.meta}),r):Fp(r)?new an(r.error.message,{...n,result:r}):new an(Lp(r,"Unknown error"),{...n,cause:r})}constructor(t,n){var i,o;const r=n==null?void 0:n.cause;super(t,{cause:r}),Hi(this,"cause",void 0),Hi(this,"shape",void 0),Hi(this,"data",void 0),Hi(this,"meta",void 0),this.meta=n==null?void 0:n.meta,this.cause=r,this.shape=(i=n==null?void 0:n.result)==null?void 0:i.error,this.data=(o=n==null?void 0:n.result)==null?void 0:o.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,an.prototype)}}function Pa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ea{$request(t){return Mp({links:this.links,op:{...t,context:t.context??{},id:++this.requestId}}).pipe(Pp())}async requestAsPromise(t){try{const n=this.$request(t);return(await Ep(n)).result.data}catch(n){throw an.from(n)}}query(t,n,r){return this.requestAsPromise({type:"query",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}mutation(t,n,r){return this.requestAsPromise({type:"mutation",path:t,input:n,context:r==null?void 0:r.context,signal:r==null?void 0:r.signal})}subscription(t,n,r){return this.$request({type:"subscription",path:t,input:n,context:r.context,signal:r.signal}).subscribe({next(o){var a,s,l,u;switch(o.result.type){case"state":{(a=r.onConnectionStateChange)==null||a.call(r,o.result);break}case"started":{(s=r.onStarted)==null||s.call(r,{context:o.context});break}case"stopped":{(l=r.onStopped)==null||l.call(r);break}case"data":case void 0:{(u=r.onData)==null||u.call(r,o.result.data);break}}},error(o){var a;(a=r.onError)==null||a.call(r,o)},complete(){var o;(o=r.onComplete)==null||o.call(r)}})}constructor(t){Pa(this,"links",void 0),Pa(this,"runtime",void 0),Pa(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(n=>n(this.runtime))}}const cf=Symbol.for("trpc_untypedClient"),Ip={query:"query",mutate:"mutation",subscribe:"subscription"},Np=e=>Ip[e];function df(e){const t=Jo(({path:n,args:r})=>{const i=[...n],o=Np(i.pop()),a=i.join(".");return e[o](a,...r)});return pl(n=>n===cf?e:t[n])}function Ap(e){const t=new ea(e);return df(t)}function ml(e){return e[cf]}const xu=e=>typeof e=="function";function _p(e){if(e)return e;if(typeof window<"u"&&xu(window.fetch))return window.fetch;if(typeof globalThis<"u"&&xu(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}const Cu=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function Su(e){let t=null,n=null;const r=()=>{clearTimeout(n),n=null,t=null};function i(s){var g,c;const l=[[]];let u=0;for(;;){const h=s[u];if(!h)break;const f=l[l.length-1];if(h.aborted){(g=h.reject)==null||g.call(h,new Error("Aborted")),u++;continue}if(e.validate(f.concat(h).map(m=>m.key))){f.push(h),u++;continue}if(f.length===0){(c=h.reject)==null||c.call(h,new Error("Input is too big for a single dispatch")),u++;continue}l.push([])}return l}function o(){const s=i(t);r();for(const l of s){if(!l.length)continue;const u={items:l};for(const c of l)c.batch=u;e.fetch(u.items.map(c=>c.key)).then(async c=>{var h;await Promise.all(c.map(async(f,p)=>{var b,v;const m=u.items[p];try{const w=await Promise.resolve(f);(b=m.resolve)==null||b.call(m,w)}catch(w){(v=m.reject)==null||v.call(m,w)}m.batch=null,m.reject=null,m.resolve=null}));for(const f of u.items)(h=f.reject)==null||h.call(f,new Error("Missing result")),f.batch=null}).catch(c=>{var h;for(const f of u.items)(h=f.reject)==null||h.call(f,c),f.batch=null})}}function a(s){const l={aborted:!1,key:s,batch:null,resolve:Cu,reject:Cu},u=new Promise((g,c)=>{l.reject=c,l.resolve=g,t||(t=[]),t.push(l)});return n||(n=setTimeout(o)),u}return{load:a}}function jp(...e){const t=new AbortController,n=e.length;let r=0;const i=()=>{++r===n&&t.abort()};for(const o of e)o!=null&&o.aborted?i():o==null||o.addEventListener("abort",i,{once:!0});return t.signal}function Kp(e){const t=e;return t?"input"in t?t:{input:t,output:t}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}function Bp(e){return{url:e.url.toString(),fetch:e.fetch,transformer:Kp(e.transformer),methodOverride:e.methodOverride}}function Hp(e){const t={};for(let n=0;n<e.length;n++){const r=e[n];t[n]=r}return t}const Vp={query:"GET",mutation:"POST",subscription:"PATCH"};function ff(e){return"input"in e?e.transformer.input.serialize(e.input):Hp(e.inputs.map(t=>e.transformer.input.serialize(t)))}const hf=e=>{const t=e.url.split("?");let r=t[0].replace(/\/$/,"")+"/"+e.path;const i=[];if(t[1]&&i.push(t[1]),"inputs"in e&&i.push("batch=1"),e.type==="query"||e.type==="subscription"){const o=ff(e);o!==void 0&&e.methodOverride!=="POST"&&i.push(`input=${encodeURIComponent(JSON.stringify(o))}`)}return i.length&&(r+="?"+i.join("&")),r},zp=e=>{if(e.type==="query"&&e.methodOverride!=="POST")return;const t=ff(e);return t!==void 0?JSON.stringify(t):void 0},Up=e=>Qp({...e,contentTypeHeader:"application/json",getUrl:hf,getBody:zp});class Wp extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}}const qp=e=>{var t;if(e!=null&&e.aborted)throw(t=e.throwIfAborted)==null||t.call(e),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new Wp};async function Gp(e){qp(e.signal);const t=e.getUrl(e),n=e.getBody(e),{type:r}=e,i=await(async()=>{const a=await e.headers();return Symbol.iterator in a?Object.fromEntries(a):a})(),o={...e.contentTypeHeader?{"content-type":e.contentTypeHeader}:{},...e.trpcAcceptHeader?{"trpc-accept":e.trpcAcceptHeader}:void 0,...i};return _p(e.fetch)(t,{method:e.methodOverride??Vp[r],signal:e.signal,body:n,headers:o})}async function Qp(e){const t={},n=await Gp(e);t.response=n;const r=await n.json();return t.responseJSON=r,{json:r,meta:t}}function Yp(e){const t=Bp(e),n=e.maxURLLength??1/0,r=e.maxItems??1/0;return()=>{const i=l=>({validate(u){if(n===1/0&&r===1/0)return!0;if(u.length>r)return!1;const g=u.map(f=>f.path).join(","),c=u.map(f=>f.input);return hf({...t,type:l,path:g,inputs:c,signal:null}).length<=n},async fetch(u){const g=u.map(b=>b.path).join(","),c=u.map(b=>b.input),h=jp(...u.map(b=>b.signal)),f=await Up({...t,path:g,inputs:c,type:l,headers(){return e.headers?typeof e.headers=="function"?e.headers({opList:u}):e.headers:{}},signal:h});return(Array.isArray(f.json)?f.json:u.map(()=>f.json)).map(b=>({meta:f.meta,json:b}))}}),o=Su(i("query")),a=Su(i("mutation")),s={query:o,mutation:a};return({op:l})=>Zo(u=>{/* istanbul ignore if -- @preserve */if(l.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const c=s[l.type].load(l);let h;return c.then(f=>{h=f;const p=Dp(f.json,t.transformer.output);if(!p.ok){u.error(an.from(p.error,{meta:f.meta}));return}u.next({context:f.meta,result:p.result}),u.complete()}).catch(f=>{u.error(an.from(f,{meta:h==null?void 0:h.meta}))}),()=>{}})}}const gf=(e,...t)=>typeof e=="function"?e(...t):e;function Xp(){let e,t;return{promise:new Promise((r,i)=>{e=r,t=i}),resolve:e,reject:t}}async function Zp(e){const t=await gf(e.url);if(!e.connectionParams)return t;const r=`${t.includes("?")?"&":"?"}connectionParams=1`;return t+r}async function Jp(e){const t={method:"connectionParams",data:await gf(e)};return JSON.stringify(t)}function Cn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function em(e){const{promise:t,resolve:n,reject:r}=Xp();return e.addEventListener("open",()=>{e.removeEventListener("error",r),n()}),e.addEventListener("error",r),t}function tm(e,{intervalMs:t,pongTimeoutMs:n}){let r,i;function o(){r=setTimeout(()=>{e.send("PING"),i=setTimeout(()=>{e.close()},n)},t)}function a(){clearTimeout(r),o()}function s(){clearTimeout(i),a()}e.addEventListener("open",o),e.addEventListener("message",({data:l})=>{clearTimeout(r),o(),l==="PONG"&&s()}),e.addEventListener("close",()=>{clearTimeout(r),clearTimeout(i)})}class xo{get ws(){return this.wsObservable.get()}set ws(t){this.wsObservable.next(t)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){if(this.openPromise)return this.openPromise;this.id=++xo.connectCount;const t=Zp(this.urlOptions).then(n=>new this.WebSocketPonyfill(n));this.openPromise=t.then(async n=>{this.ws=n,n.addEventListener("message",function({data:r}){r==="PING"&&this.send("PONG")}),this.keepAliveOpts.enabled&&tm(n,this.keepAliveOpts),n.addEventListener("close",()=>{this.ws===n&&(this.ws=null)}),await em(n),this.urlOptions.connectionParams&&n.send(await Jp(this.urlOptions.connectionParams))});try{await this.openPromise}finally{this.openPromise=null}}async close(){var t;try{await this.openPromise}finally{(t=this.ws)==null||t.close()}}constructor(t){if(Cn(this,"id",++xo.connectCount),Cn(this,"WebSocketPonyfill",void 0),Cn(this,"urlOptions",void 0),Cn(this,"keepAliveOpts",void 0),Cn(this,"wsObservable",Rp(null)),Cn(this,"openPromise",null),this.WebSocketPonyfill=t.WebSocketPonyfill??WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=t.urlOptions,this.keepAliveOpts=t.keepAlive}}Cn(xo,"connectCount",0);var ui=function(){return ui=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ui.apply(this,arguments)};function nm(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function rm(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(g){try{u(r.next(g))}catch(c){a(c)}}function l(g){try{u(r.throw(g))}catch(c){a(c)}}function u(g){g.done?o(g.value):i(g.value).then(s,l)}u((r=r.apply(e,t||[])).next())})}function im(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(u){return function(g){return l([u,g])}}function l(u){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(o=u[0]&2?i.return:u[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,u[1])).done)return o;switch(i=0,o&&(u=[u[0]&2,o.value]),u[0]){case 0:case 1:o=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!o||u[1]>o[0]&&u[1]<o[3])){n.label=u[1];break}if(u[0]===6&&n.label<o[1]){n.label=o[1],o=u;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(u);break}o[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(g){u=[6,g],i=0}finally{r=o=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Fn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function St(e,t,n){const r=e.flatMap(i=>i.split("."));if(!t&&(!n||n==="any"))return r.length?[r]:[];if(n==="infinite"&&In(t)&&("direction"in t||"cursor"in t)){const{cursor:i,direction:o,...a}=t;return[r,{input:a,type:"infinite"}]}return[r,{...typeof t<"u"&&t!==Ue&&{input:t},...n&&n!=="any"&&{type:n}}]}function uo(e){return St(e,void 0,"any")}function om(e){return Jo(({path:t,args:n})=>{const r=[...t],i=r.pop();if(i==="useMutation")return e[i](r,...n);if(i==="_def")return{path:r};const[o,...a]=n,s=a[0]||{};return e[i](r,o,s)})}const am=["client","ssrContext","ssrState","abortOnUnmount"];var Ld;const sm=(Ld=$.createContext)==null?void 0:Ld.call($,null),lm=e=>{switch(e){case"queryOptions":case"fetch":case"ensureData":case"prefetch":case"getData":case"setData":case"setQueriesData":return"query";case"infiniteQueryOptions":case"fetchInfinite":case"prefetchInfinite":case"getInfiniteData":case"setInfiniteData":return"infinite";case"setMutationDefaults":case"getMutationDefaults":case"isMutating":case"cancel":case"invalidate":case"refetch":case"reset":return"any"}};function um(e){return Jo(t=>{const n=[...t.path],r=n.pop(),i=[...t.args],o=i.shift(),a=lm(r),s=St(n,o,a);return{infiniteQueryOptions:()=>e.infiniteQueryOptions(n,s,i[0]),queryOptions:()=>e.queryOptions(n,s,...i),fetch:()=>e.fetchQuery(s,...i),fetchInfinite:()=>e.fetchInfiniteQuery(s,i[0]),prefetch:()=>e.prefetchQuery(s,...i),prefetchInfinite:()=>e.prefetchInfiniteQuery(s,i[0]),ensureData:()=>e.ensureQueryData(s,...i),invalidate:()=>e.invalidateQueries(s,...i),reset:()=>e.resetQueries(s,...i),refetch:()=>e.refetchQueries(s,...i),cancel:()=>e.cancelQuery(s,...i),setData:()=>{e.setQueryData(s,i[0],i[1])},setQueriesData:()=>e.setQueriesData(s,i[0],i[1],i[2]),setInfiniteData:()=>{e.setInfiniteQueryData(s,i[0],i[1])},getData:()=>e.getQueryData(s),getInfiniteData:()=>e.getInfiniteQueryData(s),setMutationDefaults:()=>e.setMutationDefaults(uo(n),o),getMutationDefaults:()=>e.getMutationDefaults(uo(n)),isMutating:()=>e.isMutating({mutationKey:uo(n)})}[r]()})}function cm(e){const t=df(e.client),n=um(e);return pl(r=>{const i=r;return i==="client"?t:am.includes(i)?e[i]:n[r]})}function Te(e,t,n){var o;const r=e[0];let i=(o=e[1])==null?void 0:o.input;return n&&(i={...i??{},...n.pageParam?{cursor:n.pageParam}:{},direction:n.direction}),[r.join("."),i,t==null?void 0:t.trpc]}function Es(e){return{path:e.path.join(".")}}function Br(e){const t=Es(e);return $.useMemo(()=>t,[t])}async function pf(e,t,n){const i=t.getQueryCache().build(t,{queryKey:n});i.setState({data:[],status:"success"});const o=[];for await(const a of e)o.push(a),i.setState({data:[...o]});return o}function dm(e){const{client:t,queryClient:n}=e,r=t instanceof ea?t:ml(t);return{infiniteQueryOptions:(i,o,a)=>{var u;const s=((u=o[1])==null?void 0:u.input)===Ue,l=async g=>{var f;const c={...a,trpc:{...a==null?void 0:a.trpc,...(f=a==null?void 0:a.trpc)!=null&&f.abortOnUnmount?{signal:g.signal}:{signal:null}}};return await r.query(...Te(o,c,{direction:g.direction,pageParam:g.pageParam}))};return Object.assign({...a,initialData:a==null?void 0:a.initialData,queryKey:o,queryFn:s?Ue:l,initialPageParam:(a==null?void 0:a.initialCursor)??null},{trpc:Es({path:i})})},queryOptions:(i,o,a)=>{var u;const s=((u=o[1])==null?void 0:u.input)===Ue,l=async g=>{var f;const c={...a,trpc:{...a==null?void 0:a.trpc,...(f=a==null?void 0:a.trpc)!=null&&f.abortOnUnmount?{signal:g.signal}:{signal:null}}},h=await r.query(...Te(o,c));return uf(h)?pf(h,n,o):h};return Object.assign({...a,initialData:a==null?void 0:a.initialData,queryKey:o,queryFn:s?Ue:l},{trpc:Es({path:i})})},fetchQuery:(i,o)=>n.fetchQuery({...o,queryKey:i,queryFn:()=>r.query(...Te(i,o))}),fetchInfiniteQuery:(i,o)=>n.fetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:a,direction:s})=>r.query(...Te(i,o,{pageParam:a,direction:s})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),prefetchQuery:(i,o)=>n.prefetchQuery({...o,queryKey:i,queryFn:()=>r.query(...Te(i,o))}),prefetchInfiniteQuery:(i,o)=>n.prefetchInfiniteQuery({...o,queryKey:i,queryFn:({pageParam:a,direction:s})=>r.query(...Te(i,o,{pageParam:a,direction:s})),initialPageParam:(o==null?void 0:o.initialCursor)??null}),ensureQueryData:(i,o)=>n.ensureQueryData({...o,queryKey:i,queryFn:()=>r.query(...Te(i,o))}),invalidateQueries:(i,o,a)=>n.invalidateQueries({...o,queryKey:i},a),resetQueries:(i,o,a)=>n.resetQueries({...o,queryKey:i},a),refetchQueries:(i,o,a)=>n.refetchQueries({...o,queryKey:i},a),cancelQuery:(i,o)=>n.cancelQueries({queryKey:i},o),setQueryData:(i,o,a)=>n.setQueryData(i,o,a),setQueriesData:(i,o,a,s)=>n.setQueriesData({...o,queryKey:i},a,s),getQueryData:i=>n.getQueryData(i),setInfiniteQueryData:(i,o,a)=>n.setQueryData(i,o,a),getInfiniteQueryData:i=>n.getQueryData(i),setMutationDefaults:(i,o)=>{const a=i[0],s=l=>r.mutation(...Te([a,{input:l}],e));return n.setMutationDefaults(i,typeof o=="function"?o({canonicalMutationFn:s}):o)},getMutationDefaults:i=>n.getMutationDefaults(i),isMutating:i=>n.isMutating({...i,exact:!0})}}function $u(e){const t=e instanceof ea?e:ml(e);return Jo(n=>{const r=n.path,i=r.join("."),[o,a]=n.args;return{queryKey:St(r,o,"query"),queryFn:()=>t.query(i,o,a==null?void 0:a.trpc),...a}})}const Eu=(e,t)=>new Proxy(e,{get(r,i){return t(i),r[i]}});function fm(e){var x,k;const t=((k=(x=e==null?void 0:e.overrides)==null?void 0:x.useMutation)==null?void 0:k.onSuccess)??(S=>S.originalFn()),n=(e==null?void 0:e.context)??sm,r=Ap,i=S=>{const{abortOnUnmount:R=!1,queryClient:P,ssrContext:I}=S,[D,L]=$.useState(S.ssrState??!1),E=S.client instanceof ea?S.client:ml(S.client),N=$.useMemo(()=>dm({client:E,queryClient:P}),[E,P]),_=$.useMemo(()=>({abortOnUnmount:R,queryClient:P,client:E,ssrContext:I??null,ssrState:D,...N}),[R,E,N,P,I,D]);return $.useEffect(()=>{L(T=>T?"mounted":!1)},[]),$.createElement(n.Provider,{value:_},S.children)};function o(){const S=$.useContext(n);if(!S)throw new Error("Unable to find tRPC Context. Did you forget to wrap your App inside `withTRPC` HoC?");return S}function a(S,R){var D;const{queryClient:P,ssrState:I}=o();return I&&I!=="mounted"&&((D=P.getQueryCache().find({queryKey:S}))==null?void 0:D.state.status)==="error"?{retryOnMount:!1,...R}:R}function s(S,R,P){var X,j;const I=o(),{abortOnUnmount:D,client:L,ssrState:E,queryClient:N,prefetchQuery:_}=I,T=St(S,R,"query"),A=N.getQueryDefaults(T),M=R===Ue;typeof window>"u"&&E==="prepass"&&((X=P==null?void 0:P.trpc)==null?void 0:X.ssr)!==!1&&((P==null?void 0:P.enabled)??(A==null?void 0:A.enabled))!==!1&&!M&&!N.getQueryCache().find({queryKey:T})&&_(T,P);const F=a(T,{...A,...P}),O=((j=P==null?void 0:P.trpc)==null?void 0:j.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??D,V=mp({...F,queryKey:T,queryFn:M?R:async K=>{const H={...F,trpc:{...F==null?void 0:F.trpc,...O?{signal:K.signal}:{signal:null}}},q=await L.query(...Te(T,H));return uf(q)?pf(q,N,T):q}},N);return V.trpc=Br({path:S}),V}function l(S,R,P){var N;const I=o(),D=St(S,R,"query"),L=R===Ue,E=((N=P==null?void 0:P.trpc)==null?void 0:N.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??I.abortOnUnmount;wp({...P,queryKey:D,queryFn:L?R:_=>{const T={trpc:{...P==null?void 0:P.trpc,...E?{signal:_.signal}:{}}};return I.client.query(...Te(D,T))}})}function u(S,R,P){var N;const I=o(),D=St(S,R,"query"),L=((N=P==null?void 0:P.trpc)==null?void 0:N.abortOnUnmount)??(e==null?void 0:e.abortOnUnmount)??I.abortOnUnmount,E=bp({...P,queryKey:D,queryFn:_=>{const T={...P,trpc:{...P==null?void 0:P.trpc,...L?{signal:_.signal}:{signal:null}}};return I.client.query(...Te(D,T))}},I.queryClient);return E.trpc=Br({path:S}),[E.data,E]}function g(S,R){const{client:P,queryClient:I}=o(),D=uo(S),L=I.defaultMutationOptions(I.getMutationDefaults(D)),E=Cp({...R,mutationKey:D,mutationFn:N=>P.mutation(...Te([S,{input:N}],R)),onSuccess(...N){return t({originalFn:()=>{var T,A;return((T=R==null?void 0:R.onSuccess)==null?void 0:T.call(R,...N))??((A=L==null?void 0:L.onSuccess)==null?void 0:A.call(L,...N))},queryClient:I,meta:(R==null?void 0:R.meta)??(L==null?void 0:L.meta)??{}})}},I);return E.trpc=Br({path:S}),E}const c={data:void 0,error:null,status:"idle"},h={data:void 0,error:null,status:"connecting"};/* istanbul ignore next -- @preserve */function f(S,R,P){const I=(P==null?void 0:P.enabled)??R!==Ue,D=cn(St(S,R,"any")),{client:L}=o(),E=$.useRef(P);$.useEffect(()=>{E.current=P});const[N]=$.useState(new Set([])),_=$.useCallback(X=>{N.add(X)},[N]),T=$.useRef(null),A=$.useCallback(X=>{const j=F.current,K=F.current=X(j);let H=!1;for(const q of N)if(j[q]!==K[q]){H=!0;break}H&&V(Eu(K,_))},[_,N]),M=$.useCallback(()=>{var j;if((j=T.current)==null||j.unsubscribe(),!I){A(()=>({...c,reset:M}));return}A(()=>({...h,reset:M}));const X=L.subscription(S.join("."),R??void 0,{onStarted:()=>{var K,H;(H=(K=E.current).onStarted)==null||H.call(K),A(q=>({...q,status:"pending",error:null}))},onData:K=>{var H,q;(q=(H=E.current).onData)==null||q.call(H,K),A(ue=>({...ue,status:"pending",data:K,error:null}))},onError:K=>{var H,q;(q=(H=E.current).onError)==null||q.call(H,K),A(ue=>({...ue,status:"error",error:K}))},onConnectionStateChange:K=>{A(H=>{switch(K.state){case"idle":return{...H,status:K.state,error:null,data:void 0};case"connecting":return{...H,error:K.error,status:K.state};case"pending":return H}})},onComplete:()=>{var K,H;(H=(K=E.current).onComplete)==null||H.call(K),A(q=>({...q,status:"idle",error:null,data:void 0}))}});T.current=X},[L,D,I,A]);$.useEffect(()=>(M(),()=>{var X;(X=T.current)==null||X.unsubscribe()}),[M]);const F=$.useRef(I?{...h,reset:M}:{...c,reset:M}),[O,V]=$.useState(Eu(F.current,_));return O}function p(S,R,P){var V,X;const{client:I,ssrState:D,prefetchInfiniteQuery:L,queryClient:E,abortOnUnmount:N}=o(),_=St(S,R,"infinite"),T=E.getQueryDefaults(_),A=R===Ue;typeof window>"u"&&D==="prepass"&&((V=P==null?void 0:P.trpc)==null?void 0:V.ssr)!==!1&&((P==null?void 0:P.enabled)??(T==null?void 0:T.enabled))!==!1&&!A&&!E.getQueryCache().find({queryKey:_})&&L(_,{...T,...P});const M=a(_,{...T,...P}),F=((X=P==null?void 0:P.trpc)==null?void 0:X.abortOnUnmount)??N,O=Sp({...M,initialPageParam:P.initialCursor??null,persister:P.persister,queryKey:_,queryFn:A?R:j=>{const K={...M,trpc:{...M==null?void 0:M.trpc,...F?{signal:j.signal}:{signal:null}}};return I.query(...Te(_,K,{pageParam:j.pageParam??P.initialCursor,direction:j.direction}))}},E);return O.trpc=Br({path:S}),O}function m(S,R,P){var T;const I=o(),D=St(S,R,"infinite"),L=I.queryClient.getQueryDefaults(D),E=R===Ue,N=a(D,{...L,...P}),_=((T=P==null?void 0:P.trpc)==null?void 0:T.abortOnUnmount)??I.abortOnUnmount;xp({...P,initialPageParam:P.initialCursor??null,queryKey:D,queryFn:E?R:A=>{const M={...N,trpc:{...N==null?void 0:N.trpc,..._?{signal:A.signal}:{}}};return I.client.query(...Te(D,M,{pageParam:A.pageParam??P.initialCursor,direction:A.direction}))}})}function b(S,R,P){var T;const I=o(),D=St(S,R,"infinite"),L=I.queryClient.getQueryDefaults(D),E=a(D,{...L,...P}),N=((T=P==null?void 0:P.trpc)==null?void 0:T.abortOnUnmount)??I.abortOnUnmount,_=vp({...P,initialPageParam:P.initialCursor??null,queryKey:D,queryFn:A=>{const M={...E,trpc:{...E==null?void 0:E.trpc,...N?{signal:A.signal}:{}}};return I.client.query(...Te(D,M,{pageParam:A.pageParam??P.initialCursor,direction:A.direction}))}},I.queryClient);return _.trpc=Br({path:S}),[_.data,_]}return{Provider:i,createClient:r,useContext:o,useUtils:o,useQuery:s,usePrefetchQuery:l,useSuspenseQuery:u,useQueries:(S,R)=>{var _;const{ssrState:P,queryClient:I,prefetchQuery:D,client:L}=o(),E=$u(L),N=S(E);if(typeof window>"u"&&P==="prepass")for(const T of N){const A=T;((_=A.trpc)==null?void 0:_.ssr)!==!1&&!I.getQueryCache().find({queryKey:A.queryKey})&&D(A.queryKey,A)}return af({queries:N.map(T=>({...T,queryKey:T.queryKey})),combine:R==null?void 0:R.combine},I)},useSuspenseQueries:S=>{const{queryClient:R,client:P}=o(),I=$u(P),D=S(I),L=yp({queries:D.map(E=>({...E,queryFn:E.queryFn,queryKey:E.queryKey}))},R);return[L.map(E=>E.data),L]},useMutation:g,useSubscription:f,useInfiniteQuery:p,usePrefetchInfiniteQuery:m,useSuspenseInfiniteQuery:b}}function hm(e){const t=om(e);return pl(n=>n==="useContext"||n==="useUtils"?()=>{const r=e.useUtils();return $.useMemo(()=>cm(r),[r])}:e.hasOwnProperty(n)?e[n]:t[n])}function gm(e){const t=fm(e);return hm(t)}var se=gm({overrides:{useMutation:{onSuccess:function(e){return rm(this,void 0,void 0,function(){return im(this,function(t){switch(t.label){case 0:return[4,e.originalFn()];case 1:return t.sent(),[4,e.queryClient.invalidateQueries()];case 2:return t.sent(),[2]}})})}}}}),bl={};Object.defineProperty(bl,"__esModule",{value:!0});bl.parse=xm;bl.serialize=Cm;const pm=/^[\u0021-\u003A\u003C\u003E-\u007E]+$/,mm=/^[\u0021-\u003A\u003C-\u007E]*$/,bm=/^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i,vm=/^[\u0020-\u003A\u003D-\u007E]*$/,ym=Object.prototype.toString,wm=(()=>{const e=function(){};return e.prototype=Object.create(null),e})();function xm(e,t){const n=new wm,r=e.length;if(r<2)return n;const i=(t==null?void 0:t.decode)||Sm;let o=0;do{const a=e.indexOf("=",o);if(a===-1)break;const s=e.indexOf(";",o),l=s===-1?r:s;if(a>l){o=e.lastIndexOf(";",a-1)+1;continue}const u=Pu(e,o,a),g=Ru(e,a,u),c=e.slice(u,g);if(n[c]===void 0){let h=Pu(e,a+1,l),f=Ru(e,l,h);const p=i(e.slice(h,f));n[c]=p}o=l+1}while(o<r);return n}function Pu(e,t,n){do{const r=e.charCodeAt(t);if(r!==32&&r!==9)return t}while(++t<n);return n}function Ru(e,t,n){for(;t>n;){const r=e.charCodeAt(--t);if(r!==32&&r!==9)return t+1}return n}function Cm(e,t,n){const r=(n==null?void 0:n.encode)||encodeURIComponent;if(!pm.test(e))throw new TypeError(`argument name is invalid: ${e}`);const i=r(t);if(!mm.test(i))throw new TypeError(`argument val is invalid: ${t}`);let o=e+"="+i;if(!n)return o;if(n.maxAge!==void 0){if(!Number.isInteger(n.maxAge))throw new TypeError(`option maxAge is invalid: ${n.maxAge}`);o+="; Max-Age="+n.maxAge}if(n.domain){if(!bm.test(n.domain))throw new TypeError(`option domain is invalid: ${n.domain}`);o+="; Domain="+n.domain}if(n.path){if(!vm.test(n.path))throw new TypeError(`option path is invalid: ${n.path}`);o+="; Path="+n.path}if(n.expires){if(!$m(n.expires)||!Number.isFinite(n.expires.valueOf()))throw new TypeError(`option expires is invalid: ${n.expires}`);o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.partitioned&&(o+="; Partitioned"),n.priority)switch(typeof n.priority=="string"?n.priority.toLowerCase():void 0){case"low":o+="; Priority=Low";break;case"medium":o+="; Priority=Medium";break;case"high":o+="; Priority=High";break;default:throw new TypeError(`option priority is invalid: ${n.priority}`)}if(n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:case"strict":o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"none":o+="; SameSite=None";break;default:throw new TypeError(`option sameSite is invalid: ${n.sameSite}`)}return o}function Sm(e){if(e.indexOf("%")===-1)return e;try{return decodeURIComponent(e)}catch{return e}}function $m(e){return ym.call(e)==="[object Date]"}/**
10
+ * react-router v7.6.1
11
11
  *
12
12
  * Copyright (c) Remix Software Inc.
13
13
  *
@@ -15,9 +15,15 @@
15
15
  * LICENSE.md file in the root directory of this source tree.
16
16
  *
17
17
  * @license MIT
18
- */var eu="popstate";function Tp(e={}){function t(r,i){let{pathname:o,search:a,hash:s}=r.location;return es("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:qr(i)}return Fp(t,n,null,e)}function ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function it(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Op(){return Math.random().toString(36).substring(2,10)}function tu(e,t){return{usr:e.state,key:e.key,idx:t}}function es(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?br(t):t,state:n,key:t&&t.key||r||Op()}}function qr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function br(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Fp(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",l=null,u=d();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function d(){return(a.state||{idx:null}).idx}function h(){s="POP";let b=d(),$=b==null?null:b-u;u=b,l&&l({action:s,location:m.location,delta:$})}function g(b,$){s="PUSH";let x=es(m.location,b,$);u=d()+1;let E=tu(x,u),M=m.createHref(x);try{a.pushState(E,"",M)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;i.location.assign(M)}o&&l&&l({action:s,location:m.location,delta:1})}function f(b,$){s="REPLACE";let x=es(m.location,b,$);u=d();let E=tu(x,u),M=m.createHref(x);a.replaceState(E,"",M),o&&l&&l({action:s,location:m.location,delta:0})}function p(b){let $=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:qr(b);return x=x.replace(/ $/,"%20"),ce($,`No window.location.(origin|href) available to create URL for href: ${x}`),new URL(x,$)}let m={get action(){return s},get location(){return e(i,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(eu,h),l=b,()=>{i.removeEventListener(eu,h),l=null}},createHref(b){return t(i,b)},createURL:p,encodeLocation(b){let $=p(b);return{pathname:$.pathname,search:$.search,hash:$.hash}},push:g,replace:f,go(b){return a.go(b)}};return m}function Ad(e,t,n="/"){return Lp(e,t,n,!1)}function Lp(e,t,n,r){let i=typeof t=="string"?br(t):t,o=tn(i.pathname||"/",n);if(o==null)return null;let a=Id(e);Ap(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let u=qp(o);s=zp(a[l],u,r)}return s}function Id(e,t=[],n=[],r=""){let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(ce(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=Pt([r,l.relativePath]),d=n.concat(l);o.children&&o.children.length>0&&(ce(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),Id(o.children,t,d,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Hp(u,o.index),routesMeta:d})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of Nd(o.path))i(o,a,l)}),t}function Nd(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=Nd(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Ap(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Vp(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Ip=/^:[\w-]+$/,Np=3,jp=2,_p=1,Kp=10,Bp=-2,nu=e=>e==="*";function Hp(e,t){let n=e.split("/"),r=n.length;return n.some(nu)&&(r+=Bp),t&&(r+=jp),n.filter(i=>!nu(i)).reduce((i,o)=>i+(Ip.test(o)?Np:o===""?_p:Kp),r)}function Vp(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function zp(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,d=o==="/"?t:t.slice(o.length)||"/",h=io({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},d),g=l.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=io({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},d)),!h)return null;Object.assign(i,h.params),a.push({params:i,pathname:Pt([o,h.pathname]),pathnameBase:Yp(Pt([o,h.pathnameBase])),route:g}),h.pathnameBase!=="/"&&(o=Pt([o,h.pathnameBase]))}return a}function io(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Up(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,{paramName:d,isOptional:h},g)=>{if(d==="*"){let p=s[g]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const f=s[g];return h&&!f?u[d]=void 0:u[d]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function Up(e,t=!1,n=!0){it(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function qp(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return it(!1,`The URL path "${e}" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function tn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Wp(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?br(e):e;return{pathname:n?n.startsWith("/")?n:Gp(n,t):t,search:Zp(r),hash:Xp(i)}}function Gp(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Xo(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Qp(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function jd(e){let t=Qp(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function _d(e,t,n,r=!1){let i;typeof e=="string"?i=br(e):(i={...e},ce(!i.pathname||!i.pathname.includes("?"),Xo("?","pathname","search",i)),ce(!i.pathname||!i.pathname.includes("#"),Xo("#","pathname","hash",i)),ce(!i.search||!i.search.includes("#"),Xo("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let h=t.length-1;if(!r&&a.startsWith("..")){let g=a.split("/");for(;g[0]==="..";)g.shift(),h-=1;i.pathname=g.join("/")}s=h>=0?t[h]:"/"}let l=Wp(i,s),u=a&&a!=="/"&&a.endsWith("/"),d=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||d)&&(l.pathname+="/"),l}var Pt=e=>e.join("/").replace(/\/\/+/g,"/"),Yp=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Zp=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Xp=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Jp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var Kd=["POST","PUT","PATCH","DELETE"];new Set(Kd);var em=["GET",...Kd];new Set(em);var vr=S.createContext(null);vr.displayName="DataRouter";var To=S.createContext(null);To.displayName="DataRouterState";var Bd=S.createContext({isTransitioning:!1});Bd.displayName="ViewTransition";var tm=S.createContext(new Map);tm.displayName="Fetchers";var nm=S.createContext(null);nm.displayName="Await";var mt=S.createContext(null);mt.displayName="Navigation";var ci=S.createContext(null);ci.displayName="Location";var bt=S.createContext({outlet:null,matches:[],isDataRoute:!1});bt.displayName="Route";var Qs=S.createContext(null);Qs.displayName="RouteError";function rm(e,{relative:t}={}){ce(di(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=S.useContext(mt),{hash:i,pathname:o,search:a}=fi(e,{relative:t}),s=o;return n!=="/"&&(s=o==="/"?n:Pt([n,o])),r.createHref({pathname:s,search:a,hash:i})}function di(){return S.useContext(ci)!=null}function rn(){return ce(di(),"useLocation() may be used only in the context of a <Router> component."),S.useContext(ci).location}var Hd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Vd(e){S.useContext(mt).static||S.useLayoutEffect(e)}function zd(){let{isDataRoute:e}=S.useContext(bt);return e?bm():im()}function im(){ce(di(),"useNavigate() may be used only in the context of a <Router> component.");let e=S.useContext(vr),{basename:t,navigator:n}=S.useContext(mt),{matches:r}=S.useContext(bt),{pathname:i}=rn(),o=JSON.stringify(jd(r)),a=S.useRef(!1);return Vd(()=>{a.current=!0}),S.useCallback((l,u={})=>{if(it(a.current,Hd),!a.current)return;if(typeof l=="number"){n.go(l);return}let d=_d(l,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Pt([t,d.pathname])),(u.replace?n.replace:n.push)(d,u.state,u)},[t,n,o,i,e])}S.createContext(null);function om(){let{matches:e}=S.useContext(bt),t=e[e.length-1];return t?t.params:{}}function fi(e,{relative:t}={}){let{matches:n}=S.useContext(bt),{pathname:r}=rn(),i=JSON.stringify(jd(n));return S.useMemo(()=>_d(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function am(e,t){return Ud(e,t)}function Ud(e,t,n,r){var $;ce(di(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=S.useContext(mt),{matches:o}=S.useContext(bt),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",u=a?a.pathnameBase:"/",d=a&&a.route;{let x=d&&d.path||"";qd(l,!d||x.endsWith("*")||x.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${x}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
18
+ */var Mu="popstate";function Em(e={}){function t(r,i){let{pathname:o,search:a,hash:s}=r.location;return Ps("",{pathname:o,search:a,hash:s},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:ci(i)}return Rm(t,n,null,e)}function de(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function bt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Pm(){return Math.random().toString(36).substring(2,10)}function ku(e,t){return{usr:e.state,key:e.key,idx:t}}function Ps(e,t,n=null,r){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Ir(t):t,state:n,key:t&&t.key||r||Pm()}}function ci({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Ir(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function Rm(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s="POP",l=null,u=g();u==null&&(u=0,a.replaceState({...a.state,idx:u},""));function g(){return(a.state||{idx:null}).idx}function c(){s="POP";let b=g(),v=b==null?null:b-u;u=b,l&&l({action:s,location:m.location,delta:v})}function h(b,v){s="PUSH";let w=Ps(m.location,b,v);u=g()+1;let x=ku(w,u),k=m.createHref(w);try{a.pushState(x,"",k)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(k)}o&&l&&l({action:s,location:m.location,delta:1})}function f(b,v){s="REPLACE";let w=Ps(m.location,b,v);u=g();let x=ku(w,u),k=m.createHref(w);a.replaceState(x,"",k),o&&l&&l({action:s,location:m.location,delta:0})}function p(b){return Mm(b)}let m={get action(){return s},get location(){return e(i,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(Mu,c),l=b,()=>{i.removeEventListener(Mu,c),l=null}},createHref(b){return t(i,b)},createURL:p,encodeLocation(b){let v=p(b);return{pathname:v.pathname,search:v.search,hash:v.hash}},push:h,replace:f,go(b){return a.go(b)}};return m}function Mm(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),de(n,"No window.location.(origin|href) available to create URL");let r=typeof e=="string"?e:ci(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}function mf(e,t,n="/"){return km(e,t,n,!1)}function km(e,t,n,r){let i=typeof t=="string"?Ir(t):t,o=jt(i.pathname||"/",n);if(o==null)return null;let a=bf(e);Om(a);let s=null;for(let l=0;s==null&&l<a.length;++l){let u=Bm(o);s=jm(a[l],u,r)}return s}function bf(e,t=[],n=[],r=""){let i=(o,a,s)=>{let l={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};l.relativePath.startsWith("/")&&(de(l.relativePath.startsWith(r),`Absolute route path "${l.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),l.relativePath=l.relativePath.slice(r.length));let u=At([r,l.relativePath]),g=n.concat(l);o.children&&o.children.length>0&&(de(o.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),bf(o.children,t,g,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:Am(u,o.index),routesMeta:g})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let l of vf(o.path))i(o,a,l)}),t}function vf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=vf(r.join("/")),s=[];return s.push(...a.map(l=>l===""?o:[o,l].join("/"))),i&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function Om(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_m(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}var Dm=/^:[\w-]+$/,Tm=3,Fm=2,Lm=1,Im=10,Nm=-2,Ou=e=>e==="*";function Am(e,t){let n=e.split("/"),r=n.length;return n.some(Ou)&&(r+=Nm),t&&(r+=Fm),n.filter(i=>!Ou(i)).reduce((i,o)=>i+(Dm.test(o)?Tm:o===""?Lm:Im),r)}function _m(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function jm(e,t,n=!1){let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s<r.length;++s){let l=r[s],u=s===r.length-1,g=o==="/"?t:t.slice(o.length)||"/",c=Co({path:l.relativePath,caseSensitive:l.caseSensitive,end:u},g),h=l.route;if(!c&&u&&n&&!r[r.length-1].route.index&&(c=Co({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},g)),!c)return null;Object.assign(i,c.params),a.push({params:i,pathname:At([o,c.pathname]),pathnameBase:Um(At([o,c.pathnameBase])),route:h}),c.pathnameBase!=="/"&&(o=At([o,c.pathnameBase]))}return a}function Co(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Km(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let o=i[0],a=o.replace(/(.)\/+$/,"$1"),s=i.slice(1);return{params:r.reduce((u,{paramName:g,isOptional:c},h)=>{if(g==="*"){let p=s[h]||"";a=o.slice(0,o.length-p.length).replace(/(.)\/+$/,"$1")}const f=s[h];return c&&!f?u[g]=void 0:u[g]=(f||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:a,pattern:e}}function Km(e,t=!1,n=!0){bt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function Bm(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return bt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function jt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Hm(e,t="/"){let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Ir(e):e;return{pathname:n?n.startsWith("/")?n:Vm(n,t):t,search:Wm(r),hash:qm(i)}}function Vm(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ra(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function zm(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function yf(e){let t=zm(e);return t.map((n,r)=>r===t.length-1?n.pathname:n.pathnameBase)}function wf(e,t,n,r=!1){let i;typeof e=="string"?i=Ir(e):(i={...e},de(!i.pathname||!i.pathname.includes("?"),Ra("?","pathname","search",i)),de(!i.pathname||!i.pathname.includes("#"),Ra("#","pathname","hash",i)),de(!i.search||!i.search.includes("#"),Ra("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let c=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),c-=1;i.pathname=h.join("/")}s=c>=0?t[c]:"/"}let l=Hm(i,s),u=a&&a!=="/"&&a.endsWith("/"),g=(o||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||g)&&(l.pathname+="/"),l}var At=e=>e.join("/").replace(/\/\/+/g,"/"),Um=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Wm=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qm=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Gm(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}var xf=["POST","PUT","PATCH","DELETE"];new Set(xf);var Qm=["GET",...xf];new Set(Qm);var Nr=$.createContext(null);Nr.displayName="DataRouter";var ta=$.createContext(null);ta.displayName="DataRouterState";var Cf=$.createContext({isTransitioning:!1});Cf.displayName="ViewTransition";var Ym=$.createContext(new Map);Ym.displayName="Fetchers";var Xm=$.createContext(null);Xm.displayName="Await";var Mt=$.createContext(null);Mt.displayName="Navigation";var Oi=$.createContext(null);Oi.displayName="Location";var kt=$.createContext({outlet:null,matches:[],isDataRoute:!1});kt.displayName="Route";var vl=$.createContext(null);vl.displayName="RouteError";function Zm(e,{relative:t}={}){de(Di(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=$.useContext(Mt),{hash:i,pathname:o,search:a}=Ti(e,{relative:t}),s=o;return n!=="/"&&(s=o==="/"?n:At([n,o])),r.createHref({pathname:s,search:a,hash:i})}function Di(){return $.useContext(Oi)!=null}function gn(){return de(Di(),"useLocation() may be used only in the context of a <Router> component."),$.useContext(Oi).location}var Sf="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function $f(e){$.useContext(Mt).static||$.useLayoutEffect(e)}function Ef(){let{isDataRoute:e}=$.useContext(kt);return e?fb():Jm()}function Jm(){de(Di(),"useNavigate() may be used only in the context of a <Router> component.");let e=$.useContext(Nr),{basename:t,navigator:n}=$.useContext(Mt),{matches:r}=$.useContext(kt),{pathname:i}=gn(),o=JSON.stringify(yf(r)),a=$.useRef(!1);return $f(()=>{a.current=!0}),$.useCallback((l,u={})=>{if(bt(a.current,Sf),!a.current)return;if(typeof l=="number"){n.go(l);return}let g=wf(l,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(g.pathname=g.pathname==="/"?t:At([t,g.pathname])),(u.replace?n.replace:n.push)(g,u.state,u)},[t,n,o,i,e])}$.createContext(null);function eb(){let{matches:e}=$.useContext(kt),t=e[e.length-1];return t?t.params:{}}function Ti(e,{relative:t}={}){let{matches:n}=$.useContext(kt),{pathname:r}=gn(),i=JSON.stringify(yf(n));return $.useMemo(()=>wf(e,JSON.parse(i),r,t==="path"),[e,i,r,t])}function tb(e,t){return Pf(e,t)}function Pf(e,t,n,r){var v;de(Di(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=$.useContext(Mt),{matches:o}=$.useContext(kt),a=o[o.length-1],s=a?a.params:{},l=a?a.pathname:"/",u=a?a.pathnameBase:"/",g=a&&a.route;{let w=g&&g.path||"";Rf(l,!g||w.endsWith("*")||w.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${w}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
19
19
 
20
- Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}/*`}">.`)}let h=rn(),g;if(t){let x=typeof t=="string"?br(t):t;ce(u==="/"||(($=x.pathname)==null?void 0:$.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${x.pathname}" was given in the \`location\` prop.`),g=x}else g=h;let f=g.pathname||"/",p=f;if(u!=="/"){let x=u.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(x.length).join("/")}let m=Ad(e,{pathname:p});it(d||m!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),it(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=dm(m&&m.map(x=>Object.assign({},x,{params:Object.assign({},s,x.params),pathname:Pt([u,i.encodeLocation?i.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?u:Pt([u,i.encodeLocation?i.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),o,n,r);return t&&b?S.createElement(ci.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...g},navigationType:"POP"}},b):b}function sm(){let e=mm(),t=Jp(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=S.createElement(S.Fragment,null,S.createElement("p",null,"💿 Hey developer 👋"),S.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",S.createElement("code",{style:o},"ErrorBoundary")," or"," ",S.createElement("code",{style:o},"errorElement")," prop on your route.")),S.createElement(S.Fragment,null,S.createElement("h2",null,"Unexpected Application Error!"),S.createElement("h3",{style:{fontStyle:"italic"}},t),n?S.createElement("pre",{style:i},n):null,a)}var lm=S.createElement(sm,null),um=class extends S.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?S.createElement(bt.Provider,{value:this.props.routeContext},S.createElement(Qs.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function cm({routeContext:e,match:t,children:n}){let r=S.useContext(vr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),S.createElement(bt.Provider,{value:e},n)}function dm(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let l=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);ce(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let a=!1,s=-1;if(n)for(let l=0;l<i.length;l++){let u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(s=l),u.route.id){let{loaderData:d,errors:h}=n,g=u.route.loader&&!d.hasOwnProperty(u.route.id)&&(!h||h[u.route.id]===void 0);if(u.route.lazy||g){a=!0,s>=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((l,u,d)=>{let h,g=!1,f=null,p=null;n&&(h=o&&u.route.id?o[u.route.id]:void 0,f=u.route.errorElement||lm,a&&(s<0&&d===0?(qd("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),g=!0,p=null):s===d&&(g=!0,p=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,d+1)),b=()=>{let $;return h?$=f:g?$=p:u.route.Component?$=S.createElement(u.route.Component,null):u.route.element?$=u.route.element:$=l,S.createElement(cm,{match:u,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:$})};return n&&(u.route.ErrorBoundary||u.route.errorElement||d===0)?S.createElement(um,{location:n.location,revalidation:n.revalidation,component:f,error:h,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function Ys(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fm(e){let t=S.useContext(vr);return ce(t,Ys(e)),t}function hm(e){let t=S.useContext(To);return ce(t,Ys(e)),t}function gm(e){let t=S.useContext(bt);return ce(t,Ys(e)),t}function Zs(e){let t=gm(e),n=t.matches[t.matches.length-1];return ce(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function pm(){return Zs("useRouteId")}function mm(){var r;let e=S.useContext(Qs),t=hm("useRouteError"),n=Zs("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function bm(){let{router:e}=fm("useNavigate"),t=Zs("useNavigate"),n=S.useRef(!1);return Vd(()=>{n.current=!0}),S.useCallback(async(i,o={})=>{it(n.current,Hd),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var ru={};function qd(e,t,n){!t&&!ru[e]&&(ru[e]=!0,it(!1,n))}S.memo(vm);function vm({routes:e,future:t,state:n}){return Ud(e,void 0,n,t)}function ts(e){ce(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ym({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){ce(!di(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=S.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=br(n));let{pathname:l="/",search:u="",hash:d="",state:h=null,key:g="default"}=n,f=S.useMemo(()=>{let p=tn(l,a);return p==null?null:{location:{pathname:p,search:u,hash:d,state:h,key:g},navigationType:r}},[a,l,u,d,h,g,r]);return it(f!=null,`<Router basename="${a}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),f==null?null:S.createElement(mt.Provider,{value:s},S.createElement(ci.Provider,{children:t,value:f}))}function wm({children:e,location:t}){return am(ns(e),t)}function ns(e,t=[]){let n=[];return S.Children.forEach(e,(r,i)=>{if(!S.isValidElement(r))return;let o=[...t,i];if(r.type===S.Fragment){n.push.apply(n,ns(r.props.children,o));return}ce(r.type===ts,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ce(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=ns(r.props.children,o)),n.push(a)}),n}var Wi="get",Gi="application/x-www-form-urlencoded";function Oo(e){return e!=null&&typeof e.tagName=="string"}function xm(e){return Oo(e)&&e.tagName.toLowerCase()==="button"}function Cm(e){return Oo(e)&&e.tagName.toLowerCase()==="form"}function $m(e){return Oo(e)&&e.tagName.toLowerCase()==="input"}function Sm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Em(e,t){return e.button===0&&(!t||t==="_self")&&!Sm(e)}function rs(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function Pm(e,t){let n=rs(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var Si=null;function Rm(){if(Si===null)try{new FormData(document.createElement("form"),0),Si=!1}catch{Si=!0}return Si}var Mm=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Jo(e){return e!=null&&!Mm.has(e)?(it(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gi}"`),null):e}function km(e,t){let n,r,i,o,a;if(Cm(e)){let s=e.getAttribute("action");r=s?tn(s,t):null,n=e.getAttribute("method")||Wi,i=Jo(e.getAttribute("enctype"))||Gi,o=new FormData(e)}else if(xm(e)||$m(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?tn(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||Wi,i=Jo(e.getAttribute("formenctype"))||Jo(s.getAttribute("enctype"))||Gi,o=new FormData(s,e),!Rm()){let{name:u,type:d,value:h}=e;if(d==="image"){let g=u?`${u}.`:"";o.append(`${g}x`,"0"),o.append(`${g}y`,"0")}else u&&o.append(u,h)}}else{if(Oo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Wi,r=null,i=Gi,a=e}return o&&i==="text/plain"&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function Xs(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Dm(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Tm(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Om(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let a=await Dm(o,n);return a.links?a.links():[]}return[]}));return Im(r.flat(1).filter(Tm).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function iu(e,t,n,r,i,o){let a=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,s=(l,u)=>{var d;return n[u].pathname!==l.pathname||((d=n[u].route.path)==null?void 0:d.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return o==="assets"?t.filter((l,u)=>a(l,u)||s(l,u)):o==="data"?t.filter((l,u)=>{var h;let d=r.routes[l.route.id];if(!d||!d.hasLoader)return!1;if(a(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let g=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((h=n[0])==null?void 0:h.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function Fm(e,t){return Lm(e.map(n=>{let r=t.routes[n.route.id];if(!r)return[];let i=[r.module];return r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Lm(e){return[...new Set(e)]}function Am(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Im(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(Am(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}function Nm(e){let t=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return t.pathname==="/"?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}function jm(){let e=S.useContext(vr);return Xs(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function _m(){let e=S.useContext(To);return Xs(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Js=S.createContext(void 0);Js.displayName="FrameworkContext";function Wd(){let e=S.useContext(Js);return Xs(e,"You must render this element inside a <HydratedRouter> element"),e}function Km(e,t){let n=S.useContext(Js),[r,i]=S.useState(!1),[o,a]=S.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=t,g=S.useRef(null);S.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let m=$=>{$.forEach(x=>{a(x.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return g.current&&b.observe(g.current),()=>{b.disconnect()}}},[e]),S.useEffect(()=>{if(r){let m=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(m)}}},[r]);let f=()=>{i(!0)},p=()=>{i(!1),a(!1)};return n?e!=="intent"?[o,g,{}]:[o,g,{onFocus:Rr(s,f),onBlur:Rr(l,p),onMouseEnter:Rr(u,f),onMouseLeave:Rr(d,p),onTouchStart:Rr(h,f)}]:[!1,g,{}]}function Rr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Bm({page:e,...t}){let{router:n}=jm(),r=S.useMemo(()=>Ad(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?S.createElement(Vm,{page:e,matches:r,...t}):(console.warn(`Tried to prefetch ${e} but no routes matched.`),null)}function Hm(e){let{manifest:t,routeModules:n}=Wd(),[r,i]=S.useState([]);return S.useEffect(()=>{let o=!1;return Om(e,t,n).then(a=>{o||i(a)}),()=>{o=!0}},[e,t,n]),r}function Vm({page:e,matches:t,...n}){let r=rn(),{manifest:i,routeModules:o}=Wd(),{loaderData:a,matches:s}=_m(),l=S.useMemo(()=>iu(e,t,s,i,r,"data"),[e,t,s,i,r]),u=S.useMemo(()=>iu(e,t,s,i,r,"assets"),[e,t,s,i,r]),d=S.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let f=new Set,p=!1;if(t.forEach(b=>{var x;let $=i.routes[b.route.id];!$||!$.hasLoader||(!l.some(E=>E.route.id===b.route.id)&&b.route.id in a&&((x=o[b.route.id])!=null&&x.shouldRevalidate)||$.hasClientLoader?p=!0:f.add(b.route.id))}),f.size===0)return[];let m=Nm(e);return p&&f.size>0&&m.searchParams.set("_routes",t.filter(b=>f.has(b.route.id)).map(b=>b.route.id).join(",")),[m.pathname+m.search]},[a,r,i,l,t,e,o]),h=S.useMemo(()=>Fm(u,i),[u,i]),g=Hm(u);return S.createElement(S.Fragment,null,d.map(f=>S.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})),h.map(f=>S.createElement("link",{key:f,rel:"modulepreload",href:f,...n})),g.map(({key:f,link:p})=>S.createElement("link",{key:f,...p})))}function zm(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Gd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Gd&&(window.__reactRouterVersion="7.0.2")}catch{}function Um({basename:e,children:t,window:n}){let r=S.useRef();r.current==null&&(r.current=Tp({window:n,v5Compat:!0}));let i=r.current,[o,a]=S.useState({action:i.action,location:i.location}),s=S.useCallback(l=>{S.startTransition(()=>a(l))},[a]);return S.useLayoutEffect(()=>i.listen(s),[i,s]),S.createElement(ym,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Qd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Fo=S.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:d,viewTransition:h,...g},f){let{basename:p}=S.useContext(mt),m=typeof u=="string"&&Qd.test(u),b,$=!1;if(typeof u=="string"&&m&&(b=u,Gd))try{let D=new URL(window.location.href),P=u.startsWith("//")?new URL(D.protocol+u):new URL(u),T=tn(P.pathname,p);P.origin===D.origin&&T!=null?u=T+P.search+P.hash:$=!0}catch{it(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let x=rm(u,{relative:i}),[E,M,C]=Km(r,g),k=Gm(u,{replace:a,state:s,target:l,preventScrollReset:d,relative:i,viewTransition:h});function F(D){t&&t(D),D.defaultPrevented||k(D)}let y=S.createElement("a",{...g,...C,href:b||x,onClick:$||o?t:F,ref:zm(f,M),target:l,"data-discover":!m&&n==="render"?"true":void 0});return E&&!m?S.createElement(S.Fragment,null,y,S.createElement(Bm,{page:x})):y});Fo.displayName="Link";var Yd=S.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:s,children:l,...u},d){let h=fi(a,{relative:u.relative}),g=rn(),f=S.useContext(To),{navigator:p,basename:m}=S.useContext(mt),b=f!=null&&eb(h)&&s===!0,$=p.encodeLocation?p.encodeLocation(h).pathname:h.pathname,x=g.pathname,E=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(x=x.toLowerCase(),E=E?E.toLowerCase():null,$=$.toLowerCase()),E&&m&&(E=tn(E,m)||E);const M=$!=="/"&&$.endsWith("/")?$.length-1:$.length;let C=x===$||!i&&x.startsWith($)&&x.charAt(M)==="/",k=E!=null&&(E===$||!i&&E.startsWith($)&&E.charAt($.length)==="/"),F={isActive:C,isPending:k,isTransitioning:b},y=C?t:void 0,D;typeof r=="function"?D=r(F):D=[r,C?"active":null,k?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let P=typeof o=="function"?o(F):o;return S.createElement(Fo,{...u,"aria-current":y,className:D,ref:d,style:P,to:a,viewTransition:s},typeof l=="function"?l(F):l)});Yd.displayName="NavLink";var qm=S.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=Wi,action:s,onSubmit:l,relative:u,preventScrollReset:d,viewTransition:h,...g},f)=>{let p=Xm(),m=Jm(s,{relative:u}),b=a.toLowerCase()==="get"?"get":"post",$=typeof s=="string"&&Qd.test(s),x=E=>{if(l&&l(E),E.defaultPrevented)return;E.preventDefault();let M=E.nativeEvent.submitter,C=(M==null?void 0:M.getAttribute("formmethod"))||a;p(M||E.currentTarget,{fetcherKey:t,method:C,navigate:n,replace:i,state:o,relative:u,preventScrollReset:d,viewTransition:h})};return S.createElement("form",{ref:f,method:b,action:m,onSubmit:r?l:x,...g,"data-discover":!$&&e==="render"?"true":void 0})});qm.displayName="Form";function Wm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Zd(e){let t=S.useContext(vr);return ce(t,Wm(e)),t}function Gm(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=zd(),l=rn(),u=fi(e,{relative:o});return S.useCallback(d=>{if(Em(d,t)){d.preventDefault();let h=n!==void 0?n:qr(l)===qr(u);s(e,{replace:h,state:r,preventScrollReset:i,relative:o,viewTransition:a})}},[l,s,u,n,r,t,e,i,o,a])}function Qm(e){it(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=S.useRef(rs(e)),n=S.useRef(!1),r=rn(),i=S.useMemo(()=>Pm(r.search,n.current?null:t.current),[r.search]),o=zd(),a=S.useCallback((s,l)=>{const u=rs(typeof s=="function"?s(i):s);n.current=!0,o("?"+u,l)},[o,i]);return[i,a]}var Ym=0,Zm=()=>`__${String(++Ym)}__`;function Xm(){let{router:e}=Zd("useSubmit"),{basename:t}=S.useContext(mt),n=pm();return S.useCallback(async(r,i={})=>{let{action:o,method:a,encType:s,formData:l,body:u}=km(r,t);if(i.navigate===!1){let d=i.fetcherKey||Zm();await e.fetch(d,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function Jm(e,{relative:t}={}){let{basename:n}=S.useContext(mt),r=S.useContext(bt);ce(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...fi(e||".",{relative:t})},a=rn();if(e==null){o.search=a.search;let s=new URLSearchParams(o.search),l=s.getAll("index");if(l.some(d=>d==="")){s.delete("index"),l.filter(h=>h).forEach(h=>s.append("index",h));let d=s.toString();o.search=d?`?${d}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Pt([n,o.pathname])),qr(o)}function eb(e,t={}){let n=S.useContext(Bd);ce(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Zd("useViewTransitionState"),i=fi(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=tn(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=tn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return io(i.pathname,a)!=null||io(i.pathname,o)!=null}new TextEncoder;var oo=function(e){var t=e.className;return v.jsx("div",{className:"animate-pulse bg-slate-100 dark:bg-slate-800 ".concat(t)})};function le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var tb=["color"],nb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,tb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),rb=["color"],Xd=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,rb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ib=["color"],ob=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,ib);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ab=["color"],ur=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,ab);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M13.15 7.49998C13.15 4.66458 10.9402 1.84998 7.50002 1.84998C4.72167 1.84998 3.34849 3.9064 2.76335 5H4.5C4.77614 5 5 5.22386 5 5.5C5 5.77614 4.77614 6 4.5 6H1.5C1.22386 6 1 5.77614 1 5.5V2.5C1 2.22386 1.22386 2 1.5 2C1.77614 2 2 2.22386 2 2.5V4.31318C2.70453 3.07126 4.33406 0.849976 7.50002 0.849976C11.5628 0.849976 14.15 4.18537 14.15 7.49998C14.15 10.8146 11.5628 14.15 7.50002 14.15C5.55618 14.15 3.93778 13.3808 2.78548 12.2084C2.16852 11.5806 1.68668 10.839 1.35816 10.0407C1.25306 9.78536 1.37488 9.49315 1.63024 9.38806C1.8856 9.28296 2.17781 9.40478 2.2829 9.66014C2.56374 10.3425 2.97495 10.9745 3.4987 11.5074C4.47052 12.4963 5.83496 13.15 7.50002 13.15C10.9402 13.15 13.15 10.3354 13.15 7.49998ZM7.5 4.00001C7.77614 4.00001 8 4.22387 8 4.50001V7.29291L9.85355 9.14646C10.0488 9.34172 10.0488 9.65831 9.85355 9.85357C9.65829 10.0488 9.34171 10.0488 9.14645 9.85357L7.14645 7.85357C7.05268 7.7598 7 7.63262 7 7.50001V4.50001C7 4.22387 7.22386 4.00001 7.5 4.00001Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),sb=["color"],Jd=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,sb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lb=["color"],ef=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,lb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),ub=["color"],cb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,ub);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M2.8 1L2.74967 0.99997C2.52122 0.999752 2.32429 0.999564 2.14983 1.04145C1.60136 1.17312 1.17312 1.60136 1.04145 2.14983C0.999564 2.32429 0.999752 2.52122 0.99997 2.74967L1 2.8V5.2L0.99997 5.25033C0.999752 5.47878 0.999564 5.67572 1.04145 5.85017C1.17312 6.39864 1.60136 6.82688 2.14983 6.95856C2.32429 7.00044 2.52122 7.00025 2.74967 7.00003L2.8 7H5.2L5.25033 7.00003C5.47878 7.00025 5.67572 7.00044 5.85017 6.95856C6.39864 6.82688 6.82688 6.39864 6.95856 5.85017C7.00044 5.67572 7.00025 5.47878 7.00003 5.25033L7 5.2V2.8L7.00003 2.74967C7.00025 2.52122 7.00044 2.32429 6.95856 2.14983C6.82688 1.60136 6.39864 1.17312 5.85017 1.04145C5.67572 0.999564 5.47878 0.999752 5.25033 0.99997L5.2 1H2.8ZM2.38328 2.01382C2.42632 2.00348 2.49222 2 2.8 2H5.2C5.50779 2 5.57369 2.00348 5.61672 2.01382C5.79955 2.05771 5.94229 2.20045 5.98619 2.38328C5.99652 2.42632 6 2.49222 6 2.8V5.2C6 5.50779 5.99652 5.57369 5.98619 5.61672C5.94229 5.79955 5.79955 5.94229 5.61672 5.98619C5.57369 5.99652 5.50779 6 5.2 6H2.8C2.49222 6 2.42632 5.99652 2.38328 5.98619C2.20045 5.94229 2.05771 5.79955 2.01382 5.61672C2.00348 5.57369 2 5.50779 2 5.2V2.8C2 2.49222 2.00348 2.42632 2.01382 2.38328C2.05771 2.20045 2.20045 2.05771 2.38328 2.01382ZM9.8 1L9.74967 0.99997C9.52122 0.999752 9.32429 0.999564 9.14983 1.04145C8.60136 1.17312 8.17312 1.60136 8.04145 2.14983C7.99956 2.32429 7.99975 2.52122 7.99997 2.74967L8 2.8V5.2L7.99997 5.25033C7.99975 5.47878 7.99956 5.67572 8.04145 5.85017C8.17312 6.39864 8.60136 6.82688 9.14983 6.95856C9.32429 7.00044 9.52122 7.00025 9.74967 7.00003L9.8 7H12.2L12.2503 7.00003C12.4788 7.00025 12.6757 7.00044 12.8502 6.95856C13.3986 6.82688 13.8269 6.39864 13.9586 5.85017C14.0004 5.67572 14.0003 5.47878 14 5.25033L14 5.2V2.8L14 2.74967C14.0003 2.52122 14.0004 2.32429 13.9586 2.14983C13.8269 1.60136 13.3986 1.17312 12.8502 1.04145C12.6757 0.999564 12.4788 0.999752 12.2503 0.99997L12.2 1H9.8ZM9.38328 2.01382C9.42632 2.00348 9.49222 2 9.8 2H12.2C12.5078 2 12.5737 2.00348 12.6167 2.01382C12.7995 2.05771 12.9423 2.20045 12.9862 2.38328C12.9965 2.42632 13 2.49222 13 2.8V5.2C13 5.50779 12.9965 5.57369 12.9862 5.61672C12.9423 5.79955 12.7995 5.94229 12.6167 5.98619C12.5737 5.99652 12.5078 6 12.2 6H9.8C9.49222 6 9.42632 5.99652 9.38328 5.98619C9.20045 5.94229 9.05771 5.79955 9.01382 5.61672C9.00348 5.57369 9 5.50779 9 5.2V2.8C9 2.49222 9.00348 2.42632 9.01382 2.38328C9.05771 2.20045 9.20045 2.05771 9.38328 2.01382ZM2.74967 7.99997L2.8 8H5.2L5.25033 7.99997C5.47878 7.99975 5.67572 7.99956 5.85017 8.04145C6.39864 8.17312 6.82688 8.60136 6.95856 9.14983C7.00044 9.32429 7.00025 9.52122 7.00003 9.74967L7 9.8V12.2L7.00003 12.2503C7.00025 12.4788 7.00044 12.6757 6.95856 12.8502C6.82688 13.3986 6.39864 13.8269 5.85017 13.9586C5.67572 14.0004 5.47878 14.0003 5.25033 14L5.2 14H2.8L2.74967 14C2.52122 14.0003 2.32429 14.0004 2.14983 13.9586C1.60136 13.8269 1.17312 13.3986 1.04145 12.8502C0.999564 12.6757 0.999752 12.4788 0.99997 12.2503L1 12.2V9.8L0.99997 9.74967C0.999752 9.52122 0.999564 9.32429 1.04145 9.14983C1.17312 8.60136 1.60136 8.17312 2.14983 8.04145C2.32429 7.99956 2.52122 7.99975 2.74967 7.99997ZM2.8 9C2.49222 9 2.42632 9.00348 2.38328 9.01382C2.20045 9.05771 2.05771 9.20045 2.01382 9.38328C2.00348 9.42632 2 9.49222 2 9.8V12.2C2 12.5078 2.00348 12.5737 2.01382 12.6167C2.05771 12.7995 2.20045 12.9423 2.38328 12.9862C2.42632 12.9965 2.49222 13 2.8 13H5.2C5.50779 13 5.57369 12.9965 5.61672 12.9862C5.79955 12.9423 5.94229 12.7995 5.98619 12.6167C5.99652 12.5737 6 12.5078 6 12.2V9.8C6 9.49222 5.99652 9.42632 5.98619 9.38328C5.94229 9.20045 5.79955 9.05771 5.61672 9.01382C5.57369 9.00348 5.50779 9 5.2 9H2.8ZM9.8 8L9.74967 7.99997C9.52122 7.99975 9.32429 7.99956 9.14983 8.04145C8.60136 8.17312 8.17312 8.60136 8.04145 9.14983C7.99956 9.32429 7.99975 9.52122 7.99997 9.74967L8 9.8V12.2L7.99997 12.2503C7.99975 12.4788 7.99956 12.6757 8.04145 12.8502C8.17312 13.3986 8.60136 13.8269 9.14983 13.9586C9.32429 14.0004 9.52122 14.0003 9.74967 14L9.8 14H12.2L12.2503 14C12.4788 14.0003 12.6757 14.0004 12.8502 13.9586C13.3986 13.8269 13.8269 13.3986 13.9586 12.8502C14.0004 12.6757 14.0003 12.4788 14 12.2503L14 12.2V9.8L14 9.74967C14.0003 9.52122 14.0004 9.32429 13.9586 9.14983C13.8269 8.60136 13.3986 8.17312 12.8502 8.04145C12.6757 7.99956 12.4788 7.99975 12.2503 7.99997L12.2 8H9.8ZM9.38328 9.01382C9.42632 9.00348 9.49222 9 9.8 9H12.2C12.5078 9 12.5737 9.00348 12.6167 9.01382C12.7995 9.05771 12.9423 9.20045 12.9862 9.38328C12.9965 9.42632 13 9.49222 13 9.8V12.2C13 12.5078 12.9965 12.5737 12.9862 12.6167C12.9423 12.7995 12.7995 12.9423 12.6167 12.9862C12.5737 12.9965 12.5078 13 12.2 13H9.8C9.49222 13 9.42632 12.9965 9.38328 12.9862C9.20045 12.9423 9.05771 12.7995 9.01382 12.6167C9.00348 12.5737 9 12.5078 9 12.2V9.8C9 9.49222 9.00348 9.42632 9.01382 9.38328C9.05771 9.20045 9.20045 9.05771 9.38328 9.01382Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),db=["color"],fb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,db);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M1 3.25C1 3.11193 1.11193 3 1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25ZM1.25 2C0.559643 2 0 2.55964 0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25ZM9.01091 12H5.98909L5.79222 13.05H9.20778L9.01091 12Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hb=["color"],gb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,hb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pb=["color"],is=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,pb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mb=["color"],bb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,mb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vb=["color"],yb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,vb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wb=["color"],xb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,wb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cb=["color"],$b=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Cb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M12.3536 13.3536C12.1583 13.5488 11.8417 13.5488 11.6465 13.3536L6.39645 8.10355C6.36478 8.07188 6.33824 8.03702 6.31685 8H5.00002C4.78719 8 4.59769 7.86528 4.52777 7.66426L2.12777 0.764277C2.05268 0.548387 2.13355 0.309061 2.3242 0.182972C2.51486 0.0568819 2.76674 0.0761337 2.93602 0.229734L8.336 5.12972C8.44044 5.22449 8.50001 5.35897 8.50001 5.5V5.81684C8.53702 5.83824 8.57189 5.86478 8.60356 5.89645L13.8536 11.1464C14.0488 11.3417 14.0488 11.6583 13.8536 11.8536L12.3536 13.3536ZM8.25 6.95711L7.45711 7.75L12 12.2929L12.7929 11.5L8.25 6.95711ZM3.71669 2.28845L5.35549 7H6.2929L7.50001 5.79289V5.72146L3.71669 2.28845Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sb=["color"],Eb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Sb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Pb=["color"],Rb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Pb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM4.50003 7C4.22389 7 4.00003 7.22386 4.00003 7.5C4.00003 7.77614 4.22389 8 4.50003 8H10.5C10.7762 8 11 7.77614 11 7.5C11 7.22386 10.7762 7 10.5 7H4.50003Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Mb=["color"],kb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Mb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Db=["color"],Tb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Db);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ob=["color"],Fb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Ob);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Lb=["color"],Ab=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Lb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ib=["color"],tf=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Ib);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Nb=["color"],jb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Nb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),c.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 9.1488 1.47969 10.657 2.4767 11.8162L1.64647 12.6464C1.45121 12.8417 1.45121 13.1583 1.64647 13.3535C1.84173 13.5488 2.15832 13.5488 2.35358 13.3535L3.18383 12.5233C4.34302 13.5202 5.8511 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 5.85107 13.5202 4.34298 12.5233 3.1838L13.3536 2.35355C13.5488 2.15829 13.5488 1.8417 13.3536 1.64644C13.1583 1.45118 12.8417 1.45118 12.6465 1.64644L11.8162 2.47667C10.657 1.47966 9.14883 0.877045 7.49991 0.877045ZM11.1423 3.15065C10.1568 2.32449 8.88644 1.82704 7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 8.88641 2.32452 10.1568 3.15069 11.1422L11.1423 3.15065ZM3.85781 11.8493C4.84322 12.6753 6.11348 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 6.11345 12.6754 4.84319 11.8493 3.85778L3.85781 11.8493Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_b=["color"],el=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,_b);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M4.10876 14L9.46582 1H10.8178L5.46074 14H4.10876Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Kb=["color"],Bb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Kb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Hb=["color"],Vb=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Hb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M0.900024 7.50002C0.900024 3.85495 3.85495 0.900024 7.50002 0.900024C11.1451 0.900024 14.1 3.85495 14.1 7.50002C14.1 11.1451 11.1451 14.1 7.50002 14.1C3.85495 14.1 0.900024 11.1451 0.900024 7.50002ZM7.50002 1.80002C4.35201 1.80002 1.80002 4.35201 1.80002 7.50002C1.80002 10.648 4.35201 13.2 7.50002 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.35201 10.648 1.80002 7.50002 1.80002ZM3.07504 7.50002C3.07504 5.05617 5.05618 3.07502 7.50004 3.07502C9.94388 3.07502 11.925 5.05617 11.925 7.50002C11.925 9.94386 9.94388 11.925 7.50004 11.925C5.05618 11.925 3.07504 9.94386 3.07504 7.50002ZM7.50004 3.92502C5.52562 3.92502 3.92504 5.52561 3.92504 7.50002C3.92504 9.47442 5.52563 11.075 7.50004 11.075C9.47444 11.075 11.075 9.47442 11.075 7.50002C11.075 5.52561 9.47444 3.92502 7.50004 3.92502ZM7.50004 5.25002C6.2574 5.25002 5.25004 6.25739 5.25004 7.50002C5.25004 8.74266 6.2574 9.75002 7.50004 9.75002C8.74267 9.75002 9.75004 8.74266 9.75004 7.50002C9.75004 6.25738 8.74267 5.25002 7.50004 5.25002ZM6.05004 7.50002C6.05004 6.69921 6.69923 6.05002 7.50004 6.05002C8.30084 6.05002 8.95004 6.69921 8.95004 7.50002C8.95004 8.30083 8.30084 8.95002 7.50004 8.95002C6.69923 8.95002 6.05004 8.30083 6.05004 7.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),zb=["color"],Lo=c.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,zb);return c.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),c.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});c.createContext(null);c.createContext(null);c.createContext(null);c.createContext(null);c.createContext(null);const nf=c.createContext({});class tl{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new tl(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t}constructor(t,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.type=t,this.key=n}}class Ub{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(t),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(t){let n=this.keyMap.get(t);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(t){let n=this.keyMap.get(t);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,n=new t;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(t.key,t)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(t)}commit(t,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=n,this.frozen=!r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}class rf{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}appendChild(t){this.ownerDocument.startTransaction(),t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),t.hasSetProps&&this.ownerDocument.addNode(t),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}insertBefore(t,n){if(n==null)return this.appendChild(t);this.ownerDocument.startTransaction(),t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=n,t.previousSibling=n.previousSibling,t.index=n.index,this.firstChild===n?this.firstChild=t:n.previousSibling&&(n.previousSibling.nextSibling=t),n.previousSibling=t,t.parentNode=n.parentNode;let r=n;for(;r;)r.index++,r=r.nextSibling;t.hasSetProps&&this.ownerDocument.addNode(t),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}removeChild(t){if(t.parentNode!==this||!this.ownerDocument.isMounted)return;this.ownerDocument.startTransaction();let n=t.nextSibling;for(;n;)n.index--,n=n.nextSibling;t.nextSibling&&(t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.removeNode(t),this.ownerDocument.endTransaction(),this.ownerDocument.queueUpdate()}addEventListener(){}removeEventListener(){}constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this.ownerDocument=t}}class Wr extends rf{get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Wr?this.parentNode.level+(this.node.type==="item"?1:0):0}updateNode(){var t,n,r,i;let o=this.ownerDocument.getMutableNode(this);o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof Wr?this.parentNode.node.key:null;var a;o.prevKey=(a=(t=this.previousSibling)===null||t===void 0?void 0:t.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=(n=this.nextSibling)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(r=this.firstChild)===null||r===void 0?void 0:r.node.key)!==null&&l!==void 0?l:null;var u;o.lastChildKey=(u=(i=this.lastChild)===null||i===void 0?void 0:i.node.key)!==null&&u!==void 0?u:null}setProps(t,n,r,i){let o=this.ownerDocument.getMutableNode(this),{value:a,textValue:s,id:l,...u}=t;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||t["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}this.hasSetProps||(this.ownerDocument.addNode(this),this.ownerDocument.endTransaction(),this.hasSetProps=!0),this.ownerDocument.queueUpdate()}get style(){return{}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(t,n){super(n),this.nodeType=8,this._index=0,this.hasSetProps=!1,this.node=new tl(t,`react-aria-${++n.nodeId}`),this.ownerDocument.startTransaction()}}class qb extends rf{get isConnected(){return this.isMounted}createElement(t){return new Wr(t,this)}getMutableNode(t){let n=t.node;return this.mutatedNodes.has(t)||(n=t.node.clone(),this.mutatedNodes.add(t),t.node=n),this.markDirty(t),n}getMutableCollection(){return!this.isSSR&&!this.collectionMutated&&(this.collection=this.collection.clone(),this.collectionMutated=!0),this.collection}markDirty(t){this.dirtyNodes.add(t)}startTransaction(){this.transactionCount++}endTransaction(){this.transactionCount--}addNode(t){let n=this.getMutableCollection();if(!n.getItem(t.node.key)){n.addNode(t.node);for(let r of t)this.addNode(r)}this.markDirty(t)}removeNode(t){for(let r of t)this.removeNode(r);this.getMutableCollection().removeNode(t.node.key),this.markDirty(t)}getCollection(){return this.transactionCount>0?this.collection:(this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof Wr&&o.isConnected&&o.updateNode();if(this.dirtyNodes.clear(),this.mutatedNodes.size||this.collectionMutated){var t,n;let o=this.getMutableCollection();for(let a of this.mutatedNodes)a.isConnected&&o.addNode(a.node);var r,i;o.commit((r=(t=this.firstChild)===null||t===void 0?void 0:t.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.mutatedNodes.clear()}this.collectionMutated=!1}queueUpdate(){if(!(this.dirtyNodes.size===0||this.transactionCount>0))for(let t of this.subscriptions)t()}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.mutatedNodes=new Set,this.subscriptions=new Set,this.transactionCount=0,this.collection=t,this.collectionMutated=!0}}function of(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=e,a=c.useMemo(()=>new WeakMap,o);return c.useMemo(()=>{if(n&&typeof t=="function"){let u=[];for(let d of n){let h=a.get(d);if(!h){h=t(d);var s,l;let g=(l=(s=h.props.id)!==null&&s!==void 0?s:d.key)!==null&&l!==void 0?l:d.id;if(g==null)throw new Error("Could not determine key for item");r&&(g=r+":"+g),h=c.cloneElement(h,i?{key:g,id:g,value:d}:{key:g}),a.set(d,h)}u.push(h)}return u}else if(typeof t!="function")return t},[t,n,a,r,i])}const ao={prefix:String(Math.round(Math.random()*1e10)),current:0},af=c.createContext(ao),Wb=c.createContext(!1);let Gb=!!(typeof window<"u"&&window.document&&window.document.createElement),ea=new WeakMap;function Qb(e=!1){let t=c.useContext(af),n=c.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=ea.get(o);a==null?ea.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==a.state&&(t.current=a.id,ea.delete(o))}n.current=++t.current}return n.current}function Yb(e){let t=c.useContext(af);t===ao&&!Gb&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Qb(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function Zb(e){let t=c.useId(),[n]=c.useState(kt()),r=n?"react-aria":`react-aria${ao.prefix}`;return e||`${r}-${t}`}const Xb=typeof c.useId=="function"?Zb:Yb;function Jb(){return!1}function e2(){return!0}function t2(e){return()=>{}}function kt(){return typeof c.useSyncExternalStore=="function"?c.useSyncExternalStore(t2,Jb,e2):c.useContext(Wb)}if(typeof HTMLTemplateElement<"u"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const so=c.createContext(!1),n2=typeof DocumentFragment<"u"?new DocumentFragment:null;function r2(e){let t=c.useContext(so),n=kt();if(t)return c.createElement(c.Fragment,null,e.children);let r=c.createElement(so.Provider,{value:!0},e.children);return n?c.createElement("template",{"data-react-aria-hidden":!0},r):Rn.createPortal(r,n2)}function i2(e){let t=(n,r)=>c.useContext(so)?null:e(n,r);return t.displayName=e.displayName||e.name,c.forwardRef(t)}function o2(){return c.useContext(so)}const re=typeof document<"u"?c.useLayoutEffect:()=>{};function tt(e){const t=c.useRef(null);return re(()=>{t.current=e},[e]),c.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function a2(e){let[t,n]=c.useState(e),r=c.useRef(null),i=tt(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?i():n(a.value)});re(()=>{r.current&&i()});let o=tt(a=>{r.current=a(t),i()});return[t,o]}let s2=!!(typeof window<"u"&&window.document&&window.document.createElement),Nt=new Map;function ot(e){let[t,n]=c.useState(e),r=c.useRef(null),i=Xb(t),o=c.useCallback(a=>{r.current=a},[]);return s2&&(Nt.has(i)&&!Nt.get(i).includes(o)?Nt.set(i,[...Nt.get(i),o]):Nt.set(i,[o])),re(()=>{let a=i;return()=>{Nt.delete(a)}},[i]),c.useEffect(()=>{let a=r.current;a&&(r.current=null,n(a))}),i}function l2(e,t){if(e===t)return e;let n=Nt.get(e);if(n)return n.forEach(i=>i(t)),t;let r=Nt.get(t);return r?(r.forEach(i=>i(e)),e):t}function Qi(e=[]){let t=ot(),[n,r]=a2(t),i=c.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return re(i,[t,i,...e]),n}function cr(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const oe=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},nt=e=>e&&"window"in e&&e.window===e?e:oe(e).defaultView||window;function sf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=sf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function dr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=sf(e))&&(r&&(r+=" "),r+=t);return r}function ae(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let o=t[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=cr(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?t[i]=dr(o,a):i==="id"&&o&&a?t.id=l2(o,a):t[i]=a!==void 0?a:o}}return t}function lf(...e){return e.length===1&&e[0]?e[0]:t=>{for(let n of e)typeof n=="function"?n(t):n!=null&&(n.current=t)}}const u2=new Set(["id"]),c2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),d2=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),f2=/^(data-.*)$/;function Oe(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(u2.has(a)||n&&c2.has(a)||r&&d2.has(a)||i!=null&&i.has(a)||f2.test(a))&&(o[a]=e[a]);return o}function Et(e){if(h2())e.focus({preventScroll:!0});else{let t=g2(e);e.focus(),p2(t)}}let Ei=null;function h2(){if(Ei==null){Ei=!1;try{document.createElement("div").focus({get preventScroll(){return Ei=!0,!0}})}catch{}}return Ei}function g2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function p2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function Ao(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function nl(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Dt(e){let t=null;return()=>(t==null&&(t=e()),t)}const Cn=Dt(function(){return nl(/^Mac/i)}),m2=Dt(function(){return nl(/^iPhone/i)}),uf=Dt(function(){return nl(/^iPad/i)||Cn()&&navigator.maxTouchPoints>1}),Io=Dt(function(){return m2()||uf()}),b2=Dt(function(){return Cn()||Io()}),cf=Dt(function(){return Ao(/AppleWebKit/i)&&!v2()}),v2=Dt(function(){return Ao(/Chrome/i)}),df=Dt(function(){return Ao(/Android/i)}),y2=Dt(function(){return Ao(/Firefox/i)}),w2=c.createContext({isNative:!0,open:C2,useHref:e=>e});function No(){return c.useContext(w2)}function $n(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=t;y2()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Cn()?o=!0:a=!0);let u=cf()&&Cn()&&!uf()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});$n.isOpening=n,Et(e),e.dispatchEvent(u),$n.isOpening=!1}$n.isOpening=!1;function x2(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function C2(e,t){x2(e,n=>$n(n,t))}function $2(e){let t=No();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let jn=new Map,os=new Set;function ou(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=jn.get(r.target);i||(i=new Set,jn.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=jn.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),jn.delete(r.target)),jn.size===0)){for(let o of os)o();os.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?ou():document.addEventListener("DOMContentLoaded",ou));function ff(e){requestAnimationFrame(()=>{jn.size===0?e():os.add(e)})}function hf(){let e=c.useRef(new Map),t=c.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{e.current.delete(a),a(...u)}:a;e.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,a,s)},[]),n=c.useCallback((i,o,a,s)=>{var l;let u=((l=e.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),e.current.delete(a)},[]),r=c.useCallback(()=>{e.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return c.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function gf(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=ot(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function yr(e){const t=c.useRef(null);return c.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function S2(){return typeof window.ResizeObserver<"u"}function as(e){const{ref:t,box:n,onResize:r}=e;c.useEffect(()=>{let i=t==null?void 0:t.current;if(i)if(S2()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t,n])}function rl(e,t){re(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Gr(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function pf(e,t){let n=e;for(Gr(n,t)&&(n=n.parentElement);n&&!Gr(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function E2(e,t){const n=[];for(;e&&e!==document.documentElement;)Gr(e,t)&&n.push(e),e=e.parentElement;return n}let We=typeof document<"u"&&window.visualViewport;function P2(){let e=kt(),[t,n]=c.useState(()=>e?{width:0,height:0}:au());return c.useEffect(()=>{let r=()=>{n(i=>{let o=au();return o.width===i.width&&o.height===i.height?i:o})};return We?We.addEventListener("resize",r):window.addEventListener("resize",r),()=>{We?We.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function au(){return{width:We&&(We==null?void 0:We.width)||window.innerWidth,height:We&&(We==null?void 0:We.height)||window.innerHeight}}let R2=0;const ta=new Map;function M2(e){let[t,n]=c.useState();return re(()=>{if(!e)return;let r=ta.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${R2++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=e,document.body.appendChild(o),r={refCount:0,element:o},ta.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),ta.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function su(e,t,n,r){let i=tt(n),o=n==null;c.useEffect(()=>{if(o||!e.current)return;let a=e.current;return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[e,t,r,o,i])}function mf(e,t){let n=lu(e,t,"left"),r=lu(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u}=getComputedStyle(e),d=e.scrollLeft+parseInt(u,10),h=e.scrollTop+parseInt(l,10),g=d+e.clientWidth,f=h+e.clientHeight;n<=a?a=n-parseInt(u,10):n+i>g&&(a+=n+i-g),r<=h?s=r-parseInt(l,10):r+o>f&&(s+=r+o-f),e.scrollLeft=a,e.scrollTop=s}function lu(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function uu(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=E2(e);for(let u of l)mf(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:d,top:h}=e.getBoundingClientRect();if(Math.abs(l-d)>1||Math.abs(u-h)>1){var r,i,o;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"})}}}}function ss(e){return e.mozInputSource===0&&e.isTrusted?!0:df()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function k2(e){return!df()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}function hi(e,t,n){let[r,i]=c.useState(e||t),o=c.useRef(e!==void 0),a=e!==void 0;c.useEffect(()=>{let u=o.current;u!==a&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${a?"controlled":"uncontrolled"}.`),o.current=a},[a]);let s=a?e:r,l=c.useCallback((u,...d)=>{let h=(g,...f)=>{n&&(Object.is(s,g)||n(g,...f)),a||(s=g)};typeof u=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((f,...p)=>{let m=u(a?s:f,...p);return h(m,...d),a?f:m})):(a||i(u),h(u,...d))},[a,s,n]);return[s,l]}function Qr(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}var bf={exports:{}},vf={};/**
20
+ Please change the parent <Route path="${w}"> to <Route path="${w==="/"?"*":`${w}/*`}">.`)}let c=gn(),h;if(t){let w=typeof t=="string"?Ir(t):t;de(u==="/"||((v=w.pathname)==null?void 0:v.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${w.pathname}" was given in the \`location\` prop.`),h=w}else h=c;let f=h.pathname||"/",p=f;if(u!=="/"){let w=u.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(w.length).join("/")}let m=mf(e,{pathname:p});bt(g||m!=null,`No routes matched location "${h.pathname}${h.search}${h.hash}" `),bt(m==null||m[m.length-1].route.element!==void 0||m[m.length-1].route.Component!==void 0||m[m.length-1].route.lazy!==void 0,`Matched leaf route at location "${h.pathname}${h.search}${h.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=ab(m&&m.map(w=>Object.assign({},w,{params:Object.assign({},s,w.params),pathname:At([u,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?u:At([u,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),o,n,r);return t&&b?$.createElement(Oi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...h},navigationType:"POP"}},b):b}function nb(){let e=db(),t=Gm(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},o={padding:"2px 4px",backgroundColor:r},a=null;return console.error("Error handled by React Router default ErrorBoundary:",e),a=$.createElement($.Fragment,null,$.createElement("p",null,"💿 Hey developer 👋"),$.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",$.createElement("code",{style:o},"ErrorBoundary")," or"," ",$.createElement("code",{style:o},"errorElement")," prop on your route.")),$.createElement($.Fragment,null,$.createElement("h2",null,"Unexpected Application Error!"),$.createElement("h3",{style:{fontStyle:"italic"}},t),n?$.createElement("pre",{style:i},n):null,a)}var rb=$.createElement(nb,null),ib=class extends $.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?$.createElement(kt.Provider,{value:this.props.routeContext},$.createElement(vl.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function ob({routeContext:e,match:t,children:n}){let r=$.useContext(Nr);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),$.createElement(kt.Provider,{value:e},n)}function ab(e,t=[],n=null,r=null){if(e==null){if(!n)return null;if(n.errors)e=n.matches;else if(t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,o=n==null?void 0:n.errors;if(o!=null){let l=i.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);de(l>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),i=i.slice(0,Math.min(i.length,l+1))}let a=!1,s=-1;if(n)for(let l=0;l<i.length;l++){let u=i[l];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(s=l),u.route.id){let{loaderData:g,errors:c}=n,h=u.route.loader&&!g.hasOwnProperty(u.route.id)&&(!c||c[u.route.id]===void 0);if(u.route.lazy||h){a=!0,s>=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((l,u,g)=>{let c,h=!1,f=null,p=null;n&&(c=o&&u.route.id?o[u.route.id]:void 0,f=u.route.errorElement||rb,a&&(s<0&&g===0?(Rf("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):s===g&&(h=!0,p=u.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,g+1)),b=()=>{let v;return c?v=f:h?v=p:u.route.Component?v=$.createElement(u.route.Component,null):u.route.element?v=u.route.element:v=l,$.createElement(ob,{match:u,routeContext:{outlet:l,matches:m,isDataRoute:n!=null},children:v})};return n&&(u.route.ErrorBoundary||u.route.errorElement||g===0)?$.createElement(ib,{location:n.location,revalidation:n.revalidation,component:f,error:c,children:b(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):b()},null)}function yl(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sb(e){let t=$.useContext(Nr);return de(t,yl(e)),t}function lb(e){let t=$.useContext(ta);return de(t,yl(e)),t}function ub(e){let t=$.useContext(kt);return de(t,yl(e)),t}function wl(e){let t=ub(e),n=t.matches[t.matches.length-1];return de(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cb(){return wl("useRouteId")}function db(){var r;let e=$.useContext(vl),t=lb("useRouteError"),n=wl("useRouteError");return e!==void 0?e:(r=t.errors)==null?void 0:r[n]}function fb(){let{router:e}=sb("useNavigate"),t=wl("useNavigate"),n=$.useRef(!1);return $f(()=>{n.current=!0}),$.useCallback(async(i,o={})=>{bt(n.current,Sf),n.current&&(typeof i=="number"?e.navigate(i):await e.navigate(i,{fromRouteId:t,...o}))},[e,t])}var Du={};function Rf(e,t,n){!t&&!Du[e]&&(Du[e]=!0,bt(!1,n))}$.memo(hb);function hb({routes:e,future:t,state:n}){return Pf(e,void 0,n,t)}function Rs(e){de(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function gb({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:i,static:o=!1}){de(!Di(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let a=e.replace(/^\/*/,"/"),s=$.useMemo(()=>({basename:a,navigator:i,static:o,future:{}}),[a,i,o]);typeof n=="string"&&(n=Ir(n));let{pathname:l="/",search:u="",hash:g="",state:c=null,key:h="default"}=n,f=$.useMemo(()=>{let p=jt(l,a);return p==null?null:{location:{pathname:p,search:u,hash:g,state:c,key:h},navigationType:r}},[a,l,u,g,c,h,r]);return bt(f!=null,`<Router basename="${a}"> is not able to match the URL "${l}${u}${g}" because it does not start with the basename, so the <Router> won't render anything.`),f==null?null:$.createElement(Mt.Provider,{value:s},$.createElement(Oi.Provider,{children:t,value:f}))}function pb({children:e,location:t}){return tb(Ms(e),t)}function Ms(e,t=[]){let n=[];return $.Children.forEach(e,(r,i)=>{if(!$.isValidElement(r))return;let o=[...t,i];if(r.type===$.Fragment){n.push.apply(n,Ms(r.props.children,o));return}de(r.type===Rs,`[${typeof r.type=="string"?r.type:r.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),de(!r.props.index||!r.props.children,"An index route cannot have child routes.");let a={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,hydrateFallbackElement:r.props.hydrateFallbackElement,HydrateFallback:r.props.HydrateFallback,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.hasErrorBoundary===!0||r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Ms(r.props.children,o)),n.push(a)}),n}var co="get",fo="application/x-www-form-urlencoded";function na(e){return e!=null&&typeof e.tagName=="string"}function mb(e){return na(e)&&e.tagName.toLowerCase()==="button"}function bb(e){return na(e)&&e.tagName.toLowerCase()==="form"}function vb(e){return na(e)&&e.tagName.toLowerCase()==="input"}function yb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function wb(e,t){return e.button===0&&(!t||t==="_self")&&!yb(e)}function ks(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function xb(e,t){let n=ks(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}var Vi=null;function Cb(){if(Vi===null)try{new FormData(document.createElement("form"),0),Vi=!1}catch{Vi=!0}return Vi}var Sb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ma(e){return e!=null&&!Sb.has(e)?(bt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fo}"`),null):e}function $b(e,t){let n,r,i,o,a;if(bb(e)){let s=e.getAttribute("action");r=s?jt(s,t):null,n=e.getAttribute("method")||co,i=Ma(e.getAttribute("enctype"))||fo,o=new FormData(e)}else if(mb(e)||vb(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||s.getAttribute("action");if(r=l?jt(l,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||co,i=Ma(e.getAttribute("formenctype"))||Ma(s.getAttribute("enctype"))||fo,o=new FormData(s,e),!Cb()){let{name:u,type:g,value:c}=e;if(g==="image"){let h=u?`${u}.`:"";o.append(`${h}x`,"0"),o.append(`${h}y`,"0")}else u&&o.append(u,c)}}else{if(na(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=co,r=null,i=fo,a=e}return o&&i==="text/plain"&&(a=o,o=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:o,body:a}}function xl(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}async function Eb(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Pb(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Rb(e,t,n){let r=await Promise.all(e.map(async i=>{let o=t.routes[i.route.id];if(o){let a=await Eb(o,n);return a.links?a.links():[]}return[]}));return Db(r.flat(1).filter(Pb).filter(i=>i.rel==="stylesheet"||i.rel==="preload").map(i=>i.rel==="stylesheet"?{...i,rel:"prefetch",as:"style"}:{...i,rel:"prefetch"}))}function Tu(e,t,n,r,i,o){let a=(l,u)=>n[u]?l.route.id!==n[u].route.id:!0,s=(l,u)=>{var g;return n[u].pathname!==l.pathname||((g=n[u].route.path)==null?void 0:g.endsWith("*"))&&n[u].params["*"]!==l.params["*"]};return o==="assets"?t.filter((l,u)=>a(l,u)||s(l,u)):o==="data"?t.filter((l,u)=>{var c;let g=r.routes[l.route.id];if(!g||!g.hasLoader)return!1;if(a(l,u)||s(l,u))return!0;if(l.route.shouldRevalidate){let h=l.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:((c=n[0])==null?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function Mb(e,t,{includeHydrateFallback:n}={}){return kb(e.map(r=>{let i=t.routes[r.route.id];if(!i)return[];let o=[i.module];return i.clientActionModule&&(o=o.concat(i.clientActionModule)),i.clientLoaderModule&&(o=o.concat(i.clientLoaderModule)),n&&i.hydrateFallbackModule&&(o=o.concat(i.hydrateFallbackModule)),i.imports&&(o=o.concat(i.imports)),o}).flat(1))}function kb(e){return[...new Set(e)]}function Ob(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Db(e,t){let n=new Set;return new Set(t),e.reduce((r,i)=>{let o=JSON.stringify(Ob(i));return n.has(o)||(n.add(o),r.push({key:o,link:i})),r},[])}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Tb=new Set([100,101,204,205]);function Fb(e,t){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname="_root.data":t&&jt(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.data`:n.pathname=`${n.pathname.replace(/\/$/,"")}.data`,n}function Mf(){let e=$.useContext(Nr);return xl(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Lb(){let e=$.useContext(ta);return xl(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Cl=$.createContext(void 0);Cl.displayName="FrameworkContext";function kf(){let e=$.useContext(Cl);return xl(e,"You must render this element inside a <HydratedRouter> element"),e}function Ib(e,t){let n=$.useContext(Cl),[r,i]=$.useState(!1),[o,a]=$.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:g,onTouchStart:c}=t,h=$.useRef(null);$.useEffect(()=>{if(e==="render"&&a(!0),e==="viewport"){let m=v=>{v.forEach(w=>{a(w.isIntersecting)})},b=new IntersectionObserver(m,{threshold:.5});return h.current&&b.observe(h.current),()=>{b.disconnect()}}},[e]),$.useEffect(()=>{if(r){let m=setTimeout(()=>{a(!0)},100);return()=>{clearTimeout(m)}}},[r]);let f=()=>{i(!0)},p=()=>{i(!1),a(!1)};return n?e!=="intent"?[o,h,{}]:[o,h,{onFocus:Hr(s,f),onBlur:Hr(l,p),onMouseEnter:Hr(u,f),onMouseLeave:Hr(g,p),onTouchStart:Hr(c,f)}]:[!1,h,{}]}function Hr(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Nb({page:e,...t}){let{router:n}=Mf(),r=$.useMemo(()=>mf(n.routes,e,n.basename),[n.routes,e,n.basename]);return r?$.createElement(_b,{page:e,matches:r,...t}):null}function Ab(e){let{manifest:t,routeModules:n}=kf(),[r,i]=$.useState([]);return $.useEffect(()=>{let o=!1;return Rb(e,t,n).then(a=>{o||i(a)}),()=>{o=!0}},[e,t,n]),r}function _b({page:e,matches:t,...n}){let r=gn(),{manifest:i,routeModules:o}=kf(),{basename:a}=Mf(),{loaderData:s,matches:l}=Lb(),u=$.useMemo(()=>Tu(e,t,l,i,r,"data"),[e,t,l,i,r]),g=$.useMemo(()=>Tu(e,t,l,i,r,"assets"),[e,t,l,i,r]),c=$.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let p=new Set,m=!1;if(t.forEach(v=>{var x;let w=i.routes[v.route.id];!w||!w.hasLoader||(!u.some(k=>k.route.id===v.route.id)&&v.route.id in s&&((x=o[v.route.id])!=null&&x.shouldRevalidate)||w.hasClientLoader?m=!0:p.add(v.route.id))}),p.size===0)return[];let b=Fb(e,a);return m&&p.size>0&&b.searchParams.set("_routes",t.filter(v=>p.has(v.route.id)).map(v=>v.route.id).join(",")),[b.pathname+b.search]},[a,s,r,i,u,t,e,o]),h=$.useMemo(()=>Mb(g,i),[g,i]),f=Ab(g);return $.createElement($.Fragment,null,c.map(p=>$.createElement("link",{key:p,rel:"prefetch",as:"fetch",href:p,...n})),h.map(p=>$.createElement("link",{key:p,rel:"modulepreload",href:p,...n})),f.map(({key:p,link:m})=>$.createElement("link",{key:p,...m})))}function jb(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var Of=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Of&&(window.__reactRouterVersion="7.6.1")}catch{}function Kb({basename:e,children:t,window:n}){let r=$.useRef();r.current==null&&(r.current=Em({window:n,v5Compat:!0}));let i=r.current,[o,a]=$.useState({action:i.action,location:i.location}),s=$.useCallback(l=>{$.startTransition(()=>a(l))},[a]);return $.useLayoutEffect(()=>i.listen(s),[i,s]),$.createElement(gb,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:i})}var Df=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ra=$.forwardRef(function({onClick:t,discover:n="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,state:s,target:l,to:u,preventScrollReset:g,viewTransition:c,...h},f){let{basename:p}=$.useContext(Mt),m=typeof u=="string"&&Df.test(u),b,v=!1;if(typeof u=="string"&&m&&(b=u,Of))try{let D=new URL(window.location.href),L=u.startsWith("//")?new URL(D.protocol+u):new URL(u),E=jt(L.pathname,p);L.origin===D.origin&&E!=null?u=E+L.search+L.hash:v=!0}catch{bt(!1,`<Link to="${u}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let w=Zm(u,{relative:i}),[x,k,S]=Ib(r,h),R=Vb(u,{replace:a,state:s,target:l,preventScrollReset:g,relative:i,viewTransition:c});function P(D){t&&t(D),D.defaultPrevented||R(D)}let I=$.createElement("a",{...h,...S,href:b||w,onClick:v||o?t:P,ref:jb(f,k),target:l,"data-discover":!m&&n==="render"?"true":void 0});return x&&!m?$.createElement($.Fragment,null,I,$.createElement(Nb,{page:w})):I});ra.displayName="Link";var Tf=$.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:s,children:l,...u},g){let c=Ti(a,{relative:u.relative}),h=gn(),f=$.useContext(ta),{navigator:p,basename:m}=$.useContext(Mt),b=f!=null&&Qb(c)&&s===!0,v=p.encodeLocation?p.encodeLocation(c).pathname:c.pathname,w=h.pathname,x=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;n||(w=w.toLowerCase(),x=x?x.toLowerCase():null,v=v.toLowerCase()),x&&m&&(x=jt(x,m)||x);const k=v!=="/"&&v.endsWith("/")?v.length-1:v.length;let S=w===v||!i&&w.startsWith(v)&&w.charAt(k)==="/",R=x!=null&&(x===v||!i&&x.startsWith(v)&&x.charAt(v.length)==="/"),P={isActive:S,isPending:R,isTransitioning:b},I=S?t:void 0,D;typeof r=="function"?D=r(P):D=[r,S?"active":null,R?"pending":null,b?"transitioning":null].filter(Boolean).join(" ");let L=typeof o=="function"?o(P):o;return $.createElement(ra,{...u,"aria-current":I,className:D,ref:g,style:L,to:a,viewTransition:s},typeof l=="function"?l(P):l)});Tf.displayName="NavLink";var Bb=$.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:o,method:a=co,action:s,onSubmit:l,relative:u,preventScrollReset:g,viewTransition:c,...h},f)=>{let p=qb(),m=Gb(s,{relative:u}),b=a.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&Df.test(s),w=x=>{if(l&&l(x),x.defaultPrevented)return;x.preventDefault();let k=x.nativeEvent.submitter,S=(k==null?void 0:k.getAttribute("formmethod"))||a;p(k||x.currentTarget,{fetcherKey:t,method:S,navigate:n,replace:i,state:o,relative:u,preventScrollReset:g,viewTransition:c})};return $.createElement("form",{ref:f,method:b,action:m,onSubmit:r?l:w,...h,"data-discover":!v&&e==="render"?"true":void 0})});Bb.displayName="Form";function Hb(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ff(e){let t=$.useContext(Nr);return de(t,Hb(e)),t}function Vb(e,{target:t,replace:n,state:r,preventScrollReset:i,relative:o,viewTransition:a}={}){let s=Ef(),l=gn(),u=Ti(e,{relative:o});return $.useCallback(g=>{if(wb(g,t)){g.preventDefault();let c=n!==void 0?n:ci(l)===ci(u);s(e,{replace:c,state:r,preventScrollReset:i,relative:o,viewTransition:a})}},[l,s,u,n,r,t,e,i,o,a])}function zb(e){bt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=$.useRef(ks(e)),n=$.useRef(!1),r=gn(),i=$.useMemo(()=>xb(r.search,n.current?null:t.current),[r.search]),o=Ef(),a=$.useCallback((s,l)=>{const u=ks(typeof s=="function"?s(i):s);n.current=!0,o("?"+u,l)},[o,i]);return[i,a]}var Ub=0,Wb=()=>`__${String(++Ub)}__`;function qb(){let{router:e}=Ff("useSubmit"),{basename:t}=$.useContext(Mt),n=cb();return $.useCallback(async(r,i={})=>{let{action:o,method:a,encType:s,formData:l,body:u}=$b(r,t);if(i.navigate===!1){let g=i.fetcherKey||Wb();await e.fetch(g,n,i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||a,formEncType:i.encType||s,flushSync:i.flushSync})}else await e.navigate(i.action||o,{preventScrollReset:i.preventScrollReset,formData:l,body:u,formMethod:i.method||a,formEncType:i.encType||s,replace:i.replace,state:i.state,fromRouteId:n,flushSync:i.flushSync,viewTransition:i.viewTransition})},[e,t,n])}function Gb(e,{relative:t}={}){let{basename:n}=$.useContext(Mt),r=$.useContext(kt);de(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={...Ti(e||".",{relative:t})},a=gn();if(e==null){o.search=a.search;let s=new URLSearchParams(o.search),l=s.getAll("index");if(l.some(g=>g==="")){s.delete("index"),l.filter(c=>c).forEach(c=>s.append("index",c));let g=s.toString();o.search=g?`?${g}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:At([n,o.pathname])),ci(o)}function Qb(e,t={}){let n=$.useContext(Cf);de(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ff("useViewTransitionState"),i=Ti(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=jt(n.currentLocation.pathname,r)||n.currentLocation.pathname,a=jt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Co(i.pathname,a)!=null||Co(i.pathname,o)!=null}[...Tb];var So=function(e){var t=e.className;return y.jsx("div",{className:"animate-pulse bg-slate-100 dark:bg-slate-800 ".concat(t)})};function le(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Yb=["color"],Xb=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Yb);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Zb=["color"],Lf=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Zb);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Jb=["color"],ev=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Jb);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.50009 0.877014C3.84241 0.877014 0.877258 3.84216 0.877258 7.49984C0.877258 11.1575 3.8424 14.1227 7.50009 14.1227C11.1578 14.1227 14.1229 11.1575 14.1229 7.49984C14.1229 3.84216 11.1577 0.877014 7.50009 0.877014ZM1.82726 7.49984C1.82726 4.36683 4.36708 1.82701 7.50009 1.82701C10.6331 1.82701 13.1729 4.36683 13.1729 7.49984C13.1729 10.6328 10.6331 13.1727 7.50009 13.1727C4.36708 13.1727 1.82726 10.6328 1.82726 7.49984ZM8 4.50001C8 4.22387 7.77614 4.00001 7.5 4.00001C7.22386 4.00001 7 4.22387 7 4.50001V7.50001C7 7.63262 7.05268 7.7598 7.14645 7.85357L9.14645 9.85357C9.34171 10.0488 9.65829 10.0488 9.85355 9.85357C10.0488 9.65831 10.0488 9.34172 9.85355 9.14646L8 7.29291V4.50001Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),tv=["color"],Pr=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,tv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M13.15 7.49998C13.15 4.66458 10.9402 1.84998 7.50002 1.84998C4.72167 1.84998 3.34849 3.9064 2.76335 5H4.5C4.77614 5 5 5.22386 5 5.5C5 5.77614 4.77614 6 4.5 6H1.5C1.22386 6 1 5.77614 1 5.5V2.5C1 2.22386 1.22386 2 1.5 2C1.77614 2 2 2.22386 2 2.5V4.31318C2.70453 3.07126 4.33406 0.849976 7.50002 0.849976C11.5628 0.849976 14.15 4.18537 14.15 7.49998C14.15 10.8146 11.5628 14.15 7.50002 14.15C5.55618 14.15 3.93778 13.3808 2.78548 12.2084C2.16852 11.5806 1.68668 10.839 1.35816 10.0407C1.25306 9.78536 1.37488 9.49315 1.63024 9.38806C1.8856 9.28296 2.17781 9.40478 2.2829 9.66014C2.56374 10.3425 2.97495 10.9745 3.4987 11.5074C4.47052 12.4963 5.83496 13.15 7.50002 13.15C10.9402 13.15 13.15 10.3354 13.15 7.49998ZM7.5 4.00001C7.77614 4.00001 8 4.22387 8 4.50001V7.29291L9.85355 9.14646C10.0488 9.34172 10.0488 9.65831 9.85355 9.85357C9.65829 10.0488 9.34171 10.0488 9.14645 9.85357L7.14645 7.85357C7.05268 7.7598 7 7.63262 7 7.50001V4.50001C7 4.22387 7.22386 4.00001 7.5 4.00001Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),nv=["color"],Sl=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,nv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),rv=["color"],If=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,rv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),iv=["color"],ov=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,iv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M2.8 1L2.74967 0.99997C2.52122 0.999752 2.32429 0.999564 2.14983 1.04145C1.60136 1.17312 1.17312 1.60136 1.04145 2.14983C0.999564 2.32429 0.999752 2.52122 0.99997 2.74967L1 2.8V5.2L0.99997 5.25033C0.999752 5.47878 0.999564 5.67572 1.04145 5.85017C1.17312 6.39864 1.60136 6.82688 2.14983 6.95856C2.32429 7.00044 2.52122 7.00025 2.74967 7.00003L2.8 7H5.2L5.25033 7.00003C5.47878 7.00025 5.67572 7.00044 5.85017 6.95856C6.39864 6.82688 6.82688 6.39864 6.95856 5.85017C7.00044 5.67572 7.00025 5.47878 7.00003 5.25033L7 5.2V2.8L7.00003 2.74967C7.00025 2.52122 7.00044 2.32429 6.95856 2.14983C6.82688 1.60136 6.39864 1.17312 5.85017 1.04145C5.67572 0.999564 5.47878 0.999752 5.25033 0.99997L5.2 1H2.8ZM2.38328 2.01382C2.42632 2.00348 2.49222 2 2.8 2H5.2C5.50779 2 5.57369 2.00348 5.61672 2.01382C5.79955 2.05771 5.94229 2.20045 5.98619 2.38328C5.99652 2.42632 6 2.49222 6 2.8V5.2C6 5.50779 5.99652 5.57369 5.98619 5.61672C5.94229 5.79955 5.79955 5.94229 5.61672 5.98619C5.57369 5.99652 5.50779 6 5.2 6H2.8C2.49222 6 2.42632 5.99652 2.38328 5.98619C2.20045 5.94229 2.05771 5.79955 2.01382 5.61672C2.00348 5.57369 2 5.50779 2 5.2V2.8C2 2.49222 2.00348 2.42632 2.01382 2.38328C2.05771 2.20045 2.20045 2.05771 2.38328 2.01382ZM9.8 1L9.74967 0.99997C9.52122 0.999752 9.32429 0.999564 9.14983 1.04145C8.60136 1.17312 8.17312 1.60136 8.04145 2.14983C7.99956 2.32429 7.99975 2.52122 7.99997 2.74967L8 2.8V5.2L7.99997 5.25033C7.99975 5.47878 7.99956 5.67572 8.04145 5.85017C8.17312 6.39864 8.60136 6.82688 9.14983 6.95856C9.32429 7.00044 9.52122 7.00025 9.74967 7.00003L9.8 7H12.2L12.2503 7.00003C12.4788 7.00025 12.6757 7.00044 12.8502 6.95856C13.3986 6.82688 13.8269 6.39864 13.9586 5.85017C14.0004 5.67572 14.0003 5.47878 14 5.25033L14 5.2V2.8L14 2.74967C14.0003 2.52122 14.0004 2.32429 13.9586 2.14983C13.8269 1.60136 13.3986 1.17312 12.8502 1.04145C12.6757 0.999564 12.4788 0.999752 12.2503 0.99997L12.2 1H9.8ZM9.38328 2.01382C9.42632 2.00348 9.49222 2 9.8 2H12.2C12.5078 2 12.5737 2.00348 12.6167 2.01382C12.7995 2.05771 12.9423 2.20045 12.9862 2.38328C12.9965 2.42632 13 2.49222 13 2.8V5.2C13 5.50779 12.9965 5.57369 12.9862 5.61672C12.9423 5.79955 12.7995 5.94229 12.6167 5.98619C12.5737 5.99652 12.5078 6 12.2 6H9.8C9.49222 6 9.42632 5.99652 9.38328 5.98619C9.20045 5.94229 9.05771 5.79955 9.01382 5.61672C9.00348 5.57369 9 5.50779 9 5.2V2.8C9 2.49222 9.00348 2.42632 9.01382 2.38328C9.05771 2.20045 9.20045 2.05771 9.38328 2.01382ZM2.74967 7.99997L2.8 8H5.2L5.25033 7.99997C5.47878 7.99975 5.67572 7.99956 5.85017 8.04145C6.39864 8.17312 6.82688 8.60136 6.95856 9.14983C7.00044 9.32429 7.00025 9.52122 7.00003 9.74967L7 9.8V12.2L7.00003 12.2503C7.00025 12.4788 7.00044 12.6757 6.95856 12.8502C6.82688 13.3986 6.39864 13.8269 5.85017 13.9586C5.67572 14.0004 5.47878 14.0003 5.25033 14L5.2 14H2.8L2.74967 14C2.52122 14.0003 2.32429 14.0004 2.14983 13.9586C1.60136 13.8269 1.17312 13.3986 1.04145 12.8502C0.999564 12.6757 0.999752 12.4788 0.99997 12.2503L1 12.2V9.8L0.99997 9.74967C0.999752 9.52122 0.999564 9.32429 1.04145 9.14983C1.17312 8.60136 1.60136 8.17312 2.14983 8.04145C2.32429 7.99956 2.52122 7.99975 2.74967 7.99997ZM2.8 9C2.49222 9 2.42632 9.00348 2.38328 9.01382C2.20045 9.05771 2.05771 9.20045 2.01382 9.38328C2.00348 9.42632 2 9.49222 2 9.8V12.2C2 12.5078 2.00348 12.5737 2.01382 12.6167C2.05771 12.7995 2.20045 12.9423 2.38328 12.9862C2.42632 12.9965 2.49222 13 2.8 13H5.2C5.50779 13 5.57369 12.9965 5.61672 12.9862C5.79955 12.9423 5.94229 12.7995 5.98619 12.6167C5.99652 12.5737 6 12.5078 6 12.2V9.8C6 9.49222 5.99652 9.42632 5.98619 9.38328C5.94229 9.20045 5.79955 9.05771 5.61672 9.01382C5.57369 9.00348 5.50779 9 5.2 9H2.8ZM9.8 8L9.74967 7.99997C9.52122 7.99975 9.32429 7.99956 9.14983 8.04145C8.60136 8.17312 8.17312 8.60136 8.04145 9.14983C7.99956 9.32429 7.99975 9.52122 7.99997 9.74967L8 9.8V12.2L7.99997 12.2503C7.99975 12.4788 7.99956 12.6757 8.04145 12.8502C8.17312 13.3986 8.60136 13.8269 9.14983 13.9586C9.32429 14.0004 9.52122 14.0003 9.74967 14L9.8 14H12.2L12.2503 14C12.4788 14.0003 12.6757 14.0004 12.8502 13.9586C13.3986 13.8269 13.8269 13.3986 13.9586 12.8502C14.0004 12.6757 14.0003 12.4788 14 12.2503L14 12.2V9.8L14 9.74967C14.0003 9.52122 14.0004 9.32429 13.9586 9.14983C13.8269 8.60136 13.3986 8.17312 12.8502 8.04145C12.6757 7.99956 12.4788 7.99975 12.2503 7.99997L12.2 8H9.8ZM9.38328 9.01382C9.42632 9.00348 9.49222 9 9.8 9H12.2C12.5078 9 12.5737 9.00348 12.6167 9.01382C12.7995 9.05771 12.9423 9.20045 12.9862 9.38328C12.9965 9.42632 13 9.49222 13 9.8V12.2C13 12.5078 12.9965 12.5737 12.9862 12.6167C12.9423 12.7995 12.7995 12.9423 12.6167 12.9862C12.5737 12.9965 12.5078 13 12.2 13H9.8C9.49222 13 9.42632 12.9965 9.38328 12.9862C9.20045 12.9423 9.05771 12.7995 9.01382 12.6167C9.00348 12.5737 9 12.5078 9 12.2V9.8C9 9.49222 9.00348 9.42632 9.01382 9.38328C9.05771 9.20045 9.20045 9.05771 9.38328 9.01382Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),av=["color"],sv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,av);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M1 3.25C1 3.11193 1.11193 3 1.25 3H13.75C13.8881 3 14 3.11193 14 3.25V10.75C14 10.8881 13.8881 11 13.75 11H1.25C1.11193 11 1 10.8881 1 10.75V3.25ZM1.25 2C0.559643 2 0 2.55964 0 3.25V10.75C0 11.4404 0.559644 12 1.25 12H5.07341L4.82991 13.2986C4.76645 13.6371 5.02612 13.95 5.37049 13.95H9.62951C9.97389 13.95 10.2336 13.6371 10.1701 13.2986L9.92659 12H13.75C14.4404 12 15 11.4404 15 10.75V3.25C15 2.55964 14.4404 2 13.75 2H1.25ZM9.01091 12H5.98909L5.79222 13.05H9.20778L9.01091 12Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lv=["color"],uv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,lv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M2 7.5C2 7.22386 2.22386 7 2.5 7H12.5C12.7761 7 13 7.22386 13 7.5C13 7.77614 12.7761 8 12.5 8H2.5C2.22386 8 2 7.77614 2 7.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cv=["color"],Os=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,cv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M3.625 7.5C3.625 8.12132 3.12132 8.625 2.5 8.625C1.87868 8.625 1.375 8.12132 1.375 7.5C1.375 6.87868 1.87868 6.375 2.5 6.375C3.12132 6.375 3.625 6.87868 3.625 7.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM12.5 8.625C13.1213 8.625 13.625 8.12132 13.625 7.5C13.625 6.87868 13.1213 6.375 12.5 6.375C11.8787 6.375 11.375 6.87868 11.375 7.5C11.375 8.12132 11.8787 8.625 12.5 8.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dv=["color"],fv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,dv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M8.625 2.5C8.625 3.12132 8.12132 3.625 7.5 3.625C6.87868 3.625 6.375 3.12132 6.375 2.5C6.375 1.87868 6.87868 1.375 7.5 1.375C8.12132 1.375 8.625 1.87868 8.625 2.5ZM8.625 7.5C8.625 8.12132 8.12132 8.625 7.5 8.625C6.87868 8.625 6.375 8.12132 6.375 7.5C6.375 6.87868 6.87868 6.375 7.5 6.375C8.12132 6.375 8.625 6.87868 8.625 7.5ZM7.5 13.625C8.12132 13.625 8.625 13.1213 8.625 12.5C8.625 11.8787 8.12132 11.375 7.5 11.375C6.87868 11.375 6.375 11.8787 6.375 12.5C6.375 13.1213 6.87868 13.625 7.5 13.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hv=["color"],gv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,hv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M8.4449 0.608765C8.0183 -0.107015 6.9817 -0.107015 6.55509 0.608766L0.161178 11.3368C-0.275824 12.07 0.252503 13 1.10608 13H13.8939C14.7475 13 15.2758 12.07 14.8388 11.3368L8.4449 0.608765ZM7.4141 1.12073C7.45288 1.05566 7.54712 1.05566 7.5859 1.12073L13.9798 11.8488C14.0196 11.9154 13.9715 12 13.8939 12H1.10608C1.02849 12 0.980454 11.9154 1.02018 11.8488L7.4141 1.12073ZM6.8269 4.48611C6.81221 4.10423 7.11783 3.78663 7.5 3.78663C7.88217 3.78663 8.18778 4.10423 8.1731 4.48612L8.01921 8.48701C8.00848 8.766 7.7792 8.98664 7.5 8.98664C7.2208 8.98664 6.99151 8.766 6.98078 8.48701L6.8269 4.48611ZM8.24989 10.476C8.24989 10.8902 7.9141 11.226 7.49989 11.226C7.08567 11.226 6.74989 10.8902 6.74989 10.476C6.74989 10.0618 7.08567 9.72599 7.49989 9.72599C7.9141 9.72599 8.24989 10.0618 8.24989 10.476Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pv=["color"],mv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,pv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.49933 0.25C3.49635 0.25 0.25 3.49593 0.25 7.50024C0.25 10.703 2.32715 13.4206 5.2081 14.3797C5.57084 14.446 5.70302 14.2222 5.70302 14.0299C5.70302 13.8576 5.69679 13.4019 5.69323 12.797C3.67661 13.235 3.25112 11.825 3.25112 11.825C2.92132 10.9874 2.44599 10.7644 2.44599 10.7644C1.78773 10.3149 2.49584 10.3238 2.49584 10.3238C3.22353 10.375 3.60629 11.0711 3.60629 11.0711C4.25298 12.1788 5.30335 11.8588 5.71638 11.6732C5.78225 11.205 5.96962 10.8854 6.17658 10.7043C4.56675 10.5209 2.87415 9.89918 2.87415 7.12104C2.87415 6.32925 3.15677 5.68257 3.62053 5.17563C3.54576 4.99226 3.29697 4.25521 3.69174 3.25691C3.69174 3.25691 4.30015 3.06196 5.68522 3.99973C6.26337 3.83906 6.8838 3.75895 7.50022 3.75583C8.1162 3.75895 8.73619 3.83906 9.31523 3.99973C10.6994 3.06196 11.3069 3.25691 11.3069 3.25691C11.7026 4.25521 11.4538 4.99226 11.3795 5.17563C11.8441 5.68257 12.1245 6.32925 12.1245 7.12104C12.1245 9.9063 10.4292 10.5192 8.81452 10.6985C9.07444 10.9224 9.30633 11.3648 9.30633 12.0413C9.30633 13.0102 9.29742 13.7922 9.29742 14.0299C9.29742 14.2239 9.42828 14.4496 9.79591 14.3788C12.6746 13.4179 14.75 10.7025 14.75 7.50024C14.75 3.49593 11.5036 0.25 7.49933 0.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bv=["color"],vv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,bv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M12.3536 13.3536C12.1583 13.5488 11.8417 13.5488 11.6465 13.3536L6.39645 8.10355C6.36478 8.07188 6.33824 8.03702 6.31685 8H5.00002C4.78719 8 4.59769 7.86528 4.52777 7.66426L2.12777 0.764277C2.05268 0.548387 2.13355 0.309061 2.3242 0.182972C2.51486 0.0568819 2.76674 0.0761337 2.93602 0.229734L8.336 5.12972C8.44044 5.22449 8.50001 5.35897 8.50001 5.5V5.81684C8.53702 5.83824 8.57189 5.86478 8.60356 5.89645L13.8536 11.1464C14.0488 11.3417 14.0488 11.6583 13.8536 11.8536L12.3536 13.3536ZM8.25 6.95711L7.45711 7.75L12 12.2929L12.7929 11.5L8.25 6.95711ZM3.71669 2.28845L5.35549 7H6.2929L7.50001 5.79289V5.72146L3.71669 2.28845Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),yv=["color"],wv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,yv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L12.058 2.05806C12.3021 1.81398 12.6978 1.81398 12.9419 2.05806C13.186 2.30214 13.186 2.69786 12.9419 2.94194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13361 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.49998 8.49998V4.09998C5.06992 4.09998 3.09998 6.06992 3.09998 8.49998C3.09998 10.93 5.06992 12.9 7.49998 12.9C8.715 12.9 9.815 12.4075 10.6112 11.6112L7.49998 8.49998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xv=["color"],Cv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,xv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M3.35355 1.85355C3.54882 1.65829 3.54882 1.34171 3.35355 1.14645C3.15829 0.951184 2.84171 0.951184 2.64645 1.14645L0.646447 3.14645C0.451184 3.34171 0.451184 3.65829 0.646447 3.85355L2.64645 5.85355C2.84171 6.04882 3.15829 6.04882 3.35355 5.85355C3.54882 5.65829 3.54882 5.34171 3.35355 5.14645L2.20711 4H9.5C11.433 4 13 5.567 13 7.5C13 7.77614 13.2239 8 13.5 8C13.7761 8 14 7.77614 14 7.5C14 5.01472 11.9853 3 9.5 3H2.20711L3.35355 1.85355ZM2 7.5C2 7.22386 1.77614 7 1.5 7C1.22386 7 1 7.22386 1 7.5C1 9.98528 3.01472 12 5.5 12H12.7929L11.6464 13.1464C11.4512 13.3417 11.4512 13.6583 11.6464 13.8536C11.8417 14.0488 12.1583 14.0488 12.3536 13.8536L14.3536 11.8536C14.5488 11.6583 14.5488 11.3417 14.3536 11.1464L12.3536 9.14645C12.1583 8.95118 11.8417 8.95118 11.6464 9.14645C11.4512 9.34171 11.4512 9.65829 11.6464 9.85355L12.7929 11H5.5C3.567 11 2 9.433 2 7.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sv=["color"],$v=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Sv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM4.50003 7C4.22389 7 4.00003 7.22386 4.00003 7.5C4.00003 7.77614 4.22389 8 4.50003 8H10.5C10.7762 8 11 7.77614 11 7.5C11 7.22386 10.7762 7 10.5 7H4.50003Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ev=["color"],Pv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Ev);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M2.89998 0.499976C2.89998 0.279062 2.72089 0.0999756 2.49998 0.0999756C2.27906 0.0999756 2.09998 0.279062 2.09998 0.499976V1.09998H1.49998C1.27906 1.09998 1.09998 1.27906 1.09998 1.49998C1.09998 1.72089 1.27906 1.89998 1.49998 1.89998H2.09998V2.49998C2.09998 2.72089 2.27906 2.89998 2.49998 2.89998C2.72089 2.89998 2.89998 2.72089 2.89998 2.49998V1.89998H3.49998C3.72089 1.89998 3.89998 1.72089 3.89998 1.49998C3.89998 1.27906 3.72089 1.09998 3.49998 1.09998H2.89998V0.499976ZM5.89998 3.49998C5.89998 3.27906 5.72089 3.09998 5.49998 3.09998C5.27906 3.09998 5.09998 3.27906 5.09998 3.49998V4.09998H4.49998C4.27906 4.09998 4.09998 4.27906 4.09998 4.49998C4.09998 4.72089 4.27906 4.89998 4.49998 4.89998H5.09998V5.49998C5.09998 5.72089 5.27906 5.89998 5.49998 5.89998C5.72089 5.89998 5.89998 5.72089 5.89998 5.49998V4.89998H6.49998C6.72089 4.89998 6.89998 4.72089 6.89998 4.49998C6.89998 4.27906 6.72089 4.09998 6.49998 4.09998H5.89998V3.49998ZM1.89998 6.49998C1.89998 6.27906 1.72089 6.09998 1.49998 6.09998C1.27906 6.09998 1.09998 6.27906 1.09998 6.49998V7.09998H0.499976C0.279062 7.09998 0.0999756 7.27906 0.0999756 7.49998C0.0999756 7.72089 0.279062 7.89998 0.499976 7.89998H1.09998V8.49998C1.09998 8.72089 1.27906 8.89997 1.49998 8.89997C1.72089 8.89997 1.89998 8.72089 1.89998 8.49998V7.89998H2.49998C2.72089 7.89998 2.89998 7.72089 2.89998 7.49998C2.89998 7.27906 2.72089 7.09998 2.49998 7.09998H1.89998V6.49998ZM8.54406 0.98184L8.24618 0.941586C8.03275 0.917676 7.90692 1.1655 8.02936 1.34194C8.17013 1.54479 8.29981 1.75592 8.41754 1.97445C8.91878 2.90485 9.20322 3.96932 9.20322 5.10022C9.20322 8.37201 6.82247 11.0878 3.69887 11.6097C3.45736 11.65 3.20988 11.6772 2.96008 11.6906C2.74563 11.702 2.62729 11.9535 2.77721 12.1072C2.84551 12.1773 2.91535 12.2458 2.98667 12.3128L3.05883 12.3795L3.31883 12.6045L3.50684 12.7532L3.62796 12.8433L3.81491 12.9742L3.99079 13.089C4.11175 13.1651 4.23536 13.2375 4.36157 13.3059L4.62496 13.4412L4.88553 13.5607L5.18837 13.6828L5.43169 13.7686C5.56564 13.8128 5.70149 13.8529 5.83857 13.8885C5.94262 13.9155 6.04767 13.9401 6.15405 13.9622C6.27993 13.9883 6.40713 14.0109 6.53544 14.0298L6.85241 14.0685L7.11934 14.0892C7.24637 14.0965 7.37436 14.1002 7.50322 14.1002C11.1483 14.1002 14.1032 11.1453 14.1032 7.50023C14.1032 7.25044 14.0893 7.00389 14.0623 6.76131L14.0255 6.48407C13.991 6.26083 13.9453 6.04129 13.8891 5.82642C13.8213 5.56709 13.7382 5.31398 13.6409 5.06881L13.5279 4.80132L13.4507 4.63542L13.3766 4.48666C13.2178 4.17773 13.0353 3.88295 12.8312 3.60423L12.6782 3.40352L12.4793 3.16432L12.3157 2.98361L12.1961 2.85951L12.0355 2.70246L11.8134 2.50184L11.4925 2.24191L11.2483 2.06498L10.9562 1.87446L10.6346 1.68894L10.3073 1.52378L10.1938 1.47176L9.95488 1.3706L9.67791 1.2669L9.42566 1.1846L9.10075 1.09489L8.83599 1.03486L8.54406 0.98184ZM10.4032 5.30023C10.4032 4.27588 10.2002 3.29829 9.83244 2.40604C11.7623 3.28995 13.1032 5.23862 13.1032 7.50023C13.1032 10.593 10.596 13.1002 7.50322 13.1002C6.63646 13.1002 5.81597 12.9036 5.08355 12.5522C6.5419 12.0941 7.81081 11.2082 8.74322 10.0416C8.87963 10.2284 9.10028 10.3497 9.34928 10.3497C9.76349 10.3497 10.0993 10.0139 10.0993 9.59971C10.0993 9.24256 9.84965 8.94373 9.51535 8.86816C9.57741 8.75165 9.63653 8.63334 9.6926 8.51332C9.88358 8.63163 10.1088 8.69993 10.35 8.69993C11.0403 8.69993 11.6 8.14028 11.6 7.44993C11.6 6.75976 11.0406 6.20024 10.3505 6.19993C10.3853 5.90487 10.4032 5.60464 10.4032 5.30023Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Rv=["color"],Nf=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Rv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M6.04995 2.74998C6.04995 2.44623 5.80371 2.19998 5.49995 2.19998C5.19619 2.19998 4.94995 2.44623 4.94995 2.74998V12.25C4.94995 12.5537 5.19619 12.8 5.49995 12.8C5.80371 12.8 6.04995 12.5537 6.04995 12.25V2.74998ZM10.05 2.74998C10.05 2.44623 9.80371 2.19998 9.49995 2.19998C9.19619 2.19998 8.94995 2.44623 8.94995 2.74998V12.25C8.94995 12.5537 9.19619 12.8 9.49995 12.8C9.80371 12.8 10.05 12.5537 10.05 12.25V2.74998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Mv=["color"],Af=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Mv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M3.24182 2.32181C3.3919 2.23132 3.5784 2.22601 3.73338 2.30781L12.7334 7.05781C12.8974 7.14436 13 7.31457 13 7.5C13 7.68543 12.8974 7.85564 12.7334 7.94219L3.73338 12.6922C3.5784 12.774 3.3919 12.7687 3.24182 12.6782C3.09175 12.5877 3 12.4252 3 12.25V2.75C3 2.57476 3.09175 2.4123 3.24182 2.32181ZM4 3.57925V11.4207L11.4288 7.5L4 3.57925Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),kv=["color"],Ov=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,kv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M8 2.75C8 2.47386 7.77614 2.25 7.5 2.25C7.22386 2.25 7 2.47386 7 2.75V7H2.75C2.47386 7 2.25 7.22386 2.25 7.5C2.25 7.77614 2.47386 8 2.75 8H7V12.25C7 12.5261 7.22386 12.75 7.5 12.75C7.77614 12.75 8 12.5261 8 12.25V8H12.25C12.5261 8 12.75 7.77614 12.75 7.5C12.75 7.22386 12.5261 7 12.25 7H8V2.75Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Dv=["color"],_f=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Dv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Tv=["color"],Fv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Tv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{opacity:".05",d:"M6.78296 13.376C8.73904 9.95284 8.73904 5.04719 6.78296 1.62405L7.21708 1.37598C9.261 4.95283 9.261 10.0472 7.21708 13.624L6.78296 13.376Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".1",d:"M7.28204 13.4775C9.23929 9.99523 9.23929 5.00475 7.28204 1.52248L7.71791 1.2775C9.76067 4.9119 9.76067 10.0881 7.71791 13.7225L7.28204 13.4775Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".15",d:"M7.82098 13.5064C9.72502 9.99523 9.72636 5.01411 7.82492 1.50084L8.26465 1.26285C10.2465 4.92466 10.2451 10.085 8.26052 13.7448L7.82098 13.5064Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".2",d:"M8.41284 13.429C10.1952 9.92842 10.1957 5.07537 8.41435 1.57402L8.85999 1.34729C10.7139 4.99113 10.7133 10.0128 8.85841 13.6559L8.41284 13.429Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".25",d:"M9.02441 13.2956C10.6567 9.8379 10.6586 5.17715 9.03005 1.71656L9.48245 1.50366C11.1745 5.09919 11.1726 9.91629 9.47657 13.5091L9.02441 13.2956Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".3",d:"M9.66809 13.0655C11.1097 9.69572 11.1107 5.3121 9.67088 1.94095L10.1307 1.74457C11.6241 5.24121 11.6231 9.76683 10.1278 13.2622L9.66809 13.0655Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".35",d:"M10.331 12.7456C11.5551 9.52073 11.5564 5.49103 10.3347 2.26444L10.8024 2.0874C12.0672 5.42815 12.0659 9.58394 10.7985 12.9231L10.331 12.7456Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".4",d:"M11.0155 12.2986C11.9938 9.29744 11.9948 5.71296 11.0184 2.71067L11.4939 2.55603C12.503 5.6589 12.502 9.35178 11.4909 12.4535L11.0155 12.2986Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".45",d:"M11.7214 11.668C12.4254 9.01303 12.4262 5.99691 11.7237 3.34116L12.2071 3.21329C12.9318 5.95292 12.931 9.05728 12.2047 11.7961L11.7214 11.668Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{opacity:".5",d:"M12.4432 10.752C12.8524 8.63762 12.8523 6.36089 12.4429 4.2466L12.9338 4.15155C13.3553 6.32861 13.3554 8.66985 12.9341 10.847L12.4432 10.752Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}),d.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 9.1488 1.47969 10.657 2.4767 11.8162L1.64647 12.6464C1.45121 12.8417 1.45121 13.1583 1.64647 13.3535C1.84173 13.5488 2.15832 13.5488 2.35358 13.3535L3.18383 12.5233C4.34302 13.5202 5.8511 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 5.85107 13.5202 4.34298 12.5233 3.1838L13.3536 2.35355C13.5488 2.15829 13.5488 1.8417 13.3536 1.64644C13.1583 1.45118 12.8417 1.45118 12.6465 1.64644L11.8162 2.47667C10.657 1.47966 9.14883 0.877045 7.49991 0.877045ZM11.1423 3.15065C10.1568 2.32449 8.88644 1.82704 7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 8.88641 2.32452 10.1568 3.15069 11.1422L11.1423 3.15065ZM3.85781 11.8493C4.84322 12.6753 6.11348 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 6.11345 12.6754 4.84319 11.8493 3.85778L3.85781 11.8493Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Lv=["color"],$l=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Lv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M4.10876 14L9.46582 1H10.8178L5.46074 14H4.10876Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Iv=["color"],Nv=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Iv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M7.5 0C7.77614 0 8 0.223858 8 0.5V2.5C8 2.77614 7.77614 3 7.5 3C7.22386 3 7 2.77614 7 2.5V0.5C7 0.223858 7.22386 0 7.5 0ZM2.1967 2.1967C2.39196 2.00144 2.70854 2.00144 2.90381 2.1967L4.31802 3.61091C4.51328 3.80617 4.51328 4.12276 4.31802 4.31802C4.12276 4.51328 3.80617 4.51328 3.61091 4.31802L2.1967 2.90381C2.00144 2.70854 2.00144 2.39196 2.1967 2.1967ZM0.5 7C0.223858 7 0 7.22386 0 7.5C0 7.77614 0.223858 8 0.5 8H2.5C2.77614 8 3 7.77614 3 7.5C3 7.22386 2.77614 7 2.5 7H0.5ZM2.1967 12.8033C2.00144 12.608 2.00144 12.2915 2.1967 12.0962L3.61091 10.682C3.80617 10.4867 4.12276 10.4867 4.31802 10.682C4.51328 10.8772 4.51328 11.1938 4.31802 11.3891L2.90381 12.8033C2.70854 12.9986 2.39196 12.9986 2.1967 12.8033ZM12.5 7C12.2239 7 12 7.22386 12 7.5C12 7.77614 12.2239 8 12.5 8H14.5C14.7761 8 15 7.77614 15 7.5C15 7.22386 14.7761 7 14.5 7H12.5ZM10.682 4.31802C10.4867 4.12276 10.4867 3.80617 10.682 3.61091L12.0962 2.1967C12.2915 2.00144 12.608 2.00144 12.8033 2.1967C12.9986 2.39196 12.9986 2.70854 12.8033 2.90381L11.3891 4.31802C11.1938 4.51328 10.8772 4.51328 10.682 4.31802ZM8 12.5C8 12.2239 7.77614 12 7.5 12C7.22386 12 7 12.2239 7 12.5V14.5C7 14.7761 7.22386 15 7.5 15C7.77614 15 8 14.7761 8 14.5V12.5ZM10.682 10.682C10.8772 10.4867 11.1938 10.4867 11.3891 10.682L12.8033 12.0962C12.9986 12.2915 12.9986 12.608 12.8033 12.8033C12.608 12.9986 12.2915 12.9986 12.0962 12.8033L10.682 11.3891C10.4867 11.1938 10.4867 10.8772 10.682 10.682ZM5.5 7.5C5.5 6.39543 6.39543 5.5 7.5 5.5C8.60457 5.5 9.5 6.39543 9.5 7.5C9.5 8.60457 8.60457 9.5 7.5 9.5C6.39543 9.5 5.5 8.60457 5.5 7.5ZM7.5 4.5C5.84315 4.5 4.5 5.84315 4.5 7.5C4.5 9.15685 5.84315 10.5 7.5 10.5C9.15685 10.5 10.5 9.15685 10.5 7.5C10.5 5.84315 9.15685 4.5 7.5 4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Av=["color"],_v=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,Av);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M0.900024 7.50002C0.900024 3.85495 3.85495 0.900024 7.50002 0.900024C11.1451 0.900024 14.1 3.85495 14.1 7.50002C14.1 11.1451 11.1451 14.1 7.50002 14.1C3.85495 14.1 0.900024 11.1451 0.900024 7.50002ZM7.50002 1.80002C4.35201 1.80002 1.80002 4.35201 1.80002 7.50002C1.80002 10.648 4.35201 13.2 7.50002 13.2C10.648 13.2 13.2 10.648 13.2 7.50002C13.2 4.35201 10.648 1.80002 7.50002 1.80002ZM3.07504 7.50002C3.07504 5.05617 5.05618 3.07502 7.50004 3.07502C9.94388 3.07502 11.925 5.05617 11.925 7.50002C11.925 9.94386 9.94388 11.925 7.50004 11.925C5.05618 11.925 3.07504 9.94386 3.07504 7.50002ZM7.50004 3.92502C5.52562 3.92502 3.92504 5.52561 3.92504 7.50002C3.92504 9.47442 5.52563 11.075 7.50004 11.075C9.47444 11.075 11.075 9.47442 11.075 7.50002C11.075 5.52561 9.47444 3.92502 7.50004 3.92502ZM7.50004 5.25002C6.2574 5.25002 5.25004 6.25739 5.25004 7.50002C5.25004 8.74266 6.2574 9.75002 7.50004 9.75002C8.74267 9.75002 9.75004 8.74266 9.75004 7.50002C9.75004 6.25738 8.74267 5.25002 7.50004 5.25002ZM6.05004 7.50002C6.05004 6.69921 6.69923 6.05002 7.50004 6.05002C8.30084 6.05002 8.95004 6.69921 8.95004 7.50002C8.95004 8.30083 8.30084 8.95002 7.50004 8.95002C6.69923 8.95002 6.05004 8.30083 6.05004 7.50002Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),jv=["color"],Ar=d.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=le(e,jv);return d.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),d.createElement("path",{d:"M5.5 1C5.22386 1 5 1.22386 5 1.5C5 1.77614 5.22386 2 5.5 2H9.5C9.77614 2 10 1.77614 10 1.5C10 1.22386 9.77614 1 9.5 1H5.5ZM3 3.5C3 3.22386 3.22386 3 3.5 3H5H10H11.5C11.7761 3 12 3.22386 12 3.5C12 3.77614 11.7761 4 11.5 4H11V12C11 12.5523 10.5523 13 10 13H5C4.44772 13 4 12.5523 4 12V4L3.5 4C3.22386 4 3 3.77614 3 3.5ZM5 4H10V12H5V4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))});d.createContext(null);d.createContext(null);d.createContext(null);d.createContext(null);d.createContext(null);const jf=d.createContext({}),te=typeof document<"u"?d.useLayoutEffect:()=>{};function Fe(e){const t=d.useRef(null);return te(()=>{t.current=e},[e]),d.useCallback((...n)=>{const r=t.current;return r==null?void 0:r(...n)},[])}function Kv(e){let[t,n]=d.useState(e),r=d.useRef(null),i=Fe(()=>{if(!r.current)return;let a=r.current.next();if(a.done){r.current=null;return}t===a.value?i():n(a.value)});te(()=>{r.current&&i()});let o=Fe(a=>{r.current=a(t),i()});return[t,o]}const Kf={prefix:String(Math.round(Math.random()*1e10)),current:0},Bf=d.createContext(Kf),Bv=d.createContext(!1);let ka=new WeakMap;function Hv(e=!1){let t=d.useContext(Bf),n=d.useRef(null);if(n.current===null&&!e){var r,i;let o=(i=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let a=ka.get(o);a==null?ka.set(o,{id:t.current,state:o.memoizedState}):o.memoizedState!==a.state&&(t.current=a.id,ka.delete(o))}n.current=++t.current}return n.current}function Vv(e){let t=d.useContext(Bf),n=Hv(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function zv(e){let t=d.useId(),[n]=d.useState(pn()),r=n?"react-aria":`react-aria${Kf.prefix}`;return e||`${r}-${t}`}const Uv=typeof d.useId=="function"?zv:Vv;function Wv(){return!1}function qv(){return!0}function Gv(e){return()=>{}}function pn(){return typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore(Gv,Wv,qv):d.useContext(Bv)}let Qv=!!(typeof window<"u"&&window.document&&window.document.createElement),ar=new Map,Jr;typeof FinalizationRegistry<"u"&&(Jr=new FinalizationRegistry(e=>{ar.delete(e)}));function Qe(e){let[t,n]=d.useState(e),r=d.useRef(null),i=Uv(t),o=d.useRef(null);if(Jr&&Jr.register(o,i),Qv){const a=ar.get(i);a&&!a.includes(r)?a.push(r):ar.set(i,[r])}return te(()=>{let a=i;return()=>{Jr&&Jr.unregister(o),ar.delete(a)}},[i]),d.useEffect(()=>{let a=r.current;return a&&n(a),()=>{a&&(r.current=null)}}),i}function Yv(e,t){if(e===t)return e;let n=ar.get(e);if(n)return n.forEach(i=>i.current=t),t;let r=ar.get(t);return r?(r.forEach(i=>i.current=e),e):t}function ho(e=[]){let t=Qe(),[n,r]=Kv(t),i=d.useCallback(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return te(i,[t,i,...e]),n}function Rr(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const re=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},pt=e=>e&&"window"in e&&e.window===e?e:re(e).defaultView||window;function Xv(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&typeof e.nodeType=="number"}function Zv(e){return Xv(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}let Jv=!1;function ia(){return Jv}function Ae(e,t){if(!ia())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:Zv(n)?n=n.host:n=n.parentNode}return!1}const $e=(e=document)=>{var t;if(!ia())return e.activeElement;let n=e.activeElement;for(;n&&"shadowRoot"in n&&(!((t=n.shadowRoot)===null||t===void 0)&&t.activeElement);)n=n.shadowRoot.activeElement;return n};function me(e){return ia()&&e.target.shadowRoot&&e.composedPath?e.composedPath()[0]:e.target}class e2{get currentNode(){return this._currentNode}set currentNode(t){if(!Ae(this.root,t))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=t,i=t;for(this._currentNode=t;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const a=r,s=this._doc.createTreeWalker(a,this.whatToShow,{acceptNode:this._acceptNode});n.push(s),s.currentNode=i,this._currentSetFor.add(s),r=i=a.host}else r=r.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(o),o.currentNode=i,this._currentSetFor.add(o),this._walkerStack=n}get doc(){return this._doc}firstChild(){let t=this.currentNode,n=this.nextNode();return Ae(t,n)?(n&&(this.currentNode=n),n):(this.currentNode=t,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const t=this._walkerStack[0].nextNode();if(t){if(t.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(t):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(t)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=t,t;let o=this.nextNode();return o&&(this.currentNode=o),o}return t&&(this.currentNode=t),t}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const t=this._walkerStack[0];if(t.currentNode===t.root){if(this._currentSetFor.has(t))if(this._currentSetFor.delete(t),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=t.previousNode();if(n){if(n.shadowRoot){var r;let o;if(typeof this.filter=="function"?o=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(o=this.filter.acceptNode(n)),o===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let a=this.lastChild();return a&&(this.currentNode=a),a}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(t,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=a=>{if(a.nodeType===Node.ELEMENT_NODE){const l=a.shadowRoot;if(l){const u=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(u),NodeFilter.FILTER_ACCEPT}else{var s;if(typeof this.filter=="function")return this.filter(a);if(!((s=this.filter)===null||s===void 0)&&s.acceptNode)return this.filter.acceptNode(a);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=t,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(t.createTreeWalker(n,r,this._acceptNode));const o=n.shadowRoot;if(o){const a=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(a)}}}function t2(e,t,n,r){return ia()?new e2(e,t,n,r):e.createTreeWalker(t,n,r)}function Hf(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Hf(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Mr(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Hf(e))&&(r&&(r+=" "),r+=t);return r}function ae(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let i in r){let o=t[i],a=r[i];typeof o=="function"&&typeof a=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=Rr(o,a):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof a=="string"?t[i]=Mr(o,a):i==="id"&&o&&a?t.id=Yv(o,a):t[i]=a!==void 0?a:o}}return t}function El(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1;const r=e.map(i=>{const o=Fu(i,t);return n||(n=typeof o=="function"),o});if(n)return()=>{r.forEach((i,o)=>{typeof i=="function"?i():Fu(e[o],null)})}}}function Fu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}const n2=new Set(["id"]),r2=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),i2=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),o2=/^(data-.*)$/;function Ke(e,t={}){let{labelable:n,isLink:r,propNames:i}=t,o={};for(const a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n2.has(a)||n&&r2.has(a)||r&&i2.has(a)||i!=null&&i.has(a)||o2.test(a))&&(o[a]=e[a]);return o}function vt(e){if(a2())e.focus({preventScroll:!0});else{let t=s2(e);e.focus(),l2(t)}}let zi=null;function a2(){if(zi==null){zi=!1;try{document.createElement("div").focus({get preventScroll(){return zi=!0,!0}})}catch{}}return zi}function s2(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function l2(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}function oa(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function Pl(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function Bt(e){let t=null;return()=>(t==null&&(t=e()),t)}const Nn=Bt(function(){return Pl(/^Mac/i)}),u2=Bt(function(){return Pl(/^iPhone/i)}),Vf=Bt(function(){return Pl(/^iPad/i)||Nn()&&navigator.maxTouchPoints>1}),aa=Bt(function(){return u2()||Vf()}),c2=Bt(function(){return Nn()||aa()}),zf=Bt(function(){return oa(/AppleWebKit/i)&&!Uf()}),Uf=Bt(function(){return oa(/Chrome/i)}),Rl=Bt(function(){return oa(/Android/i)}),d2=Bt(function(){return oa(/Firefox/i)}),f2=d.createContext({isNative:!0,open:g2,useHref:e=>e});function sa(){return d.useContext(f2)}function An(e,t,n=!0){var r,i;let{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}=t;d2()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&e.target==="_blank"&&(Nn()?o=!0:a=!0);let u=zf()&&Nn()&&!Vf()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:a,altKey:s,shiftKey:l}):new MouseEvent("click",{metaKey:o,ctrlKey:a,altKey:s,shiftKey:l,bubbles:!0,cancelable:!0});An.isOpening=n,vt(e),e.dispatchEvent(u),An.isOpening=!1}An.isOpening=!1;function h2(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function g2(e,t){h2(e,n=>An(n,t))}function p2(e){let t=sa();var n;const r=t.useHref((n=e==null?void 0:e.href)!==null&&n!==void 0?n:"");return{href:e!=null&&e.href?r:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}let Ut=new Map,Ds=new Set;function Lu(){if(typeof window>"u")return;function e(r){return"propertyName"in r}let t=r=>{if(!e(r)||!r.target)return;let i=Ut.get(r.target);i||(i=new Set,Ut.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!e(r)||!r.target)return;let i=Ut.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),Ut.delete(r.target)),Ut.size===0)){for(let o of Ds)o();Ds.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?Lu():document.addEventListener("DOMContentLoaded",Lu));function m2(){for(const[e]of Ut)"isConnected"in e&&!e.isConnected&&Ut.delete(e)}function Wf(e){requestAnimationFrame(()=>{m2(),Ut.size===0?e():Ds.add(e)})}function la(){let e=d.useRef(new Map),t=d.useCallback((i,o,a,s)=>{let l=s!=null&&s.once?(...u)=>{e.current.delete(a),a(...u)}:a;e.current.set(a,{type:o,eventTarget:i,fn:l,options:s}),i.addEventListener(o,l,s)},[]),n=d.useCallback((i,o,a,s)=>{var l;let u=((l=e.current.get(a))===null||l===void 0?void 0:l.fn)||a;i.removeEventListener(o,u,s),e.current.delete(a)},[]),r=d.useCallback(()=>{e.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return d.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function qf(e,t){let{id:n,"aria-label":r,"aria-labelledby":i}=e;return n=Qe(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&t&&(r=t),{id:n,"aria-label":r,"aria-labelledby":i}}function Kn(e){const t=d.useRef(null),n=d.useRef(void 0),r=d.useCallback(i=>{if(typeof e=="function"){const o=e,a=o(i);return()=>{typeof a=="function"?a():o(null)}}else if(e)return e.current=i,()=>{e.current=null}},[e]);return d.useMemo(()=>({get current(){return t.current},set current(i){t.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function Iu(e,t){const n=d.useRef(!0),r=d.useRef(null);te(()=>(n.current=!0,()=>{n.current=!1}),[]),te(()=>{n.current?n.current=!1:(!r.current||t.some((i,o)=>!Object.is(i,r[o])))&&e(),r.current=t},t)}function b2(){return typeof window.ResizeObserver<"u"}function $o(e){const{ref:t,box:n,onResize:r}=e;d.useEffect(()=>{let i=t==null?void 0:t.current;if(i)if(b2()){const o=new window.ResizeObserver(a=>{a.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,t,n])}function Ml(e,t){te(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function di(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}function Gf(e,t){let n=e;for(di(n,t)&&(n=n.parentElement);n&&!di(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function v2(e,t){const n=[];for(;e&&e!==document.documentElement;)di(e,t)&&n.push(e),e=e.parentElement;return n}let it=typeof document<"u"&&window.visualViewport;function y2(){let e=pn(),[t,n]=d.useState(()=>e?{width:0,height:0}:Nu());return d.useEffect(()=>{let r=()=>{n(i=>{let o=Nu();return o.width===i.width&&o.height===i.height?i:o})};return it?it.addEventListener("resize",r):window.addEventListener("resize",r),()=>{it?it.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function Nu(){return{width:it&&(it==null?void 0:it.width)||window.innerWidth,height:it&&(it==null?void 0:it.height)||window.innerHeight}}let w2=0;const Oa=new Map;function x2(e){let[t,n]=d.useState();return te(()=>{if(!e)return;let r=Oa.get(e);if(r)n(r.element.id);else{let i=`react-aria-description-${w2++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=e,document.body.appendChild(o),r={refCount:0,element:o},Oa.set(e,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Oa.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}function Ui(e,t,n,r){let i=Fe(n),o=n==null;d.useEffect(()=>{if(o||!e.current)return;let a=e.current;return a.addEventListener(t,i,r),()=>{a.removeEventListener(t,i,r)}},[e,t,r,o,i])}function Qf(e,t){let n=Au(e,t,"left"),r=Au(e,t,"top"),i=t.offsetWidth,o=t.offsetHeight,a=e.scrollLeft,s=e.scrollTop,{borderTopWidth:l,borderLeftWidth:u,scrollPaddingTop:g,scrollPaddingRight:c,scrollPaddingBottom:h,scrollPaddingLeft:f}=getComputedStyle(e),p=a+parseInt(u,10),m=s+parseInt(l,10),b=p+e.clientWidth,v=m+e.clientHeight,w=parseInt(g,10)||0,x=parseInt(h,10)||0,k=parseInt(c,10)||0,S=parseInt(f,10)||0;n<=a+S?a=n-parseInt(u,10)-S:n+i>b-k&&(a+=n+i-b+k),r<=m+w?s=r-parseInt(l,10)-w:r+o>v-x&&(s+=r+o-v+x),e.scrollLeft=a,e.scrollTop=s}function Au(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){i-=e[r];break}t=t.offsetParent}return i}function _u(e,t){if(e&&document.contains(e)){let a=document.scrollingElement||document.documentElement;if(window.getComputedStyle(a).overflow==="hidden"){let l=v2(e);for(let u of l)Qf(u,e)}else{var n;let{left:l,top:u}=e.getBoundingClientRect();e==null||(n=e.scrollIntoView)===null||n===void 0||n.call(e,{block:"nearest"});let{left:g,top:c}=e.getBoundingClientRect();if(Math.abs(l-g)>1||Math.abs(u-c)>1){var r,i,o;t==null||(i=t.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=e.scrollIntoView)===null||o===void 0||o.call(e,{block:"nearest"})}}}}function Yf(e){return e.mozInputSource===0&&e.isTrusted?!0:Rl()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function C2(e){return!Rl()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}const S2="react-aria-clear-focus",$2="react-aria-focus";function Zn(e){return Nn()?e.metaKey:e.ctrlKey}function ua(e,t=!0){let[n,r]=d.useState(!0),i=n&&t;return te(()=>{if(i&&e.current&&"getAnimations"in e.current)for(let o of e.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[e,i]),Xf(e,i,d.useCallback(()=>r(!1),[])),i}function Eo(e,t){let[n,r]=d.useState(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open");break}let i=n==="exiting";return Xf(e,i,d.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Xf(e,t,n){te(()=>{if(t&&e.current){if(!("getAnimations"in e.current)){n();return}let r=e.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Lr.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[e,t,n])}const kl=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],E2=kl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";kl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const P2=kl.join(':not([hidden]):not([tabindex="-1"]),');function Zf(e){return e.matches(E2)}function R2(e){return e.matches(P2)}function Fi(e,t,n){let[r,i]=d.useState(e||t),o=d.useRef(e!==void 0),a=e!==void 0;d.useEffect(()=>{o.current,o.current=a},[a]);let s=a?e:r,l=d.useCallback((u,...g)=>{let c=(h,...f)=>{n&&(Object.is(s,h)||n(h,...f)),a||(s=h)};typeof u=="function"?i((f,...p)=>{let m=u(a?s:f,...p);return c(m,...g),a?f:m}):(a||i(u),c(u,...g))},[a,s,n]);return[s,l]}function fi(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}const Po=Symbol("default");function mn({values:e,children:t}){for(let[n,r]of e)t=d.createElement(n.Provider,{value:r},t);return t}function at(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=e;return d.useMemo(()=>{let l,u,g;return typeof t=="function"?l=t({...s,defaultClassName:i}):l=t,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?g=r({...s,defaultChildren:o}):r==null?g=o:g=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:g??o,"data-rac":""}},[t,n,r,i,o,a,s])}function Jf(e,t){let n=d.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=t||Po;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(a=>`"${a}"`)),o=t?`Invalid slot "${t}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${i}.`)}return n.slots[r]}return n}function yt(e,t,n){let r=Jf(n,e.slot)||{},{ref:i,...o}=r,a=Kn(d.useMemo(()=>El(t,i),[t,i])),s=ae(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,g={...l.defaultStyle,...u},c=typeof e.style=="function"?e.style({...l,defaultStyle:g}):e.style;return{...g,...c}}:s.style={...o.style,...e.style}),[s,a]}function e0(e=!0){let[t,n]=d.useState(e),r=d.useRef(!1),i=d.useCallback(o=>{r.current=!0,n(!!o)},[]);return te(()=>{r.current||n(!1)},[]),[i,t]}class Ol{get childNodes(){throw new Error("childNodes is not supported")}clone(){let t=new Ol(this.type,this.key);return t.value=this.value,t.level=this.level,t.hasChildNodes=this.hasChildNodes,t.rendered=this.rendered,t.textValue=this.textValue,t["aria-label"]=this["aria-label"],t.index=this.index,t.parentKey=this.parentKey,t.prevKey=this.prevKey,t.nextKey=this.nextKey,t.firstChildKey=this.firstChildKey,t.lastChildKey=this.lastChildKey,t.props=this.props,t.render=this.render,t.colSpan=this.colSpan,t.colIndex=this.colIndex,t}constructor(t,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=t,this.key=n}}class Dl{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let t=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;t;)yield t,t=t.nextKey!=null?this.keyMap.get(t.nextKey):void 0}getChildren(t){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(t),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(t){let n=this.keyMap.get(t);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(t){let n=this.keyMap.get(t);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let t=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(t==null?void 0:t.lastChildKey)!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let t=this.constructor,n=new t;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(t){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(t.key,t)}removeNode(t){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(t)}commit(t,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=t,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(t){let n=new Dl,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),a=null;for(let s of this.getChildren(i.key))if(ju(s,t,this,n)){let l=s.clone();a==null&&(o.firstChildKey=l.key),n.firstKey==null&&(n.firstKey=o.key),a&&a.parentKey===l.parentKey?(a.nextKey=l.key,l.prevKey=a.key):l.prevKey=null,l.nextKey=null,n.addNode(l),a=l}a&&(a.type!=="header"?(o.lastChildKey=a.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(a.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=i.clone();ju(o,t,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function ju(e,t,n,r){if(e.type==="subdialogtrigger"||e.type==="submenutrigger"){let i=[...n.getChildren(e.key)][0];if(i&&t(i.textValue)){let o=i.clone();return r.addNode(o),!0}else return!1}else return e.type==="header"?!0:t(e.textValue)}class t0{*[Symbol.iterator](){let t=this.firstChild;for(;t;)yield t,t=t.nextSibling}get firstChild(){return this._firstChild}set firstChild(t){this._firstChild=t,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(t){this._lastChild=t,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(t){this._previousSibling=t,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(t){this._nextSibling=t,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(t){this._parentNode=t,this.ownerDocument.markDirty(this)}get isConnected(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.isConnected)||!1}invalidateChildIndices(t){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||t.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=t,this.ownerDocument.markDirty(this))}updateChildIndices(){let t=this._minInvalidChildIndex;for(;t;)t.index=t.previousSibling?t.previousSibling.index+1:0,t=t.nextSibling;this._minInvalidChildIndex=null}appendChild(t){t.parentNode&&t.parentNode.removeChild(t),this.firstChild==null&&(this.firstChild=t),this.lastChild?(this.lastChild.nextSibling=t,t.index=this.lastChild.index+1,t.previousSibling=this.lastChild):(t.previousSibling=null,t.index=0),t.parentNode=this,t.nextSibling=null,this.lastChild=t,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(t,n){if(n==null)return this.appendChild(t);t.parentNode&&t.parentNode.removeChild(t),t.nextSibling=n,t.previousSibling=n.previousSibling,t.index=n.index-1,this.firstChild===n?this.firstChild=t:n.previousSibling&&(n.previousSibling.nextSibling=t),n.previousSibling=t,t.parentNode=n.parentNode,this.invalidateChildIndices(t),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(t){t.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===t&&(this._minInvalidChildIndex=null),t.nextSibling&&(this.invalidateChildIndices(t.nextSibling),t.nextSibling.previousSibling=t.previousSibling),t.previousSibling&&(t.previousSibling.nextSibling=t.nextSibling),this.firstChild===t&&(this.firstChild=t.nextSibling),this.lastChild===t&&(this.lastChild=t.previousSibling),t.parentNode=null,t.nextSibling=null,t.previousSibling=null,t.index=0,this.ownerDocument.markDirty(t),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let t=this.previousSibling;for(;t&&t.isHidden;)t=t.previousSibling;return t}get nextVisibleSibling(){let t=this.nextSibling;for(;t&&t.isHidden;)t=t.nextSibling;return t}get firstVisibleChild(){let t=this.firstChild;for(;t&&t.isHidden;)t=t.nextSibling;return t}get lastVisibleChild(){let t=this.lastChild;for(;t&&t.isHidden;)t=t.previousSibling;return t}constructor(t){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=t}}class sr extends t0{get index(){return this._index}set index(t){this._index=t,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof sr?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var t,n,r;let i=this.nextVisibleSibling,o=this.getMutableNode();o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof sr?this.parentNode.node.key:null;var a;o.prevKey=(a=(t=this.previousVisibleSibling)===null||t===void 0?void 0:t.node.key)!==null&&a!==void 0?a:null;var s;o.nextKey=(s=i==null?void 0:i.node.key)!==null&&s!==void 0?s:null,o.hasChildNodes=!!this.firstChild;var l;o.firstChildKey=(l=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null;var u;if(o.lastChildKey=(u=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&u!==void 0?u:null,(o.colSpan!=null||o.colIndex!=null)&&i){var g,c;let h=((g=o.colIndex)!==null&&g!==void 0?g:o.index)+((c=o.colSpan)!==null&&c!==void 0?c:1);if(h!==i.node.colIndex){let f=i.getMutableNode();f.colIndex=h}}}setProps(t,n,r,i){let o=this.getMutableNode(),{value:a,textValue:s,id:l,...u}=t;if(u.ref=n,o.props=u,o.rendered=r,o.render=i,o.value=a,o.textValue=s||(typeof u.children=="string"?u.children:"")||t["aria-label"]||"",l!=null&&l!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=l}u.colSpan!=null&&(o.colSpan=u.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let t=this;return{get display(){return t.isHidden?"none":""},set display(n){let r=n==="none";if(t.isHidden!==r){var i,o;(((i=t.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===t||((o=t.parentNode)===null||o===void 0?void 0:o.lastVisibleChild)===t)&&t.ownerDocument.markDirty(t.parentNode);let a=t.previousVisibleSibling,s=t.nextVisibleSibling;a&&t.ownerDocument.markDirty(a),s&&t.ownerDocument.markDirty(s),t.isHidden=r,t.ownerDocument.markDirty(t)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(t,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new Ol(t,`react-aria-${++n.nodeId}`)}}class M2 extends t0{get isConnected(){return this.isMounted}createElement(t){return new sr(t,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(t){this.dirtyNodes.add(t)}addNode(t){if(t.isHidden)return;let n=this.getMutableCollection();if(!n.getItem(t.node.key))for(let r of t)this.addNode(r);n.addNode(t.node)}removeNode(t){for(let r of t)this.removeNode(r);this.getMutableCollection().removeNode(t.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof sr&&(!o.isConnected||o.isHidden)?this.removeNode(o):o.updateChildIndices();for(let o of this.dirtyNodes)o instanceof sr&&(o.isConnected&&!o.isHidden&&(o.updateNode(),this.addNode(o)),o.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var t,n,r,i;this.nextCollection.commit((r=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let t of this.subscriptions)t();this.inSubscription=!1}}subscribe(t){return this.subscriptions.add(t),()=>this.subscriptions.delete(t)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(t){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=t,this.nextCollection=t}}function n0(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=e,a=d.useMemo(()=>new WeakMap,o);return d.useMemo(()=>{if(n&&typeof t=="function"){let u=[];for(let g of n){let c=a.get(g);if(!c){c=t(g);var s,l;let h=(l=(s=c.props.id)!==null&&s!==void 0?s:g.key)!==null&&l!==void 0?l:g.id;if(h==null)throw new Error("Could not determine key for item");r&&(h=r+":"+h),c=d.cloneElement(c,i?{key:h,id:h,value:g}:{key:h}),a.set(g,c)}u.push(c)}return u}else if(typeof t!="function")return t},[t,n,a,r,i])}if(typeof HTMLTemplateElement<"u"){const e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}const Ro=d.createContext(!1);function k2(e){if(d.useContext(Ro))return d.createElement(d.Fragment,null,e.children);let n=d.createElement(Ro.Provider,{value:!0},e.children);return d.createElement("template",{"data-react-aria-hidden":!0},n)}function O2(e){let t=(n,r)=>d.useContext(Ro)?null:e(n,r);return t.displayName=e.displayName||e.name,d.forwardRef(t)}function D2(){return d.useContext(Ro)}function Tl(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function r0(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function i0(e){let t=d.useRef({isFocused:!1,observer:null});te(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=Fe(r=>{e==null||e(r)});return d.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=a=>{if(t.current.isFocused=!1,i.disabled){let s=Tl(a);n(s)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let Mo=!1;function T2(e){for(;e&&!Zf(e);)e=e.parentElement;let t=pt(e),n=t.document.activeElement;if(!n||n===e)return;Mo=!0;let r=!1,i=g=>{(g.target===n||r)&&g.stopImmediatePropagation()},o=g=>{(g.target===n||r)&&(g.stopImmediatePropagation(),!e&&!r&&(r=!0,vt(n),l()))},a=g=>{(g.target===e||r)&&g.stopImmediatePropagation()},s=g=>{(g.target===e||r)&&(g.stopImmediatePropagation(),r||(r=!0,vt(n),l()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",a,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",a,!0),Mo=!1,r=!1},u=requestAnimationFrame(l);return l}let tr="default",Ts="",go=new WeakMap;function F2(e){if(aa()){if(tr==="default"){const t=re(e);Ts=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}tr="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";go.set(e,e.style[t]),e.style[t]="none"}}function Ku(e){if(aa()){if(tr!=="disabled")return;tr="restoring",setTimeout(()=>{Wf(()=>{if(tr==="restoring"){const t=re(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=Ts||""),Ts="",tr="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&go.has(e)){let t=go.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),go.delete(e)}}const hi=d.createContext({register:()=>{}});hi.displayName="PressResponderContext";function L2(e,t){return t.get?t.get.call(e):t.value}function o0(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function I2(e,t){var n=o0(e,t,"get");return L2(e,n)}function N2(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function A2(e,t,n){N2(e,t),t.set(e,n)}function _2(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function Bu(e,t,n){var r=o0(e,t,"set");return _2(e,r,n),n}function j2(e){let t=d.useContext(hi);if(t){let{register:n,...r}=t;e=ae(r,e),n()}return Ml(t,e.ref),e}var Wi=new WeakMap;class qi{continuePropagation(){Bu(this,Wi,!1)}get shouldStopPropagation(){return I2(this,Wi)}constructor(t,n,r,i){A2(this,Wi,{writable:!0,value:void 0}),Bu(this,Wi,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,g,c=null;r.clientX!=null&&r.clientY!=null&&(g=r.clientX,c=r.clientY),s&&(g!=null&&c!=null?(l=g-s.left,u=c-s.top):(l=s.width/2,u=s.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const Hu=Symbol("linkClicked"),Vu="react-aria-pressable-style",zu="data-react-aria-pressable";function ca(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:a,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:g,allowTextSelectionOnPress:c,ref:h,...f}=j2(e),[p,m]=d.useState(!1),b=d.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:v,removeAllGlobalListeners:w}=la(),x=Fe((E,N)=>{let _=b.current;if(s||_.didFirePressStart)return!1;let T=!0;if(_.isTriggeringEvent=!0,r){let A=new qi("pressstart",N,E);r(A),T=A.shouldStopPropagation}return n&&n(!0),_.isTriggeringEvent=!1,_.didFirePressStart=!0,m(!0),T}),k=Fe((E,N,_=!0)=>{let T=b.current;if(!T.didFirePressStart)return!1;T.didFirePressStart=!1,T.isTriggeringEvent=!0;let A=!0;if(i){let M=new qi("pressend",N,E);i(M),A=M.shouldStopPropagation}if(n&&n(!1),m(!1),t&&_&&!s){let M=new qi("press",N,E);t(M),A&&(A=M.shouldStopPropagation)}return T.isTriggeringEvent=!1,A}),S=Fe((E,N)=>{let _=b.current;if(s)return!1;if(o){_.isTriggeringEvent=!0;let T=new qi("pressup",N,E);return o(T),_.isTriggeringEvent=!1,T.shouldStopPropagation}return!0}),R=Fe(E=>{let N=b.current;if(N.isPressed&&N.target){N.didFirePressStart&&N.pointerType!=null&&k(Gn(N.target,E),N.pointerType,!1),N.isPressed=!1,N.isOverTarget=!1,N.activePointerId=null,N.pointerType=null,w(),c||Ku(N.target);for(let _ of N.disposables)_();N.disposables=[]}}),P=Fe(E=>{g&&R(E)}),I=Fe(E=>{a==null||a(E)}),D=Fe((E,N)=>{if(a){let _=new MouseEvent("click",E);r0(_,N),a(Tl(_))}}),L=d.useMemo(()=>{let E=b.current,N={onKeyDown(T){if(Da(T.nativeEvent,T.currentTarget)&&Ae(T.currentTarget,me(T.nativeEvent))){var A;Uu(me(T.nativeEvent),T.key)&&T.preventDefault();let M=!0;if(!E.isPressed&&!T.repeat){E.target=T.currentTarget,E.isPressed=!0,E.pointerType="keyboard",M=x(T,"keyboard");let F=T.currentTarget,O=V=>{Da(V,F)&&!V.repeat&&Ae(F,me(V))&&E.target&&S(Gn(E.target,V),"keyboard")};v(re(T.currentTarget),"keyup",Rr(O,_),!0)}M&&T.stopPropagation(),T.metaKey&&Nn()&&((A=E.metaKeyEvents)===null||A===void 0||A.set(T.key,T.nativeEvent))}else T.key==="Meta"&&(E.metaKeyEvents=new Map)},onClick(T){if(!(T&&!Ae(T.currentTarget,me(T.nativeEvent)))&&T&&T.button===0&&!E.isTriggeringEvent&&!An.isOpening){let A=!0;if(s&&T.preventDefault(),!E.ignoreEmulatedMouseEvents&&!E.isPressed&&(E.pointerType==="virtual"||Yf(T.nativeEvent))){let M=x(T,"virtual"),F=S(T,"virtual"),O=k(T,"virtual");I(T),A=M&&F&&O}else if(E.isPressed&&E.pointerType!=="keyboard"){let M=E.pointerType||T.nativeEvent.pointerType||"virtual";A=k(Gn(T.currentTarget,T),M,!0),E.isOverTarget=!1,I(T),R(T)}E.ignoreEmulatedMouseEvents=!1,A&&T.stopPropagation()}}},_=T=>{var A;if(E.isPressed&&E.target&&Da(T,E.target)){var M;Uu(me(T),T.key)&&T.preventDefault();let O=me(T),V=Ae(E.target,me(T));k(Gn(E.target,T),"keyboard",V),V&&D(T,E.target),w(),T.key!=="Enter"&&Fl(E.target)&&Ae(E.target,O)&&!T[Hu]&&(T[Hu]=!0,An(E.target,T,!1)),E.isPressed=!1,(M=E.metaKeyEvents)===null||M===void 0||M.delete(T.key)}else if(T.key==="Meta"&&(!((A=E.metaKeyEvents)===null||A===void 0)&&A.size)){var F;let O=E.metaKeyEvents;E.metaKeyEvents=void 0;for(let V of O.values())(F=E.target)===null||F===void 0||F.dispatchEvent(new KeyboardEvent("keyup",V))}};if(typeof PointerEvent<"u"){N.onPointerDown=M=>{if(M.button!==0||!Ae(M.currentTarget,me(M.nativeEvent)))return;if(C2(M.nativeEvent)){E.pointerType="virtual";return}E.pointerType=M.pointerType;let F=!0;if(!E.isPressed){E.isPressed=!0,E.isOverTarget=!0,E.activePointerId=M.pointerId,E.target=M.currentTarget,c||F2(E.target),F=x(M,E.pointerType);let O=me(M.nativeEvent);"releasePointerCapture"in O&&O.releasePointerCapture(M.pointerId),v(re(M.currentTarget),"pointerup",T,!1),v(re(M.currentTarget),"pointercancel",A,!1)}F&&M.stopPropagation()},N.onMouseDown=M=>{if(Ae(M.currentTarget,me(M.nativeEvent))&&M.button===0){if(u){let F=T2(M.target);F&&E.disposables.push(F)}M.stopPropagation()}},N.onPointerUp=M=>{!Ae(M.currentTarget,me(M.nativeEvent))||E.pointerType==="virtual"||M.button===0&&S(M,E.pointerType||M.pointerType)},N.onPointerEnter=M=>{M.pointerId===E.activePointerId&&E.target&&!E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!0,x(Gn(E.target,M),E.pointerType))},N.onPointerLeave=M=>{M.pointerId===E.activePointerId&&E.target&&E.isOverTarget&&E.pointerType!=null&&(E.isOverTarget=!1,k(Gn(E.target,M),E.pointerType,!1),P(M))};let T=M=>{if(M.pointerId===E.activePointerId&&E.isPressed&&M.button===0&&E.target){if(Ae(E.target,me(M))&&E.pointerType!=null){let F=!1,O=setTimeout(()=>{E.isPressed&&E.target instanceof HTMLElement&&(F?R(M):(vt(E.target),E.target.click()))},80);v(M.currentTarget,"click",()=>F=!0,!0),E.disposables.push(()=>clearTimeout(O))}else R(M);E.isOverTarget=!1}},A=M=>{R(M)};N.onDragStart=M=>{Ae(M.currentTarget,me(M.nativeEvent))&&R(M)}}return N},[v,s,u,w,c,R,P,k,x,S,I,D]);return d.useEffect(()=>{if(!h)return;const E=re(h.current);if(!E||!E.head||E.getElementById(Vu))return;const N=E.createElement("style");N.id=Vu,N.textContent=`
21
+ @layer {
22
+ [${zu}] {
23
+ touch-action: pan-x pan-y pinch-zoom;
24
+ }
25
+ }
26
+ `.trim(),E.head.prepend(N)},[h]),d.useEffect(()=>{let E=b.current;return()=>{var N;c||Ku((N=E.target)!==null&&N!==void 0?N:void 0);for(let _ of E.disposables)_();E.disposables=[]}},[c]),{isPressed:l||p,pressProps:ae(f,L,{[zu]:!0})}}function Fl(e){return e.tagName==="A"&&e.hasAttribute("href")}function Da(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof pt(i).HTMLInputElement&&!a0(i,n)||i instanceof pt(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&Fl(i))&&n!=="Enter")}function Gn(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function K2(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!Fl(e)}function Uu(e,t){return e instanceof HTMLInputElement?!a0(e,t):K2(e)}const B2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function a0(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":B2.has(e.type)}let _r=null,Fs=new Set,ri=new Map,_n=!1,Ls=!1;const H2={Tab:!0,Escape:!0};function Ll(e,t){for(let n of Fs)n(e,t)}function V2(e){return!(e.metaKey||!Nn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function ko(e){_n=!0,V2(e)&&(_r="keyboard",Ll("keyboard",e))}function lr(e){_r="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(_n=!0,Ll("pointer",e))}function s0(e){Yf(e)&&(_n=!0,_r="virtual")}function l0(e){e.target===window||e.target===document||Mo||!e.isTrusted||(!_n&&!Ls&&(_r="virtual",Ll("virtual",e)),_n=!1,Ls=!1)}function u0(){Mo||(_n=!1,Ls=!0)}function Is(e){if(typeof window>"u"||typeof document>"u"||ri.get(pt(e)))return;const t=pt(e),n=re(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){_n=!0,r.apply(this,arguments)},n.addEventListener("keydown",ko,!0),n.addEventListener("keyup",ko,!0),n.addEventListener("click",s0,!0),t.addEventListener("focus",l0,!0),t.addEventListener("blur",u0,!1),typeof PointerEvent<"u"&&(n.addEventListener("pointerdown",lr,!0),n.addEventListener("pointermove",lr,!0),n.addEventListener("pointerup",lr,!0)),t.addEventListener("beforeunload",()=>{c0(e)},{once:!0}),ri.set(t,{focus:r})}const c0=(e,t)=>{const n=pt(e),r=re(e);t&&r.removeEventListener("DOMContentLoaded",t),ri.has(n)&&(n.HTMLElement.prototype.focus=ri.get(n).focus,r.removeEventListener("keydown",ko,!0),r.removeEventListener("keyup",ko,!0),r.removeEventListener("click",s0,!0),n.removeEventListener("focus",l0,!0),n.removeEventListener("blur",u0,!1),typeof PointerEvent<"u"&&(r.removeEventListener("pointerdown",lr,!0),r.removeEventListener("pointermove",lr,!0),r.removeEventListener("pointerup",lr,!0)),ri.delete(n))};function z2(e){const t=re(e);let n;return t.readyState!=="loading"?Is(e):(n=()=>{Is(e)},t.addEventListener("DOMContentLoaded",n)),()=>c0(e,n)}typeof document<"u"&&z2();function gi(){return _r!=="pointer"}function pi(){return _r}const U2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function W2(e,t,n){let r=re(n==null?void 0:n.target);const i=typeof window<"u"?pt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?pt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?pt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?pt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||r.activeElement instanceof i&&!U2.has(r.activeElement.type)||r.activeElement instanceof o||r.activeElement instanceof a&&r.activeElement.isContentEditable,!(e&&t==="keyboard"&&n instanceof s&&!H2[n.key])}function q2(e,t,n){Is(),d.useEffect(()=>{let r=(i,o)=>{W2(!!(n!=null&&n.isTextInput),i,o)&&e(gi())};return Fs.add(r),()=>{Fs.delete(r)}},t)}function dn(e){const t=re(e),n=$e(t);if(pi()==="virtual"){let r=n;Wf(()=>{$e(t)===r&&e.isConnected&&vt(e)})}else vt(e)}function Il(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=d.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=i0(o),s=d.useCallback(l=>{const u=re(l.target),g=u?$e(u):$e();l.target===l.currentTarget&&g===me(l.nativeEvent)&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?o:void 0}}}function Wu(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped(){return t}};e(r),t&&n.stopPropagation()}}function d0(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:Wu(e.onKeyDown),onKeyUp:Wu(e.onKeyUp)}}}let Oo=d.createContext(null);function G2(e){let t=d.useContext(Oo)||{};Ml(t,e);let{ref:n,...r}=t;return r}const Q2=d.forwardRef(function(t,n){let{children:r,...i}=t,o=Kn(n),a={...i,ref:o};return d.createElement(Oo.Provider,{value:a},r)});function f0(e,t){let{focusProps:n}=Il(e),{keyboardProps:r}=d0(e),i=ae(n,r),o=G2(t),a=e.isDisabled?{}:o,s=d.useRef(e.autoFocus);d.useEffect(()=>{s.current&&t.current&&dn(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:ae({...i,tabIndex:l},a)}}const h0=d.forwardRef(({children:e,...t},n)=>{let r=d.useRef(!1),i=d.useContext(hi);n=Kn(n||(i==null?void 0:i.ref));let o=ae(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return Ml(i,n),d.useEffect(()=>{r.current||(r.current=!0)},[]),d.createElement(hi.Provider,{value:o},e)});function Y2({children:e}){let t=d.useMemo(()=>({register:()=>{}}),[]);return d.createElement(hi.Provider,{value:t},e)}function Nl(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=d.useRef({isFocusWithin:!1}),{addGlobalListener:a,removeAllGlobalListeners:s}=la(),l=d.useCallback(c=>{c.currentTarget.contains(c.target)&&o.current.isFocusWithin&&!c.currentTarget.contains(c.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(c),i&&i(!1))},[n,i,o,s]),u=i0(l),g=d.useCallback(c=>{if(!c.currentTarget.contains(c.target))return;const h=re(c.target),f=$e(h);if(!o.current.isFocusWithin&&f===me(c.nativeEvent)){r&&r(c),i&&i(!0),o.current.isFocusWithin=!0,u(c);let p=c.currentTarget;a(h,"focus",m=>{if(o.current.isFocusWithin&&!Ae(p,m.target)){let b=new h.defaultView.FocusEvent("blur",{relatedTarget:m.target});r0(b,p);let v=Tl(b);l(v)}},{capture:!0})}},[r,i,u,a,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:g,onBlur:l}}}let Ns=!1,Ta=0;function X2(){Ns=!0,setTimeout(()=>{Ns=!1},50)}function qu(e){e.pointerType==="touch"&&X2()}function Z2(){if(!(typeof document>"u"))return typeof PointerEvent<"u"&&document.addEventListener("pointerup",qu),Ta++,()=>{Ta--,!(Ta>0)&&typeof PointerEvent<"u"&&document.removeEventListener("pointerup",qu)}}function jr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,a]=d.useState(!1),s=d.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;d.useEffect(Z2,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=la(),{hoverProps:g,triggerHoverEnd:c}=d.useMemo(()=>{let h=(m,b)=>{if(s.pointerType=b,i||b==="touch"||s.isHovered||!m.currentTarget.contains(m.target))return;s.isHovered=!0;let v=m.currentTarget;s.target=v,l(re(m.target),"pointerover",w=>{s.isHovered&&s.target&&!Ae(s.target,w.target)&&f(w,w.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:v,pointerType:b}),n&&n(!0),a(!0)},f=(m,b)=>{let v=s.target;s.pointerType="",s.target=null,!(b==="touch"||!s.isHovered||!v)&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:v,pointerType:b}),n&&n(!1),a(!1))},p={};return typeof PointerEvent<"u"&&(p.onPointerEnter=m=>{Ns&&m.pointerType==="mouse"||h(m,m.pointerType)},p.onPointerLeave=m=>{!i&&m.currentTarget.contains(m.target)&&f(m,m.pointerType)}),{hoverProps:p,triggerHoverEnd:f}},[t,n,r,i,s,l,u]);return d.useEffect(()=>{i&&c({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:g,isHovered:o}}function J2(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=d.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=Fe(l=>{n&&Gu(l,t)&&(i&&i(l),o.current.isPointerDown=!0)}),s=Fe(l=>{n&&n(l)});d.useEffect(()=>{let l=o.current;if(r)return;const u=t.current,g=re(u);if(typeof PointerEvent<"u"){let c=h=>{l.isPointerDown&&Gu(h,t)&&s(h),l.isPointerDown=!1};return g.addEventListener("pointerdown",a,!0),g.addEventListener("pointerup",c,!0),()=>{g.removeEventListener("pointerdown",a,!0),g.removeEventListener("pointerup",c,!0)}}},[t,r,a,s])}function Gu(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current?!e.composedPath().includes(t.current):!1}const e5=500;function g0(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=e5,accessibilityDescription:a}=e;const s=d.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=la(),{pressProps:g}=ca({isDisabled:t,onPressStart(h){if(h.continuePropagation(),(h.pointerType==="mouse"||h.pointerType==="touch")&&(n&&n({...h,type:"longpressstart"}),s.current=setTimeout(()=>{h.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),re(h.target).activeElement!==h.target&&vt(h.target),i&&i({...h,type:"longpress"}),s.current=void 0},o),h.pointerType==="touch")){let f=p=>{p.preventDefault()};l(h.target,"contextmenu",f,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(h.target,"contextmenu",f)},30)},{once:!0})}},onPressEnd(h){s.current&&clearTimeout(s.current),r&&(h.pointerType==="mouse"||h.pointerType==="touch")&&r({...h,type:"longpressend"})}}),c=x2(i&&!t?a:void 0);return{longPressProps:ae(g,c)}}var p0={exports:{}},m0={};/**
21
27
  * @license React
22
28
  * use-sync-external-store-shim.production.js
23
29
  *
@@ -25,7 +31,7 @@ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}
25
31
  *
26
32
  * This source code is licensed under the MIT license found in the
27
33
  * LICENSE file in the root directory of this source tree.
28
- */var fr=c;function D2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var T2=typeof Object.is=="function"?Object.is:D2,O2=fr.useState,F2=fr.useEffect,L2=fr.useLayoutEffect,A2=fr.useDebugValue;function I2(e,t){var n=t(),r=O2({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return L2(function(){i.value=n,i.getSnapshot=t,na(i)&&o({inst:i})},[e,n,t]),F2(function(){return na(i)&&o({inst:i}),e(function(){na(i)&&o({inst:i})})},[e]),A2(n),n}function na(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!T2(e,n)}catch{return!0}}function N2(e,t){return t()}var j2=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?N2:I2;vf.useSyncExternalStore=fr.useSyncExternalStore!==void 0?fr.useSyncExternalStore:j2;bf.exports=vf;var _2=bf.exports;const yf=c.createContext(!1),Yr=c.createContext(null);function K2(e){if(c.useContext(Yr))return e.content;let{collection:n,document:r}=z2(e.createCollection);return c.createElement(c.Fragment,null,c.createElement(r2,null,c.createElement(Yr.Provider,{value:r},e.content)),c.createElement(B2,{render:e.children,collection:n}))}function B2({collection:e,render:t}){return t(e)}function H2(e,t,n){let r=kt(),i=c.useRef(r);i.current=r;let o=c.useCallback(()=>i.current?n():t(),[t,n]);return _2.useSyncExternalStore(e,o)}const V2=typeof c.useSyncExternalStore=="function"?c.useSyncExternalStore:H2;function z2(e){let[t]=c.useState(()=>new qb((e==null?void 0:e())||new Ub)),n=c.useCallback(a=>t.subscribe(a),[t]),r=c.useCallback(()=>{let a=t.getCollection();return t.isSSR&&t.resetAfterSSR(),a},[t]),i=c.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=V2(n,r,i);return re(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const ls=c.createContext(null);function U2(e,t,n,r,i,o){let a=c.useCallback(l=>{l==null||l.setProps(t,n,r,o)},[t,n,r,o]),s=c.useContext(ls);if(s){let l=s.ownerDocument.nodesByProps.get(t);return l||(l=s.ownerDocument.createElement(e),l.setProps(t,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,l)),i?c.createElement(ls.Provider,{value:l},i):null}return c.createElement(e,{ref:a},i)}function q2(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),r=c.forwardRef((i,o)=>{if(!c.useContext(yf)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return U2(e,i,o,"children"in i?i.children:null,null,s=>c.createElement(n,{node:s}))});return r.displayName=t.name,r}function W2(e){return of({...e,addIdAndValue:!0})}const cu=c.createContext(null);function G2(e){let t=c.useContext(cu),n=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope||(t==null?void 0:t.idScope),i=W2({...e,idScope:r,dependencies:n});return c.useContext(Yr)&&(i=c.createElement(Q2,null,i)),t=c.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),c.createElement(cu.Provider,{value:t},i)}function Q2({children:e}){let t=c.useContext(Yr),n=c.useMemo(()=>c.createElement(Yr.Provider,{value:null},c.createElement(yf.Provider,{value:!0},e)),[e]);return kt()?c.createElement(ls.Provider,{value:t},n):Rn.createPortal(n,t)}const Y2=c.createContext(null),Z2={CollectionRoot({collection:e,renderDropIndicator:t}){return du(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return du(e,t,n)}};function du(e,t,n){return of({items:t?e.getChildren(t.key):e,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=e.getKeyAfter(a);return c.createElement(c.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=e.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const wf=c.createContext(Z2);function X2(e){return c.useMemo(()=>e!=null?new Set([e]):null,[e])}const lo=Symbol("default");function on({values:e,children:t}){for(let[n,r]of e)t=c.createElement(n.Provider,{value:r},t);return t}function Ye(e){let{className:t,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:a,values:s}=e;return c.useMemo(()=>{let l,u,d;return typeof t=="function"?l=t({...s,defaultClassName:i}):l=t,typeof n=="function"?u=n({...s,defaultStyle:a||{}}):u=n,typeof r=="function"?d=r({...s,defaultChildren:o}):r==null?d=o:d=r,{className:l??i,style:u||a?{...a,...u}:void 0,children:d??o,"data-rac":""}},[t,n,r,i,o,a,s])}function xf(e,t){let n=c.useContext(e);if(t===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=new Intl.ListFormat().format(Object.keys(n.slots).map(o=>`"${o}"`));if(!t&&!n.slots[lo])throw new Error(`A slot prop is required. Valid slot names are ${r}.`);let i=t||lo;if(!n.slots[i])throw new Error(`Invalid slot "${t}". Valid slot names are ${r}.`);return n.slots[i]}return n}function at(e,t,n){let r=xf(n,e.slot)||{},{ref:i,...o}=r,a=yr(c.useMemo(()=>lf(t,i),[t,i])),s=ae(o,e);return"style"in o&&o.style&&"style"in e&&e.style&&(typeof o.style=="function"||typeof e.style=="function"?s.style=l=>{let u=typeof o.style=="function"?o.style(l):o.style,d={...l.defaultStyle,...u},h=typeof e.style=="function"?e.style({...l,defaultStyle:d}):e.style;return{...d,...h}}:s.style={...o.style,...e.style}),[s,a]}function Cf(){let[e,t]=c.useState(!0),n=c.useRef(!1),r=c.useCallback(i=>{n.current=!0,t(!!i)},[]);return re(()=>{n.current||t(!1)},[]),[r,e]}function jo(e,t=!0){let[n,r]=c.useState(!0);return $f(e,n&&t,c.useCallback(()=>r(!1),[])),n&&t}function uo(e,t){let[n,r]=c.useState(!1),[i,o]=c.useState("idle");return!t&&e.current&&i==="idle"&&(n=!0,r(!0),o("exiting")),!e.current&&i==="exited"&&o("idle"),$f(e,n,c.useCallback(()=>{o("exited"),r(!1)},[])),n}function $f(e,t,n){let r=c.useRef(null);t&&e.current&&(r.current=window.getComputedStyle(e.current).animation),re(()=>{if(t&&e.current){let i=window.getComputedStyle(e.current);if(i.animationName&&i.animationName!=="none"&&i.animation!==r.current){let o=s=>{s.target===e.current&&(a.removeEventListener("animationend",o),Rn.flushSync(()=>{n()}))},a=e.current;return a.addEventListener("animationend",o),()=>{a.removeEventListener("animationend",o)}}else n()}},[e,t,n])}let Hn="default",us="",Yi=new WeakMap;function fu(e){if(Io()){if(Hn==="default"){const t=oe(e);us=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}Hn="disabled"}else(e instanceof HTMLElement||e instanceof SVGElement)&&(Yi.set(e,e.style.userSelect),e.style.userSelect="none")}function Pi(e){if(Io()){if(Hn!=="disabled")return;Hn="restoring",setTimeout(()=>{ff(()=>{if(Hn==="restoring"){const t=oe(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=us||""),us="",Hn="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&Yi.has(e)){let t=Yi.get(e);e.style.userSelect==="none"&&(e.style.userSelect=t),e.getAttribute("style")===""&&e.removeAttribute("style"),Yi.delete(e)}}const Zr=c.createContext({register:()=>{}});Zr.displayName="PressResponderContext";function J2(e,t){return t.get?t.get.call(e):t.value}function Sf(e,t,n){if(!t.has(e))throw new TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function ev(e,t){var n=Sf(e,t,"get");return J2(e,n)}function tv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function nv(e,t,n){tv(e,t),t.set(e,n)}function rv(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function hu(e,t,n){var r=Sf(e,t,"set");return rv(e,r,n),n}function iv(e){let t=c.useContext(Zr);if(t){let{register:n,...r}=t;e=ae(r,e),n()}return rl(t,e.ref),e}var Ri=new WeakMap;class Mi{continuePropagation(){hu(this,Ri,!1)}get shouldStopPropagation(){return ev(this,Ri)}constructor(t,n,r,i){nv(this,Ri,{writable:!0,value:void 0}),hu(this,Ri,!0);var o;let a=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const s=a==null?void 0:a.getBoundingClientRect();let l,u=0,d,h=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,h=r.clientY),s&&(d!=null&&h!=null?(l=d-s.left,u=h-s.top):(l=s.width/2,u=s.height/2)),this.type=t,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=l,this.y=u}}const gu=Symbol("linkClicked");function _o(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,isDisabled:a,isPressed:s,preventFocusOnPress:l,shouldCancelOnPointerExit:u,allowTextSelectionOnPress:d,ref:h,...g}=iv(e),[f,p]=c.useState(!1),m=c.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:b,removeAllGlobalListeners:$}=hf(),x=tt((y,D)=>{let P=m.current;if(a||P.didFirePressStart)return!1;let T=!0;if(P.isTriggeringEvent=!0,r){let L=new Mi("pressstart",D,y);r(L),T=L.shouldStopPropagation}return n&&n(!0),P.isTriggeringEvent=!1,P.didFirePressStart=!0,p(!0),T}),E=tt((y,D,P=!0)=>{let T=m.current;if(!T.didFirePressStart)return!1;T.ignoreClickAfterPress=!0,T.didFirePressStart=!1,T.isTriggeringEvent=!0;let L=!0;if(i){let R=new Mi("pressend",D,y);i(R),L=R.shouldStopPropagation}if(n&&n(!1),p(!1),t&&P&&!a){let R=new Mi("press",D,y);t(R),L&&(L=R.shouldStopPropagation)}return T.isTriggeringEvent=!1,L}),M=tt((y,D)=>{let P=m.current;if(a)return!1;if(o){P.isTriggeringEvent=!0;let T=new Mi("pressup",D,y);return o(T),P.isTriggeringEvent=!1,T.shouldStopPropagation}return!0}),C=tt(y=>{let D=m.current;D.isPressed&&D.target&&(D.isOverTarget&&D.pointerType!=null&&E(vt(D.target,y),D.pointerType,!1),D.isPressed=!1,D.isOverTarget=!1,D.activePointerId=null,D.pointerType=null,$(),d||Pi(D.target))}),k=tt(y=>{u&&C(y)}),F=c.useMemo(()=>{let y=m.current,D={onKeyDown(T){if(ra(T.nativeEvent,T.currentTarget)&&T.currentTarget.contains(T.target)){var L;mu(T.target,T.key)&&T.preventDefault();let R=!0;if(!y.isPressed&&!T.repeat){y.target=T.currentTarget,y.isPressed=!0,R=x(T,"keyboard");let I=T.currentTarget,O=K=>{ra(K,I)&&!K.repeat&&I.contains(K.target)&&y.target&&M(vt(y.target,K),"keyboard")};b(oe(T.currentTarget),"keyup",cr(O,P),!0)}R&&T.stopPropagation(),T.metaKey&&Cn()&&((L=y.metaKeyEvents)===null||L===void 0||L.set(T.key,T.nativeEvent))}else T.key==="Meta"&&(y.metaKeyEvents=new Map)},onClick(T){if(!(T&&!T.currentTarget.contains(T.target))&&T&&T.button===0&&!y.isTriggeringEvent&&!$n.isOpening){let L=!0;if(a&&T.preventDefault(),!y.ignoreClickAfterPress&&!y.ignoreEmulatedMouseEvents&&!y.isPressed&&(y.pointerType==="virtual"||ss(T.nativeEvent))){!a&&!l&&Et(T.currentTarget);let R=x(T,"virtual"),I=M(T,"virtual"),O=E(T,"virtual");L=R&&I&&O}y.ignoreEmulatedMouseEvents=!1,y.ignoreClickAfterPress=!1,L&&T.stopPropagation()}}},P=T=>{var L;if(y.isPressed&&y.target&&ra(T,y.target)){var R;mu(T.target,T.key)&&T.preventDefault();let O=T.target;E(vt(y.target,T),"keyboard",y.target.contains(O)),$(),T.key!=="Enter"&&il(y.target)&&y.target.contains(O)&&!T[gu]&&(T[gu]=!0,$n(y.target,T,!1)),y.isPressed=!1,(R=y.metaKeyEvents)===null||R===void 0||R.delete(T.key)}else if(T.key==="Meta"&&(!((L=y.metaKeyEvents)===null||L===void 0)&&L.size)){var I;let O=y.metaKeyEvents;y.metaKeyEvents=void 0;for(let K of O.values())(I=y.target)===null||I===void 0||I.dispatchEvent(new KeyboardEvent("keyup",K))}};if(typeof PointerEvent<"u"){D.onPointerDown=O=>{if(O.button!==0||!O.currentTarget.contains(O.target))return;if(k2(O.nativeEvent)){y.pointerType="virtual";return}ia(O.currentTarget)&&O.preventDefault(),y.pointerType=O.pointerType;let K=!0;y.isPressed||(y.isPressed=!0,y.isOverTarget=!0,y.activePointerId=O.pointerId,y.target=O.currentTarget,!a&&!l&&Et(O.currentTarget),d||fu(y.target),K=x(O,y.pointerType),b(oe(O.currentTarget),"pointermove",T,!1),b(oe(O.currentTarget),"pointerup",L,!1),b(oe(O.currentTarget),"pointercancel",I,!1)),K&&O.stopPropagation()},D.onMouseDown=O=>{O.currentTarget.contains(O.target)&&O.button===0&&(ia(O.currentTarget)&&O.preventDefault(),O.stopPropagation())},D.onPointerUp=O=>{!O.currentTarget.contains(O.target)||y.pointerType==="virtual"||O.button===0&&Ln(O,O.currentTarget)&&M(O,y.pointerType||O.pointerType)};let T=O=>{O.pointerId===y.activePointerId&&(y.target&&Ln(O,y.target)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,x(vt(y.target,O),y.pointerType)):y.target&&y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,E(vt(y.target,O),y.pointerType,!1),k(O)))},L=O=>{O.pointerId===y.activePointerId&&y.isPressed&&O.button===0&&y.target&&(Ln(O,y.target)&&y.pointerType!=null?E(vt(y.target,O),y.pointerType):y.isOverTarget&&y.pointerType!=null&&E(vt(y.target,O),y.pointerType,!1),y.isPressed=!1,y.isOverTarget=!1,y.activePointerId=null,y.pointerType=null,$(),d||Pi(y.target),"ontouchend"in y.target&&O.pointerType!=="mouse"&&b(y.target,"touchend",R,{once:!0}))},R=O=>{Ef(O.currentTarget)&&O.preventDefault()},I=O=>{C(O)};D.onDragStart=O=>{O.currentTarget.contains(O.target)&&C(O)}}else{D.onMouseDown=R=>{if(R.button!==0||!R.currentTarget.contains(R.target))return;if(ia(R.currentTarget)&&R.preventDefault(),y.ignoreEmulatedMouseEvents){R.stopPropagation();return}y.isPressed=!0,y.isOverTarget=!0,y.target=R.currentTarget,y.pointerType=ss(R.nativeEvent)?"virtual":"mouse",!a&&!l&&Et(R.currentTarget),x(R,y.pointerType)&&R.stopPropagation(),b(oe(R.currentTarget),"mouseup",T,!1)},D.onMouseEnter=R=>{if(!R.currentTarget.contains(R.target))return;let I=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!0,I=x(R,y.pointerType)),I&&R.stopPropagation()},D.onMouseLeave=R=>{if(!R.currentTarget.contains(R.target))return;let I=!0;y.isPressed&&!y.ignoreEmulatedMouseEvents&&y.pointerType!=null&&(y.isOverTarget=!1,I=E(R,y.pointerType,!1),k(R)),I&&R.stopPropagation()},D.onMouseUp=R=>{R.currentTarget.contains(R.target)&&!y.ignoreEmulatedMouseEvents&&R.button===0&&M(R,y.pointerType||"mouse")};let T=R=>{if(R.button===0){if(y.isPressed=!1,$(),y.ignoreEmulatedMouseEvents){y.ignoreEmulatedMouseEvents=!1;return}y.target&&Ln(R,y.target)&&y.pointerType!=null?E(vt(y.target,R),y.pointerType):y.target&&y.isOverTarget&&y.pointerType!=null&&E(vt(y.target,R),y.pointerType,!1),y.isOverTarget=!1}};D.onTouchStart=R=>{if(!R.currentTarget.contains(R.target))return;let I=ov(R.nativeEvent);if(!I)return;y.activePointerId=I.identifier,y.ignoreEmulatedMouseEvents=!0,y.isOverTarget=!0,y.isPressed=!0,y.target=R.currentTarget,y.pointerType="touch",!a&&!l&&Et(R.currentTarget),d||fu(y.target),x(Lt(y.target,R),y.pointerType)&&R.stopPropagation(),b(nt(R.currentTarget),"scroll",L,!0)},D.onTouchMove=R=>{if(!R.currentTarget.contains(R.target))return;if(!y.isPressed){R.stopPropagation();return}let I=pu(R.nativeEvent,y.activePointerId),O=!0;I&&Ln(I,R.currentTarget)?!y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!0,O=x(Lt(y.target,R),y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(y.isOverTarget=!1,O=E(Lt(y.target,R),y.pointerType,!1),k(Lt(y.target,R))),O&&R.stopPropagation()},D.onTouchEnd=R=>{if(!R.currentTarget.contains(R.target))return;if(!y.isPressed){R.stopPropagation();return}let I=pu(R.nativeEvent,y.activePointerId),O=!0;I&&Ln(I,R.currentTarget)&&y.pointerType!=null?(M(Lt(y.target,R),y.pointerType),O=E(Lt(y.target,R),y.pointerType)):y.isOverTarget&&y.pointerType!=null&&(O=E(Lt(y.target,R),y.pointerType,!1)),O&&R.stopPropagation(),y.isPressed=!1,y.activePointerId=null,y.isOverTarget=!1,y.ignoreEmulatedMouseEvents=!0,y.target&&!d&&Pi(y.target),$()},D.onTouchCancel=R=>{R.currentTarget.contains(R.target)&&(R.stopPropagation(),y.isPressed&&C(Lt(y.target,R)))};let L=R=>{y.isPressed&&R.target.contains(y.target)&&C({currentTarget:y.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};D.onDragStart=R=>{R.currentTarget.contains(R.target)&&C(R)}}return D},[b,a,l,$,d,C,k,E,x,M]);return c.useEffect(()=>()=>{var y;d||Pi((y=m.current.target)!==null&&y!==void 0?y:void 0)},[d]),{isPressed:s||f,pressProps:ae(g,F)}}function il(e){return e.tagName==="A"&&e.hasAttribute("href")}function ra(e,t){const{key:n,code:r}=e,i=t,o=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof nt(i).HTMLInputElement&&!Pf(i,n)||i instanceof nt(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&il(i))&&n!=="Enter")}function ov(e){const{targetTouches:t}=e;return t.length>0?t[0]:null}function pu(e,t){const n=e.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===t)return i}return null}function Lt(e,t){let n=0,r=0;return t.targetTouches&&t.targetTouches.length===1&&(n=t.targetTouches[0].clientX,r=t.targetTouches[0].clientY),{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function vt(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r}}function av(e){let t=0,n=0;return e.width!==void 0?t=e.width/2:e.radiusX!==void 0&&(t=e.radiusX),e.height!==void 0?n=e.height/2:e.radiusY!==void 0&&(n=e.radiusY),{top:e.clientY-n,right:e.clientX+t,bottom:e.clientY+n,left:e.clientX-t}}function sv(e,t){return!(e.left>t.right||t.left>e.right||e.top>t.bottom||t.top>e.bottom)}function Ln(e,t){let n=t.getBoundingClientRect(),r=av(e);return sv(n,r)}function ia(e){return!(e instanceof HTMLElement)||!e.hasAttribute("draggable")}function Ef(e){return e instanceof HTMLInputElement?!1:e instanceof HTMLButtonElement?e.type!=="submit"&&e.type!=="reset":!il(e)}function mu(e,t){return e instanceof HTMLInputElement?!Pf(e,t):Ef(e)}const lv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function Pf(e,t){return e.type==="checkbox"||e.type==="radio"?t===" ":lv.has(e.type)}const Rf=c.forwardRef(({children:e,...t},n)=>{let r=c.useRef(!1),i=c.useContext(Zr);n=yr(n||(i==null?void 0:i.ref));let o=ae(i||{},{...t,ref:n,register(){r.current=!0,i&&i.register()}});return rl(i,n),c.useEffect(()=>{r.current||(console.warn("A PressResponder was rendered without a pressable child. Either call the usePress hook, or wrap your DOM node with <Pressable> component."),r.current=!0)},[]),c.createElement(Zr.Provider,{value:o},e)});function uv({children:e}){let t=c.useMemo(()=>({register:()=>{}}),[]);return c.createElement(Zr.Provider,{value:t},e)}class cv{isDefaultPrevented(){return this.nativeEvent.defaultPrevented}preventDefault(){this.defaultPrevented=!0,this.nativeEvent.preventDefault()}stopPropagation(){this.nativeEvent.stopPropagation(),this.isPropagationStopped=()=>!0}isPropagationStopped(){return!1}persist(){}constructor(t,n){this.nativeEvent=n,this.target=n.target,this.currentTarget=n.currentTarget,this.relatedTarget=n.relatedTarget,this.bubbles=n.bubbles,this.cancelable=n.cancelable,this.defaultPrevented=n.defaultPrevented,this.eventPhase=n.eventPhase,this.isTrusted=n.isTrusted,this.timeStamp=n.timeStamp,this.type=t}}function Mf(e){let t=c.useRef({isFocused:!1,observer:null});re(()=>{const r=t.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=tt(r=>{e==null||e(r)});return c.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){t.current.isFocused=!0;let i=r.target,o=a=>{t.current.isFocused=!1,i.disabled&&n(new cv("blur",a)),t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var a;(a=t.current.observer)===null||a===void 0||a.disconnect();let s=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}function ol(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:i}=e;const o=c.useCallback(l=>{if(l.target===l.currentTarget)return r&&r(l),i&&i(!1),!0},[r,i]),a=Mf(o),s=c.useCallback(l=>{const u=oe(l.target);l.target===l.currentTarget&&u.activeElement===l.target&&(n&&n(l),i&&i(!0),a(l))},[i,n,a]);return{focusProps:{onFocus:!t&&(n||i||r)?s:void 0,onBlur:!t&&(r||i)?o:void 0}}}let wr=null,cs=new Set,Kr=new Map,Sn=!1,ds=!1;const dv={Tab:!0,Escape:!0};function al(e,t){for(let n of cs)n(e,t)}function fv(e){return!(e.metaKey||!Cn()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function co(e){Sn=!0,fv(e)&&(wr="keyboard",al("keyboard",e))}function Ge(e){wr="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Sn=!0,al("pointer",e))}function kf(e){ss(e)&&(Sn=!0,wr="virtual")}function Df(e){e.target===window||e.target===document||(!Sn&&!ds&&(wr="virtual",al("virtual",e)),Sn=!1,ds=!1)}function Tf(){Sn=!1,ds=!0}function fs(e){if(typeof window>"u"||Kr.get(nt(e)))return;const t=nt(e),n=oe(e);let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){Sn=!0,r.apply(this,arguments)},n.addEventListener("keydown",co,!0),n.addEventListener("keyup",co,!0),n.addEventListener("click",kf,!0),t.addEventListener("focus",Df,!0),t.addEventListener("blur",Tf,!1),typeof PointerEvent<"u"?(n.addEventListener("pointerdown",Ge,!0),n.addEventListener("pointermove",Ge,!0),n.addEventListener("pointerup",Ge,!0)):(n.addEventListener("mousedown",Ge,!0),n.addEventListener("mousemove",Ge,!0),n.addEventListener("mouseup",Ge,!0)),t.addEventListener("beforeunload",()=>{Of(e)},{once:!0}),Kr.set(t,{focus:r})}const Of=(e,t)=>{const n=nt(e),r=oe(e);t&&r.removeEventListener("DOMContentLoaded",t),Kr.has(n)&&(n.HTMLElement.prototype.focus=Kr.get(n).focus,r.removeEventListener("keydown",co,!0),r.removeEventListener("keyup",co,!0),r.removeEventListener("click",kf,!0),n.removeEventListener("focus",Df,!0),n.removeEventListener("blur",Tf,!1),typeof PointerEvent<"u"?(r.removeEventListener("pointerdown",Ge,!0),r.removeEventListener("pointermove",Ge,!0),r.removeEventListener("pointerup",Ge,!0)):(r.removeEventListener("mousedown",Ge,!0),r.removeEventListener("mousemove",Ge,!0),r.removeEventListener("mouseup",Ge,!0)),Kr.delete(n))};function hv(e){const t=oe(e);let n;return t.readyState!=="loading"?fs(e):(n=()=>{fs(e)},t.addEventListener("DOMContentLoaded",n)),()=>Of(e,n)}typeof document<"u"&&hv();function Ko(){return wr!=="pointer"}function fo(){return wr}const gv=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pv(e,t,n){var r;const i=typeof window<"u"?nt(n==null?void 0:n.target).HTMLInputElement:HTMLInputElement,o=typeof window<"u"?nt(n==null?void 0:n.target).HTMLTextAreaElement:HTMLTextAreaElement,a=typeof window<"u"?nt(n==null?void 0:n.target).HTMLElement:HTMLElement,s=typeof window<"u"?nt(n==null?void 0:n.target).KeyboardEvent:KeyboardEvent;return e=e||(n==null?void 0:n.target)instanceof i&&!gv.has(n==null||(r=n.target)===null||r===void 0?void 0:r.type)||(n==null?void 0:n.target)instanceof o||(n==null?void 0:n.target)instanceof a&&(n==null?void 0:n.target.isContentEditable),!(e&&t==="keyboard"&&n instanceof s&&!dv[n.key])}function mv(e,t,n){fs(),c.useEffect(()=>{let r=(i,o)=>{pv(!!(n!=null&&n.isTextInput),i,o)&&e(Ko())};return cs.add(r),()=>{cs.delete(r)}},t)}function sl(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:i}=e,o=c.useRef({isFocusWithin:!1}),a=c.useCallback(u=>{o.current.isFocusWithin&&!u.currentTarget.contains(u.relatedTarget)&&(o.current.isFocusWithin=!1,n&&n(u),i&&i(!1))},[n,i,o]),s=Mf(a),l=c.useCallback(u=>{!o.current.isFocusWithin&&document.activeElement===u.target&&(r&&r(u),i&&i(!0),o.current.isFocusWithin=!0,s(u))},[r,i,s]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:l,onBlur:a}}}let ho=!1,oa=0;function hs(){ho=!0,setTimeout(()=>{ho=!1},50)}function bu(e){e.pointerType==="touch"&&hs()}function bv(){if(!(typeof document>"u"))return typeof PointerEvent<"u"?document.addEventListener("pointerup",bu):document.addEventListener("touchend",hs),oa++,()=>{oa--,!(oa>0)&&(typeof PointerEvent<"u"?document.removeEventListener("pointerup",bu):document.removeEventListener("touchend",hs))}}function xr(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:i}=e,[o,a]=c.useState(!1),s=c.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;c.useEffect(bv,[]);let{hoverProps:l,triggerHoverEnd:u}=c.useMemo(()=>{let d=(f,p)=>{if(s.pointerType=p,i||p==="touch"||s.isHovered||!f.currentTarget.contains(f.target))return;s.isHovered=!0;let m=f.currentTarget;s.target=m,t&&t({type:"hoverstart",target:m,pointerType:p}),n&&n(!0),a(!0)},h=(f,p)=>{if(s.pointerType="",s.target=null,p==="touch"||!s.isHovered)return;s.isHovered=!1;let m=f.currentTarget;r&&r({type:"hoverend",target:m,pointerType:p}),n&&n(!1),a(!1)},g={};return typeof PointerEvent<"u"?(g.onPointerEnter=f=>{ho&&f.pointerType==="mouse"||d(f,f.pointerType)},g.onPointerLeave=f=>{!i&&f.currentTarget.contains(f.target)&&h(f,f.pointerType)}):(g.onTouchStart=()=>{s.ignoreEmulatedMouseEvents=!0},g.onMouseEnter=f=>{!s.ignoreEmulatedMouseEvents&&!ho&&d(f,"mouse"),s.ignoreEmulatedMouseEvents=!1},g.onMouseLeave=f=>{!i&&f.currentTarget.contains(f.target)&&h(f,"mouse")}),{hoverProps:g,triggerHoverEnd:h}},[t,n,r,i,s]);return c.useEffect(()=>{i&&u({currentTarget:s.target},s.pointerType)},[i]),{hoverProps:l,isHovered:o}}function vv(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:i}=e,o=c.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),a=tt(l=>{n&&ki(l,t)&&(i&&i(l),o.current.isPointerDown=!0)}),s=tt(l=>{n&&n(l)});c.useEffect(()=>{let l=o.current;if(r)return;const u=t.current,d=oe(u);if(typeof PointerEvent<"u"){let h=g=>{l.isPointerDown&&ki(g,t)&&s(g),l.isPointerDown=!1};return d.addEventListener("pointerdown",a,!0),d.addEventListener("pointerup",h,!0),()=>{d.removeEventListener("pointerdown",a,!0),d.removeEventListener("pointerup",h,!0)}}else{let h=f=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&ki(f,t)&&s(f),l.isPointerDown=!1},g=f=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&ki(f,t)&&s(f),l.isPointerDown=!1};return d.addEventListener("mousedown",a,!0),d.addEventListener("mouseup",h,!0),d.addEventListener("touchstart",a,!0),d.addEventListener("touchend",g,!0),()=>{d.removeEventListener("mousedown",a,!0),d.removeEventListener("mouseup",h,!0),d.removeEventListener("touchstart",a,!0),d.removeEventListener("touchend",g,!0)}}},[t,r,a,s])}function ki(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function vu(e){if(!e)return;let t=!0;return n=>{let r={...n,preventDefault(){n.preventDefault()},isDefaultPrevented(){return n.isDefaultPrevented()},stopPropagation(){console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.")},continuePropagation(){t=!1}};e(r),t&&n.stopPropagation()}}function Ff(e){return{keyboardProps:e.isDisabled?{}:{onKeyDown:vu(e.onKeyDown),onKeyUp:vu(e.onKeyUp)}}}const yv=500;function Lf(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:o=yv,accessibilityDescription:a}=e;const s=c.useRef(void 0);let{addGlobalListener:l,removeGlobalListener:u}=hf(),{pressProps:d}=_o({isDisabled:t,onPressStart(g){if(g.continuePropagation(),(g.pointerType==="mouse"||g.pointerType==="touch")&&(n&&n({...g,type:"longpressstart"}),s.current=setTimeout(()=>{g.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...g,type:"longpress"}),s.current=void 0},o),g.pointerType==="touch")){let f=p=>{p.preventDefault()};l(g.target,"contextmenu",f,{once:!0}),l(window,"pointerup",()=>{setTimeout(()=>{u(g.target,"contextmenu",f)},30)},{once:!0})}},onPressEnd(g){s.current&&clearTimeout(s.current),r&&(g.pointerType==="mouse"||g.pointerType==="touch")&&r({...g,type:"longpressend"})}}),h=M2(i&&!t?a:void 0);return{longPressProps:ae(d,h)}}function En(e){const t=oe(e);if(fo()==="virtual"){let n=t.activeElement;ff(()=>{t.activeElement===n&&e.isConnected&&Et(e)})}else Et(e)}function wv(e){const t=nt(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:a,visibility:s}=o(e);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function xv(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Af(e,t){return e.nodeName!=="#comment"&&wv(e)&&xv(e,t)&&(!e.parentElement||Af(e.parentElement,e))}const yu=c.createContext(null),gs="react-aria-focus-scope-restore";let se=null;function If(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,o=c.useRef(null),a=c.useRef(null),s=c.useRef([]),{parentNode:l}=c.useContext(yu)||{},u=c.useMemo(()=>new ms({scopeRef:s}),[s]);re(()=>{let g=l||me.root;if(me.getTreeNode(g.scopeRef)&&se&&!go(se,g.scopeRef)){let f=me.getTreeNode(se);f&&(g=f)}g.addChild(u),me.addNode(u)},[u,l]),re(()=>{let g=me.getTreeNode(s);g&&(g.contain=!!n)},[n]),re(()=>{var g;let f=(g=o.current)===null||g===void 0?void 0:g.nextSibling,p=[],m=b=>b.stopPropagation();for(;f&&f!==a.current;)p.push(f),f.addEventListener(gs,m),f=f.nextSibling;return s.current=p,()=>{for(let b of p)b.removeEventListener(gs,m)}},[t]),Mv(s,r,n),Ev(s,n),kv(s,r,n),Rv(s,i),c.useEffect(()=>{const g=oe(s.current?s.current[0]:void 0).activeElement;let f=null;if(Qe(g,s.current)){for(let p of me.traverse())p.scopeRef&&Qe(g,p.scopeRef.current)&&(f=p);f===me.getTreeNode(s)&&(se=f.scopeRef)}},[s]),re(()=>()=>{var g,f,p;let m=(p=(f=me.getTreeNode(s))===null||f===void 0||(g=f.parent)===null||g===void 0?void 0:g.scopeRef)!==null&&p!==void 0?p:null;(s===se||go(s,se))&&(!m||me.getTreeNode(m))&&(se=m),me.removeTreeNode(s)},[s]);let d=c.useMemo(()=>Cv(s),[]),h=c.useMemo(()=>({focusManager:d,parentNode:u}),[u,d]);return c.createElement(yu.Provider,{value:h},c.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,c.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function Cv(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,s=r||oe(n[0]).activeElement,l=n[0].previousElementSibling,u=cn(n),d=je(u,{tabbable:i,accept:a},n);d.currentNode=Qe(s,n)?s:l;let h=d.nextNode();return!h&&o&&(d.currentNode=l,h=d.nextNode()),h&&Te(h,!0),h},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t,s=r||oe(n[0]).activeElement,l=n[n.length-1].nextElementSibling,u=cn(n),d=je(u,{tabbable:i,accept:a},n);d.currentNode=Qe(s,n)?s:l;let h=d.previousNode();return!h&&o&&(d.currentNode=l,h=d.previousNode()),h&&Te(h,!0),h},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=cn(n),a=je(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&Te(s,!0),s},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=cn(n),a=je(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&Te(s,!0),s}}}const ll=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],$v=ll.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ll.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Sv=ll.join(':not([hidden]):not([tabindex="-1"]),');function cn(e){return e[0].parentElement}function Nr(e){let t=me.getTreeNode(se);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function Ev(e,t){let n=c.useRef(void 0),r=c.useRef(void 0);re(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=oe(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!Nr(e)||u.isComposing)return;let d=o.activeElement,h=e.current;if(!h||!Qe(d,h))return;let g=cn(h),f=je(g,{tabbable:!0},h);if(!d)return;f.currentNode=d;let p=u.shiftKey?f.previousNode():f.nextNode();p||(f.currentNode=u.shiftKey?h[h.length-1].nextElementSibling:h[0].previousElementSibling,p=u.shiftKey?f.previousNode():f.nextNode()),u.preventDefault(),p&&Te(p,!0)},s=u=>{(!se||go(se,e))&&Qe(u.target,e.current)?(se=e,n.current=u.target):Nr(e)&&!Gt(u.target,e)?n.current?n.current.focus():se&&se.current&&ps(se.current):Nr(e)&&(n.current=u.target)},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(o.activeElement&&Nr(e)&&!Gt(o.activeElement,e))if(se=e,o.body.contains(u.target)){var d;n.current=u.target,(d=n.current)===null||d===void 0||d.focus()}else se.current&&ps(se.current)})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[e,t]),re(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function Nf(e){return Gt(e)}function Qe(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function Gt(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of me.traverse(me.getTreeNode(t)))if(n&&Qe(e,n.current))return!0;return!1}function Pv(e){return Gt(e,se)}function go(e,t){var n;let r=(n=me.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Te(e,t=!1){if(e!=null&&!t)try{En(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function jf(e,t=!0){let n=e[0].previousElementSibling,r=cn(e),i=je(r,{tabbable:t},e);i.currentNode=n;let o=i.nextNode();return t&&!o&&(r=cn(e),i=je(r,{tabbable:!1},e),i.currentNode=n,o=i.nextNode()),o}function ps(e,t=!0){Te(jf(e,t))}function Rv(e,t){const n=c.useRef(t);c.useEffect(()=>{if(n.current){se=e;const r=oe(e.current?e.current[0]:void 0);!Qe(r.activeElement,se.current)&&e.current&&ps(e.current)}n.current=!1},[e])}function Mv(e,t,n){re(()=>{if(t||n)return;let r=e.current;const i=oe(r?r[0]:void 0);let o=a=>{let s=a.target;Qe(s,e.current)?se=e:Nf(s)||(se=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[e,t,n])}function wu(e){let t=me.getTreeNode(se);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function kv(e,t,n){const r=c.useRef(typeof document<"u"?oe(e.current?e.current[0]:void 0).activeElement:null);re(()=>{let i=e.current;const o=oe(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!se||go(se,e))&&Qe(o.activeElement,e.current)&&(se=e)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[e,n]),re(()=>{const i=oe(e.current?e.current[0]:void 0);if(!t)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!Nr(e)||a.isComposing)return;let s=i.activeElement;if(!Gt(s,e)||!wu(e))return;let l=me.getTreeNode(e);if(!l)return;let u=l.nodeToRestore,d=je(i.body,{tabbable:!0});d.currentNode=s;let h=a.shiftKey?d.previousNode():d.nextNode();if((!u||!i.body.contains(u)||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!h||!Gt(h,e))&&u){d.currentNode=u;do h=a.shiftKey?d.previousNode():d.nextNode();while(Gt(h,e));a.preventDefault(),a.stopPropagation(),h?Te(h,!0):Nf(u)?Te(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[e,t,n]),re(()=>{const i=oe(e.current?e.current[0]:void 0);if(!t)return;let o=me.getTreeNode(e);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=me.getTreeNode(e);if(!s)return;let l=s.nodeToRestore;if(t&&l&&(i.activeElement&&Gt(i.activeElement,e)||i.activeElement===i.body&&wu(e))){let u=me.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let d=u.getTreeNode(e);for(;d;){if(d.nodeToRestore&&d.nodeToRestore.isConnected){xu(d.nodeToRestore);return}d=d.parent}for(d=u.getTreeNode(e);d;){if(d.scopeRef&&d.scopeRef.current&&me.getTreeNode(d.scopeRef)){let h=jf(d.scopeRef.current,!0);xu(h);return}d=d.parent}}})}}}},[e,t])}function xu(e){e.dispatchEvent(new CustomEvent(gs,{bubbles:!0,cancelable:!0}))&&Te(e)}function je(e,t,n){let r=t!=null&&t.tabbable?Sv:$v,i=oe(e).createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var a;return!(t==null||(a=t.from)===null||a===void 0)&&a.contains(o)?NodeFilter.FILTER_REJECT:o.matches(r)&&Af(o)&&(!n||Qe(o,n))&&(!(t!=null&&t.accept)||t.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(i.currentNode=t.from),i}function Dv(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:o=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=i||oe(r).activeElement,u=je(r,{tabbable:o,accept:s});r.contains(l)&&(u.currentNode=l);let d=u.nextNode();return!d&&a&&(u.currentNode=r,d=u.nextNode()),d&&Te(d,!0),d},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:o=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=i||oe(r).activeElement,u=je(r,{tabbable:o,accept:s});if(r.contains(l))u.currentNode=l;else{let h=aa(u);return h&&Te(h,!0),h??null}let d=u.previousNode();if(!d&&a){u.currentNode=r;let h=aa(u);if(!h)return null;d=h}return d&&Te(d,!0),d??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:o=t.accept}=n,s=je(r,{tabbable:i,accept:o}).nextNode();return s&&Te(s,!0),s},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:o=t.accept}=n,a=je(r,{tabbable:i,accept:o}),s=aa(a);return s&&Te(s,!0),s??null}}}function aa(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class ul{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new ms({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&Qe(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new ul;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new ms({scopeRef:null}),this.fastMap.set(null,this.root)}}class ms{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let me=new ul;function cl(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=c.useRef({isFocused:!1,isFocusVisible:t||Ko()}),[o,a]=c.useState(!1),[s,l]=c.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=c.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),d=c.useCallback(f=>{i.current.isFocused=f,a(f),u()},[u]);mv(f=>{i.current.isFocusVisible=f,u()},[],{isTextInput:n});let{focusProps:h}=ol({isDisabled:r,onFocusChange:d}),{focusWithinProps:g}=sl({isDisabled:!r,onFocusWithinChange:d});return{isFocused:o,isFocusVisible:s,focusProps:r?g:h}}let _f=c.createContext(null);function Tv(e){let t=c.useContext(_f)||{};rl(t,e);let{ref:n,...r}=t;return r}function Ov(e,t){let{children:n,...r}=e,i=yr(t),o={...r,ref:i};return c.createElement(_f.Provider,{value:o},n)}let Fv=c.forwardRef(Ov);function Kf(e,t){let{focusProps:n}=ol(e),{keyboardProps:r}=Ff(e),i=ae(n,r),o=Tv(t),a=e.isDisabled?{}:o,s=c.useRef(e.autoFocus);return c.useEffect(()=>{s.current&&t.current&&En(t.current),s.current=!1},[t]),{focusableProps:ae({...i,tabIndex:e.excludeFromTabOrder&&!e.isDisabled?-1:void 0},a)}}const Lv=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Av=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Iv(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return Lv.has(n.script)}let t=e.split("-")[0];return Av.has(t)}const Nv=Symbol.for("react-aria.i18n.locale");function Bf(){let e=typeof window<"u"&&window[Nv]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:Iv(e)?"rtl":"ltr"}}let bs=Bf(),jr=new Set;function Cu(){bs=Bf();for(let e of jr)e(bs)}function jv(){let e=kt(),[t,n]=c.useState(bs);return c.useEffect(()=>(jr.size===0&&window.addEventListener("languagechange",Cu),jr.add(n),()=>{jr.delete(n),jr.size===0&&window.removeEventListener("languagechange",Cu)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const _v=c.createContext(null);function Cr(){let e=jv();return c.useContext(_v)||e}const Kv=Symbol.for("react-aria.i18n.locale"),Bv=Symbol.for("react-aria.i18n.strings");let An;class Bo{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=Hv(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[Kv];if(An===void 0){let i=window[Bv];if(!i)return null;An={};for(let o in i)An[o]=new Bo({[n]:i[o]},n)}let r=An==null?void 0:An[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function Hv(e,t,n="en-US"){if(t[e])return t[e];let r=Vv(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function Vv(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const $u=new Map,Su=new Map;class zv{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=$u.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),$u.set(o,a));let s=a.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=Su.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Su.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const Eu=new WeakMap;function Uv(e){let t=Eu.get(e);return t||(t=new Bo(e),Eu.set(e,t)),t}function qv(e,t){return t&&Bo.getGlobalDictionaryForPackage(t)||Uv(e)}function Hf(e,t){let{locale:n}=Cr(),r=qv(e,t);return c.useMemo(()=>new zv(n,r),[n,r])}let sa=new Map,vs=!1;try{vs=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let po=!1;try{po=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Vf={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class Wv{format(t){let n="";if(!vs&&this.options.signDisplay!=null?n=Qv(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!po){var r;let{unit:i,unitDisplay:o="short",locale:a}=this.resolvedOptions();if(!i)return n;let s=(r=Vf[i])===null||r===void 0?void 0:r[o];n+=s[a]||s.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!vs&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!po&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=Gv(t,n),this.options=n}}function Gv(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!po){var r;let{unit:a,unitDisplay:s="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=Vf[a])===null||r===void 0)&&r[s]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,s)=>a[0]<s[0]?-1:1).join():"");if(sa.has(i))return sa.get(i);let o=new Intl.NumberFormat(e,t);return sa.set(i,o),o}function Qv(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),o=e.format(n),a=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(a,"+").replace("!!!",o)}else return e.format(n)}}function Yv(e={}){let{locale:t}=Cr();return c.useMemo(()=>new Wv(t,e),[t,e])}let la=new Map;function Zv(e){let{locale:t}=Cr(),n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(la.has(n))return la.get(n);let r=new Intl.Collator(t,e);return la.set(n,r),r}function zf(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:a,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:d,onClick:h,href:g,target:f,rel:p,type:m="button"}=e,b;n==="button"?b={type:m,disabled:r}:b={role:"button",tabIndex:r?void 0:0,href:n==="a"&&!r?g:void 0,target:n==="a"?f:void 0,type:n==="input"?m:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:$,isPressed:x}=_o({onPressStart:o,onPressEnd:a,onPressChange:l,onPress:i,onPressUp:s,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:E}=Kf(e,t);d&&(E.tabIndex=r?-1:E.tabIndex);let M=ae(E,$,Oe(e,{labelable:!0}));return{isPressed:x,buttonProps:ae(b,M,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],onClick:C=>{h&&(h(C),console.warn("onClick is deprecated, please use onPress"))}})}}function Uf(e,t,n){const{isSelected:r}=t,{isPressed:i,buttonProps:o}=zf({...e,onPress:cr(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:ae(o,{"aria-pressed":r})}}function Xv(e,t){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=e;let[o,a]=c.useState(!1);re(()=>{var p;a(!!(t.current&&(!((p=t.current.parentElement)===null||p===void 0)&&p.closest('[role="toolbar"]'))))});const{direction:s}=Cr(),l=s==="rtl"&&i==="horizontal";let u=Dv(t);const d=p=>{if(p.currentTarget.contains(p.target)){if(i==="horizontal"&&p.key==="ArrowRight"||i==="vertical"&&p.key==="ArrowDown")l?u.focusPrevious():u.focusNext();else if(i==="horizontal"&&p.key==="ArrowLeft"||i==="vertical"&&p.key==="ArrowUp")l?u.focusNext():u.focusPrevious();else if(p.key==="Tab"){p.stopPropagation(),h.current=document.activeElement,p.shiftKey?u.focusFirst():u.focusLast();return}else return;p.stopPropagation(),p.preventDefault()}},h=c.useRef(null),g=p=>{!p.currentTarget.contains(p.relatedTarget)&&!h.current&&(h.current=p.target)},f=p=>{var m;if(h.current&&!p.currentTarget.contains(p.relatedTarget)&&(!((m=t.current)===null||m===void 0)&&m.contains(p.target))){var b;(b=h.current)===null||b===void 0||b.focus(),h.current=null}};return{toolbarProps:{...Oe(e,{labelable:!0}),role:o?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:o?void 0:d,onFocusCapture:o?void 0:f,onBlurCapture:o?void 0:g}}}function Jv(e,t,n){let{isDisabled:r}=e,{toolbarProps:i}=Xv(e,n);return{groupProps:{...i,role:t.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function e5(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),setSelected(l){t.setSelected(e.id,l)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:o,isDisabled:a,buttonProps:s}=Uf({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode==="single"&&(s.role="radio",s["aria-checked"]=r.isSelected,delete s["aria-pressed"]),{isPressed:i,isSelected:o,isDisabled:a,buttonProps:s}}const qf=7e3;let ut=null;function Pu(e,t="assertive",n=qf){ut?ut.announce(e,t,n):(ut=new t5,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?ut.announce(e,t,n):setTimeout(()=>{ut!=null&&ut.isAttached()&&(ut==null||ut.announce(e,t,n))},100))}class t5{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=qf){var i,o;if(!this.node)return;let a=document.createElement("div");typeof t=="object"?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",t["aria-labelledby"])):a.textContent=t,n==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(a):(o=this.politeLog)===null||o===void 0||o.appendChild(a),t!==""&&setTimeout(()=>{a.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function n5(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=ot(t);let a=ot(),s={};n?(r=r?`${a} ${r}`:a,s={id:a,htmlFor:o==="label"?t:void 0}):!r&&!i&&console.warn("If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility");let l=gf({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:l}}function r5(e={}){let{isReadOnly:t}=e,[n,r]=hi(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function o(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:o}}function i5(e){let{selectionMode:t="single",disallowEmptySelection:n,isDisabled:r=!1}=e,[i,o]=hi(c.useMemo(()=>e.selectedKeys?new Set(e.selectedKeys):void 0,[e.selectedKeys]),c.useMemo(()=>e.defaultSelectedKeys?new Set(e.defaultSelectedKeys):new Set,[e.defaultSelectedKeys]),e.onSelectionChange);return{selectionMode:t,isDisabled:r,selectedKeys:i,setSelectedKeys:o,toggleKey(a){let s;t==="multiple"?(s=new Set(i),s.has(a)&&(!n||s.size>1)?s.delete(a):s.add(a)):s=new Set(i.has(a)&&!n?[]:[a]),o(s)},setSelected(a,s){s!==i.has(a)&&this.toggleKey(a)}}}const Ru={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function o5(e={}){let{style:t,isFocusable:n}=e,[r,i]=c.useState(!1),{focusWithinProps:o}=sl({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=c.useMemo(()=>r?t:t?{...Ru,...t}:Ru,[r]);return{visuallyHiddenProps:{...o,style:a}}}function a5(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...o}=e,{visuallyHiddenProps:a}=o5(e);return c.createElement(n,ae(o,a),t)}const pt={top:"top",bottom:"top",left:"left",right:"left"},mo={top:"bottom",bottom:"top",left:"right",right:"left"},s5={top:"left",left:"top"},ys={top:"height",left:"width"},Wf={width:"totalWidth",height:"totalHeight"},Di={};let we=typeof document<"u"?window.visualViewport:null;function Mu(e){let t=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=we==null?void 0:we.scale)!==null&&l!==void 0?l:1)>1;if(e.tagName==="BODY"){let p=document.documentElement;r=p.clientWidth,i=p.clientHeight;var d;t=(d=we==null?void 0:we.width)!==null&&d!==void 0?d:r;var h;n=(h=we==null?void 0:we.height)!==null&&h!==void 0?h:i,s.top=p.scrollTop||e.scrollTop,s.left=p.scrollLeft||e.scrollLeft,we&&(o=we.offsetTop,a=we.offsetLeft)}else({width:t,height:n,top:o,left:a}=Wn(e)),s.top=e.scrollTop,s.left=e.scrollLeft,r=t,i=n;if(cf()&&(e.tagName==="BODY"||e.tagName==="HTML")&&u){s.top=0,s.left=0;var g;o=(g=we==null?void 0:we.pageTop)!==null&&g!==void 0?g:0;var f;a=(f=we==null?void 0:we.pageLeft)!==null&&f!==void 0?f:0}return{width:t,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function l5(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ku(e,t,n,r,i,o,a){var s;let l=(s=i.scroll[e])!==null&&s!==void 0?s:0,u=r[ys[e]],d=r.scroll[pt[e]]+o,h=u+r.scroll[pt[e]]-o,g=t-l+a[e]-r[pt[e]],f=t-l+n+a[e]-r[pt[e]];return g<d?d-g:f>h?Math.max(h-f,d-g):0}function u5(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function Du(e){if(Di[e])return Di[e];let[t,n]=e.split(" "),r=pt[t]||"right",i=s5[r];pt[n]||(n="center");let o=ys[r],a=ys[i];return Di[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},Di[e]}function ua(e,t,n,r,i,o,a,s,l,u){let{placement:d,crossPlacement:h,axis:g,crossAxis:f,size:p,crossSize:m}=r,b={};var $;b[f]=($=e[f])!==null&&$!==void 0?$:0;var x,E,M,C;h==="center"?b[f]+=(((x=e[m])!==null&&x!==void 0?x:0)-((E=n[m])!==null&&E!==void 0?E:0))/2:h!==f&&(b[f]+=((M=e[m])!==null&&M!==void 0?M:0)-((C=n[m])!==null&&C!==void 0?C:0)),b[f]+=o;const k=e[f]-n[m]+l+u,F=e[f]+e[m]-l-u;if(b[f]=Qr(b[f],k,F),d===g){const y=s?a[p]:t[Wf[p]];b[mo[g]]=Math.floor(y-e[g]+i)}else b[g]=Math.floor(e[g]+e[p]+i);return b}function c5(e,t,n,r,i,o,a,s){const l=r?n.height:t[Wf.height];var u;let d=e.top!=null?n.top+e.top:n.top+(l-((u=e.bottom)!==null&&u!==void 0?u:0)-a);var h,g,f,p,m,b;let $=s!=="top"?Math.max(0,t.height+t.top+((h=t.scroll.top)!==null&&h!==void 0?h:0)-d-(((g=i.top)!==null&&g!==void 0?g:0)+((f=i.bottom)!==null&&f!==void 0?f:0)+o)):Math.max(0,d+a-(t.top+((p=t.scroll.top)!==null&&p!==void 0?p:0))-(((m=i.top)!==null&&m!==void 0?m:0)+((b=i.bottom)!==null&&b!==void 0?b:0)+o));return Math.min(t.height-o*2,$)}function Tu(e,t,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,d;if(a===s)return Math.max(0,n[s]-e[s]-((u=e.scroll[s])!==null&&u!==void 0?u:0)+t[s]-((d=r[s])!==null&&d!==void 0?d:0)-r[mo[s]]-i);var h;return Math.max(0,e[l]+e[s]+e.scroll[s]-t[s]-n[s]-n[l]-((h=r[s])!==null&&h!==void 0?h:0)-r[mo[s]]-i)}function d5(e,t,n,r,i,o,a,s,l,u,d,h,g,f,p,m){let b=Du(e),{size:$,crossAxis:x,crossSize:E,placement:M,crossPlacement:C}=b,k=ua(t,s,n,b,d,h,u,g,p,m),F=d,y=Tu(s,u,t,i,o+d,b);if(a&&r[$]>y){let U=Du(`${mo[M]} ${C}`),_=ua(t,s,n,U,d,h,u,g,p,m);Tu(s,u,t,i,o+d,U)>y&&(b=U,k=_,F=d)}let D="bottom";b.axis==="top"?b.placement==="top"?D="top":b.placement==="bottom"&&(D="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?D="bottom":b.crossPlacement==="bottom"&&(D="top"));let P=ku(x,k[x],n[E],s,l,o,u);k[x]+=P;let T=c5(k,s,u,g,i,o,n.height,D);f&&f<T&&(T=f),n.height=Math.min(n.height,T),k=ua(t,s,n,b,F,h,u,g,p,m),P=ku(x,k[x],n[E],s,l,o,u),k[x]+=P;let L={},R=t[x]+.5*t[E]-k[x]-i[pt[x]];const I=p/2+m;var O,K,A,W;const B=pt[x]==="left"?((O=i.left)!==null&&O!==void 0?O:0)+((K=i.right)!==null&&K!==void 0?K:0):((A=i.top)!==null&&A!==void 0?A:0)+((W=i.bottom)!==null&&W!==void 0?W:0),X=n[E]-B-p/2-m,q=t[x]+p/2-(k[x]+i[pt[x]]),j=t[x]+t[E]-p/2-(k[x]+i[pt[x]]),H=Qr(R,q,j);return L[x]=Qr(H,I,X),{position:k,maxHeight:T,arrowOffsetLeft:L.left,arrowOffsetTop:L.top,placement:b.placement}}function f5(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:d,arrowSize:h=0,arrowBoundaryOffset:g=0}=e,f=r instanceof HTMLElement?h5(r):document.documentElement,p=f===document.documentElement;const m=window.getComputedStyle(f).position;let b=!!m&&m!=="static",$=p?Wn(n):Ou(n,f);if(!p){let{marginTop:L,marginLeft:R}=window.getComputedStyle(n);$.top+=parseInt(L,10)||0,$.left+=parseInt(R,10)||0}let x=Wn(r),E=u5(r);var M,C;x.width+=((M=E.left)!==null&&M!==void 0?M:0)+((C=E.right)!==null&&C!==void 0?C:0);var k,F;x.height+=((k=E.top)!==null&&k!==void 0?k:0)+((F=E.bottom)!==null&&F!==void 0?F:0);let y=l5(i),D=Mu(s),P=Mu(f),T=s.tagName==="BODY"?Wn(f):Ou(f,s);return f.tagName==="HTML"&&s.tagName==="BODY"&&(P.scroll.top=0,P.scroll.left=0),d5(t,$,x,y,E,o,a,D,P,T,l,u,b,d,h,g)}function Wn(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+o-s,left:n+a-l,width:r,height:i}}function Ou(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=e.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=Wn(e);let i=Wn(t),o=window.getComputedStyle(t);i.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function h5(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!Fu(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!Fu(t);)t=t.parentElement;return t||document.documentElement}function Fu(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const Gf=new WeakMap;function g5(e){let{triggerRef:t,isOpen:n,onClose:r}=e;c.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!t.current||a instanceof Node&&!a.contains(t.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||Gf.get(t.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let pe=typeof document<"u"?window.visualViewport:null;function Qf(e){let{direction:t}=Cr(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:d=0,crossOffset:h=0,shouldUpdatePosition:g=!0,isOpen:f=!0,onClose:p,maxHeight:m,arrowBoundaryOffset:b=0}=e,[$,x]=c.useState(null),E=[g,a,i.current,r.current,o.current,s,l,u,d,h,f,t,m,b,n],M=c.useRef(pe==null?void 0:pe.scale);c.useEffect(()=>{f&&(M.current=pe==null?void 0:pe.scale)},[f]);let C=c.useCallback(()=>{if(g===!1||!f||!i.current||!r.current||!u||(pe==null?void 0:pe.scale)!==M.current)return;let P=null;if(o.current&&o.current.contains(document.activeElement)){var T;let W=(T=document.activeElement)===null||T===void 0?void 0:T.getBoundingClientRect(),B=o.current.getBoundingClientRect();var L;if(P={type:"top",offset:((L=W==null?void 0:W.top)!==null&&L!==void 0?L:0)-B.top},P.offset>B.height/2){P.type="bottom";var R;P.offset=((R=W==null?void 0:W.bottom)!==null&&R!==void 0?R:0)-B.bottom}}let I=i.current;if(!m&&i.current){var O;I.style.top="0px",I.style.bottom="";var K;I.style.maxHeight=((K=(O=window.visualViewport)===null||O===void 0?void 0:O.height)!==null&&K!==void 0?K:window.innerHeight)+"px"}let A=f5({placement:m5(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:d,crossOffset:h,maxHeight:m,arrowSize:n,arrowBoundaryOffset:b});if(A.position){if(I.style.top="",I.style.bottom="",I.style.left="",I.style.right="",Object.keys(A.position).forEach(W=>I.style[W]=A.position[W]+"px"),I.style.maxHeight=A.maxHeight!=null?A.maxHeight+"px":"",P&&document.activeElement&&o.current){let W=document.activeElement.getBoundingClientRect(),B=o.current.getBoundingClientRect(),X=W[P.type]-B[P.type];o.current.scrollTop+=X-P.offset}x(A)}},E);re(C,E),p5(C),as({ref:i,onResize:C}),as({ref:r,onResize:C});let k=c.useRef(!1);re(()=>{let P,T=()=>{k.current=!0,clearTimeout(P),P=setTimeout(()=>{k.current=!1},500),C()},L=()=>{k.current&&T()};return pe==null||pe.addEventListener("resize",T),pe==null||pe.addEventListener("scroll",L),()=>{pe==null||pe.removeEventListener("resize",T),pe==null||pe.removeEventListener("scroll",L)}},[C]);let F=c.useCallback(()=>{k.current||p==null||p()},[p,k]);g5({triggerRef:r,isOpen:f,onClose:p&&F});var y,D;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...$==null?void 0:$.position,maxHeight:(y=$==null?void 0:$.maxHeight)!==null&&y!==void 0?y:"100vh"}},placement:(D=$==null?void 0:$.placement)!==null&&D!==void 0?D:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:$==null?void 0:$.arrowOffsetLeft,top:$==null?void 0:$.arrowOffsetTop}},updatePosition:C}}function p5(e){re(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function m5(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const yt=[];function Yf(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;c.useEffect(()=>(i&&yt.push(t),()=>{let p=yt.indexOf(t);p>=0&&yt.splice(p,1)}),[i,t]);let l=()=>{yt[yt.length-1]===t&&n&&n()},u=p=>{(!s||s(p.target))&&yt[yt.length-1]===t&&(p.stopPropagation(),p.preventDefault())},d=p=>{(!s||s(p.target))&&(yt[yt.length-1]===t&&(p.stopPropagation(),p.preventDefault()),l())},h=p=>{p.key==="Escape"&&!a&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};vv({ref:t,onInteractOutside:o&&i?d:void 0,onInteractOutsideStart:u});let{focusWithinProps:g}=sl({isDisabled:!r,onBlurWithin:p=>{!p.relatedTarget||Pv(p.relatedTarget)||(!s||s(p.relatedTarget))&&(n==null||n())}}),f=p=>{p.target===p.currentTarget&&p.preventDefault()};return{overlayProps:{onKeyDown:h,...g},underlayProps:{onPointerDown:f}}}function Zf(e,t,n){let{type:r}=e,{isOpen:i}=t;c.useEffect(()=>{n&&n.current&&Gf.set(n.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let a=ot();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?a:void 0,onPress:t.toggle},overlayProps:{id:a}}}const ca=typeof document<"u"&&window.visualViewport,b5=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Ti=0,da;function Xf(e={}){let{isDisabled:t}=e;re(()=>{if(!t)return Ti++,Ti===1&&(Io()?da=y5():da=v5()),()=>{Ti--,Ti===0&&da()}},[t])}function v5(){return cr(Vn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Vn(document.documentElement,"overflow","hidden"))}function y5(){let e,t,n=u=>{e=pf(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=Vn(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=u=>{let d=u.target;Au(d)&&d!==document.activeElement&&(u.preventDefault(),s(),d.style.transform="translateY(-2000px)",d.focus(),requestAnimationFrame(()=>{d.style.transform=""})),t&&t()},o=u=>{let d=u.target;Au(d)&&(s(),d.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{d.style.transform="",ca&&(ca.height<window.innerHeight?requestAnimationFrame(()=>{Lu(d)}):ca.addEventListener("resize",()=>Lu(d),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},d=window.pageXOffset,h=window.pageYOffset;a=cr(Mr(window,"scroll",u),Vn(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),Vn(document.documentElement,"overflow","hidden"),Vn(document.body,"marginTop",`-${h}px`),()=>{window.scrollTo(d,h)}),window.scrollTo(0,0)},l=cr(Mr(document,"touchstart",n,{passive:!1,capture:!0}),Mr(document,"touchmove",r,{passive:!1,capture:!0}),Mr(document,"touchend",i,{passive:!1,capture:!0}),Mr(document,"focus",o,!0));return()=>{t==null||t(),a==null||a(),l()}}function Vn(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Mr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Lu(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=pf(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function Au(e){return e instanceof HTMLInputElement&&!b5.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const ws=c.createContext(null);function w5(e){let{children:t}=e,n=c.useContext(ws),[r,i]=c.useState(0),o=c.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return c.createElement(ws.Provider,{value:o},t)}function x5(){let e=c.useContext(ws);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function C5(e){let{modalProviderProps:t}=x5();return c.createElement("div",{"data-overlay-container":!0,...e,...t})}function $5(e){return c.createElement(w5,null,c.createElement(C5,e))}function S5(e){let t=kt(),{portalContainer:n=t?null:document.body,...r}=e;if(c.useEffect(()=>{if(n!=null&&n.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let i=c.createElement($5,r);return Rn.createPortal(i,n)}var Jf={};Jf={dismiss:"تجاهل"};var e0={};e0={dismiss:"Отхвърляне"};var t0={};t0={dismiss:"Odstranit"};var n0={};n0={dismiss:"Luk"};var r0={};r0={dismiss:"Schließen"};var i0={};i0={dismiss:"Απόρριψη"};var o0={};o0={dismiss:"Dismiss"};var a0={};a0={dismiss:"Descartar"};var s0={};s0={dismiss:"Lõpeta"};var l0={};l0={dismiss:"Hylkää"};var u0={};u0={dismiss:"Rejeter"};var c0={};c0={dismiss:"התעלם"};var d0={};d0={dismiss:"Odbaci"};var f0={};f0={dismiss:"Elutasítás"};var h0={};h0={dismiss:"Ignora"};var g0={};g0={dismiss:"閉じる"};var p0={};p0={dismiss:"무시"};var m0={};m0={dismiss:"Atmesti"};var b0={};b0={dismiss:"Nerādīt"};var v0={};v0={dismiss:"Lukk"};var y0={};y0={dismiss:"Negeren"};var w0={};w0={dismiss:"Zignoruj"};var x0={};x0={dismiss:"Descartar"};var C0={};C0={dismiss:"Dispensar"};var $0={};$0={dismiss:"Revocare"};var S0={};S0={dismiss:"Пропустить"};var E0={};E0={dismiss:"Zrušiť"};var P0={};P0={dismiss:"Opusti"};var R0={};R0={dismiss:"Odbaci"};var M0={};M0={dismiss:"Avvisa"};var k0={};k0={dismiss:"Kapat"};var D0={};D0={dismiss:"Скасувати"};var T0={};T0={dismiss:"取消"};var O0={};O0={dismiss:"關閉"};var F0={};F0={"ar-AE":Jf,"bg-BG":e0,"cs-CZ":t0,"da-DK":n0,"de-DE":r0,"el-GR":i0,"en-US":o0,"es-ES":a0,"et-EE":s0,"fi-FI":l0,"fr-FR":u0,"he-IL":c0,"hr-HR":d0,"hu-HU":f0,"it-IT":h0,"ja-JP":g0,"ko-KR":p0,"lt-LT":m0,"lv-LV":b0,"nb-NO":v0,"nl-NL":y0,"pl-PL":w0,"pt-BR":x0,"pt-PT":C0,"ro-RO":$0,"ru-RU":S0,"sk-SK":E0,"sl-SI":P0,"sr-SP":R0,"sv-SE":M0,"tr-TR":k0,"uk-UA":D0,"zh-CN":T0,"zh-TW":O0};function E5(e){return e&&e.__esModule?e.default:e}function xs(e){let{onDismiss:t,...n}=e,r=Hf(E5(F0),"@react-aria/overlays"),i=gf(n,r.format("dismiss")),o=()=>{t&&t()};return c.createElement(a5,null,c.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let kr=new WeakMap,He=[];function L0(e,t=document.body){let n=new Set(e),r=new Set,i=l=>{for(let g of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(g);let u=g=>{if(n.has(g)||g.parentElement&&r.has(g.parentElement)&&g.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let f of n)if(g.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},d=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),h=u(l);if(h===NodeFilter.FILTER_ACCEPT&&o(l),h!==NodeFilter.FILTER_REJECT){let g=d.nextNode();for(;g!=null;)o(g),g=d.nextNode()}},o=l=>{var u;let d=(u=kr.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&d===0||(d===0&&l.setAttribute("aria-hidden","true"),r.add(l),kr.set(l,d+1))};He.length&&He[He.length-1].disconnect(),i(t);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(d=>d.contains(u.target))){for(let d of u.removedNodes)d instanceof Element&&(n.delete(d),r.delete(d));for(let d of u.addedNodes)(d instanceof HTMLElement||d instanceof SVGElement)&&(d.dataset.liveAnnouncer==="true"||d.dataset.reactAriaTopLayer==="true")?n.add(d):d instanceof Element&&i(d)}});a.observe(t,{childList:!0,subtree:!0});let s={observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return He.push(s),()=>{a.disconnect();for(let l of r){let u=kr.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),kr.delete(l)):kr.set(l,u-1))}s===He[He.length-1]?(He.pop(),He.length&&He[He.length-1].observe()):He.splice(He.indexOf(s),1)}}function P5(e,t){let{triggerRef:n,popoverRef:r,isNonModal:i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a,...s}=e,{overlayProps:l,underlayProps:u}=Yf({isOpen:t.isOpen&&!s["data-react-aria-top-layer"],onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!i,isKeyboardDismissDisabled:o,shouldCloseOnInteractOutside:a},r),{overlayProps:d,arrowProps:h,placement:g}=Qf({...s,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:i?t.close:void 0});return Xf({isDisabled:i||!t.isOpen}),re(()=>{if(t.isOpen&&!i&&r.current)return L0([r.current])},[i,t.isOpen,r]),{popoverProps:ae(l,d),arrowProps:h,underlayProps:u,placement:g}}const R5=c.createContext({});function M5(){var e;return(e=c.useContext(R5))!==null&&e!==void 0?e:{}}const A0=c.createContext(null);function I0(e){let t=kt(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,o]=c.useState(!1),a=c.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=M5();if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=c.createElement(If,{restoreFocus:!0,contain:i&&!r},l)),l=c.createElement(A0.Provider,{value:a},c.createElement(uv,null,l)),Rn.createPortal(l,n)}function N0(){let e=c.useContext(A0),t=e==null?void 0:e.setContain;re(()=>{t==null||t(!0)},[t])}function k5(e,t,n){let{overlayProps:r,underlayProps:i}=Yf({...e,isOpen:t.isOpen,onClose:t.close},n);return Xf({isDisabled:!t.isOpen}),N0(),c.useEffect(()=>{if(t.isOpen&&n.current)return L0([n.current])},[t.isOpen,n]),{modalProps:ae(r),underlayProps:i}}function Cs(e){return b2()?e.altKey:e.ctrlKey}function _n(e){return Cn()?e.metaKey:e.ctrlKey}const D5=1e3;function T5(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=c.useRef({search:"",timeout:void 0}).current,o=a=>{let s=O5(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,t.getKeyForSearch!=null){let l=t.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=t.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},D5)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:void 0}}}function O5(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function F5(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,selectOnFocus:l=t.selectionBehavior==="replace",disallowTypeAhead:u=!1,shouldUseVirtualFocus:d,allowsTabNavigation:h=!1,isVirtualized:g,scrollRef:f=r,linkBehavior:p="action"}=e,{direction:m}=Cr(),b=No(),$=P=>{var T;if(P.altKey&&P.key==="Tab"&&P.preventDefault(),!(!((T=r.current)===null||T===void 0)&&T.contains(P.target)))return;const L=(_,ye)=>{if(_!=null){if(t.isLink(_)&&p==="selection"&&l&&!Cs(P)){var ee;Rn.flushSync(()=>{t.setFocusedKey(_,ye)});let Tt=(ee=f.current)===null||ee===void 0?void 0:ee.querySelector(`[data-key="${CSS.escape(_.toString())}"]`),st=t.getItemProps(_);Tt&&b.open(Tt,P,st.href,st.routerOptions);return}if(t.setFocusedKey(_,ye),t.isLink(_)&&p==="override")return;P.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_):l&&!Cs(P)&&t.replaceSelection(_)}};switch(P.key){case"ArrowDown":if(n.getKeyBelow){var R,I,O;let _=t.focusedKey!=null?(R=n.getKeyBelow)===null||R===void 0?void 0:R.call(n,t.focusedKey):(I=n.getFirstKey)===null||I===void 0?void 0:I.call(n);_==null&&o&&(_=(O=n.getFirstKey)===null||O===void 0?void 0:O.call(n,t.focusedKey)),_!=null&&(P.preventDefault(),L(_))}break;case"ArrowUp":if(n.getKeyAbove){var K,A,W;let _=t.focusedKey!=null?(K=n.getKeyAbove)===null||K===void 0?void 0:K.call(n,t.focusedKey):(A=n.getLastKey)===null||A===void 0?void 0:A.call(n);_==null&&o&&(_=(W=n.getLastKey)===null||W===void 0?void 0:W.call(n,t.focusedKey)),_!=null&&(P.preventDefault(),L(_))}break;case"ArrowLeft":if(n.getKeyLeftOf){var B,X,q;let _=t.focusedKey!=null?(B=n.getKeyLeftOf)===null||B===void 0?void 0:B.call(n,t.focusedKey):null;_==null&&o&&(_=m==="rtl"?(X=n.getFirstKey)===null||X===void 0?void 0:X.call(n,t.focusedKey):(q=n.getLastKey)===null||q===void 0?void 0:q.call(n,t.focusedKey)),_!=null&&(P.preventDefault(),L(_,m==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var j,H,U;let _=t.focusedKey!=null?(j=n.getKeyRightOf)===null||j===void 0?void 0:j.call(n,t.focusedKey):null;_==null&&o&&(_=m==="rtl"?(H=n.getLastKey)===null||H===void 0?void 0:H.call(n,t.focusedKey):(U=n.getFirstKey)===null||U===void 0?void 0:U.call(n,t.focusedKey)),_!=null&&(P.preventDefault(),L(_,m==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){P.preventDefault();let _=n.getFirstKey(t.focusedKey,_n(P));t.setFocusedKey(_),_!=null&&(_n(P)&&P.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_):l&&t.replaceSelection(_))}break;case"End":if(n.getLastKey){P.preventDefault();let _=n.getLastKey(t.focusedKey,_n(P));t.setFocusedKey(_),_!=null&&(_n(P)&&P.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(_):l&&t.replaceSelection(_))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let _=n.getKeyPageBelow(t.focusedKey);_!=null&&(P.preventDefault(),L(_))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let _=n.getKeyPageAbove(t.focusedKey);_!=null&&(P.preventDefault(),L(_))}break;case"a":_n(P)&&t.selectionMode==="multiple"&&s!==!0&&(P.preventDefault(),t.selectAll());break;case"Escape":!a&&t.selectedKeys.size!==0&&(P.stopPropagation(),P.preventDefault(),t.clearSelection());break;case"Tab":if(!h){if(P.shiftKey)r.current.focus();else{let _=je(r.current,{tabbable:!0}),ye,ee;do ee=_.lastChild(),ee&&(ye=ee);while(ee);ye&&!ye.contains(document.activeElement)&&Et(ye)}break}}},x=c.useRef({top:0,left:0});su(f,"scroll",g?void 0:()=>{var P,T,L,R;x.current={top:(L=(P=f.current)===null||P===void 0?void 0:P.scrollTop)!==null&&L!==void 0?L:0,left:(R=(T=f.current)===null||T===void 0?void 0:T.scrollLeft)!==null&&R!==void 0?R:0}});let E=P=>{if(t.isFocused){P.currentTarget.contains(P.target)||t.setFocused(!1);return}if(P.currentTarget.contains(P.target)){if(t.setFocused(!0),t.focusedKey==null){var T,L;let O=A=>{A!=null&&(t.setFocusedKey(A),l&&t.replaceSelection(A))},K=P.relatedTarget;var R,I;K&&P.currentTarget.compareDocumentPosition(K)&Node.DOCUMENT_POSITION_FOLLOWING?O((R=t.lastSelectedKey)!==null&&R!==void 0?R:(T=n.getLastKey)===null||T===void 0?void 0:T.call(n)):O((I=t.firstSelectedKey)!==null&&I!==void 0?I:(L=n.getFirstKey)===null||L===void 0?void 0:L.call(n))}else!g&&f.current&&(f.current.scrollTop=x.current.top,f.current.scrollLeft=x.current.left);if(t.focusedKey!=null&&f.current){let O=f.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);O&&(O.contains(document.activeElement)||Et(O),fo()==="keyboard"&&uu(O,{containingElement:r.current}))}}},M=P=>{P.currentTarget.contains(P.relatedTarget)||t.setFocused(!1)};const C=c.useRef(i);c.useEffect(()=>{if(C.current){var P,T;let I=null;var L;i==="first"&&(I=(L=(P=n.getFirstKey)===null||P===void 0?void 0:P.call(n))!==null&&L!==void 0?L:null);var R;i==="last"&&(I=(R=(T=n.getLastKey)===null||T===void 0?void 0:T.call(n))!==null&&R!==void 0?R:null);let O=t.selectedKeys;if(O.size){for(let K of O)if(t.canSelectItem(K)){I=K;break}}t.setFocused(!0),t.setFocusedKey(I),I==null&&!d&&r.current&&En(r.current)}},[]);let k=c.useRef(t.focusedKey);c.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==k.current||C.current)&&f.current&&r.current){let P=fo(),T=r.current.querySelector(`[data-key="${CSS.escape(t.focusedKey.toString())}"]`);if(!T)return;(P==="keyboard"||C.current)&&(mf(f.current,T),P!=="virtual"&&uu(T,{containingElement:r.current}))}!d&&t.isFocused&&t.focusedKey==null&&k.current!=null&&r.current&&En(r.current),k.current=t.focusedKey,C.current=!1}),su(r,"react-aria-focus-scope-restore",P=>{P.preventDefault(),t.setFocused(!0)});let F={onKeyDown:$,onFocus:E,onBlur:M,onMouseDown(P){f.current===P.target&&P.preventDefault()}},{typeSelectProps:y}=T5({keyboardDelegate:n,selectionManager:t});u||(F=ae(y,F));let D;return d||(D=t.focusedKey==null?0:-1),{collectionProps:{...F,tabIndex:D}}}function L5(e){let{selectionManager:t,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:o,focus:a,isDisabled:s,onAction:l,allowsDifferentPressOrigin:u,linkBehavior:d="action"}=e,h=No(),g=A=>{if(A.pointerType==="keyboard"&&Cs(A))t.toggleSelection(n);else{if(t.selectionMode==="none")return;if(t.isLink(n)){if(d==="selection"&&r.current){let W=t.getItemProps(n);h.open(r.current,A,W.href,W.routerOptions),t.setSelectedKeys(t.selectedKeys);return}else if(d==="override"||d==="none")return}t.selectionMode==="single"?t.isSelected(n)&&!t.disallowEmptySelection?t.toggleSelection(n):t.replaceSelection(n):A&&A.shiftKey?t.extendSelection(n):t.selectionBehavior==="toggle"||A&&(_n(A)||A.pointerType==="touch"||A.pointerType==="virtual")?t.toggleSelection(n):t.replaceSelection(n)}};c.useEffect(()=>{n===t.focusedKey&&t.isFocused&&!o&&(a?a():document.activeElement!==r.current&&r.current&&En(r.current))},[r,n,t.focusedKey,t.childFocusStrategy,t.isFocused,o]),s=s||t.isDisabled(n);let f={};!o&&!s?f={tabIndex:n===t.focusedKey?0:-1,onFocus(A){A.target===r.current&&t.setFocusedKey(n)}}:s&&(f.onMouseDown=A=>{A.preventDefault()});let p=t.isLink(n)&&d==="override",m=t.isLink(n)&&d!=="selection"&&d!=="none",b=!s&&t.canSelectItem(n)&&!p,$=(l||m)&&!s,x=$&&(t.selectionBehavior==="replace"?!b:!b||t.isEmpty),E=$&&b&&t.selectionBehavior==="replace",M=x||E,C=c.useRef(null),k=M&&b,F=c.useRef(!1),y=c.useRef(!1),D=A=>{if(l&&l(),m&&r.current){let W=t.getItemProps(n);h.open(r.current,A,W.href,W.routerOptions)}},P={};i?(P.onPressStart=A=>{C.current=A.pointerType,F.current=k,A.pointerType==="keyboard"&&(!M||Nu())&&g(A)},u?(P.onPressUp=x?void 0:A=>{A.pointerType!=="keyboard"&&b&&g(A)},P.onPress=x?D:void 0):P.onPress=A=>{if(x||E&&A.pointerType!=="mouse"){if(A.pointerType==="keyboard"&&!Iu())return;D(A)}else A.pointerType!=="keyboard"&&b&&g(A)}):(P.onPressStart=A=>{C.current=A.pointerType,F.current=k,y.current=x,b&&(A.pointerType==="mouse"&&!x||A.pointerType==="keyboard"&&(!$||Nu()))&&g(A)},P.onPress=A=>{(A.pointerType==="touch"||A.pointerType==="pen"||A.pointerType==="virtual"||A.pointerType==="keyboard"&&M&&Iu()||A.pointerType==="mouse"&&y.current)&&(M?D(A):b&&g(A))}),f["data-key"]=n,P.preventFocusOnPress=o;let{pressProps:T,isPressed:L}=_o(P),R=E?A=>{C.current==="mouse"&&(A.stopPropagation(),A.preventDefault(),D(A))}:void 0,{longPressProps:I}=Lf({isDisabled:!k,onLongPress(A){A.pointerType==="touch"&&(g(A),t.setSelectionBehavior("toggle"))}}),O=A=>{C.current==="touch"&&F.current&&A.preventDefault()},K=t.isLink(n)?A=>{$n.isOpening||A.preventDefault()}:void 0;return{itemProps:ae(f,b||x?T:{},k?I:{},{onDoubleClick:R,onDragStartCapture:O,onClick:K}),isPressed:L,isSelected:t.isSelected(n),isFocused:t.isFocused&&t.focusedKey===n,isDisabled:s,allowsSelection:b,hasAction:M}}function Iu(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function Nu(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}class ju{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?n.querySelector(`[data-key="${CSS.escape(t.toString())}"]`):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t==null?void 0:t.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t==null?void 0:t.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,o;return{x:(n=t==null?void 0:t.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t==null?void 0:t.scrollTop)!==null&&r!==void 0?r:0,width:(i=t==null?void 0:t.offsetWidth)!==null&&i!==void 0?i:0,height:(o=t==null?void 0:t.offsetHeight)!==null&&o!==void 0?o:0}}constructor(t){this.ref=t}}class A5{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Gr(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!Gr(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,t.length);if(o.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new ju(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new ju(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function I5(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=e,s=Zv({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,u=c.useMemo(()=>o||new A5({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:d}=F5({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:d}}class N5{build(t,n){return this.context=n,_u(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(c.isValidElement(n)&&n.type===c.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];c.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(c.isValidElement(t.element)&&t.element.type===c.Fragment){let b=[];c.Children.forEach(t.element.props.children,x=>{b.push(x)});var o;let $=(o=t.index)!==null&&o!==void 0?o:0;for(const x of b)yield*this.getFullNode({element:x,index:$++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let b=this.cache.get(t.value);if(b&&(!b.shouldInvalidate||!b.shouldInvalidate(this.context))){b.index=t.index,b.parentKey=i?i.key:null,yield b;return}a=n.renderer(t.value)}if(c.isValidElement(a)){let b=a.type;if(typeof b!="function"&&typeof b.getCollectionNode!="function"){let M=a.type;throw new Error(`Unknown element <${M}> in collection.`)}let $=b.getCollectionNode(a.props,this.context);var s;let x=(s=t.index)!==null&&s!==void 0?s:0,E=$.next();for(;!E.done&&E.value;){let M=E.value;t.index=x;var l;let C=(l=M.key)!==null&&l!==void 0?l:null;C==null&&(C=M.element?null:this.getKey(a,t,n,r));let F=[...this.getFullNode({...M,key:C,index:x,wrapper:j5(t.wrapper,M.wrapper)},this.getChildState(n,M),r?`${r}${a.key}`:a.key,i)];for(let y of F){var u,d;y.value=(d=(u=M.value)!==null&&u!==void 0?u:t.value)!==null&&d!==void 0?d:null,y.value&&this.cache.set(y.value,y);var h;if(t.type&&y.type!==t.type)throw new Error(`Unsupported type <${fa(y.type)}> in <${fa((h=i==null?void 0:i.type)!==null&&h!==void 0?h:"unknown parent type")}>. Only <${fa(t.type)}> is supported.`);x++,yield y}E=$.next(F)}return}if(t.key==null||t.type==null)return;let g=this;var f,p;let m={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(f=t.value)!==null&&f!==void 0?f:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(p=t.textValue)!==null&&p!==void 0?p:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:_u(function*(){if(!t.hasChildNodes||!t.childNodes)return;let b=0;for(let $ of t.childNodes()){$.key!=null&&($.key=`${m.key}${$.key}`);let x=g.getFullNode({...$,index:b},g.getChildState(n,$),m.key,m);for(let E of x)b++,yield E}})};yield m}constructor(){this.cache=new WeakMap}}function _u(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function j5(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function fa(e){return e[0].toUpperCase()+e.slice(1)}function _5(e,t,n){let r=c.useMemo(()=>new N5,[]),{children:i,items:o,collection:a}=e;return c.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return t(l)},[r,i,o,a,n,t])}function j0(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function K5(e){return B5(e)}function B5(e,t){for(let n of e)return n}function ha(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...Ku(e,t),t],i=[...Ku(e,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(t=r[o],n=i[o],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function Ku(e,t){let n=[],r=t;for(;(r==null?void 0:r.parentKey)!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}const Bu=new WeakMap;function H5(e){let t=Bu.get(e);if(t!=null)return t;let n=0,r=i=>{for(let o of i)o.type==="section"?r(j0(o,e)):n++};return r(e),Bu.set(e,n),n}var _0={};_0={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var K0={};K0={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var B0={};B0={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var H0={};H0={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var V0={};V0={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var z0={};z0={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var U0={};U0={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var q0={};q0={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var W0={};W0={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var G0={};G0={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Q0={};Q0={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Y0={};Y0={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Z0={};Z0={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var X0={};X0={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var J0={};J0={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var eh={};eh={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var th={};th={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var nh={};nh={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var rh={};rh={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var ih={};ih={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var oh={};oh={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var ah={};ah={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var sh={};sh={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var lh={};lh={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var uh={};uh={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var ch={};ch={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var dh={};dh={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var fh={};fh={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var hh={};hh={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var gh={};gh={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var ph={};ph={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var mh={};mh={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var bh={};bh={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var vh={};vh={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var yh={};yh={"ar-AE":_0,"bg-BG":K0,"cs-CZ":B0,"da-DK":H0,"de-DE":V0,"el-GR":z0,"en-US":U0,"es-ES":q0,"et-EE":W0,"fi-FI":G0,"fr-FR":Q0,"he-IL":Y0,"hr-HR":Z0,"hu-HU":X0,"it-IT":J0,"ja-JP":eh,"ko-KR":th,"lt-LT":nh,"lv-LV":rh,"nb-NO":ih,"nl-NL":oh,"pl-PL":ah,"pt-BR":sh,"pt-PT":lh,"ro-RO":uh,"ru-RU":ch,"sk-SK":dh,"sl-SI":fh,"sr-SP":hh,"sv-SE":gh,"tr-TR":ph,"uk-UA":mh,"zh-CN":bh,"zh-TW":vh};function V5(e){return e&&e.__esModule?e.default:e}function z5(e,t,n){let{type:r="menu",isDisabled:i,trigger:o="press"}=e,a=ot(),{triggerProps:s,overlayProps:l}=Zf({type:r},t,n),u=f=>{if(!i&&!(o==="longPress"&&!f.altKey)&&n&&n.current)switch(f.key){case"Enter":case" ":if(o==="longPress")return;case"ArrowDown":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),t.toggle("last");break;default:"continuePropagation"in f&&f.continuePropagation()}},d=Hf(V5(yh),"@react-aria/menu"),{longPressProps:h}=Lf({isDisabled:i||o!=="longPress",accessibilityDescription:d.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),g={onPressStart(f){f.pointerType!=="touch"&&f.pointerType!=="keyboard"&&!i&&t.open(f.pointerType==="virtual"?"first":null)},onPress(f){f.pointerType==="touch"&&!i&&t.toggle()}};return delete s.onPress,{menuTriggerProps:{...s,...o==="press"?g:h,id:a,onKeyDown:u},menuProps:{...l,"aria-labelledby":a,autoFocus:t.focusStrategy||!0,onClose:t.close}}}const wh=new WeakMap;function U5(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=e;!e["aria-label"]&&!e["aria-labelledby"]&&console.warn("An aria-label or aria-labelledby prop is required for accessibility.");let s=Oe(e,{labelable:!0}),{listProps:l}=I5({...a,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return wh.set(t,{onClose:e.onClose,onAction:e.onAction}),{menuProps:ae(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var d;u.key!=="Escape"&&((d=l.onKeyDown)===null||d===void 0||d.call(l,u))}})}}function q5(e,t,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:d,onPressChange:h,onPressEnd:g,onHoverStart:f,onHoverChange:p,onHoverEnd:m,onKeyDown:b,onKeyUp:$,onFocus:x,onFocusChange:E,onBlur:M,selectionManager:C=t.selectionManager}=e,k=!!s,F=k&&e["aria-expanded"]==="true";var y;let D=(y=e.isDisabled)!==null&&y!==void 0?y:C.isDisabled(i);var P;let T=(P=e.isSelected)!==null&&P!==void 0?P:C.isSelected(i),L=wh.get(t),R=t.collection.getItem(i),I=e.onClose||L.onClose,O=No(),K=de=>{var Sr;if(!k){if(!(R==null||(Sr=R.props)===null||Sr===void 0)&&Sr.onAction?R.props.onAction():e.onAction&&e.onAction(i),L.onAction){let Er=L.onAction;Er(i)}de.target instanceof HTMLAnchorElement&&R&&O.open(de.target,de,R.props.href,R.props.routerOptions)}},A="menuitem";k||(C.selectionMode==="single"?A="menuitemradio":C.selectionMode==="multiple"&&(A="menuitemcheckbox"));let W=Qi(),B=Qi(),X=Qi(),q={id:r,"aria-disabled":D||void 0,role:A,"aria-label":e["aria-label"],"aria-labelledby":W,"aria-describedby":[B,X].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":s,"aria-expanded":e["aria-expanded"]};C.selectionMode!=="none"&&!k&&(q["aria-checked"]=T),a&&(q["aria-posinset"]=R==null?void 0:R.index,q["aria-setsize"]=H5(t.collection));let j=de=>{de.pointerType==="keyboard"&&K(de),l==null||l(de)},H=de=>{de.pointerType!=="keyboard"&&(K(de),!k&&I&&(o??(C.selectionMode!=="multiple"||C.isLink(i)))&&I()),u==null||u(de)},{itemProps:U,isFocused:_}=L5({selectionManager:C,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none"}),{pressProps:ye,isPressed:ee}=_o({onPressStart:j,onPress:d,onPressUp:H,onPressChange:h,onPressEnd:g,isDisabled:D}),{hoverProps:Tt}=xr({isDisabled:D,onHoverStart(de){!Ko()&&!(F&&s==="dialog")&&(C.setFocused(!0),C.setFocusedKey(i)),f==null||f(de)},onHoverChange:p,onHoverEnd:m}),{keyboardProps:st}=Ff({onKeyDown:de=>{if(de.repeat){de.continuePropagation();return}switch(de.key){case" ":!D&&C.selectionMode==="none"&&!k&&o!==!1&&I&&I();break;case"Enter":!D&&o!==!1&&!k&&I&&I();break;default:k||de.continuePropagation(),b==null||b(de);break}},onKeyUp:$}),{focusProps:an}=ol({onBlur:M,onFocus:x,onFocusChange:E}),Ot=Oe(R==null?void 0:R.props);delete Ot.id;let Uo=$2(R==null?void 0:R.props);return{menuItemProps:{...q,...ae(Ot,Uo,k?{onFocus:U.onFocus,"data-key":U["data-key"]}:U,ye,Tt,st,an),tabIndex:U.tabIndex!=null&&F?-1:U.tabIndex},labelProps:{id:W},descriptionProps:{id:B},keyboardShortcutProps:{id:X},isFocused:_,isSelected:T,isPressed:ee,isDisabled:D}}function W5(e){let{heading:t,"aria-label":n}=e,r=ot();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":t?r:void 0}}}function G5(e,t){let{role:n="dialog"}=e,r=Qi();r=e["aria-label"]?void 0:r;let i=c.useRef(!1);return c.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){En(t.current);let o=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),En(t.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),N0(),{dialogProps:{...Oe(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}},titleProps:{id:r}}}function Q5(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:o,formatOptions:a={style:"percent"}}=e,s=Oe(e,{labelable:!0}),{labelProps:l,fieldProps:u}=n5({...e,labelElementType:"span"});t=Qr(t,n,r);let d=(t-n)/(r-n),h=Yv(a);if(!o&&!i){let g=a.style==="percent"?d:t;i=h.format(g)}return{progressBarProps:ae(s,{...u,"aria-valuenow":o?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":o?void 0:i,role:"progressbar"}),labelProps:l}}function Y5(e){let{progressBarProps:t,labelProps:n}=Q5(e);return{meterProps:{...t,role:"meter progressbar"},labelProps:n}}function Z5(e,t){let n=Oe(e,{labelable:!0}),{hoverProps:r}=xr({onHoverStart:()=>t==null?void 0:t.open(!0),onHoverEnd:()=>t==null?void 0:t.close()});return{tooltipProps:ae(n,r,{role:"tooltip"})}}function X5(e,t,n){let{isDisabled:r,trigger:i}=e,o=ot(),a=c.useRef(!1),s=c.useRef(!1),l=()=>{(a.current||s.current)&&t.open(s.current)},u=$=>{!a.current&&!s.current&&t.close($)};c.useEffect(()=>{let $=x=>{n&&n.current&&x.key==="Escape"&&(x.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",$,!0),()=>{document.removeEventListener("keydown",$,!0)}},[n,t]);let d=()=>{i!=="focus"&&(fo()==="pointer"?a.current=!0:a.current=!1,l())},h=()=>{i!=="focus"&&(s.current=!1,a.current=!1,u())},g=()=>{s.current=!1,a.current=!1,u(!0)},f=()=>{Ko()&&(s.current=!0,l())},p=()=>{s.current=!1,a.current=!1,u(!0)},{hoverProps:m}=xr({isDisabled:r,onHoverStart:d,onHoverEnd:h}),{focusableProps:b}=Kf({isDisabled:r,onFocus:f,onBlur:p},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...ae(b,m,{onPointerDown:g,onKeyDown:g})},tooltipProps:{id:o}}}const J5=c.createContext({}),e9=c.createContext(null),t9=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),xh=c.createContext({});function n9(e,t){[e,t]=at(e,t,xh),e=r9(e);let n=e,{isPending:r}=n,{buttonProps:i,isPressed:o}=zf(e,t),{focusProps:a,isFocused:s,isFocusVisible:l}=cl(e),{hoverProps:u,isHovered:d}=xr({...e,isDisabled:e.isDisabled||r}),h={isHovered:d,isPressed:(n.isPressed||o)&&!r,isFocused:s,isFocusVisible:l,isDisabled:e.isDisabled||!1,isPending:r??!1},g=Ye({...e,values:h,defaultClassName:"react-aria-Button"}),f=ot(i.id),p=ot(),m=i["aria-labelledby"];r&&(m?m=`${m} ${p}`:i["aria-label"]&&(m=`${f} ${p}`));let b=c.useRef(r);return c.useEffect(()=>{let $={"aria-labelledby":m||f};(!b.current&&s&&r||b.current&&s&&!r)&&Pu($,"assertive"),b.current=r},[r,s,m,f]),c.createElement("button",{...Oe(e,{propNames:t9}),...ae(i,a,u),...g,id:f,ref:t,"aria-labelledby":m,slot:e.slot||void 0,"aria-disabled":r?"true":i["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":h.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":r||void 0,"data-focus-visible":l||void 0},c.createElement(e9.Provider,{value:{id:p}},g.children))}function r9(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}const dl=i2(n9),i9=c.createContext({});class Je extends Set{constructor(t,n,r){super(t),t instanceof Je?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function o9(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ch(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=e,a=c.useRef(!1),[,s]=c.useState(!1),l=c.useRef(null),u=c.useRef(null),[,d]=c.useState(null),h=c.useMemo(()=>Hu(e.selectedKeys),[e.selectedKeys]),g=c.useMemo(()=>Hu(e.defaultSelectedKeys,new Je),[e.defaultSelectedKeys]),[f,p]=hi(h,g,e.onSelectionChange),m=c.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[b,$]=c.useState(i);i==="replace"&&b==="toggle"&&typeof f=="object"&&f.size===0&&$("replace");let x=c.useRef(i);return c.useEffect(()=>{i!==x.current&&($(i),x.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:b,setSelectionBehavior:$,get isFocused(){return a.current},setFocused(E){a.current=E,s(E)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(E,M="first"){l.current=E,u.current=M,d(E)},selectedKeys:f,setSelectedKeys(E){(r||!o9(E,f))&&p(E)},disabledKeys:m,disabledBehavior:o}}function Hu(e,t){return e?e==="all"?"all":new Je(e):t}class $h{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&ha(this.collection,i,t)<0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&ha(this.collection,i,t)>0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Je([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new Je(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?ha(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],o=t;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new Je(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new Je([n],n,n):new Je;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new Je;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&t.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=K5(j0(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new Je)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function Ho(e){let[t,n]=hi(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=c.useCallback(()=>{n(!0)},[n]),i=c.useCallback(()=>{n(!1)},[n]),o=c.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:o}}function Sh(e){let t=Ho(e),[n,r]=c.useState(null),[i,o]=c.useState([]),a=()=>{o([]),t.close()};return{focusStrategy:n,...t,open(u=null){r(u),t.open()},toggle(u=null){r(u),t.toggle()},close(){a()},expandedKeysStack:i,openSubmenu:(u,d)=>{o(h=>d>h.length?h:[...h.slice(0,d),u])},closeSubmenu:(u,d)=>{o(h=>h[d]===u?h.slice(0,d):h)}}}const a9=1500,Vu=500;let sn={},s9=0,Dr=!1,wt=null,ln=null;function Eh(e={}){let{delay:t=a9,closeDelay:n=Vu}=e,{isOpen:r,open:i,close:o}=Ho(e),a=c.useMemo(()=>`${++s9}`,[]),s=c.useRef(null),l=c.useRef(o),u=()=>{sn[a]=g},d=()=>{for(let p in sn)p!==a&&(sn[p](!0),delete sn[p])},h=()=>{s.current&&clearTimeout(s.current),s.current=null,d(),u(),Dr=!0,i(),wt&&(clearTimeout(wt),wt=null),ln&&(clearTimeout(ln),ln=null)},g=p=>{p||n<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},n)),wt&&(clearTimeout(wt),wt=null),Dr&&(ln&&clearTimeout(ln),ln=setTimeout(()=>{delete sn[a],ln=null,Dr=!1},Math.max(Vu,n)))},f=()=>{d(),u(),!r&&!wt&&!Dr?wt=setTimeout(()=>{wt=null,Dr=!0,h()},t):r||h()};return c.useEffect(()=>{l.current=o},[o]),c.useEffect(()=>()=>{s.current&&clearTimeout(s.current),sn[a]&&delete sn[a]},[a]),{isOpen:r,open:p=>{!p&&t>0&&!s.current?f():h()},close:g}}class l9{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of t)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function u9(e){let{onExpandedChange:t}=e,[n,r]=hi(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=Ch(e),o=c.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=_5(e,c.useCallback(l=>new l9(l,{expandedKeys:n}),[n]),null);return c.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(c9(n,l))},setExpandedKeys:r,selectionManager:new $h(a,i)}}function c9(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}const d9=c.createContext({}),f9=c.createContext({}),Ph=c.createContext({placement:"bottom"}),fl=c.createContext(null);function h9(e,t){[e,t]=at(e,t,fl);let n=c.useContext(kn),r=Ho(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,o=uo(t,i.isOpen)||e.isExiting||!1;if(o2()){let s=e.children;return typeof s=="function"&&(s=s({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),c.createElement(c.Fragment,null,s)}return i&&!i.isOpen&&!o?null:c.createElement(p9,{...e,triggerRef:e.triggerRef,state:i,popoverRef:t,isExiting:o})}const g9=c.forwardRef(h9);function p9({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){let i=c.useRef(null),[o,a]=c.useState(0);re(()=>{i.current&&e.isOpen&&a(i.current.getBoundingClientRect().width)},[e.isOpen,i]);var s;let{popoverProps:l,underlayProps:u,arrowProps:d,placement:h}=P5({...r,offset:(s=r.offset)!==null&&s!==void 0?s:8,arrowSize:o},e),g=r.popoverRef,f=jo(g,!!h)||r.isEntering||!1,p=Ye({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:f,isExiting:t}}),m={...l.style,...p.style};return c.createElement(I0,{...r,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&c.createElement("div",{"data-testid":"underlay",...u,style:{position:"fixed",inset:0}}),c.createElement("div",{...ae(Oe(r),l),...p,ref:g,slot:r.slot||void 0,style:m,"data-trigger":r.trigger,"data-placement":h,"data-entering":f||void 0,"data-exiting":t||void 0},!r.isNonModal&&c.createElement(xs,{onDismiss:e.close}),c.createElement(Ph.Provider,{value:{...d,placement:h,ref:i}},p.children),c.createElement(xs,{onDismiss:e.close})))}const m9=c.createContext({}),Rh=c.createContext(null),hl=c.createContext(null),gl=c.createContext(null),bo=c.createContext(null);function b9(e){let t=Sh(e),n=c.useRef(null),{menuTriggerProps:r,menuProps:i}=z5({...e,type:"menu"},t,n),[o,a]=c.useState(null),s=c.useCallback(()=>{n.current&&a(n.current.offsetWidth+"px")},[n]);as({ref:n,onResize:s});let l=c.useRef(null);return c.createElement(on,{values:[[Rh,{...i,ref:l}],[kn,t],[gl,t],[fl,{trigger:"MenuTrigger",triggerRef:n,scrollRef:l,placement:"bottom start",style:{"--trigger-width":o}}]]},c.createElement(Rf,{...r,ref:n,isPressed:t.isOpen},e.children))}const v9=c.createContext(null);function y9(e,t){return[e,t]=at(e,t,Rh),c.createElement(K2,{content:c.createElement(G2,e)},n=>n.size>0&&c.createElement(w9,{props:e,collection:n,menuRef:t}))}function w9({props:e,collection:t,menuRef:n}){let r=u9({...e,collection:t,children:void 0}),i=c.useContext(gl),{isVirtualized:o,CollectionRoot:a}=c.useContext(wf),{menuProps:s}=U5({...e,isVirtualized:o,onClose:e.onClose||(i==null?void 0:i.close)},r,n),l=Ye({defaultClassName:"react-aria-Menu",className:e.className,style:e.style,values:{}});return c.createElement(If,null,c.createElement("div",{...Oe(e),...s,...l,ref:n,slot:e.slot||void 0,onScroll:e.onScroll},c.createElement(on,{values:[[hl,r],[f9,{elementType:"div"}],[Y2,{name:"MenuSection",render:$9}],[v9,{parentMenuRef:n}],[$s,null],[bo,r.selectionManager]]},c.createElement(a,{collection:t,persistedKeys:X2(r.selectionManager.focusedKey),scrollRef:n}))))}const x9=c.forwardRef(y9);class C9 extends $h{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(t,n){return this.parent.setFocusedKey(t,n)}setFocused(t){this.parent.setFocused(t)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(t,n){super(t.collection,n),this.parent=t}}function $9(e,t,n,r="react-aria-MenuSection"){var i,o;let a=c.useContext(hl),{CollectionBranch:s}=c.useContext(wf),[l,u]=Cf();var d;let{headingProps:h,groupProps:g}=W5({heading:u,"aria-label":(d=n.props["aria-label"])!==null&&d!==void 0?d:void 0}),f=Ye({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),p=c.useContext(bo),m=Ch(e),b=e.selectionMode!=null?new C9(p,m):p;return c.createElement("section",{...Oe(e),...g,...f,ref:t},c.createElement(on,{values:[[d9,{...h,ref:l}],[bo,b]]},c.createElement(s,{collection:a.collection,parent:n})))}const $s=c.createContext(null),S9=q2("item",function(t,n,r){var i;[t,n]=at(t,n,$s);let o=(i=xf($s))===null||i===void 0?void 0:i.id,a=c.useContext(hl),s=yr(n),l=c.useContext(bo),{menuItemProps:u,labelProps:d,descriptionProps:h,keyboardShortcutProps:g,...f}=q5({...t,id:o,key:r.key,selectionManager:l},a,s),{isFocusVisible:p,focusProps:m}=cl(),{hoverProps:b,isHovered:$}=xr({isDisabled:f.isDisabled}),x=Ye({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...f,isHovered:$,isFocusVisible:p,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),E=t.href?"a":"div";return c.createElement(E,{...ae(u,m,b),...x,ref:s,"data-disabled":f.isDisabled||void 0,"data-hovered":$||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":p||void 0,"data-pressed":f.isPressed||void 0,"data-selected":f.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},c.createElement(on,{values:[[i9,{slots:{label:d,description:h}}],[m9,g]]},x.children))}),Mh=c.createContext(null),kn=c.createContext(null);function pl(e){let t=Sh(e),n=c.useRef(null),{triggerProps:r,overlayProps:i}=Zf({type:"dialog"},t,n);return r.id=ot(),i["aria-labelledby"]=r.id,c.createElement(on,{values:[[kn,t],[gl,t],[Mh,i],[fl,{trigger:"DialogTrigger",triggerRef:n}]]},c.createElement(Rf,{...r,ref:n,isPressed:t.isOpen},e.children))}function E9(e,t){let n=e["aria-labelledby"];[e,t]=at(e,t,Mh);let{dialogProps:r,titleProps:i}=G5({...e,"aria-labelledby":n},t),o=c.useContext(kn);!r["aria-label"]&&!r["aria-labelledby"]&&(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let a=Ye({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(o==null?void 0:o.close)||(()=>{})}});return c.createElement("section",{...Oe(e),...r,...a,ref:t,slot:e.slot||void 0},c.createElement(on,{values:[[nf,{slots:{[lo]:{},title:{...i,level:2}}}],[xh,{slots:{[lo]:{},close:{onPress:()=>o==null?void 0:o.close()}}}]]},a.children))}const ml=c.forwardRef(E9);function P9(e,t){[e,t]=at(e,t,nf);let{children:n,level:r=3,className:i,...o}=e,a=`h${r}`;return c.createElement(a,{...o,ref:t,className:i??"react-aria-Heading"},n)}const bl=c.forwardRef(P9),R9=c.createContext(null);function M9(e,t){[e,t]=at(e,t,R9);let{value:n=0,minValue:r=0,maxValue:i=100}=e;n=Qr(n,r,i);let[o,a]=Cf(),{meterProps:s,labelProps:l}=Y5({...e,label:a}),u=(n-r)/(i-r)*100,d=Ye({...e,defaultClassName:"react-aria-Meter",values:{percentage:u,valueText:s["aria-valuetext"]}});return c.createElement("div",{...s,...d,ref:t,slot:e.slot||void 0},c.createElement(J5.Provider,{value:{...l,ref:o,elementType:"span"}},d.children))}const k9=c.forwardRef(M9),D9=c.createContext(null),vl=c.createContext(null);function T9(e,t){if(c.useContext(vl))return c.createElement(zu,{...e,modalRef:t},e.children);let{isDismissable:r,isKeyboardDismissDisabled:i,isOpen:o,defaultOpen:a,onOpenChange:s,children:l,isEntering:u,isExiting:d,UNSTABLE_portalContainer:h,shouldCloseOnInteractOutside:g,...f}=e;return c.createElement(F9,{isDismissable:r,isKeyboardDismissDisabled:i,isOpen:o,defaultOpen:a,onOpenChange:s,isEntering:u,isExiting:d,UNSTABLE_portalContainer:h,shouldCloseOnInteractOutside:g},c.createElement(zu,{...f,modalRef:t},l))}const yl=c.forwardRef(T9);function O9(e,t){[e,t]=at(e,t,D9);let n=c.useContext(kn),r=Ho(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,o=yr(t),a=c.useRef(null),s=uo(o,i.isOpen),l=uo(a,i.isOpen),u=s||l||e.isExiting||!1,d=kt();return!i.isOpen&&!u||d?null:c.createElement(L9,{...e,state:i,isExiting:u,overlayRef:o,modalRef:a})}const F9=c.forwardRef(O9);function L9({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:o}=k5(t,r,n),a=jo(t.overlayRef)||t.isEntering||!1,s=Ye({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:t.isExiting,state:r}}),l=P2(),u={...s.style,"--visual-viewport-height":l.height+"px"};return c.createElement(I0,{isExiting:t.isExiting,portalContainer:e},c.createElement("div",{...ae(Oe(t),o),...s,style:u,ref:t.overlayRef,"data-entering":a||void 0,"data-exiting":t.isExiting||void 0},c.createElement(on,{values:[[vl,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[kn,r]]},s.children)))}function zu(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=c.useContext(vl),o=c.useContext(kn),a=c.useMemo(()=>lf(e.modalRef,n),[e.modalRef,n]),s=yr(a),l=jo(s),u=Ye({...e,defaultClassName:"react-aria-Modal",values:{isEntering:l,isExiting:r,state:o}});return c.createElement("div",{...ae(Oe(e),t),...u,ref:s,"data-entering":l||void 0,"data-exiting":r||void 0},i&&c.createElement(xs,{onDismiss:o.close}),u.children)}const A9=c.createContext({}),kh=c.createContext(null);function I9(e,t){[e,t]=at(e,t,A9);let n=i5(e),{groupProps:r}=Jv(e,n,t),i=Ye({...e,values:{isDisabled:n.isDisabled,state:n},defaultClassName:"react-aria-ToggleButtonGroup"});return c.createElement("div",{...r,...i,ref:t,slot:e.slot||void 0,"data-orientation":e.orientation||"horizontal","data-disabled":e.isDisabled||void 0},c.createElement(kh.Provider,{value:n},i.children))}const N9=c.forwardRef(I9),j9=c.createContext({});function _9(e,t){[e,t]=at(e,t,j9);let n=c.useContext(kh),r=r5(n&&e.id!=null?{isSelected:n.selectedKeys.has(e.id),onChange(p){n.setSelected(e.id,p)}}:e),{buttonProps:i,isPressed:o,isSelected:a,isDisabled:s}=n&&e.id!=null?e5({...e,id:e.id},n,t):Uf({...e,id:e.id!=null?String(e.id):void 0},r,t),{focusProps:l,isFocused:u,isFocusVisible:d}=cl(e),{hoverProps:h,isHovered:g}=xr(e),f=Ye({...e,id:void 0,values:{isHovered:g,isPressed:o,isFocused:u,isSelected:r.isSelected,isFocusVisible:d,isDisabled:s,state:r},defaultClassName:"react-aria-ToggleButton"});return c.createElement("button",{...ae(i,l,h),...f,ref:t,slot:e.slot||void 0,"data-focused":u||void 0,"data-disabled":s||void 0,"data-pressed":o||void 0,"data-selected":a||void 0,"data-hovered":g||void 0,"data-focus-visible":d||void 0})}const K9=c.forwardRef(_9),wl=c.createContext(null),Dh=c.createContext(null);function B9(e){let t=Eh(e),n=c.useRef(null),{triggerProps:r,tooltipProps:i}=X5(e,t,n);return c.createElement(on,{values:[[wl,t],[Dh,{...i,triggerRef:n}]]},c.createElement(Fv,{...r,ref:n},e.children))}function H9({UNSTABLE_portalContainer:e,...t},n){[t,n]=at(t,n,Dh);let r=c.useContext(wl),i=Eh(t),o=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,a=uo(n,o.isOpen)||t.isExiting||!1;return!o.isOpen&&!a?null:c.createElement(S5,{portalContainer:e},c.createElement(z9,{...t,tooltipRef:n,isExiting:a}))}const V9=c.forwardRef(H9);function z9(e){let t=c.useContext(wl),n=c.useRef(null),[r,i]=c.useState(0);re(()=>{n.current&&t.isOpen&&i(n.current.getBoundingClientRect().width)},[t.isOpen,n]);let{overlayProps:o,arrowProps:a,placement:s}=Qf({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:r,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=jo(e.tooltipRef,!!s)||e.isEntering||!1,u=Ye({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}});e=ae(e,o);let{tooltipProps:d}=Z5(e,t);return c.createElement("div",{...d,ref:e.tooltipRef,...u,style:{...o.style,...u.style},"data-placement":s??void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},c.createElement(Ph.Provider,{value:{...a,placement:s,ref:n}},u.children))}function U9(e,t){var n=c.useState(function(){if(typeof window>"u")return t;try{for(var a=window.localStorage.getItem(e),s=a?JSON.parse(a):t,l=0,u=Object.entries(t);l<u.length;l++){var d=u[l][0];if(typeof s[d]>"u")throw new Error("Missing key in local storage")}return s}catch(h){return console.log(h),t}}),r=n[0],i=n[1],o=function(a){try{var s=a instanceof Function?a(r):a;i(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(l){console.log(l)}};return[r,o]}var q9=function(){var e=U9("user-preferences",{theme:"system"}),t=e[0],n=e[1];return v.jsx(N9,{className:"flex h-7 space-x-0.5 rounded-md bg-slate-100 p-0.5 dark:bg-slate-700",defaultSelectedKeys:["system"],"aria-label":"Theme",selectedKeys:[t.theme],onSelectionChange:function(r){r.has("system")?n({theme:"system"}):r.has("light")?(document.documentElement.classList.remove("dark"),n({theme:"light"})):r.has("dark")&&(document.documentElement.classList.add("dark"),n({theme:"dark"}))},children:[{value:"system",icon:function(){return v.jsx(fb,{})},ariaLabel:"System theme"},{value:"light",icon:function(){return v.jsx(Bb,{})},ariaLabel:"Light theme"},{value:"dark",icon:function(){return v.jsx(kb,{})},ariaLabel:"Dark theme"}].map(function(r){return v.jsx(K9,{className:"flex aspect-square h-full items-center justify-center rounded-md text-slate-900 transition duration-150 ease-in-out hover:bg-slate-200 active:bg-slate-300 data-[selected=true]:bg-slate-200 data-[selected=true]:shadow-sm dark:text-slate-50 dark:hover:bg-slate-500 dark:data-[selected=true]:bg-slate-500",id:r.value,"aria-label":r.ariaLabel,children:r.icon()},r.value)})})},Ss=function(e){var t=e.message;return v.jsx("div",{className:"flex items-center justify-center rounded-md bg-red-50 py-4",children:v.jsx("div",{className:"flex flex-col justify-center",children:v.jsx("p",{className:"text-sm text-red-900",children:t})})})},Uu=function(e){var t=e.to,n=e.label,r=e.icon;return v.jsxs(Yd,{to:t,className:function(i){var o=i.isActive;return"relative -ml-px backdrop-blur-50 flex w-full items-center space-x-2 rounded-md pl-4 py-1 transition duration-150 ease-in-out ".concat(o?"bg-slate-100/90 font-medium text-slate-900 dark:bg-slate-900 dark:text-brand-300":"text-slate-500 dark:text-slate-400 border-slate-100 hover:bg-slate-50 dark:hover:bg-slate-900 hover:border-slate-300 hover:text-slate-900 dark:border-slate-700 dark:hover:border-slate-600 dark:hover:text-slate-100")},children:[r,v.jsx("span",{className:"block truncate",children:n})]})},Th=function(e){var t=e.children,n=be.queue.list.useQuery(),r=n.data,i=n.isLoading,o=n.isError;return v.jsxs("div",{className:"grid xl:grid-cols-[auto,1fr]",children:[v.jsx("div",{className:"hidden w-64 xl:block",children:v.jsxs("div",{className:"sticky top-0 isolate flex h-full max-h-screen min-h-screen flex-col justify-between overflow-hidden border-r border-brand-50 px-4 pb-4 pt-8 shadow-sm dark:border-slate-700 dark:bg-black",children:[v.jsxs("svg",{viewBox:"0 0 1108 632","aria-hidden":"true",className:"absolute left-[calc(50%-24rem)] top-10 -z-10 w-[69.25rem] max-w-none rotate-90 transform-gpu opacity-50 blur-3xl lg:top-[calc(50%-30rem)]",children:[v.jsx("path",{fill:"url(#175c433f-44f6-4d59-93f0-c5c51ad5566d)",fillOpacity:".2",d:"M235.233 402.609 57.541 321.573.83 631.05l234.404-228.441 320.018 145.945c-65.036-115.261-134.286-322.756 109.01-230.655C968.382 433.026 1031 651.247 1092.23 459.36c48.98-153.51-34.51-321.107-82.37-385.717L810.952 324.222 648.261.088 235.233 402.609Z"}),v.jsx("defs",{children:v.jsxs("linearGradient",{id:"175c433f-44f6-4d59-93f0-c5c51ad5566d",x1:"1220.59",x2:"-85.053",y1:"432.766",y2:"638.714",gradientUnits:"userSpaceOnUse",children:[v.jsx("stop",{stopColor:"#bbebff"}),v.jsx("stop",{offset:1,stopColor:"#ffffff"})]})})]}),v.jsxs("div",{className:"space-y-8",children:[v.jsxs("div",{className:"flex items-center space-x-2 text-slate-900 dark:text-brand-50",children:[v.jsx(jb,{width:28,height:28}),v.jsx("p",{className:"text-lg font-semibold",children:"QueueDash"})]}),v.jsxs("div",{className:"w-full space-y-4",children:[v.jsx(Uu,{label:"Overview",icon:v.jsx(cb,{className:"mb-0.5",height:16,width:16}),to:"../"}),v.jsx("div",{className:"h-px w-full bg-slate-100 dark:bg-slate-700"}),v.jsx("div",{className:"w-full space-y-1",children:i?yn([],new Array(10),!0).map(function(a,s){return v.jsx(oo,{className:"h-8 w-full"},s)}):o?v.jsx(Ss,{message:"Could not fetch queues"}):r==null?void 0:r.map(function(a){return v.jsx(Uu,{to:"../".concat(a.name),label:a.displayName},a.name)})})]})]}),v.jsxs("div",{className:"flex w-full items-center justify-between",children:[v.jsx("a",{href:"https://github.com/alexbudure/queuedash",target:"_blank",rel:"noreferrer",className:"flex size-7 items-center justify-center rounded-md bg-slate-100 text-slate-900 shadow-sm transition duration-150 ease-in-out hover:bg-slate-200 active:bg-slate-300 dark:bg-slate-600 dark:text-slate-50 dark:hover:bg-slate-500",children:v.jsx(xb,{})}),v.jsx(q9,{})]})]})}),v.jsx("div",{className:"bg-white px-4 py-3 dark:bg-[#121212] lg:px-10 lg:py-8",children:v.jsx("div",{className:"max-w-screen-xl",children:t})})]})};/**
34
+ */var kr=d;function t5(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var n5=typeof Object.is=="function"?Object.is:t5,r5=kr.useState,i5=kr.useEffect,o5=kr.useLayoutEffect,a5=kr.useDebugValue;function s5(e,t){var n=t(),r=r5({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return o5(function(){i.value=n,i.getSnapshot=t,Fa(i)&&o({inst:i})},[e,n,t]),i5(function(){return Fa(i)&&o({inst:i}),e(function(){Fa(i)&&o({inst:i})})},[e]),a5(n),n}function Fa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!n5(e,n)}catch{return!0}}function l5(e,t){return t()}var u5=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?l5:s5;m0.useSyncExternalStore=kr.useSyncExternalStore!==void 0?kr.useSyncExternalStore:u5;p0.exports=m0;var c5=p0.exports;const b0=d.createContext(!1),mi=d.createContext(null);function d5(e){if(d.useContext(mi))return e.content;let{collection:n,document:r}=p5(e.createCollection);return d.createElement(d.Fragment,null,d.createElement(k2,null,d.createElement(mi.Provider,{value:r},e.content)),d.createElement(f5,{render:e.children,collection:n}))}function f5({collection:e,render:t}){return t(e)}function h5(e,t,n){let r=pn(),i=d.useRef(r);i.current=r;let o=d.useCallback(()=>i.current?n():t(),[t,n]);return c5.useSyncExternalStore(e,o)}const g5=typeof d.useSyncExternalStore=="function"?d.useSyncExternalStore:h5;function p5(e){let[t]=d.useState(()=>new M2((e==null?void 0:e())||new Dl)),n=d.useCallback(a=>t.subscribe(a),[t]),r=d.useCallback(()=>{let a=t.getCollection();return t.isSSR&&t.resetAfterSSR(),a},[t]),i=d.useCallback(()=>(t.isSSR=!0,t.getCollection()),[t]),o=g5(n,r,i);return te(()=>(t.isMounted=!0,()=>{t.isMounted=!1}),[t]),{collection:o,document:t}}const As=d.createContext(null);function m5(e,t,n,r,i,o){let a=d.useCallback(l=>{l==null||l.setProps(t,n,r,o)},[t,n,r,o]),s=d.useContext(As);if(s){let l=s.ownerDocument.nodesByProps.get(t);return l||(l=s.ownerDocument.createElement(e),l.setProps(t,n,r,o),s.appendChild(l),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,l)),i?d.createElement(As.Provider,{value:l},i):null}return d.createElement(e,{ref:a},i)}function b5(e,t){let n=({node:i})=>t(i.props,i.props.ref,i),r=d.forwardRef((i,o)=>{let a=d.useContext(Oo);if(!d.useContext(b0)){if(t.length>=3)throw new Error(t.name+" cannot be rendered outside a collection.");return t(i,o)}return m5(e,i,o,"children"in i?i.children:null,null,l=>d.createElement(Oo.Provider,{value:a},d.createElement(n,{node:l})))});return r.displayName=t.name,r}function v5(e){return n0({...e,addIdAndValue:!0})}const Qu=d.createContext(null);function y5(e){let t=d.useContext(Qu),n=((t==null?void 0:t.dependencies)||[]).concat(e.dependencies),r=e.idScope||(t==null?void 0:t.idScope),i=v5({...e,idScope:r,dependencies:n});return d.useContext(mi)&&(i=d.createElement(w5,null,i)),t=d.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),d.createElement(Qu.Provider,{value:t},i)}function w5({children:e}){let t=d.useContext(mi),n=d.useMemo(()=>d.createElement(mi.Provider,{value:null},d.createElement(b0.Provider,{value:!0},e)),[e]);return pn()?d.createElement(As.Provider,{value:t},n):Lr.createPortal(n,t)}const x5=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),C5=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function S5(e){if(Intl.Locale){let n=new Intl.Locale(e).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return x5.has(n.script)}let t=e.split("-")[0];return C5.has(t)}const $5=Symbol.for("react-aria.i18n.locale");function v0(){let e=typeof window<"u"&&window[$5]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:S5(e)?"rtl":"ltr"}}let _s=v0(),ei=new Set;function Yu(){_s=v0();for(let e of ei)e(_s)}function E5(){let e=pn(),[t,n]=d.useState(_s);return d.useEffect(()=>(ei.size===0&&window.addEventListener("languagechange",Yu),ei.add(n),()=>{ei.delete(n),ei.size===0&&window.removeEventListener("languagechange",Yu)}),[]),e?{locale:"en-US",direction:"ltr"}:t}const P5=d.createContext(null);function Bn(){let e=E5();return d.useContext(P5)||e}const R5=Symbol.for("react-aria.i18n.locale"),M5=Symbol.for("react-aria.i18n.strings");let Qn;class da{getStringForLocale(t,n){let i=this.getStringsForLocale(n)[t];if(!i)throw new Error(`Could not find intl message ${t} in ${n} locale`);return i}getStringsForLocale(t){let n=this.strings[t];return n||(n=k5(t,this.strings,this.defaultLocale),this.strings[t]=n),n}static getGlobalDictionaryForPackage(t){if(typeof window>"u")return null;let n=window[R5];if(Qn===void 0){let i=window[M5];if(!i)return null;Qn={};for(let o in i)Qn[o]=new da({[n]:i[o]},n)}let r=Qn==null?void 0:Qn[t];if(!r)throw new Error(`Strings for package "${t}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return r}constructor(t,n="en-US"){this.strings=Object.fromEntries(Object.entries(t).filter(([,r])=>r)),this.defaultLocale=n}}function k5(e,t,n="en-US"){if(t[e])return t[e];let r=O5(e);if(t[r])return t[r];for(let i in t)if(i.startsWith(r+"-"))return t[i];return t[n]}function O5(e){return Intl.Locale?new Intl.Locale(e).language:e.split("-")[0]}const Xu=new Map,Zu=new Map;class D5{format(t,n){let r=this.strings.getStringForLocale(t,this.locale);return typeof r=="function"?r(n,this):r}plural(t,n,r="cardinal"){let i=n["="+t];if(i)return typeof i=="function"?i():i;let o=this.locale+":"+r,a=Xu.get(o);a||(a=new Intl.PluralRules(this.locale,{type:r}),Xu.set(o,a));let s=a.select(t);return i=n[s]||n.other,typeof i=="function"?i():i}number(t){let n=Zu.get(this.locale);return n||(n=new Intl.NumberFormat(this.locale),Zu.set(this.locale,n)),n.format(t)}select(t,n){let r=t[n]||t.other;return typeof r=="function"?r():r}constructor(t,n){this.locale=t,this.strings=n}}const Ju=new WeakMap;function T5(e){let t=Ju.get(e);return t||(t=new da(e),Ju.set(e,t)),t}function F5(e,t){return t&&da.getGlobalDictionaryForPackage(t)||T5(e)}function y0(e,t){let{locale:n}=Bn(),r=F5(e,t);return d.useMemo(()=>new D5(n,r),[n,r])}let La=new Map,js=!1;try{js=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Do=!1;try{Do=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const w0={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class L5{format(t){let n="";if(!js&&this.options.signDisplay!=null?n=N5(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Do){var r;let{unit:i,unitDisplay:o="short",locale:a}=this.resolvedOptions();if(!i)return n;let s=(r=w0[i])===null||r===void 0?void 0:r[o];n+=s[a]||s.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),i=this.numberFormatter.formatToParts(n);return[...r.map(o=>({...o,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...i.map(o=>({...o,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!js&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Do&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=I5(t,n),this.options=n}}function I5(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!Do){var r;let{unit:a,unitDisplay:s="short"}=t;if(!a)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=w0[a])===null||r===void 0)&&r[s]))throw new Error(`Unsupported unit ${a} with unitDisplay = ${s}`);t={...t,style:"decimal"}}let i=e+(t?Object.entries(t).sort((a,s)=>a[0]<s[0]?-1:1).join():"");if(La.has(i))return La.get(i);let o=new Intl.NumberFormat(e,t);return La.set(i,o),o}function N5(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let i=e.format(-n),o=e.format(n),a=i.replace(o,"").replace(/\u200e|\u061C/,"");return[...a].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(o,"!!!").replace(a,"+").replace("!!!",o)}else return e.format(n)}}function A5(e={}){let{locale:t}=Bn();return d.useMemo(()=>new L5(t,e),[t,e])}let Ia=new Map;function _5(e){let{locale:t}=Bn(),n=t+(e?Object.entries(e).sort((i,o)=>i[0]<o[0]?-1:1).join():"");if(Ia.has(n))return Ia.get(n);let r=new Intl.Collator(t,e);return Ia.set(n,r),r}function x0(e,t){let{elementType:n="button",isDisabled:r,onPress:i,onPressStart:o,onPressEnd:a,onPressUp:s,onPressChange:l,preventFocusOnPress:u,allowFocusWhenDisabled:g,onClick:c,href:h,target:f,rel:p,type:m="button"}=e,b;n==="button"?b={type:m,disabled:r}:b={role:"button",href:n==="a"&&!r?h:void 0,target:n==="a"?f:void 0,type:n==="input"?m:void 0,disabled:n==="input"?r:void 0,"aria-disabled":!r||n==="input"?void 0:r,rel:n==="a"?p:void 0};let{pressProps:v,isPressed:w}=ca({onPressStart:o,onPressEnd:a,onPressChange:l,onPress:i,onPressUp:s,onClick:c,isDisabled:r,preventFocusOnPress:u,ref:t}),{focusableProps:x}=f0(e,t);g&&(x.tabIndex=r?-1:x.tabIndex);let k=ae(x,v,Ke(e,{labelable:!0}));return{isPressed:w,buttonProps:ae(b,k,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"]})}}function C0(e,t,n){const{isSelected:r}=t,{isPressed:i,buttonProps:o}=x0({...e,onPress:Rr(t.toggle,e.onPress)},n);return{isPressed:i,isSelected:r,isDisabled:e.isDisabled||!1,buttonProps:ae(o,{"aria-pressed":r})}}function j5(e){const t=pt(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:o}=e.ownerDocument.defaultView;let{display:a,visibility:s}=o(e);i=a!=="none"&&s!=="hidden"&&s!=="collapse"}return i}function K5(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function S0(e,t){return e.nodeName!=="#comment"&&j5(e)&&K5(e,t)&&(!e.parentElement||S0(e.parentElement,e))}const ec=d.createContext(null),Ks="react-aria-focus-scope-restore";let ce=null;function $0(e){let{children:t,contain:n,restoreFocus:r,autoFocus:i}=e,o=d.useRef(null),a=d.useRef(null),s=d.useRef([]),{parentNode:l}=d.useContext(ec)||{},u=d.useMemo(()=>new Hs({scopeRef:s}),[s]);te(()=>{let h=l||be.root;if(be.getTreeNode(h.scopeRef)&&ce&&!To(ce,h.scopeRef)){let f=be.getTreeNode(ce);f&&(h=f)}h.addChild(u),be.addNode(u)},[u,l]),te(()=>{let h=be.getTreeNode(s);h&&(h.contain=!!n)},[n]),te(()=>{var h;let f=(h=o.current)===null||h===void 0?void 0:h.nextSibling,p=[],m=b=>b.stopPropagation();for(;f&&f!==a.current;)p.push(f),f.addEventListener(Ks,m),f=f.nextSibling;return s.current=p,()=>{for(let b of p)b.removeEventListener(Ks,m)}},[t]),U5(s,r,n),H5(s,n),W5(s,r,n),z5(s,i),d.useEffect(()=>{const h=$e(re(s.current?s.current[0]:void 0));let f=null;if(ot(h,s.current)){for(let p of be.traverse())p.scopeRef&&ot(h,p.scopeRef.current)&&(f=p);f===be.getTreeNode(s)&&(ce=f.scopeRef)}},[s]),te(()=>()=>{var h,f,p;let m=(p=(f=be.getTreeNode(s))===null||f===void 0||(h=f.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&p!==void 0?p:null;(s===ce||To(s,ce))&&(!m||be.getTreeNode(m))&&(ce=m),be.removeTreeNode(s)},[s]);let g=d.useMemo(()=>B5(s),[]),c=d.useMemo(()=>({focusManager:g,parentNode:u}),[u,g]);return d.createElement(ec.Provider,{value:c},d.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:o}),t,d.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:a}))}function B5(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t;var s;let l=r||$e(re((s=n[0])!==null&&s!==void 0?s:void 0)),u=n[0].previousElementSibling,g=$n(n),c=qe(g,{tabbable:i,accept:a},n);c.currentNode=ot(l,n)?l:u;let h=c.nextNode();return!h&&o&&(c.currentNode=u,h=c.nextNode()),h&&je(h,!0),h},focusPrevious(t={}){let n=e.current,{from:r,tabbable:i,wrap:o,accept:a}=t;var s;let l=r||$e(re((s=n[0])!==null&&s!==void 0?s:void 0)),u=n[n.length-1].nextElementSibling,g=$n(n),c=qe(g,{tabbable:i,accept:a},n);c.currentNode=ot(l,n)?l:u;let h=c.previousNode();return!h&&o&&(c.currentNode=u,h=c.previousNode()),h&&je(h,!0),h},focusFirst(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=$n(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[0].previousElementSibling;let s=a.nextNode();return s&&je(s,!0),s},focusLast(t={}){let n=e.current,{tabbable:r,accept:i}=t,o=$n(n),a=qe(o,{tabbable:r,accept:i},n);a.currentNode=n[n.length-1].nextElementSibling;let s=a.previousNode();return s&&je(s,!0),s}}}function $n(e){return e[0].parentElement}function ti(e){let t=be.getTreeNode(ce);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function H5(e,t){let n=d.useRef(void 0),r=d.useRef(void 0);te(()=>{let i=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const o=re(i?i[0]:void 0);let a=u=>{if(u.key!=="Tab"||u.altKey||u.ctrlKey||u.metaKey||!ti(e)||u.isComposing)return;let g=$e(o),c=e.current;if(!c||!ot(g,c))return;let h=$n(c),f=qe(h,{tabbable:!0},c);if(!g)return;f.currentNode=g;let p=u.shiftKey?f.previousNode():f.nextNode();p||(f.currentNode=u.shiftKey?c[c.length-1].nextElementSibling:c[0].previousElementSibling,p=u.shiftKey?f.previousNode():f.nextNode()),u.preventDefault(),p&&je(p,!0)},s=u=>{(!ce||To(ce,e))&&ot(me(u),e.current)?(ce=e,n.current=me(u)):ti(e)&&!rn(me(u),e)?n.current?n.current.focus():ce&&ce.current&&Bs(ce.current):ti(e)&&(n.current=me(u))},l=u=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{let g=pi(),c=(g==="virtual"||g===null)&&Rl()&&Uf(),h=$e(o);if(!c&&h&&ti(e)&&!rn(h,e)){ce=e;let p=me(u);if(p&&p.isConnected){var f;n.current=p,(f=n.current)===null||f===void 0||f.focus()}else ce.current&&Bs(ce.current)}})};return o.addEventListener("keydown",a,!1),o.addEventListener("focusin",s,!1),i==null||i.forEach(u=>u.addEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.addEventListener("focusout",l,!1)),()=>{o.removeEventListener("keydown",a,!1),o.removeEventListener("focusin",s,!1),i==null||i.forEach(u=>u.removeEventListener("focusin",s,!1)),i==null||i.forEach(u=>u.removeEventListener("focusout",l,!1))}},[e,t]),te(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function E0(e){return rn(e)}function ot(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function rn(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of be.traverse(be.getTreeNode(t)))if(n&&ot(e,n.current))return!0;return!1}function V5(e){return rn(e,ce)}function To(e,t){var n;let r=(n=be.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function je(e,t=!1){if(e!=null&&!t)try{dn(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function P0(e,t=!0){let n=e[0].previousElementSibling,r=$n(e),i=qe(r,{tabbable:t},e);i.currentNode=n;let o=i.nextNode();return t&&!o&&(r=$n(e),i=qe(r,{tabbable:!1},e),i.currentNode=n,o=i.nextNode()),o}function Bs(e,t=!0){je(P0(e,t))}function z5(e,t){const n=d.useRef(t);d.useEffect(()=>{if(n.current){ce=e;const r=re(e.current?e.current[0]:void 0);!ot($e(r),ce.current)&&e.current&&Bs(e.current)}n.current=!1},[e])}function U5(e,t,n){te(()=>{if(t||n)return;let r=e.current;const i=re(r?r[0]:void 0);let o=a=>{let s=me(a);ot(s,e.current)?ce=e:E0(s)||(ce=null)};return i.addEventListener("focusin",o,!1),r==null||r.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),r==null||r.forEach(a=>a.removeEventListener("focusin",o,!1))}},[e,t,n])}function tc(e){let t=be.getTreeNode(ce);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function W5(e,t,n){const r=d.useRef(typeof document<"u"?$e(re(e.current?e.current[0]:void 0)):null);te(()=>{let i=e.current;const o=re(i?i[0]:void 0);if(!t||n)return;let a=()=>{(!ce||To(ce,e))&&ot($e(o),e.current)&&(ce=e)};return o.addEventListener("focusin",a,!1),i==null||i.forEach(s=>s.addEventListener("focusin",a,!1)),()=>{o.removeEventListener("focusin",a,!1),i==null||i.forEach(s=>s.removeEventListener("focusin",a,!1))}},[e,n]),te(()=>{const i=re(e.current?e.current[0]:void 0);if(!t)return;let o=a=>{if(a.key!=="Tab"||a.altKey||a.ctrlKey||a.metaKey||!ti(e)||a.isComposing)return;let s=i.activeElement;if(!rn(s,e)||!tc(e))return;let l=be.getTreeNode(e);if(!l)return;let u=l.nodeToRestore,g=qe(i.body,{tabbable:!0});g.currentNode=s;let c=a.shiftKey?g.previousNode():g.nextNode();if((!u||!u.isConnected||u===i.body)&&(u=void 0,l.nodeToRestore=void 0),(!c||!rn(c,e))&&u){g.currentNode=u;do c=a.shiftKey?g.previousNode():g.nextNode();while(rn(c,e));a.preventDefault(),a.stopPropagation(),c?je(c,!0):E0(u)?je(u,!0):s.blur()}};return n||i.addEventListener("keydown",o,!0),()=>{n||i.removeEventListener("keydown",o,!0)}},[e,t,n]),te(()=>{const i=re(e.current?e.current[0]:void 0);if(!t)return;let o=be.getTreeNode(e);if(o){var a;return o.nodeToRestore=(a=r.current)!==null&&a!==void 0?a:void 0,()=>{let s=be.getTreeNode(e);if(!s)return;let l=s.nodeToRestore,u=$e(i);if(t&&l&&(u&&rn(u,e)||u===i.body&&tc(e))){let g=be.clone();requestAnimationFrame(()=>{if(i.activeElement===i.body){let c=g.getTreeNode(e);for(;c;){if(c.nodeToRestore&&c.nodeToRestore.isConnected){nc(c.nodeToRestore);return}c=c.parent}for(c=g.getTreeNode(e);c;){if(c.scopeRef&&c.scopeRef.current&&be.getTreeNode(c.scopeRef)){let h=P0(c.scopeRef.current,!0);nc(h);return}c=c.parent}}})}}}},[e,t])}function nc(e){e.dispatchEvent(new CustomEvent(Ks,{bubbles:!0,cancelable:!0}))&&je(e)}function qe(e,t,n){let r=t!=null&&t.tabbable?R2:Zf,i=(e==null?void 0:e.nodeType)===Node.ELEMENT_NODE?e:null,o=re(i),a=t2(o,e||o,NodeFilter.SHOW_ELEMENT,{acceptNode(s){var l;return!(t==null||(l=t.from)===null||l===void 0)&&l.contains(s)?NodeFilter.FILTER_REJECT:r(s)&&S0(s)&&(!n||ot(s,n))&&(!(t!=null&&t.accept)||t.accept(s))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(a.currentNode=t.from),a}function q5(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:i,tabbable:o=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=i||$e(re(r)),u=qe(r,{tabbable:o,accept:s});r.contains(l)&&(u.currentNode=l);let g=u.nextNode();return!g&&a&&(u.currentNode=r,g=u.nextNode()),g&&je(g,!0),g},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:i,tabbable:o=t.tabbable,wrap:a=t.wrap,accept:s=t.accept}=n,l=i||$e(re(r)),u=qe(r,{tabbable:o,accept:s});if(r.contains(l))u.currentNode=l;else{let c=Na(u);return c&&je(c,!0),c??null}let g=u.previousNode();if(!g&&a){u.currentNode=r;let c=Na(u);if(!c)return null;g=c}return g&&je(g,!0),g??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:o=t.accept}=n,s=qe(r,{tabbable:i,accept:o}).nextNode();return s&&je(s,!0),s},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:i=t.tabbable,accept:o=t.accept}=n,a=qe(r,{tabbable:i,accept:o}),s=Na(a);return s&&je(s,!0),s??null}}}function Na(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class Al{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let i=this.fastMap.get(n??null);if(!i)return;let o=new Hs({scopeRef:t});i.addChild(o),o.parent=i,this.fastMap.set(t,o),r&&(o.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t);if(!n)return;let r=n.parent;for(let o of this.traverse())o!==n&&n.nodeToRestore&&o.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&ot(o.nodeToRestore,n.scopeRef.current)&&(o.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(o=>r&&r.addChild(o))),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){var t;let n=new Al;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(t=i.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new Hs({scopeRef:null}),this.fastMap.set(null,this.root)}}class Hs{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let be=new Al;function R0(e={}){let{autoFocus:t=!1,isTextInput:n,within:r}=e,i=d.useRef({isFocused:!1,isFocusVisible:t||gi()}),[o,a]=d.useState(!1),[s,l]=d.useState(()=>i.current.isFocused&&i.current.isFocusVisible),u=d.useCallback(()=>l(i.current.isFocused&&i.current.isFocusVisible),[]),g=d.useCallback(f=>{i.current.isFocused=f,a(f),u()},[u]);q2(f=>{i.current.isFocusVisible=f,u()},[],{isTextInput:n});let{focusProps:c}=Il({isDisabled:r,onFocusChange:g}),{focusWithinProps:h}=Nl({isDisabled:!r,onFocusWithinChange:g});return{isFocused:o,isFocusVisible:s,focusProps:r?h:c}}function M0(e){let t=Y5(re(e));t!==e&&(t&&G5(t,e),e&&Q5(e,t))}function G5(e,t){e.dispatchEvent(new FocusEvent("blur",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:t}))}function Q5(e,t){e.dispatchEvent(new FocusEvent("focus",{relatedTarget:t})),e.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:t}))}function Y5(e){let t=$e(e),n=t==null?void 0:t.getAttribute("aria-activedescendant");return n&&e.getElementById(n)||t}function X5(e,t){const{"aria-label":n,"aria-labelledby":r,orientation:i="horizontal"}=e;let[o,a]=d.useState(!1);te(()=>{var p;a(!!(t.current&&(!((p=t.current.parentElement)===null||p===void 0)&&p.closest('[role="toolbar"]'))))});const{direction:s}=Bn(),l=s==="rtl"&&i==="horizontal";let u=q5(t);const g=p=>{if(p.currentTarget.contains(p.target)){if(i==="horizontal"&&p.key==="ArrowRight"||i==="vertical"&&p.key==="ArrowDown")l?u.focusPrevious():u.focusNext();else if(i==="horizontal"&&p.key==="ArrowLeft"||i==="vertical"&&p.key==="ArrowUp")l?u.focusNext():u.focusPrevious();else if(p.key==="Tab"){p.stopPropagation(),c.current=document.activeElement,p.shiftKey?u.focusFirst():u.focusLast();return}else return;p.stopPropagation(),p.preventDefault()}},c=d.useRef(null),h=p=>{!p.currentTarget.contains(p.relatedTarget)&&!c.current&&(c.current=p.target)},f=p=>{var m;if(c.current&&!p.currentTarget.contains(p.relatedTarget)&&(!((m=t.current)===null||m===void 0)&&m.contains(p.target))){var b;(b=c.current)===null||b===void 0||b.focus(),c.current=null}};return{toolbarProps:{...Ke(e,{labelable:!0}),role:o?"group":"toolbar","aria-orientation":i,"aria-label":n,"aria-labelledby":n==null?r:void 0,onKeyDownCapture:o?void 0:g,onFocusCapture:o?void 0:f,onBlurCapture:o?void 0:h}}}function Z5(e,t,n){let{isDisabled:r}=e,{toolbarProps:i}=X5(e,n);return{groupProps:{...i,role:t.selectionMode==="single"?"radiogroup":i.role,"aria-disabled":r}}}function J5(e,t,n){let r={isSelected:t.selectedKeys.has(e.id),setSelected(l){t.setSelected(e.id,l)},toggle(){t.toggleKey(e.id)}},{isPressed:i,isSelected:o,isDisabled:a,buttonProps:s}=C0({...e,id:void 0,isDisabled:e.isDisabled||t.isDisabled},r,n);return t.selectionMode==="single"&&(s.role="radio",s["aria-checked"]=r.isSelected,delete s["aria-pressed"]),{isPressed:i,isSelected:o,isDisabled:a,buttonProps:s}}const k0=7e3;let wt=null;function rc(e,t="assertive",n=k0){wt?wt.announce(e,t,n):(wt=new ey,(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u")?wt.announce(e,t,n):setTimeout(()=>{wt!=null&&wt.isAttached()&&(wt==null||wt.announce(e,t,n))},100))}class ey{isAttached(){var t;return(t=this.node)===null||t===void 0?void 0:t.isConnected}createLog(t){let n=document.createElement("div");return n.setAttribute("role","log"),n.setAttribute("aria-live",t),n.setAttribute("aria-relevant","additions"),n}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(t,n="assertive",r=k0){var i,o;if(!this.node)return;let a=document.createElement("div");typeof t=="object"?(a.setAttribute("role","img"),a.setAttribute("aria-labelledby",t["aria-labelledby"])):a.textContent=t,n==="assertive"?(i=this.assertiveLog)===null||i===void 0||i.appendChild(a):(o=this.politeLog)===null||o===void 0||o.appendChild(a),t!==""&&setTimeout(()=>{a.remove()},r)}clear(t){this.node&&((!t||t==="assertive")&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!t||t==="polite")&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,typeof document<"u"&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}function ty(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":i,labelElementType:o="label"}=e;t=Qe(t);let a=Qe(),s={};n&&(r=r?`${a} ${r}`:a,s={id:a,htmlFor:o==="label"?t:void 0});let l=qf({id:t,"aria-label":i,"aria-labelledby":r});return{labelProps:s,fieldProps:l}}function ny(e={}){let{isReadOnly:t}=e,[n,r]=Fi(e.isSelected,e.defaultSelected||!1,e.onChange);function i(a){t||r(a)}function o(){t||r(!n)}return{isSelected:n,setSelected:i,toggle:o}}function ry(e){let{selectionMode:t="single",disallowEmptySelection:n,isDisabled:r=!1}=e,[i,o]=Fi(d.useMemo(()=>e.selectedKeys?new Set(e.selectedKeys):void 0,[e.selectedKeys]),d.useMemo(()=>e.defaultSelectedKeys?new Set(e.defaultSelectedKeys):new Set,[e.defaultSelectedKeys]),e.onSelectionChange);return{selectionMode:t,isDisabled:r,selectedKeys:i,setSelectedKeys:o,toggleKey(a){let s;t==="multiple"?(s=new Set(i),s.has(a)&&(!n||s.size>1)?s.delete(a):s.add(a)):s=new Set(i.has(a)&&!n?[]:[a]),o(s)},setSelected(a,s){s!==i.has(a)&&this.toggleKey(a)}}}const ic={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function iy(e={}){let{style:t,isFocusable:n}=e,[r,i]=d.useState(!1),{focusWithinProps:o}=Nl({isDisabled:!n,onFocusWithinChange:s=>i(s)}),a=d.useMemo(()=>r?t:t?{...ic,...t}:ic,[r]);return{visuallyHiddenProps:{...o,style:a}}}function oy(e){let{children:t,elementType:n="div",isFocusable:r,style:i,...o}=e,{visuallyHiddenProps:a}=iy(e);return d.createElement(n,ae(o,a),t)}const Rt={top:"top",bottom:"top",left:"left",right:"left"},Fo={top:"bottom",bottom:"top",left:"right",right:"left"},ay={top:"left",left:"top"},Vs={top:"height",left:"width"},O0={width:"totalWidth",height:"totalHeight"},Gi={};let we=typeof document<"u"?window.visualViewport:null;function oc(e){let t=0,n=0,r=0,i=0,o=0,a=0,s={};var l;let u=((l=we==null?void 0:we.scale)!==null&&l!==void 0?l:1)>1;if(e.tagName==="BODY"){let p=document.documentElement;r=p.clientWidth,i=p.clientHeight;var g;t=(g=we==null?void 0:we.width)!==null&&g!==void 0?g:r;var c;n=(c=we==null?void 0:we.height)!==null&&c!==void 0?c:i,s.top=p.scrollTop||e.scrollTop,s.left=p.scrollLeft||e.scrollLeft,we&&(o=we.offsetTop,a=we.offsetLeft)}else({width:t,height:n,top:o,left:a}=ur(e)),s.top=e.scrollTop,s.left=e.scrollLeft,r=t,i=n;if(zf()&&(e.tagName==="BODY"||e.tagName==="HTML")&&u){s.top=0,s.left=0;var h;o=(h=we==null?void 0:we.pageTop)!==null&&h!==void 0?h:0;var f;a=(f=we==null?void 0:we.pageLeft)!==null&&f!==void 0?f:0}return{width:t,height:n,totalWidth:r,totalHeight:i,scroll:s,top:o,left:a}}function sy(e){return{top:e.scrollTop,left:e.scrollLeft,width:e.scrollWidth,height:e.scrollHeight}}function ac(e,t,n,r,i,o,a){var s;let l=(s=i.scroll[e])!==null&&s!==void 0?s:0,u=r[Vs[e]],g=r.scroll[Rt[e]]+o,c=u+r.scroll[Rt[e]]-o,h=t-l+a[e]-r[Rt[e]],f=t-l+n+a[e]-r[Rt[e]];return h<g?g-h:f>c?Math.max(c-f,g-h):0}function ly(e){let t=window.getComputedStyle(e);return{top:parseInt(t.marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0}}function sc(e){if(Gi[e])return Gi[e];let[t,n]=e.split(" "),r=Rt[t]||"right",i=ay[r];Rt[n]||(n="center");let o=Vs[r],a=Vs[i];return Gi[e]={placement:t,crossPlacement:n,axis:r,crossAxis:i,size:o,crossSize:a},Gi[e]}function Aa(e,t,n,r,i,o,a,s,l,u){let{placement:g,crossPlacement:c,axis:h,crossAxis:f,size:p,crossSize:m}=r,b={};var v;b[f]=(v=e[f])!==null&&v!==void 0?v:0;var w,x,k,S;c==="center"?b[f]+=(((w=e[m])!==null&&w!==void 0?w:0)-((x=n[m])!==null&&x!==void 0?x:0))/2:c!==f&&(b[f]+=((k=e[m])!==null&&k!==void 0?k:0)-((S=n[m])!==null&&S!==void 0?S:0)),b[f]+=o;const R=e[f]-n[m]+l+u,P=e[f]+e[m]-l-u;if(b[f]=fi(b[f],R,P),g===h){const I=s?a[p]:t[O0[p]];b[Fo[h]]=Math.floor(I-e[h]+i)}else b[h]=Math.floor(e[h]+e[p]+i);return b}function uy(e,t,n,r,i,o,a,s){const l=r?n.height:t[O0.height];var u;let g=e.top!=null?n.top+e.top:n.top+(l-((u=e.bottom)!==null&&u!==void 0?u:0)-a);var c,h,f,p,m,b;let v=s!=="top"?Math.max(0,t.height+t.top+((c=t.scroll.top)!==null&&c!==void 0?c:0)-g-(((h=i.top)!==null&&h!==void 0?h:0)+((f=i.bottom)!==null&&f!==void 0?f:0)+o)):Math.max(0,g+a-(t.top+((p=t.scroll.top)!==null&&p!==void 0?p:0))-(((m=i.top)!==null&&m!==void 0?m:0)+((b=i.bottom)!==null&&b!==void 0?b:0)+o));return Math.min(t.height-o*2,v)}function lc(e,t,n,r,i,o){let{placement:a,axis:s,size:l}=o;var u,g;if(a===s)return Math.max(0,n[s]-e[s]-((u=e.scroll[s])!==null&&u!==void 0?u:0)+t[s]-((g=r[s])!==null&&g!==void 0?g:0)-r[Fo[s]]-i);var c;return Math.max(0,e[l]+e[s]+e.scroll[s]-t[s]-n[s]-n[l]-((c=r[s])!==null&&c!==void 0?c:0)-r[Fo[s]]-i)}function cy(e,t,n,r,i,o,a,s,l,u,g,c,h,f,p,m){let b=sc(e),{size:v,crossAxis:w,crossSize:x,placement:k,crossPlacement:S}=b,R=Aa(t,s,n,b,g,c,u,h,p,m),P=g,I=lc(s,u,t,i,o+g,b);if(a&&r[v]>I){let q=sc(`${Fo[k]} ${S}`),ue=Aa(t,s,n,q,g,c,u,h,p,m);lc(s,u,t,i,o+g,q)>I&&(b=q,R=ue,P=g)}let D="bottom";b.axis==="top"?b.placement==="top"?D="top":b.placement==="bottom"&&(D="bottom"):b.crossAxis==="top"&&(b.crossPlacement==="top"?D="bottom":b.crossPlacement==="bottom"&&(D="top"));let L=ac(w,R[w],n[x],s,l,o,u);R[w]+=L;let E=uy(R,s,u,h,i,o,n.height,D);f&&f<E&&(E=f),n.height=Math.min(n.height,E),R=Aa(t,s,n,b,P,c,u,h,p,m),L=ac(w,R[w],n[x],s,l,o,u),R[w]+=L;let N={},_=t[w]+.5*t[x]-R[w]-i[Rt[w]];const T=p/2+m;var A,M,F,O;const V=Rt[w]==="left"?((A=i.left)!==null&&A!==void 0?A:0)+((M=i.right)!==null&&M!==void 0?M:0):((F=i.top)!==null&&F!==void 0?F:0)+((O=i.bottom)!==null&&O!==void 0?O:0),X=n[x]-V-p/2-m,j=t[w]+p/2-(R[w]+i[Rt[w]]),K=t[w]+t[x]-p/2-(R[w]+i[Rt[w]]),H=fi(_,j,K);return N[w]=fi(H,T,X),{position:R,maxHeight:E,arrowOffsetLeft:N.left,arrowOffsetTop:N.top,placement:b.placement}}function dy(e){let{placement:t,targetNode:n,overlayNode:r,scrollNode:i,padding:o,shouldFlip:a,boundaryElement:s,offset:l,crossOffset:u,maxHeight:g,arrowSize:c=0,arrowBoundaryOffset:h=0}=e,f=r instanceof HTMLElement?fy(r):document.documentElement,p=f===document.documentElement;const m=window.getComputedStyle(f).position;let b=!!m&&m!=="static",v=p?ur(n):uc(n,f);if(!p){let{marginTop:N,marginLeft:_}=window.getComputedStyle(n);v.top+=parseInt(N,10)||0,v.left+=parseInt(_,10)||0}let w=ur(r),x=ly(r);var k,S;w.width+=((k=x.left)!==null&&k!==void 0?k:0)+((S=x.right)!==null&&S!==void 0?S:0);var R,P;w.height+=((R=x.top)!==null&&R!==void 0?R:0)+((P=x.bottom)!==null&&P!==void 0?P:0);let I=sy(i),D=oc(s),L=oc(f),E=s.tagName==="BODY"?ur(f):uc(f,s);return f.tagName==="HTML"&&s.tagName==="BODY"&&(L.scroll.top=0,L.scroll.left=0),cy(t,v,w,I,x,o,a,D,L,E,l,u,b,g,c,h)}function ur(e){let{top:t,left:n,width:r,height:i}=e.getBoundingClientRect(),{scrollTop:o,scrollLeft:a,clientTop:s,clientLeft:l}=document.documentElement;return{top:t+o-s,left:n+a-l,width:r,height:i}}function uc(e,t){let n=window.getComputedStyle(e),r;if(n.position==="fixed"){let{top:i,left:o,width:a,height:s}=e.getBoundingClientRect();r={top:i,left:o,width:a,height:s}}else{r=ur(e);let i=ur(t),o=window.getComputedStyle(t);i.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,i.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=i.top,r.left-=i.left}return r.top-=parseInt(n.marginTop,10)||0,r.left-=parseInt(n.marginLeft,10)||0,r}function fy(e){let t=e.offsetParent;if(t&&t===document.body&&window.getComputedStyle(t).position==="static"&&!cc(t)&&(t=document.documentElement),t==null)for(t=e.parentElement;t&&!cc(t);)t=t.parentElement;return t||document.documentElement}function cc(e){let t=window.getComputedStyle(e);return t.transform!=="none"||/transform|perspective/.test(t.willChange)||t.filter!=="none"||t.contain==="paint"||"backdropFilter"in t&&t.backdropFilter!=="none"||"WebkitBackdropFilter"in t&&t.WebkitBackdropFilter!=="none"}const D0=new WeakMap;function hy(e){let{triggerRef:t,isOpen:n,onClose:r}=e;d.useEffect(()=>{if(!n||r===null)return;let i=o=>{let a=o.target;if(!t.current||a instanceof Node&&!a.contains(t.current)||o.target instanceof HTMLInputElement||o.target instanceof HTMLTextAreaElement)return;let s=r||D0.get(t.current);s&&s()};return window.addEventListener("scroll",i,!0),()=>{window.removeEventListener("scroll",i,!0)}},[n,r,t])}let pe=typeof document<"u"?window.visualViewport:null;function T0(e){let{direction:t}=Bn(),{arrowSize:n=0,targetRef:r,overlayRef:i,scrollRef:o=i,placement:a="bottom",containerPadding:s=12,shouldFlip:l=!0,boundaryElement:u=typeof document<"u"?document.body:null,offset:g=0,crossOffset:c=0,shouldUpdatePosition:h=!0,isOpen:f=!0,onClose:p,maxHeight:m,arrowBoundaryOffset:b=0}=e,[v,w]=d.useState(null),x=[h,a,i.current,r.current,o.current,s,l,u,g,c,f,t,m,b,n],k=d.useRef(pe==null?void 0:pe.scale);d.useEffect(()=>{f&&(k.current=pe==null?void 0:pe.scale)},[f]);let S=d.useCallback(()=>{if(h===!1||!f||!i.current||!r.current||!u||(pe==null?void 0:pe.scale)!==k.current)return;let L=null;if(o.current&&o.current.contains(document.activeElement)){var E;let O=(E=document.activeElement)===null||E===void 0?void 0:E.getBoundingClientRect(),V=o.current.getBoundingClientRect();var N;if(L={type:"top",offset:((N=O==null?void 0:O.top)!==null&&N!==void 0?N:0)-V.top},L.offset>V.height/2){L.type="bottom";var _;L.offset=((_=O==null?void 0:O.bottom)!==null&&_!==void 0?_:0)-V.bottom}}let T=i.current;if(!m&&i.current){var A;T.style.top="0px",T.style.bottom="";var M;T.style.maxHeight=((M=(A=window.visualViewport)===null||A===void 0?void 0:A.height)!==null&&M!==void 0?M:window.innerHeight)+"px"}let F=dy({placement:py(a,t),overlayNode:i.current,targetNode:r.current,scrollNode:o.current||i.current,padding:s,shouldFlip:l,boundaryElement:u,offset:g,crossOffset:c,maxHeight:m,arrowSize:n,arrowBoundaryOffset:b});if(F.position){if(T.style.top="",T.style.bottom="",T.style.left="",T.style.right="",Object.keys(F.position).forEach(O=>T.style[O]=F.position[O]+"px"),T.style.maxHeight=F.maxHeight!=null?F.maxHeight+"px":"",L&&document.activeElement&&o.current){let O=document.activeElement.getBoundingClientRect(),V=o.current.getBoundingClientRect(),X=O[L.type]-V[L.type];o.current.scrollTop+=X-L.offset}w(F)}},x);te(S,x),gy(S),$o({ref:i,onResize:S}),$o({ref:r,onResize:S});let R=d.useRef(!1);te(()=>{let L,E=()=>{R.current=!0,clearTimeout(L),L=setTimeout(()=>{R.current=!1},500),S()},N=()=>{R.current&&E()};return pe==null||pe.addEventListener("resize",E),pe==null||pe.addEventListener("scroll",N),()=>{pe==null||pe.removeEventListener("resize",E),pe==null||pe.removeEventListener("scroll",N)}},[S]);let P=d.useCallback(()=>{R.current||p==null||p()},[p,R]);hy({triggerRef:r,isOpen:f,onClose:p&&P});var I,D;return{overlayProps:{style:{position:"absolute",zIndex:1e5,...v==null?void 0:v.position,maxHeight:(I=v==null?void 0:v.maxHeight)!==null&&I!==void 0?I:"100vh"}},placement:(D=v==null?void 0:v.placement)!==null&&D!==void 0?D:null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:v==null?void 0:v.arrowOffsetLeft,top:v==null?void 0:v.arrowOffsetTop}},updatePosition:S}}function gy(e){te(()=>(window.addEventListener("resize",e,!1),()=>{window.removeEventListener("resize",e,!1)}),[e])}function py(e,t){return t==="rtl"?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")}const xt=[];function F0(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:i,isDismissable:o=!1,isKeyboardDismissDisabled:a=!1,shouldCloseOnInteractOutside:s}=e;d.useEffect(()=>{if(i&&!xt.includes(t))return xt.push(t),()=>{let p=xt.indexOf(t);p>=0&&xt.splice(p,1)}},[i,t]);let l=()=>{xt[xt.length-1]===t&&n&&n()},u=p=>{(!s||s(p.target))&&xt[xt.length-1]===t&&(p.stopPropagation(),p.preventDefault())},g=p=>{(!s||s(p.target))&&(xt[xt.length-1]===t&&(p.stopPropagation(),p.preventDefault()),l())},c=p=>{p.key==="Escape"&&!a&&!p.nativeEvent.isComposing&&(p.stopPropagation(),p.preventDefault(),l())};J2({ref:t,onInteractOutside:o&&i?g:void 0,onInteractOutsideStart:u});let{focusWithinProps:h}=Nl({isDisabled:!r,onBlurWithin:p=>{!p.relatedTarget||V5(p.relatedTarget)||(!s||s(p.relatedTarget))&&(n==null||n())}}),f=p=>{p.target===p.currentTarget&&p.preventDefault()};return{overlayProps:{onKeyDown:c,...h},underlayProps:{onPointerDown:f}}}function L0(e,t,n){let{type:r}=e,{isOpen:i}=t;d.useEffect(()=>{n&&n.current&&D0.set(n.current,t.close)});let o;r==="menu"?o=!0:r==="listbox"&&(o="listbox");let a=Qe();return{triggerProps:{"aria-haspopup":o,"aria-expanded":i,"aria-controls":i?a:void 0,onPress:t.toggle},overlayProps:{id:a}}}const _a=typeof document<"u"&&window.visualViewport,my=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Qi=0,ja;function I0(e={}){let{isDisabled:t}=e;te(()=>{if(!t)return Qi++,Qi===1&&(aa()?ja=vy():ja=by()),()=>{Qi--,Qi===0&&ja()}},[t])}function by(){return Rr(nr(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),nr(document.documentElement,"overflow","hidden"))}function vy(){let e,t,n=u=>{e=Gf(u.target,!0),!(e===document.documentElement&&e===document.body)&&e instanceof HTMLElement&&window.getComputedStyle(e).overscrollBehavior==="auto"&&(t=nr(e,"overscrollBehavior","contain"))},r=u=>{if(!e||e===document.documentElement||e===document.body){u.preventDefault();return}e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&u.preventDefault()},i=()=>{t&&t()},o=u=>{let g=u.target;yy(g)&&(s(),g.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{g.style.transform="",_a&&(_a.height<window.innerHeight?requestAnimationFrame(()=>{dc(g)}):_a.addEventListener("resize",()=>dc(g),{once:!0}))}))},a=null,s=()=>{if(a)return;let u=()=>{window.scrollTo(0,0)},g=window.pageXOffset,c=window.pageYOffset;a=Rr(Vr(window,"scroll",u),nr(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`),nr(document.documentElement,"overflow","hidden"),nr(document.body,"marginTop",`-${c}px`),()=>{window.scrollTo(g,c)}),window.scrollTo(0,0)},l=Rr(Vr(document,"touchstart",n,{passive:!1,capture:!0}),Vr(document,"touchmove",r,{passive:!1,capture:!0}),Vr(document,"touchend",i,{passive:!1,capture:!0}),Vr(document,"focus",o,!0));return()=>{t==null||t(),a==null||a(),l()}}function nr(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Vr(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function dc(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let r=Gf(n);if(r!==document.documentElement&&r!==document.body&&r!==n){let i=r.getBoundingClientRect().top,o=n.getBoundingClientRect().top;o>i+n.clientHeight&&(r.scrollTop+=o-i)}n=r.parentElement}}function yy(e){return e instanceof HTMLInputElement&&!my.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}const wy=d.createContext({});function N0(){var e;return(e=d.useContext(wy))!==null&&e!==void 0?e:{}}const zs=d.createContext(null);function xy(e){let{children:t}=e,n=d.useContext(zs),[r,i]=d.useState(0),o=d.useMemo(()=>({parent:n,modalCount:r,addModal(){i(a=>a+1),n&&n.addModal()},removeModal(){i(a=>a-1),n&&n.removeModal()}}),[n,r]);return d.createElement(zs.Provider,{value:o},t)}function Cy(){let e=d.useContext(zs);return{modalProviderProps:{"aria-hidden":e&&e.modalCount>0?!0:void 0}}}function Sy(e){let{modalProviderProps:t}=Cy();return d.createElement("div",{"data-overlay-container":!0,...e,...t})}function $y(e){return d.createElement(xy,null,d.createElement(Sy,e))}function Ey(e){let t=pn(),{portalContainer:n=t?null:document.body,...r}=e,{getContainer:i}=N0();if(!e.portalContainer&&i&&(n=i()),d.useEffect(()=>{if(n!=null&&n.closest("[data-overlay-container]"))throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.")},[n]),!n)return null;let o=d.createElement($y,r);return Lr.createPortal(o,n)}var A0={};A0={dismiss:"تجاهل"};var _0={};_0={dismiss:"Отхвърляне"};var j0={};j0={dismiss:"Odstranit"};var K0={};K0={dismiss:"Luk"};var B0={};B0={dismiss:"Schließen"};var H0={};H0={dismiss:"Απόρριψη"};var V0={};V0={dismiss:"Dismiss"};var z0={};z0={dismiss:"Descartar"};var U0={};U0={dismiss:"Lõpeta"};var W0={};W0={dismiss:"Hylkää"};var q0={};q0={dismiss:"Rejeter"};var G0={};G0={dismiss:"התעלם"};var Q0={};Q0={dismiss:"Odbaci"};var Y0={};Y0={dismiss:"Elutasítás"};var X0={};X0={dismiss:"Ignora"};var Z0={};Z0={dismiss:"閉じる"};var J0={};J0={dismiss:"무시"};var eh={};eh={dismiss:"Atmesti"};var th={};th={dismiss:"Nerādīt"};var nh={};nh={dismiss:"Lukk"};var rh={};rh={dismiss:"Negeren"};var ih={};ih={dismiss:"Zignoruj"};var oh={};oh={dismiss:"Descartar"};var ah={};ah={dismiss:"Dispensar"};var sh={};sh={dismiss:"Revocare"};var lh={};lh={dismiss:"Пропустить"};var uh={};uh={dismiss:"Zrušiť"};var ch={};ch={dismiss:"Opusti"};var dh={};dh={dismiss:"Odbaci"};var fh={};fh={dismiss:"Avvisa"};var hh={};hh={dismiss:"Kapat"};var gh={};gh={dismiss:"Скасувати"};var ph={};ph={dismiss:"取消"};var mh={};mh={dismiss:"關閉"};var bh={};bh={"ar-AE":A0,"bg-BG":_0,"cs-CZ":j0,"da-DK":K0,"de-DE":B0,"el-GR":H0,"en-US":V0,"es-ES":z0,"et-EE":U0,"fi-FI":W0,"fr-FR":q0,"he-IL":G0,"hr-HR":Q0,"hu-HU":Y0,"it-IT":X0,"ja-JP":Z0,"ko-KR":J0,"lt-LT":eh,"lv-LV":th,"nb-NO":nh,"nl-NL":rh,"pl-PL":ih,"pt-BR":oh,"pt-PT":ah,"ro-RO":sh,"ru-RU":lh,"sk-SK":uh,"sl-SI":ch,"sr-SP":dh,"sv-SE":fh,"tr-TR":hh,"uk-UA":gh,"zh-CN":ph,"zh-TW":mh};function Py(e){return e&&e.__esModule?e.default:e}function Us(e){let{onDismiss:t,...n}=e,r=y0(Py(bh),"@react-aria/overlays"),i=qf(n,r.format("dismiss")),o=()=>{t&&t()};return d.createElement(oy,null,d.createElement("button",{...i,tabIndex:-1,onClick:o,style:{width:1,height:1}}))}let zr=new WeakMap,Le=[];function vh(e,t=document.body){let n=new Set(e),r=new Set,i=l=>{for(let h of l.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))n.add(h);let u=h=>{if(n.has(h)||h.parentElement&&r.has(h.parentElement)&&h.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let f of n)if(h.contains(f))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},g=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:u}),c=u(l);if(c===NodeFilter.FILTER_ACCEPT&&o(l),c!==NodeFilter.FILTER_REJECT){let h=g.nextNode();for(;h!=null;)o(h),h=g.nextNode()}},o=l=>{var u;let g=(u=zr.get(l))!==null&&u!==void 0?u:0;l.getAttribute("aria-hidden")==="true"&&g===0||(g===0&&l.setAttribute("aria-hidden","true"),r.add(l),zr.set(l,g+1))};Le.length&&Le[Le.length-1].disconnect(),i(t);let a=new MutationObserver(l=>{for(let u of l)if(!(u.type!=="childList"||u.addedNodes.length===0)&&![...n,...r].some(g=>g.contains(u.target))){for(let g of u.removedNodes)g instanceof Element&&(n.delete(g),r.delete(g));for(let g of u.addedNodes)(g instanceof HTMLElement||g instanceof SVGElement)&&(g.dataset.liveAnnouncer==="true"||g.dataset.reactAriaTopLayer==="true")?n.add(g):g instanceof Element&&i(g)}});a.observe(t,{childList:!0,subtree:!0});let s={visibleNodes:n,hiddenNodes:r,observe(){a.observe(t,{childList:!0,subtree:!0})},disconnect(){a.disconnect()}};return Le.push(s),()=>{a.disconnect();for(let l of r){let u=zr.get(l);u!=null&&(u===1?(l.removeAttribute("aria-hidden"),zr.delete(l)):zr.set(l,u-1))}s===Le[Le.length-1]?(Le.pop(),Le.length&&Le[Le.length-1].observe()):Le.splice(Le.indexOf(s),1)}}function Ry(e){let t=Le[Le.length-1];if(t&&!t.visibleNodes.has(e))return t.visibleNodes.add(e),()=>{t.visibleNodes.delete(e)}}function My(e,t){let{triggerRef:n,popoverRef:r,groupRef:i,isNonModal:o,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s,...l}=e,u=l.trigger==="SubmenuTrigger",{overlayProps:g,underlayProps:c}=F0({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||u,isKeyboardDismissDisabled:a,shouldCloseOnInteractOutside:s},i??r),{overlayProps:h,arrowProps:f,placement:p}=T0({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!u?t.close:null});return I0({isDisabled:o||!t.isOpen}),te(()=>{if(t.isOpen&&r.current){var m,b;return o?Ry((m=i==null?void 0:i.current)!==null&&m!==void 0?m:r.current):vh([(b=i==null?void 0:i.current)!==null&&b!==void 0?b:r.current])}},[o,t.isOpen,r,i]),{popoverProps:ae(g,h),arrowProps:f,underlayProps:c,placement:p}}const yh=d.createContext(null);function Ws(e){let t=pn(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[i,o]=d.useState(!1),a=d.useMemo(()=>({contain:i,setContain:o}),[i,o]),{getContainer:s}=N0();if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=d.createElement($0,{restoreFocus:!0,contain:(e.shouldContainFocus||i)&&!r},l)),l=d.createElement(yh.Provider,{value:a},d.createElement(Y2,null,l)),Lr.createPortal(l,n)}function wh(){let e=d.useContext(yh),t=e==null?void 0:e.setContain;te(()=>{t==null||t(!0)},[t])}function ky(e,t,n){let{overlayProps:r,underlayProps:i}=F0({...e,isOpen:t.isOpen,onClose:t.close},n);return I0({isDisabled:!t.isOpen}),wh(),d.useEffect(()=>{if(t.isOpen&&n.current)return vh([n.current])},[t.isOpen,n]),{modalProps:ae(r),underlayProps:i}}function qs(e){return c2()?e.altKey:e.ctrlKey}function po(e,t){var n,r;let i=`[data-key="${CSS.escape(String(t))}"]`,o=(n=e.current)===null||n===void 0?void 0:n.dataset.collection;return o&&(i=`[data-collection="${CSS.escape(o)}"]${i}`),(r=e.current)===null||r===void 0?void 0:r.querySelector(i)}const xh=new WeakMap;function Oy(e){let t=Qe();return xh.set(e,t),t}function Dy(e){return xh.get(e)}const Ty=1e3;function Fy(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=d.useRef({search:"",timeout:void 0}).current,o=a=>{let s=Ly(a.key);if(!(!s||a.ctrlKey||a.metaKey||!a.currentTarget.contains(a.target))){if(s===" "&&i.search.trim().length>0&&(a.preventDefault(),"continuePropagation"in a||a.stopPropagation()),i.search+=s,t.getKeyForSearch!=null){let l=t.getKeyForSearch(i.search,n.focusedKey);l==null&&(l=t.getKeyForSearch(i.search)),l!=null&&(n.setFocusedKey(l),r&&r(l))}clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Ty)}};return{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?o:void 0}}}function Ly(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Iy(e){let{selectionManager:t,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:a=!1,disallowSelectAll:s=!1,escapeKeyBehavior:l="clearSelection",selectOnFocus:u=t.selectionBehavior==="replace",disallowTypeAhead:g=!1,shouldUseVirtualFocus:c,allowsTabNavigation:h=!1,isVirtualized:f,scrollRef:p=r,linkBehavior:m="action"}=e,{direction:b}=Bn(),v=sa(),w=F=>{var O;if(F.altKey&&F.key==="Tab"&&F.preventDefault(),!(!((O=r.current)===null||O===void 0)&&O.contains(F.target)))return;const V=(W,Je)=>{if(W!=null){if(t.isLink(W)&&m==="selection"&&u&&!qs(F)){Lr.flushSync(()=>{t.setFocusedKey(W,Je)});let Be=po(r,W),ne=t.getItemProps(W);Be&&v.open(Be,F,ne.href,ne.routerOptions);return}if(t.setFocusedKey(W,Je),t.isLink(W)&&m==="override")return;F.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(W):u&&!qs(F)&&t.replaceSelection(W)}};switch(F.key){case"ArrowDown":if(n.getKeyBelow){var X,j,K;let W=t.focusedKey!=null?(X=n.getKeyBelow)===null||X===void 0?void 0:X.call(n,t.focusedKey):(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n);W==null&&o&&(W=(K=n.getFirstKey)===null||K===void 0?void 0:K.call(n,t.focusedKey)),W!=null&&(F.preventDefault(),V(W))}break;case"ArrowUp":if(n.getKeyAbove){var H,q,ue;let W=t.focusedKey!=null?(H=n.getKeyAbove)===null||H===void 0?void 0:H.call(n,t.focusedKey):(q=n.getLastKey)===null||q===void 0?void 0:q.call(n);W==null&&o&&(W=(ue=n.getLastKey)===null||ue===void 0?void 0:ue.call(n,t.focusedKey)),W!=null&&(F.preventDefault(),V(W))}break;case"ArrowLeft":if(n.getKeyLeftOf){var ee,Xe,Ze;let W=t.focusedKey!=null?(ee=n.getKeyLeftOf)===null||ee===void 0?void 0:ee.call(n,t.focusedKey):null;W==null&&o&&(W=b==="rtl"?(Xe=n.getFirstKey)===null||Xe===void 0?void 0:Xe.call(n,t.focusedKey):(Ze=n.getLastKey)===null||Ze===void 0?void 0:Ze.call(n,t.focusedKey)),W!=null&&(F.preventDefault(),V(W,b==="rtl"?"first":"last"))}break;case"ArrowRight":if(n.getKeyRightOf){var st,lt,bn;let W=t.focusedKey!=null?(st=n.getKeyRightOf)===null||st===void 0?void 0:st.call(n,t.focusedKey):null;W==null&&o&&(W=b==="rtl"?(lt=n.getLastKey)===null||lt===void 0?void 0:lt.call(n,t.focusedKey):(bn=n.getFirstKey)===null||bn===void 0?void 0:bn.call(n,t.focusedKey)),W!=null&&(F.preventDefault(),V(W,b==="rtl"?"last":"first"))}break;case"Home":if(n.getFirstKey){if(t.focusedKey===null&&F.shiftKey)return;F.preventDefault();let W=n.getFirstKey(t.focusedKey,Zn(F));t.setFocusedKey(W),W!=null&&(Zn(F)&&F.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(W):u&&t.replaceSelection(W))}break;case"End":if(n.getLastKey){if(t.focusedKey===null&&F.shiftKey)return;F.preventDefault();let W=n.getLastKey(t.focusedKey,Zn(F));t.setFocusedKey(W),W!=null&&(Zn(F)&&F.shiftKey&&t.selectionMode==="multiple"?t.extendSelection(W):u&&t.replaceSelection(W))}break;case"PageDown":if(n.getKeyPageBelow&&t.focusedKey!=null){let W=n.getKeyPageBelow(t.focusedKey);W!=null&&(F.preventDefault(),V(W))}break;case"PageUp":if(n.getKeyPageAbove&&t.focusedKey!=null){let W=n.getKeyPageAbove(t.focusedKey);W!=null&&(F.preventDefault(),V(W))}break;case"a":Zn(F)&&t.selectionMode==="multiple"&&s!==!0&&(F.preventDefault(),t.selectAll());break;case"Escape":l==="clearSelection"&&!a&&t.selectedKeys.size!==0&&(F.stopPropagation(),F.preventDefault(),t.clearSelection());break;case"Tab":if(!h){if(F.shiftKey)r.current.focus();else{let W=qe(r.current,{tabbable:!0}),Je,Be;do Be=W.lastChild(),Be&&(Je=Be);while(Be);Je&&!Je.contains(document.activeElement)&&vt(Je)}break}}},x=d.useRef({top:0,left:0});Ui(p,"scroll",f?void 0:()=>{var F,O,V,X;x.current={top:(V=(F=p.current)===null||F===void 0?void 0:F.scrollTop)!==null&&V!==void 0?V:0,left:(X=(O=p.current)===null||O===void 0?void 0:O.scrollLeft)!==null&&X!==void 0?X:0}});let k=F=>{if(t.isFocused){F.currentTarget.contains(F.target)||t.setFocused(!1);return}if(F.currentTarget.contains(F.target)){if(t.setFocused(!0),t.focusedKey==null){var O,V;let K=q=>{q!=null&&(t.setFocusedKey(q),u&&!t.isSelected(q)&&t.replaceSelection(q))},H=F.relatedTarget;var X,j;H&&F.currentTarget.compareDocumentPosition(H)&Node.DOCUMENT_POSITION_FOLLOWING?K((X=t.lastSelectedKey)!==null&&X!==void 0?X:(O=n.getLastKey)===null||O===void 0?void 0:O.call(n)):K((j=t.firstSelectedKey)!==null&&j!==void 0?j:(V=n.getFirstKey)===null||V===void 0?void 0:V.call(n))}else!f&&p.current&&(p.current.scrollTop=x.current.top,p.current.scrollLeft=x.current.left);if(t.focusedKey!=null&&p.current){let K=po(r,t.focusedKey);K instanceof HTMLElement&&(!K.contains(document.activeElement)&&!c&&vt(K),pi()==="keyboard"&&_u(K,{containingElement:r.current}))}}},S=F=>{F.currentTarget.contains(F.relatedTarget)||t.setFocused(!1)},R=d.useRef(!1);Ui(r,$2,c?F=>{let{detail:O}=F;F.stopPropagation(),t.setFocused(!0),(O==null?void 0:O.focusStrategy)==="first"&&(R.current=!0)}:void 0);let P=Fe(()=>{var F,O;let V=(O=(F=n.getFirstKey)===null||F===void 0?void 0:F.call(n))!==null&&O!==void 0?O:null;V==null?(M0(r.current),t.collection.size>0&&(R.current=!1)):(t.setFocusedKey(V),R.current=!1)});Iu(()=>{R.current&&P()},[t.collection,P]);let I=Fe(()=>{t.collection.size>0&&(R.current=!1)});Iu(()=>{I()},[t.focusedKey,I]),Ui(r,S2,c?F=>{var O;F.stopPropagation(),t.setFocused(!1),!((O=F.detail)===null||O===void 0)&&O.clearFocusKey&&t.setFocusedKey(null)}:void 0);const D=d.useRef(i),L=d.useRef(!1);d.useEffect(()=>{if(D.current){var F,O;let j=null;var V;i==="first"&&(j=(V=(F=n.getFirstKey)===null||F===void 0?void 0:F.call(n))!==null&&V!==void 0?V:null);var X;i==="last"&&(j=(X=(O=n.getLastKey)===null||O===void 0?void 0:O.call(n))!==null&&X!==void 0?X:null);let K=t.selectedKeys;if(K.size){for(let H of K)if(t.canSelectItem(H)){j=H;break}}t.setFocused(!0),t.setFocusedKey(j),j==null&&!c&&r.current&&dn(r.current),t.collection.size>0&&(D.current=!1,L.current=!0)}});let E=d.useRef(t.focusedKey),N=d.useRef(null);d.useEffect(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==E.current||L.current)&&p.current&&r.current){let F=pi(),O=po(r,t.focusedKey);if(!(O instanceof HTMLElement))return;(F==="keyboard"||L.current)&&(N.current&&cancelAnimationFrame(N.current),N.current=requestAnimationFrame(()=>{p.current&&Qf(p.current,O)}),F!=="virtual"&&_u(O,{containingElement:r.current}))}!c&&t.isFocused&&t.focusedKey==null&&E.current!=null&&r.current&&dn(r.current),E.current=t.focusedKey,L.current=!1}),d.useEffect(()=>()=>{N.current&&cancelAnimationFrame(N.current)},[]),Ui(r,"react-aria-focus-scope-restore",F=>{F.preventDefault(),t.setFocused(!0)});let _={onKeyDown:w,onFocus:k,onBlur:S,onMouseDown(F){p.current===F.target&&F.preventDefault()}},{typeSelectProps:T}=Fy({keyboardDelegate:n,selectionManager:t});g||(_=ae(T,_));let A;c||(A=t.focusedKey==null?0:-1);let M=Oy(t.collection);return{collectionProps:ae(_,{tabIndex:A,"data-collection":M})}}function Ny(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:a,focus:s,isDisabled:l,onAction:u,allowsDifferentPressOrigin:g,linkBehavior:c="action"}=e,h=sa();t=Qe(t);let f=O=>{if(O.pointerType==="keyboard"&&qs(O))n.toggleSelection(r);else{if(n.selectionMode==="none")return;if(n.isLink(r)){if(c==="selection"&&i.current){let V=n.getItemProps(r);h.open(i.current,O,V.href,V.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(c==="override"||c==="none")return}n.selectionMode==="single"?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):O&&O.shiftKey?n.extendSelection(r):n.selectionBehavior==="toggle"||O&&(Zn(O)||O.pointerType==="touch"||O.pointerType==="virtual")?n.toggleSelection(r):n.replaceSelection(r)}};d.useEffect(()=>{r===n.focusedKey&&n.isFocused&&(a?M0(i.current):s?s():document.activeElement!==i.current&&i.current&&dn(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,a]),l=l||n.isDisabled(r);let p={};!a&&!l?p={tabIndex:r===n.focusedKey?0:-1,onFocus(O){O.target===i.current&&n.setFocusedKey(r)}}:l&&(p.onMouseDown=O=>{O.preventDefault()});let m=n.isLink(r)&&c==="override",b=n.isLink(r)&&c!=="selection"&&c!=="none",v=!l&&n.canSelectItem(r)&&!m,w=(u||b)&&!l,x=w&&(n.selectionBehavior==="replace"?!v:!v||n.isEmpty),k=w&&v&&n.selectionBehavior==="replace",S=x||k,R=d.useRef(null),P=S&&v,I=d.useRef(!1),D=d.useRef(!1),L=O=>{if(u&&u(),b&&i.current){let V=n.getItemProps(r);h.open(i.current,O,V.href,V.routerOptions)}},E={ref:i};o?(E.onPressStart=O=>{R.current=O.pointerType,I.current=P,O.pointerType==="keyboard"&&(!S||hc())&&f(O)},g?(E.onPressUp=x?void 0:O=>{O.pointerType==="mouse"&&v&&f(O)},E.onPress=x?L:O=>{O.pointerType!=="keyboard"&&O.pointerType!=="mouse"&&v&&f(O)}):E.onPress=O=>{if(x||k&&O.pointerType!=="mouse"){if(O.pointerType==="keyboard"&&!fc())return;L(O)}else O.pointerType!=="keyboard"&&v&&f(O)}):(E.onPressStart=O=>{R.current=O.pointerType,I.current=P,D.current=x,v&&(O.pointerType==="mouse"&&!x||O.pointerType==="keyboard"&&(!w||hc()))&&f(O)},E.onPress=O=>{(O.pointerType==="touch"||O.pointerType==="pen"||O.pointerType==="virtual"||O.pointerType==="keyboard"&&S&&fc()||O.pointerType==="mouse"&&D.current)&&(S?L(O):v&&f(O))}),p["data-collection"]=Dy(n.collection),p["data-key"]=r,E.preventFocusOnPress=a,a&&(E=ae(E,{onPressStart(O){O.pointerType!=="touch"&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(O){O.pointerType==="touch"&&(n.setFocused(!0),n.setFocusedKey(r))}}));let{pressProps:N,isPressed:_}=ca(E),T=k?O=>{R.current==="mouse"&&(O.stopPropagation(),O.preventDefault(),L(O))}:void 0,{longPressProps:A}=g0({isDisabled:!P,onLongPress(O){O.pointerType==="touch"&&(f(O),n.setSelectionBehavior("toggle"))}}),M=O=>{R.current==="touch"&&I.current&&O.preventDefault()},F=n.isLink(r)?O=>{An.isOpening||O.preventDefault()}:void 0;return{itemProps:ae(p,v||x||a&&!l?N:{},P?A:{},{onDoubleClick:T,onDragStartCapture:M,onClick:F,id:t},a?{onMouseDown:O=>O.preventDefault()}:void 0),isPressed:_,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:v,hasAction:S}}function fc(){let e=window.event;return(e==null?void 0:e.key)==="Enter"}function hc(){let e=window.event;return(e==null?void 0:e.key)===" "||(e==null?void 0:e.code)==="Space"}class gc{getItemRect(t){let n=this.ref.current;if(!n)return null;let r=t!=null?po(this.ref,t):null;if(!r)return null;let i=n.getBoundingClientRect(),o=r.getBoundingClientRect();return{x:o.left-i.left+n.scrollLeft,y:o.top-i.top+n.scrollTop,width:o.width,height:o.height}}getContentSize(){let t=this.ref.current;var n,r;return{width:(n=t==null?void 0:t.scrollWidth)!==null&&n!==void 0?n:0,height:(r=t==null?void 0:t.scrollHeight)!==null&&r!==void 0?r:0}}getVisibleRect(){let t=this.ref.current;var n,r,i,o;return{x:(n=t==null?void 0:t.scrollLeft)!==null&&n!==void 0?n:0,y:(r=t==null?void 0:t.scrollTop)!==null&&r!==void 0?r:0,width:(i=t==null?void 0:t.offsetWidth)!==null&&i!==void 0?i:0,height:(o=t==null?void 0:t.offsetHeight)!==null&&o!==void 0?o:0}}constructor(t){this.ref=t}}class Ay{isDisabled(t){var n;return this.disabledBehavior==="all"&&(((n=t.props)===null||n===void 0?void 0:n.isDisabled)||this.disabledKeys.has(t.key))}findNextNonDisabled(t,n){let r=t;for(;r!=null;){let i=this.collection.getItem(r);if((i==null?void 0:i.type)==="item"&&!this.isDisabled(i))return r;r=n(r)}return null}getNextKey(t){let n=t;return n=this.collection.getKeyAfter(n),this.findNextNonDisabled(n,r=>this.collection.getKeyAfter(r))}getPreviousKey(t){let n=t;return n=this.collection.getKeyBefore(n),this.findNextNonDisabled(n,r=>this.collection.getKeyBefore(r))}findKey(t,n,r){let i=t,o=this.layoutDelegate.getItemRect(i);if(!o||i==null)return null;let a=o;do{if(i=n(i),i==null)break;o=this.layoutDelegate.getItemRect(i)}while(o&&r(a,o)&&i!=null);return i}isSameRow(t,n){return t.y===n.y||t.x!==n.x}isSameColumn(t,n){return t.x===n.x||t.y!==n.y}getKeyBelow(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getNextKey(n),this.isSameRow):this.getNextKey(t)}getKeyAbove(t){return this.layout==="grid"&&this.orientation==="vertical"?this.findKey(t,n=>this.getPreviousKey(n),this.isSameRow):this.getPreviousKey(t)}getNextColumn(t,n){return n?this.getPreviousKey(t):this.getNextKey(t)}getKeyRightOf(t){let n=this.direction==="ltr"?"getKeyRightOf":"getKeyLeftOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="rtl"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="rtl"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="rtl"):null}getKeyLeftOf(t){let n=this.direction==="ltr"?"getKeyLeftOf":"getKeyRightOf";return this.layoutDelegate[n]?(t=this.layoutDelegate[n](t),this.findNextNonDisabled(t,r=>this.layoutDelegate[n](r))):this.layout==="grid"?this.orientation==="vertical"?this.getNextColumn(t,this.direction==="ltr"):this.findKey(t,r=>this.getNextColumn(r,this.direction==="ltr"),this.isSameColumn):this.orientation==="horizontal"?this.getNextColumn(t,this.direction==="ltr"):null}getFirstKey(){let t=this.collection.getFirstKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyAfter(n))}getLastKey(){let t=this.collection.getLastKey();return this.findNextNonDisabled(t,n=>this.collection.getKeyBefore(n))}getKeyPageAbove(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!di(n))return this.getFirstKey();let i=t;if(this.orientation==="horizontal"){let o=Math.max(0,r.x+r.width-this.layoutDelegate.getVisibleRect().width);for(;r&&r.x>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.max(0,r.y+r.height-this.layoutDelegate.getVisibleRect().height);for(;r&&r.y>o&&i!=null;)i=this.getKeyAbove(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getFirstKey()}getKeyPageBelow(t){let n=this.ref.current,r=this.layoutDelegate.getItemRect(t);if(!r)return null;if(n&&!di(n))return this.getLastKey();let i=t;if(this.orientation==="horizontal"){let o=Math.min(this.layoutDelegate.getContentSize().width,r.y-r.width+this.layoutDelegate.getVisibleRect().width);for(;r&&r.x<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}else{let o=Math.min(this.layoutDelegate.getContentSize().height,r.y-r.height+this.layoutDelegate.getVisibleRect().height);for(;r&&r.y<o&&i!=null;)i=this.getKeyBelow(i),r=i==null?null:this.layoutDelegate.getItemRect(i)}return i??this.getLastKey()}getKeyForSearch(t,n){if(!this.collator)return null;let r=this.collection,i=n||this.getFirstKey();for(;i!=null;){let o=r.getItem(i);if(!o)return null;let a=o.textValue.slice(0,t.length);if(o.textValue&&this.collator.compare(a,t)===0)return i;i=this.getNextKey(i)}return null}constructor(...t){if(t.length===1){let n=t[0];this.collection=n.collection,this.ref=n.ref,this.collator=n.collator,this.disabledKeys=n.disabledKeys||new Set,this.disabledBehavior=n.disabledBehavior||"all",this.orientation=n.orientation||"vertical",this.direction=n.direction,this.layout=n.layout||"stack",this.layoutDelegate=n.layoutDelegate||new gc(n.ref)}else this.collection=t[0],this.disabledKeys=t[1],this.ref=t[2],this.collator=t[3],this.layout="stack",this.orientation="vertical",this.disabledBehavior="all",this.layoutDelegate=new gc(this.ref);this.layout==="stack"&&this.orientation==="vertical"&&(this.getKeyLeftOf=void 0,this.getKeyRightOf=void 0)}}function _y(e){let{selectionManager:t,collection:n,disabledKeys:r,ref:i,keyboardDelegate:o,layoutDelegate:a}=e,s=_5({usage:"search",sensitivity:"base"}),l=t.disabledBehavior,u=d.useMemo(()=>o||new Ay({collection:n,disabledKeys:r,disabledBehavior:l,ref:i,collator:s,layoutDelegate:a}),[o,a,n,r,i,s,l]),{collectionProps:g}=Iy({...e,ref:i,selectionManager:t,keyboardDelegate:u});return{listProps:g}}class jy{build(t,n){return this.context=n,pc(()=>this.iterateCollection(t))}*iterateCollection(t){let{children:n,items:r}=t;if(d.isValidElement(n)&&n.type===d.Fragment)yield*this.iterateCollection({children:n.props.children,items:r});else if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");let i=0;for(let o of r)yield*this.getFullNode({value:o,index:i},{renderer:n}),i++}else{let i=[];d.Children.forEach(n,a=>{a&&i.push(a)});let o=0;for(let a of i){let s=this.getFullNode({element:a,index:o},{});for(let l of s)o++,yield l}}}getKey(t,n,r,i){if(t.key!=null)return t.key;if(n.type==="cell"&&n.key!=null)return`${i}${n.key}`;let o=n.value;if(o!=null){var a;let s=(a=o.key)!==null&&a!==void 0?a:o.id;if(s==null)throw new Error("No key found for item");return s}return i?`${i}.${n.index}`:`$.${n.index}`}getChildState(t,n){return{renderer:n.renderer||t.renderer}}*getFullNode(t,n,r,i){if(d.isValidElement(t.element)&&t.element.type===d.Fragment){let b=[];d.Children.forEach(t.element.props.children,w=>{b.push(w)});var o;let v=(o=t.index)!==null&&o!==void 0?o:0;for(const w of b)yield*this.getFullNode({element:w,index:v++},n,r,i);return}let a=t.element;if(!a&&t.value&&n&&n.renderer){let b=this.cache.get(t.value);if(b&&(!b.shouldInvalidate||!b.shouldInvalidate(this.context))){b.index=t.index,b.parentKey=i?i.key:null,yield b;return}a=n.renderer(t.value)}if(d.isValidElement(a)){let b=a.type;if(typeof b!="function"&&typeof b.getCollectionNode!="function"){let k=a.type;throw new Error(`Unknown element <${k}> in collection.`)}let v=b.getCollectionNode(a.props,this.context);var s;let w=(s=t.index)!==null&&s!==void 0?s:0,x=v.next();for(;!x.done&&x.value;){let k=x.value;t.index=w;var l;let S=(l=k.key)!==null&&l!==void 0?l:null;S==null&&(S=k.element?null:this.getKey(a,t,n,r));let P=[...this.getFullNode({...k,key:S,index:w,wrapper:Ky(t.wrapper,k.wrapper)},this.getChildState(n,k),r?`${r}${a.key}`:a.key,i)];for(let I of P){var u,g;I.value=(g=(u=k.value)!==null&&u!==void 0?u:t.value)!==null&&g!==void 0?g:null,I.value&&this.cache.set(I.value,I);var c;if(t.type&&I.type!==t.type)throw new Error(`Unsupported type <${Ka(I.type)}> in <${Ka((c=i==null?void 0:i.type)!==null&&c!==void 0?c:"unknown parent type")}>. Only <${Ka(t.type)}> is supported.`);w++,yield I}x=v.next(P)}return}if(t.key==null||t.type==null)return;let h=this;var f,p;let m={type:t.type,props:t.props,key:t.key,parentKey:i?i.key:null,value:(f=t.value)!==null&&f!==void 0?f:null,level:i?i.level+1:0,index:t.index,rendered:t.rendered,textValue:(p=t.textValue)!==null&&p!==void 0?p:"","aria-label":t["aria-label"],wrapper:t.wrapper,shouldInvalidate:t.shouldInvalidate,hasChildNodes:t.hasChildNodes||!1,childNodes:pc(function*(){if(!t.hasChildNodes||!t.childNodes)return;let b=0;for(let v of t.childNodes()){v.key!=null&&(v.key=`${m.key}${v.key}`);let w=h.getFullNode({...v,index:b},h.getChildState(n,v),m.key,m);for(let x of w)b++,yield x}})};yield m}constructor(){this.cache=new WeakMap}}function pc(e){let t=[],n=null;return{*[Symbol.iterator](){for(let r of t)yield r;n||(n=e());for(let r of n)t.push(r),yield r}}}function Ky(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Ka(e){return e[0].toUpperCase()+e.slice(1)}function By(e,t,n){let r=d.useMemo(()=>new jy,[]),{children:i,items:o,collection:a}=e;return d.useMemo(()=>{if(a)return a;let l=r.build({children:i,items:o},n);return t(l)},[r,i,o,a,n,t])}function Ch(e,t){return typeof t.getChildren=="function"?t.getChildren(e.key):e.childNodes}function Hy(e){return Vy(e)}function Vy(e,t){for(let n of e)return n}function Ba(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...mc(e,t),t],i=[...mc(e,n),n],o=r.slice(0,i.length).findIndex((a,s)=>a!==i[s]);return o!==-1?(t=r[o],n=i[o],t.index-n.index):r.findIndex(a=>a===n)>=0?1:(i.findIndex(a=>a===t)>=0,-1)}function mc(e,t){let n=[],r=t;for(;(r==null?void 0:r.parentKey)!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}const bc=new WeakMap;function zy(e){let t=bc.get(e);if(t!=null)return t;let n=0,r=i=>{for(let o of i)o.type==="section"?r(Ch(o,e)):o.type==="item"&&n++};return r(e),bc.set(e,n),n}var Sh={};Sh={longPressMessage:"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة"};var $h={};$h={longPressMessage:"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто"};var Eh={};Eh={longPressMessage:"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku"};var Ph={};Ph={longPressMessage:"Langt tryk eller tryk på Alt + pil ned for at åbne menuen"};var Rh={};Rh={longPressMessage:"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen"};var Mh={};Mh={longPressMessage:"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού"};var kh={};kh={longPressMessage:"Long press or press Alt + ArrowDown to open menu"};var Oh={};Oh={longPressMessage:"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú"};var Dh={};Dh={longPressMessage:"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool"};var Th={};Th={longPressMessage:"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli"};var Fh={};Fh={longPressMessage:"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu."};var Lh={};Lh={longPressMessage:"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט"};var Ih={};Ih={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika"};var Nh={};Nh={longPressMessage:"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához"};var Ah={};Ah={longPressMessage:"Premere a lungo o premere Alt + Freccia giù per aprire il menu"};var _h={};_h={longPressMessage:"長押しまたは Alt+下矢印キーでメニューを開く"};var jh={};jh={longPressMessage:"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기"};var Kh={};Kh={longPressMessage:"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“."};var Bh={};Bh={longPressMessage:"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa"};var Hh={};Hh={longPressMessage:"Langt trykk eller trykk Alt + PilNed for å åpne menyen"};var Vh={};Vh={longPressMessage:"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen"};var zh={};zh={longPressMessage:"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu"};var Uh={};Uh={longPressMessage:"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu"};var Wh={};Wh={longPressMessage:"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu"};var qh={};qh={longPressMessage:"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul"};var Gh={};Gh={longPressMessage:"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню"};var Qh={};Qh={longPressMessage:"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol"};var Yh={};Yh={longPressMessage:"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol"};var Xh={};Xh={longPressMessage:"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni"};var Zh={};Zh={longPressMessage:"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn"};var Jh={};Jh={longPressMessage:"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın"};var e1={};e1={longPressMessage:"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню"};var t1={};t1={longPressMessage:"长按或按 Alt + 向下方向键以打开菜单"};var n1={};n1={longPressMessage:"長按或按 Alt+向下鍵以開啟功能表"};var r1={};r1={"ar-AE":Sh,"bg-BG":$h,"cs-CZ":Eh,"da-DK":Ph,"de-DE":Rh,"el-GR":Mh,"en-US":kh,"es-ES":Oh,"et-EE":Dh,"fi-FI":Th,"fr-FR":Fh,"he-IL":Lh,"hr-HR":Ih,"hu-HU":Nh,"it-IT":Ah,"ja-JP":_h,"ko-KR":jh,"lt-LT":Kh,"lv-LV":Bh,"nb-NO":Hh,"nl-NL":Vh,"pl-PL":zh,"pt-BR":Uh,"pt-PT":Wh,"ro-RO":qh,"ru-RU":Gh,"sk-SK":Qh,"sl-SI":Yh,"sr-SP":Xh,"sv-SE":Zh,"tr-TR":Jh,"uk-UA":e1,"zh-CN":t1,"zh-TW":n1};function Uy(e){return e&&e.__esModule?e.default:e}function Wy(e,t,n){let{type:r="menu",isDisabled:i,trigger:o="press"}=e,a=Qe(),{triggerProps:s,overlayProps:l}=L0({type:r},t,n),u=f=>{if(!i&&!(o==="longPress"&&!f.altKey)&&n&&n.current)switch(f.key){case"Enter":case" ":if(o==="longPress")return;case"ArrowDown":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),t.toggle("first");break;case"ArrowUp":"continuePropagation"in f||f.stopPropagation(),f.preventDefault(),t.toggle("last");break;default:"continuePropagation"in f&&f.continuePropagation()}},g=y0(Uy(r1),"@react-aria/menu"),{longPressProps:c}=g0({isDisabled:i||o!=="longPress",accessibilityDescription:g.format("longPressMessage"),onLongPressStart(){t.close()},onLongPress(){t.open("first")}}),h={preventFocusOnPress:!0,onPressStart(f){f.pointerType!=="touch"&&f.pointerType!=="keyboard"&&!i&&(vt(f.target),t.open(f.pointerType==="virtual"?"first":null))},onPress(f){f.pointerType==="touch"&&!i&&(vt(f.target),t.toggle())}};return delete s.onPress,{menuTriggerProps:{...s,...o==="press"?h:c,id:a,onKeyDown:u},menuProps:{...l,"aria-labelledby":a,autoFocus:t.focusStrategy||!0,onClose:t.close}}}const i1=new WeakMap;function qy(e,t,n){let{shouldFocusWrap:r=!0,onKeyDown:i,onKeyUp:o,...a}=e;!e["aria-label"]&&e["aria-labelledby"];let s=Ke(e,{labelable:!0}),{listProps:l}=_y({...a,ref:n,selectionManager:t.selectionManager,collection:t.collection,disabledKeys:t.disabledKeys,shouldFocusWrap:r,linkBehavior:"override"});return i1.set(t,{onClose:e.onClose,onAction:e.onAction,shouldUseVirtualFocus:e.shouldUseVirtualFocus}),{menuProps:ae(s,{onKeyDown:i,onKeyUp:o},{role:"menu",...l,onKeyDown:u=>{var g;(u.key!=="Escape"||e.shouldUseVirtualFocus)&&((g=l.onKeyDown)===null||g===void 0||g.call(l,u))}})}}function Gy(e,t,n){let{id:r,key:i,closeOnSelect:o,isVirtualized:a,"aria-haspopup":s,onPressStart:l,onPressUp:u,onPress:g,onPressChange:c,onPressEnd:h,onHoverStart:f,onHoverChange:p,onHoverEnd:m,onKeyDown:b,onKeyUp:v,onFocus:w,onFocusChange:x,onBlur:k,selectionManager:S=t.selectionManager}=e,R=!!s,P=R&&e["aria-expanded"]==="true";var I;let D=(I=e.isDisabled)!==null&&I!==void 0?I:S.isDisabled(i);var L;let E=(L=e.isSelected)!==null&&L!==void 0?L:S.isSelected(i),N=i1.get(t),_=t.collection.getItem(i),T=e.onClose||N.onClose,A=sa(),M=ne=>{var zn;if(!R){if(!(_==null||(zn=_.props)===null||zn===void 0)&&zn.onAction?_.props.onAction():e.onAction&&e.onAction(i),N.onAction){let vn=N.onAction;vn(i)}ne.target instanceof HTMLAnchorElement&&_&&A.open(ne.target,ne,_.props.href,_.props.routerOptions)}},F="menuitem";R||(S.selectionMode==="single"?F="menuitemradio":S.selectionMode==="multiple"&&(F="menuitemcheckbox"));let O=ho(),V=ho(),X=ho(),j={id:r,"aria-disabled":D||void 0,role:F,"aria-label":e["aria-label"],"aria-labelledby":O,"aria-describedby":[V,X].filter(Boolean).join(" ")||void 0,"aria-controls":e["aria-controls"],"aria-haspopup":s,"aria-expanded":e["aria-expanded"]};S.selectionMode!=="none"&&!R&&(j["aria-checked"]=E),a&&(j["aria-posinset"]=_==null?void 0:_.index,j["aria-setsize"]=zy(t.collection));let K=ne=>{ne.pointerType==="keyboard"&&M(ne),l==null||l(ne)},H=()=>{!R&&T&&(o??(S.selectionMode!=="multiple"||S.isLink(i)))&&T()},q=ne=>{ne.pointerType==="mouse"&&(M(ne),H()),u==null||u(ne)},ue=ne=>{ne.pointerType!=="keyboard"&&ne.pointerType!=="mouse"&&(M(ne),H()),g==null||g(ne)},{itemProps:ee,isFocused:Xe}=Ny({id:r,selectionManager:S,key:i,ref:n,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,linkBehavior:"none",shouldUseVirtualFocus:N.shouldUseVirtualFocus}),{pressProps:Ze,isPressed:st}=ca({onPressStart:K,onPress:ue,onPressUp:q,onPressChange:c,onPressEnd:h,isDisabled:D}),{hoverProps:lt}=jr({isDisabled:D,onHoverStart(ne){!gi()&&!(P&&s)&&(S.setFocused(!0),S.setFocusedKey(i)),f==null||f(ne)},onHoverChange:p,onHoverEnd:m}),{keyboardProps:bn}=d0({onKeyDown:ne=>{if(ne.repeat){ne.continuePropagation();return}switch(ne.key){case" ":!D&&S.selectionMode==="none"&&!R&&o!==!1&&T&&T();break;case"Enter":!D&&o!==!1&&!R&&T&&T();break;default:R||ne.continuePropagation(),b==null||b(ne);break}},onKeyUp:v}),{focusProps:W}=Il({onBlur:k,onFocus:w,onFocusChange:x}),Je=Ke(_==null?void 0:_.props);delete Je.id;let Be=p2(_==null?void 0:_.props);return{menuItemProps:{...j,...ae(Je,Be,R?{onFocus:ee.onFocus,"data-collection":ee["data-collection"],"data-key":ee["data-key"]}:ee,Ze,lt,bn,W,N.shouldUseVirtualFocus||R?{onMouseDown:ne=>ne.preventDefault()}:void 0),tabIndex:ee.tabIndex!=null&&P&&!N.shouldUseVirtualFocus?-1:ee.tabIndex},labelProps:{id:O},descriptionProps:{id:V},keyboardShortcutProps:{id:X},isFocused:Xe,isFocusVisible:Xe&&S.isFocused&&gi()&&!P,isSelected:E,isPressed:st,isDisabled:D}}function Qy(e){let{heading:t,"aria-label":n}=e,r=Qe();return{itemProps:{role:"presentation"},headingProps:t?{id:r,role:"presentation"}:{},groupProps:{role:"group","aria-label":n,"aria-labelledby":t?r:void 0}}}function Yy(e,t){let{role:n="dialog"}=e,r=ho();r=e["aria-label"]?void 0:r;let i=d.useRef(!1);return d.useEffect(()=>{if(t.current&&!t.current.contains(document.activeElement)){dn(t.current);let o=setTimeout(()=>{document.activeElement===t.current&&(i.current=!0,t.current&&(t.current.blur(),dn(t.current)),i.current=!1)},500);return()=>{clearTimeout(o)}}},[t]),wh(),{dialogProps:{...Ke(e,{labelable:!0}),role:n,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||r,onBlur:o=>{i.current&&o.stopPropagation()}},titleProps:{id:r}}}function Xy(e){let{value:t=0,minValue:n=0,maxValue:r=100,valueLabel:i,isIndeterminate:o,formatOptions:a={style:"percent"}}=e,s=Ke(e,{labelable:!0}),{labelProps:l,fieldProps:u}=ty({...e,labelElementType:"span"});t=fi(t,n,r);let g=(t-n)/(r-n),c=A5(a);if(!o&&!i){let h=a.style==="percent"?g:t;i=c.format(h)}return{progressBarProps:ae(s,{...u,"aria-valuenow":o?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":o?void 0:i,role:"progressbar"}),labelProps:l}}function Zy(e){let{progressBarProps:t,labelProps:n}=Xy(e);return{meterProps:{...t,role:"meter progressbar"},labelProps:n}}function Jy(e,t){let n=Ke(e,{labelable:!0}),{hoverProps:r}=jr({onHoverStart:()=>t==null?void 0:t.open(!0),onHoverEnd:()=>t==null?void 0:t.close()});return{tooltipProps:ae(n,r,{role:"tooltip"})}}function e9(e,t,n){let{isDisabled:r,trigger:i}=e,o=Qe(),a=d.useRef(!1),s=d.useRef(!1),l=()=>{(a.current||s.current)&&t.open(s.current)},u=v=>{!a.current&&!s.current&&t.close(v)};d.useEffect(()=>{let v=w=>{n&&n.current&&w.key==="Escape"&&(w.stopPropagation(),t.close(!0))};if(t.isOpen)return document.addEventListener("keydown",v,!0),()=>{document.removeEventListener("keydown",v,!0)}},[n,t]);let g=()=>{i!=="focus"&&(pi()==="pointer"?a.current=!0:a.current=!1,l())},c=()=>{i!=="focus"&&(s.current=!1,a.current=!1,u())},h=()=>{s.current=!1,a.current=!1,u(!0)},f=()=>{gi()&&(s.current=!0,l())},p=()=>{s.current=!1,a.current=!1,u(!0)},{hoverProps:m}=jr({isDisabled:r,onHoverStart:g,onHoverEnd:c}),{focusableProps:b}=f0({isDisabled:r,onFocus:f,onBlur:p},n);return{triggerProps:{"aria-describedby":t.isOpen?o:void 0,...ae(b,m,{onPointerDown:h,onKeyDown:h,tabIndex:void 0})},tooltipProps:{id:o}}}const t9=d.createContext({}),n9=d.createContext(null),r9=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),o1=d.createContext({}),_l=O2(function(t,n){[t,n]=yt(t,n,o1),t=i9(t);let r=t,{isPending:i}=r,{buttonProps:o,isPressed:a}=x0(t,n),{focusProps:s,isFocused:l,isFocusVisible:u}=R0(t),{hoverProps:g,isHovered:c}=jr({...t,isDisabled:t.isDisabled||i}),h={isHovered:c,isPressed:(r.isPressed||a)&&!i,isFocused:l,isFocusVisible:u,isDisabled:t.isDisabled||!1,isPending:i??!1},f=at({...t,values:h,defaultClassName:"react-aria-Button"}),p=Qe(o.id),m=Qe(),b=o["aria-labelledby"];i&&(b?b=`${b} ${m}`:o["aria-label"]&&(b=`${p} ${m}`));let v=d.useRef(i);return d.useEffect(()=>{let w={"aria-labelledby":b||p};(!v.current&&l&&i||v.current&&l&&!i)&&rc(w,"assertive"),v.current=i},[i,l,b,p]),d.createElement("button",{...Ke(t,{propNames:r9}),...ae(o,s,g),...f,type:o.type==="submit"&&i?"button":o.type,id:p,ref:n,"aria-labelledby":b,slot:t.slot||void 0,"aria-disabled":i?"true":o["aria-disabled"],"data-disabled":t.isDisabled||void 0,"data-pressed":h.isPressed||void 0,"data-hovered":c||void 0,"data-focused":l||void 0,"data-pending":i||void 0,"data-focus-visible":u||void 0},d.createElement(n9.Provider,{value:{id:m}},f.children))});function i9(e){return e.isPending&&(e.onPress=void 0,e.onPressStart=void 0,e.onPressEnd=void 0,e.onPressChange=void 0,e.onPressUp=void 0,e.onKeyDown=void 0,e.onKeyUp=void 0,e.onClick=void 0,e.href=void 0),e}const o9=d.createContext({});class ht extends Set{constructor(t,n,r){super(t),t instanceof ht?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function a9(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function a1(e){let{selectionMode:t="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:o="all"}=e,a=d.useRef(!1),[,s]=d.useState(!1),l=d.useRef(null),u=d.useRef(null),[,g]=d.useState(null),c=d.useMemo(()=>vc(e.selectedKeys),[e.selectedKeys]),h=d.useMemo(()=>vc(e.defaultSelectedKeys,new ht),[e.defaultSelectedKeys]),[f,p]=Fi(c,h,e.onSelectionChange),m=d.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[b,v]=d.useState(i);i==="replace"&&b==="toggle"&&typeof f=="object"&&f.size===0&&v("replace");let w=d.useRef(i);return d.useEffect(()=>{i!==w.current&&(v(i),w.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:b,setSelectionBehavior:v,get isFocused(){return a.current},setFocused(x){a.current=x,s(x)},get focusedKey(){return l.current},get childFocusStrategy(){return u.current},setFocusedKey(x,k="first"){l.current=x,u.current=k,g(x)},selectedKeys:f,setSelectedKeys(x){(r||!a9(x,f))&&p(x)},disabledKeys:m,disabledBehavior:o}}function vc(e,t){return e?e==="all"?"all":new ht(e):t}class fa{get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(t){this.state.setSelectionBehavior(t)}get isFocused(){return this.state.isFocused}setFocused(t){this.state.setFocused(t)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(t,n){(t==null||this.collection.getItem(t))&&this.state.setFocusedKey(t,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(t){if(this.state.selectionMode==="none")return!1;let n=this.getKey(t);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let t=this.getSelectAllKeys(),n=this.state.selectedKeys;return this._isSelectAll=t.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Ba(this.collection,i,t)<0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let t=null;for(let r of this.state.selectedKeys){let i=this.collection.getItem(r);(!t||i&&Ba(this.collection,i,t)>0)&&(t=i)}var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new ht([n],n,n);else{let a=this.state.selectedKeys;var i;let s=(i=a.anchorKey)!==null&&i!==void 0?i:n;r=new ht(a,s,n);var o;for(let l of this.getKeyRange(s,(o=a.currentKey)!==null&&o!==void 0?o:n))r.delete(l);for(let l of this.getKeyRange(n,s))this.canSelectItem(l)&&r.add(l)}this.state.setSelectedKeys(r)}getKeyRange(t,n){let r=this.collection.getItem(t),i=this.collection.getItem(n);return r&&i?Ba(this.collection,r,i)<=0?this.getKeyRangeInternal(t,n):this.getKeyRangeInternal(n,t):[]}getKeyRangeInternal(t,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(t,n);let i=[],o=t;for(;o!=null;){let a=this.collection.getItem(o);if(a&&(a.type==="item"||a.type==="cell"&&this.allowsCellSelection)&&i.push(o),o===n)return i;o=this.collection.getKeyAfter(o)}return[]}getKey(t){let n=this.collection.getItem(t);if(!n||n.type==="cell"&&this.allowsCellSelection)return t;for(;n&&n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(t){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(t)){this.replaceSelection(t);return}let n=this.getKey(t);if(n==null)return;let r=new ht(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(t){if(this.selectionMode==="none")return;let n=this.getKey(t);if(n==null)return;let r=this.canSelectItem(n)?new ht([n],n,n):new ht;this.state.setSelectedKeys(r)}setSelectedKeys(t){if(this.selectionMode==="none")return;let n=new ht;for(let r of t){let i=this.getKey(r);if(i!=null&&(n.add(i),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let t=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var i;let a=this.collection.getItem(r);(a==null?void 0:a.type)==="item"&&t.push(r);var o;a!=null&&a.hasChildNodes&&(this.allowsCellSelection||a.type!=="item")&&n((o=(i=Hy(Ch(a,this.collection)))===null||i===void 0?void 0:i.key)!==null&&o!==void 0?o:null)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new ht)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(t,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(t)&&!this.disallowEmptySelection?this.toggleSelection(t):this.replaceSelection(t):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(t):this.replaceSelection(t))}isSelectionEqual(t){if(t===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(t.size!==n.size)return!1;for(let r of t)if(!n.has(r))return!1;for(let r of n)if(!t.has(r))return!1;return!0}canSelectItem(t){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(t))return!1;let r=this.collection.getItem(t);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(t){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(t)||!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(t){var n,r;return!!(!((r=this.collection.getItem(t))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(t){var n;return(n=this.collection.getItem(t))===null||n===void 0?void 0:n.props}withCollection(t){return new fa(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(t,n,r){this.collection=t,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function ha(e){let[t,n]=Fi(e.isOpen,e.defaultOpen||!1,e.onOpenChange);const r=d.useCallback(()=>{n(!0)},[n]),i=d.useCallback(()=>{n(!1)},[n]),o=d.useCallback(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:i,toggle:o}}function jl(e){let t=ha(e),[n,r]=d.useState(null),[i,o]=d.useState([]),a=()=>{o([]),t.close()};return{focusStrategy:n,...t,open(u=null){r(u),t.open()},toggle(u=null){r(u),t.toggle()},close(){a()},expandedKeysStack:i,openSubmenu:(u,g)=>{o(c=>g>c.length?c:[...c.slice(0,g),u])},closeSubmenu:(u,g)=>{o(c=>c[g]===u?c.slice(0,g):c)}}}const s9=1500,yc=500;let wn={},l9=0,Ur=!1,Dt=null,xn=null;function s1(e={}){let{delay:t=s9,closeDelay:n=yc}=e,{isOpen:r,open:i,close:o}=ha(e),a=d.useMemo(()=>`${++l9}`,[]),s=d.useRef(null),l=d.useRef(o),u=()=>{wn[a]=h},g=()=>{for(let p in wn)p!==a&&(wn[p](!0),delete wn[p])},c=()=>{s.current&&clearTimeout(s.current),s.current=null,g(),u(),Ur=!0,i(),Dt&&(clearTimeout(Dt),Dt=null),xn&&(clearTimeout(xn),xn=null)},h=p=>{p||n<=0?(s.current&&clearTimeout(s.current),s.current=null,l.current()):s.current||(s.current=setTimeout(()=>{s.current=null,l.current()},n)),Dt&&(clearTimeout(Dt),Dt=null),Ur&&(xn&&clearTimeout(xn),xn=setTimeout(()=>{delete wn[a],xn=null,Ur=!1},Math.max(yc,n)))},f=()=>{g(),u(),!r&&!Dt&&!Ur?Dt=setTimeout(()=>{Dt=null,Ur=!0,c()},t):r||c()};return d.useEffect(()=>{l.current=o},[o]),d.useEffect(()=>()=>{s.current&&clearTimeout(s.current),wn[a]&&delete wn[a]},[a]),{isOpen:r,open:p=>{!p&&t>0&&!s.current?f():c()},close:h}}class u9{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(t){let n=this.keyMap.get(t);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(t){let n=this.keyMap.get(t);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(t){var n;return(n=this.keyMap.get(t))!==null&&n!==void 0?n:null}at(t){const n=[...this.getKeys()];return this.getItem(n[t])}constructor(t,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=t,n=n||new Set;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&(s.type==="section"||n.has(s.key)))for(let l of s.childNodes)r(l)};for(let s of t)r(s);let i=null,o=0;for(let[s,l]of this.keyMap)i?(i.nextKey=s,l.prevKey=i.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),i=l,i.nextKey=void 0;var a;this.lastKey=(a=i==null?void 0:i.key)!==null&&a!==void 0?a:null}}function c9(e){let{onExpandedChange:t}=e,[n,r]=Fi(e.expandedKeys?new Set(e.expandedKeys):void 0,e.defaultExpandedKeys?new Set(e.defaultExpandedKeys):new Set,t),i=a1(e),o=d.useMemo(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),a=By(e,d.useCallback(l=>new u9(l,{expandedKeys:n}),[n]),null);return d.useEffect(()=>{i.focusedKey!=null&&!a.getItem(i.focusedKey)&&i.setFocusedKey(null)},[a,i.focusedKey]),{collection:a,expandedKeys:n,disabledKeys:o,toggleKey:l=>{r(d9(n,l))},setExpandedKeys:r,selectionManager:new fa(a,i)}}function d9(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}const wc=d.createContext(null),f9=d.createContext(null),h9={CollectionRoot({collection:e,renderDropIndicator:t}){return xc(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return xc(e,t,n)}};function xc(e,t,n){return n0({items:t?e.getChildren(t.key):e,dependencies:[n],children(r){var i;let o=r.render(r);if(!n||r.type!=="item")return o;let a=r.key,s=e.getKeyAfter(a);return d.createElement(d.Fragment,null,n({type:"item",key:a,dropPosition:"before"}),o,(s==null||((i=e.getItem(s))===null||i===void 0?void 0:i.type)!=="item")&&n({type:"item",key:a,dropPosition:"after"}))}})}const l1=d.createContext(h9);function g9(e){return d.useMemo(()=>e!=null?new Set([e]):null,[e])}const p9=d.createContext({}),m9=d.createContext({}),u1=d.createContext({placement:"bottom"}),Kl=d.createContext(null),Cc=d.createContext(null),b9=d.forwardRef(function(t,n){[t,n]=yt(t,n,Kl);let r=d.useContext(Hn),i=ha(t),o=t.isOpen!=null||t.defaultOpen!=null||!r?i:r,a=Eo(n,o.isOpen)||t.isExiting||!1,s=D2(),{direction:l}=Bn();if(s){let u=t.children;return typeof u=="function"&&(u=u({trigger:t.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),d.createElement(d.Fragment,null,u)}return o&&!o.isOpen&&!a?null:d.createElement(v9,{...t,triggerRef:t.triggerRef,state:o,popoverRef:n,isExiting:a,dir:l})});function v9({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){let i=d.useRef(null),[o,a]=d.useState(0),s=d.useRef(null),l=d.useContext(Cc),u=l&&r.trigger==="SubmenuTrigger";te(()=>{i.current&&e.isOpen&&a(i.current.getBoundingClientRect().width)},[e.isOpen,i]);var g;let{popoverProps:c,underlayProps:h,arrowProps:f,placement:p}=My({...r,offset:(g=r.offset)!==null&&g!==void 0?g:8,arrowSize:o,groupRef:u?l:s},e),m=r.popoverRef,b=ua(m,!!p)||r.isEntering||!1,v=at({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:p,isEntering:b,isExiting:t}}),w=!r.isNonModal||r.trigger==="SubmenuTrigger",[x,k]=d.useState(!1);te(()=>{m.current&&k(w&&!m.current.querySelector("[role=dialog]"))},[m,w]),d.useEffect(()=>{x&&m.current&&!m.current.contains(document.activeElement)&&dn(m.current)},[x,m]);let S={...c.style,...v.style},R=d.createElement("div",{...ae(Ke(r),c),...v,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:m,slot:r.slot||void 0,style:S,dir:r.dir,"data-trigger":r.trigger,"data-placement":p,"data-entering":b||void 0,"data-exiting":t||void 0},!r.isNonModal&&d.createElement(Us,{onDismiss:e.close}),d.createElement(u1.Provider,{value:{...f,placement:p,ref:i}},v.children),d.createElement(Us,{onDismiss:e.close}));if(!u)return d.createElement(Ws,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&d.createElement("div",{"data-testid":"underlay",...h,style:{position:"fixed",inset:0}}),d.createElement("div",{ref:s,style:{display:"contents"}},d.createElement(Cc.Provider,{value:s},R)));var P;return d.createElement(Ws,{...r,shouldContainFocus:x,isExiting:t,portalContainer:(P=n??(l==null?void 0:l.current))!==null&&P!==void 0?P:void 0},R)}const y9=d.createContext({}),c1=d.createContext(null),Bl=d.createContext(null),Lo=d.createContext(null),Io=d.createContext(null);function w9(e){let t=jl(e),n=d.useRef(null),{menuTriggerProps:r,menuProps:i}=Wy({...e,type:"menu"},t,n),[o,a]=d.useState(null),s=d.useCallback(()=>{n.current&&a(n.current.offsetWidth+"px")},[n]);$o({ref:n,onResize:s});let l=d.useRef(null);return d.createElement(mn,{values:[[c1,{...i,ref:l}],[Hn,t],[Lo,t],[Kl,{trigger:"MenuTrigger",triggerRef:n,scrollRef:l,placement:"bottom start",style:{"--trigger-width":o},"aria-labelledby":i["aria-labelledby"]}]]},d.createElement(h0,{...r,ref:n,isPressed:t.isOpen},e.children))}const x9=d.createContext(null),C9=d.forwardRef(function(t,n){return[t,n]=yt(t,n,c1),d.createElement(d5,{content:d.createElement(y5,t)},r=>d.createElement(S9,{props:t,collection:r,menuRef:n}))});function S9({props:e,collection:t,menuRef:n}){let{filter:r,collectionProps:i,collectionRef:o}=d.useContext(wc)||{};n=Kn(d.useMemo(()=>El(n,o!==void 0?o:null),[o,n]));let a=d.useMemo(()=>r?t.UNSTABLE_filter(r):t,[t,r]),s=c9({...e,collection:a,children:void 0}),l=d.useContext(Lo),{isVirtualized:u,CollectionRoot:g}=d.useContext(l1),{menuProps:c}=qy({...e,...i,isVirtualized:u,onClose:e.onClose||(l==null?void 0:l.close)},s,n),h=at({defaultClassName:"react-aria-Menu",className:e.className,style:e.style,values:{isEmpty:s.collection.size===0}}),f=null;return s.collection.size===0&&e.renderEmptyState&&(f=d.createElement("div",{role:"menuitem",style:{display:"contents"}},e.renderEmptyState())),d.createElement($0,null,d.createElement("div",{...Ke(e),...c,...h,ref:n,slot:e.slot||void 0,"data-empty":s.collection.size===0||void 0,onScroll:e.onScroll},d.createElement(mn,{values:[[Bl,s],[m9,{elementType:"div"}],[f9,{name:"MenuSection",render:E9}],[x9,{parentMenuRef:n,shouldUseVirtualFocus:i==null?void 0:i.shouldUseVirtualFocus}],[Gs,null],[wc,null],[Io,s.selectionManager],[Lo,l??jl({})]]},d.createElement(g,{collection:s.collection,persistedKeys:g9(s.selectionManager.focusedKey),scrollRef:n})),f))}class $9 extends fa{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(t,n){return this.parent.setFocusedKey(t,n)}setFocused(t){this.parent.setFocused(t)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(t,n){super(t.collection,n),this.parent=t}}function E9(e,t,n,r="react-aria-MenuSection"){var i,o;let a=d.useContext(Bl),{CollectionBranch:s}=d.useContext(l1),[l,u]=e0();var g;let{headingProps:c,groupProps:h}=Qy({heading:u,"aria-label":(g=n.props["aria-label"])!==null&&g!==void 0?g:void 0}),f=at({defaultClassName:r,className:(i=n.props)===null||i===void 0?void 0:i.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),p=d.useContext(Io),m=a1(e),b=e.selectionMode!=null?new $9(p,m):p;return d.createElement("section",{...Ke(e),...h,...f,ref:t},d.createElement(mn,{values:[[p9,{...c,ref:l}],[Io,b]]},d.createElement(s,{collection:a.collection,parent:n})))}const Gs=d.createContext(null),P9=b5("item",function(t,n,r){var i;[t,n]=yt(t,n,Gs);let o=(i=Jf(Gs))===null||i===void 0?void 0:i.id,a=d.useContext(Bl),s=Kn(n),l=d.useContext(Io),{menuItemProps:u,labelProps:g,descriptionProps:c,keyboardShortcutProps:h,...f}=Gy({...t,id:o,key:r.key,selectionManager:l},a,s),{hoverProps:p,isHovered:m}=jr({isDisabled:f.isDisabled}),b=at({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...f,isHovered:m,isFocusVisible:f.isFocusVisible,selectionMode:l.selectionMode,selectionBehavior:l.selectionBehavior,hasSubmenu:!!t["aria-haspopup"],isOpen:t["aria-expanded"]==="true"}}),v=t.href?"a":"div";return d.createElement(v,{...ae(u,p),...b,ref:s,"data-disabled":f.isDisabled||void 0,"data-hovered":m||void 0,"data-focused":f.isFocused||void 0,"data-focus-visible":f.isFocusVisible||void 0,"data-pressed":f.isPressed||void 0,"data-selected":f.isSelected||void 0,"data-selection-mode":l.selectionMode==="none"?void 0:l.selectionMode,"data-has-submenu":!!t["aria-haspopup"]||void 0,"data-open":t["aria-expanded"]==="true"||void 0},d.createElement(mn,{values:[[o9,{slots:{[Po]:g,label:g,description:c}}],[y9,h]]},b.children))}),d1=d.createContext(null),Hn=d.createContext(null);function f1(e){let t=jl(e),n=d.useRef(null),{triggerProps:r,overlayProps:i}=L0({type:"dialog"},t,n),[o,a]=d.useState(null),s=d.useCallback(()=>{n.current&&a(n.current.offsetWidth+"px")},[n]);return $o({ref:n,onResize:s}),r.id=Qe(),i["aria-labelledby"]=r.id,d.createElement(mn,{values:[[Hn,t],[Lo,t],[d1,i],[Kl,{trigger:"DialogTrigger",triggerRef:n,"aria-labelledby":i["aria-labelledby"],style:{"--trigger-width":o}}]]},d.createElement(h0,{...r,ref:n,isPressed:t.isOpen},e.children))}const ga=d.forwardRef(function(t,n){let r=t["aria-labelledby"];[t,n]=yt(t,n,d1);let{dialogProps:i,titleProps:o}=Yy({...t,"aria-labelledby":r},n),a=d.useContext(Hn);!i["aria-label"]&&!i["aria-labelledby"]&&t["aria-labelledby"]&&(i["aria-labelledby"]=t["aria-labelledby"]);let s=at({defaultClassName:"react-aria-Dialog",className:t.className,style:t.style,children:t.children,values:{close:(a==null?void 0:a.close)||(()=>{})}});return d.createElement("section",{...Ke(t),...i,...s,ref:n,slot:t.slot||void 0},d.createElement(mn,{values:[[jf,{slots:{[Po]:{},title:{...o,level:2}}}],[o1,{slots:{[Po]:{},close:{onPress:()=>a==null?void 0:a.close()}}}]]},s.children))}),pa=d.forwardRef(function(t,n){[t,n]=yt(t,n,jf);let{children:r,level:i=3,className:o,...a}=t,s=`h${i}`;return d.createElement(s,{...a,ref:n,className:o??"react-aria-Heading"},r)}),R9=d.createContext(null),M9=d.forwardRef(function(t,n){[t,n]=yt(t,n,R9);let{value:r=0,minValue:i=0,maxValue:o=100}=t;r=fi(r,i,o);let[a,s]=e0(!t["aria-label"]&&!t["aria-labelledby"]),{meterProps:l,labelProps:u}=Zy({...t,label:s}),g=(r-i)/(o-i)*100,c=at({...t,defaultClassName:"react-aria-Meter",values:{percentage:g,valueText:l["aria-valuetext"]}});return d.createElement("div",{...l,...c,ref:n,slot:t.slot||void 0},d.createElement(t9.Provider,{value:{...u,ref:a,elementType:"span"}},c.children))}),k9=d.createContext(null),Hl=d.createContext(null),ma=d.forwardRef(function(t,n){if(d.useContext(Hl))return d.createElement(Sc,{...t,modalRef:n},t.children);let{isDismissable:i,isKeyboardDismissDisabled:o,isOpen:a,defaultOpen:s,onOpenChange:l,children:u,isEntering:g,isExiting:c,UNSTABLE_portalContainer:h,shouldCloseOnInteractOutside:f,...p}=t;return d.createElement(D9,{isDismissable:i,isKeyboardDismissDisabled:o,isOpen:a,defaultOpen:s,onOpenChange:l,isEntering:g,isExiting:c,UNSTABLE_portalContainer:h,shouldCloseOnInteractOutside:f},d.createElement(Sc,{...p,modalRef:n},u))});function O9(e,t){[e,t]=yt(e,t,k9);let n=d.useContext(Hn),r=ha(e),i=e.isOpen!=null||e.defaultOpen!=null||!n?r:n,o=Kn(t),a=d.useRef(null),s=Eo(o,i.isOpen),l=Eo(a,i.isOpen),u=s||l||e.isExiting||!1,g=pn();return!i.isOpen&&!u||g?null:d.createElement(T9,{...e,state:i,isExiting:u,overlayRef:o,modalRef:a})}const D9=d.forwardRef(O9);function T9({UNSTABLE_portalContainer:e,...t}){let n=t.modalRef,{state:r}=t,{modalProps:i,underlayProps:o}=ky(t,r,n),a=ua(t.overlayRef)||t.isEntering||!1,s=at({...t,defaultClassName:"react-aria-ModalOverlay",values:{isEntering:a,isExiting:t.isExiting,state:r}}),l=y2(),u={...s.style,"--visual-viewport-height":l.height+"px"};return d.createElement(Ws,{isExiting:t.isExiting,portalContainer:e},d.createElement("div",{...ae(Ke(t),o),...s,style:u,ref:t.overlayRef,"data-entering":a||void 0,"data-exiting":t.isExiting||void 0},d.createElement(mn,{values:[[Hl,{modalProps:i,modalRef:n,isExiting:t.isExiting,isDismissable:t.isDismissable}],[Hn,r]]},s.children)))}function Sc(e){let{modalProps:t,modalRef:n,isExiting:r,isDismissable:i}=d.useContext(Hl),o=d.useContext(Hn),a=d.useMemo(()=>El(e.modalRef,n),[e.modalRef,n]),s=Kn(a),l=ua(s),u=at({...e,defaultClassName:"react-aria-Modal",values:{isEntering:l,isExiting:r,state:o}});return d.createElement("div",{...ae(Ke(e),t),...u,ref:s,"data-entering":l||void 0,"data-exiting":r||void 0},i&&d.createElement(Us,{onDismiss:o.close}),u.children)}const F9=d.createContext({}),h1=d.createContext(null),L9=d.forwardRef(function(t,n){[t,n]=yt(t,n,F9);let r=ry(t),{groupProps:i}=Z5(t,r,n),o=at({...t,values:{isDisabled:r.isDisabled,state:r},defaultClassName:"react-aria-ToggleButtonGroup"});return d.createElement("div",{...i,...o,ref:n,slot:t.slot||void 0,"data-orientation":t.orientation||"horizontal","data-disabled":t.isDisabled||void 0},d.createElement(h1.Provider,{value:r},o.children))}),I9=d.createContext({}),N9=d.forwardRef(function(t,n){[t,n]=yt(t,n,I9);let r=d.useContext(h1),i=ny(r&&t.id!=null?{isSelected:r.selectedKeys.has(t.id),onChange(m){r.setSelected(t.id,m)}}:t),{buttonProps:o,isPressed:a,isSelected:s,isDisabled:l}=r&&t.id!=null?J5({...t,id:t.id},r,n):C0({...t,id:t.id!=null?String(t.id):void 0},i,n),{focusProps:u,isFocused:g,isFocusVisible:c}=R0(t),{hoverProps:h,isHovered:f}=jr(t),p=at({...t,id:void 0,values:{isHovered:f,isPressed:a,isFocused:g,isSelected:i.isSelected,isFocusVisible:c,isDisabled:l,state:i},defaultClassName:"react-aria-ToggleButton"});return d.createElement("button",{...ae(o,u,h),...p,ref:n,slot:t.slot||void 0,"data-focused":g||void 0,"data-disabled":l||void 0,"data-pressed":a||void 0,"data-selected":s||void 0,"data-hovered":f||void 0,"data-focus-visible":c||void 0})}),Vl=d.createContext(null),g1=d.createContext(null);function A9(e){let t=s1(e),n=d.useRef(null),{triggerProps:r,tooltipProps:i}=e9(e,t,n);return d.createElement(mn,{values:[[Vl,t],[g1,{...i,triggerRef:n}]]},d.createElement(Q2,{...r,ref:n},e.children))}const _9=d.forwardRef(function({UNSTABLE_portalContainer:t,...n},r){[n,r]=yt(n,r,g1);let i=d.useContext(Vl),o=s1(n),a=n.isOpen!=null||n.defaultOpen!=null||!i?o:i,s=Eo(r,a.isOpen)||n.isExiting||!1;return!a.isOpen&&!s?null:d.createElement(Ey,{portalContainer:t},d.createElement(j9,{...n,tooltipRef:r,isExiting:s}))});function j9(e){let t=d.useContext(Vl),n=d.useRef(null),[r,i]=d.useState(0);te(()=>{n.current&&t.isOpen&&i(n.current.getBoundingClientRect().width)},[t.isOpen,n]);let{overlayProps:o,arrowProps:a,placement:s}=T0({placement:e.placement||"top",targetRef:e.triggerRef,overlayRef:e.tooltipRef,offset:e.offset,crossOffset:e.crossOffset,isOpen:t.isOpen,arrowSize:r,arrowBoundaryOffset:e.arrowBoundaryOffset,shouldFlip:e.shouldFlip,onClose:()=>t.close(!0)}),l=ua(e.tooltipRef,!!s)||e.isEntering||!1,u=at({...e,defaultClassName:"react-aria-Tooltip",values:{placement:s,isEntering:l,isExiting:e.isExiting,state:t}});e=ae(e,o);let{tooltipProps:g}=Jy(e,t);return d.createElement("div",{...g,ref:e.tooltipRef,...u,style:{...o.style,...u.style},"data-placement":s??void 0,"data-entering":l||void 0,"data-exiting":e.isExiting||void 0},d.createElement(u1.Provider,{value:{...a,placement:s,ref:n}},u.children))}function K9(e,t){var n=d.useState(function(){if(typeof window>"u")return t;try{for(var a=window.localStorage.getItem(e),s=a?JSON.parse(a):t,l=0,u=Object.entries(t);l<u.length;l++){var g=u[l][0];if(typeof s[g]>"u")throw new Error("Missing key in local storage")}return s}catch(c){return console.log(c),t}}),r=n[0],i=n[1],o=function(a){try{var s=a instanceof Function?a(r):a;i(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch(l){console.log(l)}};return[r,o]}var B9=function(){var e=K9("user-preferences",{theme:"system"}),t=e[0],n=e[1];return y.jsx(L9,{className:"flex h-7 space-x-0.5 rounded-md bg-slate-100 p-0.5 dark:bg-slate-700",defaultSelectedKeys:["system"],"aria-label":"Theme",selectedKeys:[t.theme],onSelectionChange:function(r){r.has("system")?n({theme:"system"}):r.has("light")?(document.documentElement.classList.remove("dark"),n({theme:"light"})):r.has("dark")&&(document.documentElement.classList.add("dark"),n({theme:"dark"}))},children:[{value:"system",icon:function(){return y.jsx(sv,{})},ariaLabel:"System theme"},{value:"light",icon:function(){return y.jsx(Nv,{})},ariaLabel:"Light theme"},{value:"dark",icon:function(){return y.jsx(Pv,{})},ariaLabel:"Dark theme"}].map(function(r){return y.jsx(N9,{className:"flex aspect-square h-full items-center justify-center rounded-md text-slate-900 transition duration-150 ease-in-out hover:bg-slate-200 active:bg-slate-300 data-[selected=true]:bg-slate-200 data-[selected=true]:shadow-sm dark:text-slate-50 dark:hover:bg-slate-500 dark:data-[selected=true]:bg-slate-500",id:r.value,"aria-label":r.ariaLabel,children:r.icon()},r.value)})})},Qs=function(e){var t=e.message;return y.jsx("div",{className:"flex items-center justify-center rounded-md bg-red-50 py-4",children:y.jsx("div",{className:"flex flex-col justify-center",children:y.jsx("p",{className:"text-sm text-red-900",children:t})})})},$c=function(e){var t=e.to,n=e.label,r=e.icon;return y.jsxs(Tf,{to:t,className:function(i){var o=i.isActive;return"relative -ml-px backdrop-blur-50 flex w-full items-center space-x-2 rounded-md pl-4 py-1 transition duration-150 ease-in-out ".concat(o?"bg-slate-100/90 font-medium text-slate-900 dark:bg-slate-900 dark:text-brand-300":"text-slate-500 dark:text-slate-400 border-slate-100 hover:bg-slate-50 dark:hover:bg-slate-900 hover:border-slate-300 hover:text-slate-900 dark:border-slate-700 dark:hover:border-slate-600 dark:hover:text-slate-100")},children:[r,y.jsx("span",{className:"block truncate",children:n})]})},p1=function(e){var t=e.children,n=se.queue.list.useQuery(),r=n.data,i=n.isLoading,o=n.isError;return y.jsxs("div",{className:"grid xl:grid-cols-[auto,1fr]",children:[y.jsx("div",{className:"hidden w-64 xl:block",children:y.jsxs("div",{className:"sticky top-0 isolate flex h-full max-h-screen min-h-screen flex-col justify-between overflow-hidden border-r border-brand-50 px-4 pb-4 pt-8 shadow-sm dark:border-slate-700 dark:bg-black",children:[y.jsxs("svg",{viewBox:"0 0 1108 632","aria-hidden":"true",className:"absolute left-[calc(50%-24rem)] top-10 -z-10 w-[69.25rem] max-w-none rotate-90 transform-gpu opacity-50 blur-3xl lg:top-[calc(50%-30rem)]",children:[y.jsx("path",{fill:"url(#175c433f-44f6-4d59-93f0-c5c51ad5566d)",fillOpacity:".2",d:"M235.233 402.609 57.541 321.573.83 631.05l234.404-228.441 320.018 145.945c-65.036-115.261-134.286-322.756 109.01-230.655C968.382 433.026 1031 651.247 1092.23 459.36c48.98-153.51-34.51-321.107-82.37-385.717L810.952 324.222 648.261.088 235.233 402.609Z"}),y.jsx("defs",{children:y.jsxs("linearGradient",{id:"175c433f-44f6-4d59-93f0-c5c51ad5566d",x1:"1220.59",x2:"-85.053",y1:"432.766",y2:"638.714",gradientUnits:"userSpaceOnUse",children:[y.jsx("stop",{stopColor:"#bbebff"}),y.jsx("stop",{offset:1,stopColor:"#ffffff"})]})})]}),y.jsxs("div",{className:"space-y-8",children:[y.jsxs("div",{className:"flex items-center space-x-2 text-slate-900 dark:text-brand-50",children:[y.jsx(Fv,{width:28,height:28}),y.jsx("p",{className:"text-lg font-semibold",children:"QueueDash"})]}),y.jsxs("div",{className:"w-full space-y-4",children:[y.jsx($c,{label:"Overview",icon:y.jsx(ov,{className:"mb-0.5",height:16,width:16}),to:"../"}),y.jsx("div",{className:"h-px w-full bg-slate-100 dark:bg-slate-700"}),y.jsx("div",{className:"w-full space-y-1",children:i?Fn([],new Array(10),!0).map(function(a,s){return y.jsx(So,{className:"h-8 w-full"},s)}):o?y.jsx(Qs,{message:"Could not fetch queues"}):r==null?void 0:r.map(function(a){return y.jsx($c,{to:"../".concat(a.name),label:a.displayName},a.name)})})]})]}),y.jsxs("div",{className:"flex w-full items-center justify-between",children:[y.jsx("a",{href:"https://github.com/alexbudure/queuedash",target:"_blank",rel:"noreferrer",className:"flex size-7 items-center justify-center rounded-md bg-slate-100 text-slate-900 shadow-sm transition duration-150 ease-in-out hover:bg-slate-200 active:bg-slate-300 dark:bg-slate-600 dark:text-slate-50 dark:hover:bg-slate-500",children:y.jsx(mv,{})}),y.jsx(B9,{})]})]})}),y.jsx("div",{className:"bg-white px-4 py-3 dark:bg-[#121212] lg:px-10 lg:py-8",children:y.jsx("div",{className:"max-w-screen-xl",children:t})})]})};/**
29
35
  * table-core
30
36
  *
31
37
  * Copyright (c) TanStack
@@ -34,10 +40,10 @@ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}
34
40
  * LICENSE.md file in the root directory of this source tree.
35
41
  *
36
42
  * @license MIT
37
- */function W9(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Qt(e,t){return typeof e=="function"?e(t):e}function Ke(e,t){return n=>{t.setState(r=>({...r,[e]:Qt(n,r[e])}))}}function Vo(e){return e instanceof Function}function G9(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Q9(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function Q(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((d,h)=>r[h]!==d)))return i;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const d=Math.round((Date.now()-a)*100)/100,h=Math.round((Date.now()-u)*100)/100,g=h/16,f=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${f(h,5)} /${f(d,5)} ms`,`
43
+ */function m1(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function on(e,t){return typeof e=="function"?e(t):e}function Ye(e,t){return n=>{t.setState(r=>({...r,[e]:on(n,r[e])}))}}function ba(e){return e instanceof Function}function H9(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function V9(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function Q(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((g,c)=>r[c]!==g)))return i;r=s;let u;if(n.key&&n.debug&&(u=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const g=Math.round((Date.now()-a)*100)/100,c=Math.round((Date.now()-u)*100)/100,h=c/16,f=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%c⏱ ${f(c,5)} /${f(g,5)} ms`,`
38
44
  font-size: .6rem;
39
45
  font-weight: bold;
40
- color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Y(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function Y9(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Q(()=>[e,n,t,o],(a,s,l,u)=>({table:a,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Y(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function Z9(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(i=(o=s.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,d;if(s.accessorFn?d=s.accessorFn:l&&(l.includes(".")?d=g=>{let f=g;for(const m of l.split(".")){var p;f=(p=f)==null?void 0:p[m]}return f}:d=g=>g[s.accessorKey]),!u)throw new Error;let h={id:`${String(u)}`,accessorFn:d,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Q(()=>[!0],()=>{var g;return[h,...(g=h.columns)==null?void 0:g.flatMap(f=>f.getFlatColumns())]},Y(e.options,"debugColumns")),getLeafColumns:Q(()=>[e._getOrderColumnsFn()],g=>{var f;if((f=h.columns)!=null&&f.length){let p=h.columns.flatMap(m=>m.getLeafColumns());return g(p)}return[h]},Y(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(h,e);return h}const Se="debugHeaders";function qu(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),a.push(l)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const X9={createTable:e=>{e.getHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r==null?void 0:r.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?o:[],l=(a=i==null?void 0:i.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?a:[],u=n.filter(h=>!(r!=null&&r.includes(h.id))&&!(i!=null&&i.includes(h.id)));return Oi(t,[...s,...u,...l],e)},Y(e.options,Se)),e.getCenterHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Oi(t,n,e,"center")),Y(e.options,Se)),e.getLeftHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oi(t,o,e,"left")},Y(e.options,Se)),e.getRightHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oi(t,o,e,"right")},Y(e.options,Se)),e.getFooterGroups=Q(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Y(e.options,Se)),e.getLeftFooterGroups=Q(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Y(e.options,Se)),e.getCenterFooterGroups=Q(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Y(e.options,Se)),e.getRightFooterGroups=Q(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Y(e.options,Se)),e.getFlatHeaders=Q(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Se)),e.getLeftFlatHeaders=Q(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Se)),e.getCenterFlatHeaders=Q(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Se)),e.getRightFlatHeaders=Q(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Se)),e.getCenterLeafHeaders=Q(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Se)),e.getLeftLeafHeaders=Q(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Se)),e.getRightLeafHeaders=Q(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Se)),e.getLeafHeaders=Q(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,l,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(d=>d.getLeafHeaders()).flat()},Y(e.options,Se))}};function Oi(e,t,n,r){var i,o;let a=0;const s=function(g,f){f===void 0&&(f=1),a=Math.max(a,f),g.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&s(p.columns,f+1)},0)};s(e);let l=[];const u=(g,f)=>{const p={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},m=[];g.forEach(b=>{const $=[...m].reverse()[0],x=b.column.depth===p.depth;let E,M=!1;if(x&&b.column.parent?E=b.column.parent:(E=b.column,M=!0),$&&($==null?void 0:$.column)===E)$.subHeaders.push(b);else{const C=qu(n,E,{id:[r,f,E.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:M,placeholderId:M?`${m.filter(k=>k.column===E).length}`:void 0,depth:f,index:m.length});C.subHeaders.push(b),m.push(C)}p.headers.push(b),b.headerGroup=p}),l.push(p),f>0&&u(m,f-1)},d=t.map((g,f)=>qu(n,g,{depth:a,index:f}));u(d,a-1),l.reverse();const h=g=>g.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,b=0,$=[0];p.subHeaders&&p.subHeaders.length?($=[],h(p.subHeaders).forEach(E=>{let{colSpan:M,rowSpan:C}=E;m+=M,$.push(C)})):m=1;const x=Math.min(...$);return b=b+x,p.colSpan=m,p.rowSpan=b,{colSpan:m,rowSpan:b}});return h((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const J9=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Q9(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const d=u.getParentRow();if(!d)break;l.push(d),u=d}return l.reverse()},getAllCells:Q(()=>[e.getAllLeafColumns()],l=>l.map(u=>Y9(e,s,u,u.id)),Y(e.options,"debugRows")),_getAllCellsByColumnId:Q(()=>[s.getAllCells()],l=>l.reduce((u,d)=>(u[d.column.id]=d,u),{}),Y(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},ey={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Oh=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};Oh.autoRemove=e=>rt(e);const Fh=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Fh.autoRemove=e=>rt(e);const Lh=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};Lh.autoRemove=e=>rt(e);const Ah=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};Ah.autoRemove=e=>rt(e)||!(e!=null&&e.length);const Ih=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});Ih.autoRemove=e=>rt(e)||!(e!=null&&e.length);const Nh=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});Nh.autoRemove=e=>rt(e)||!(e!=null&&e.length);const jh=(e,t,n)=>e.getValue(t)===n;jh.autoRemove=e=>rt(e);const _h=(e,t,n)=>e.getValue(t)==n;_h.autoRemove=e=>rt(e);const xl=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};xl.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};xl.autoRemove=e=>rt(e)||rt(e[0])&&rt(e[1]);const $t={includesString:Oh,includesStringSensitive:Fh,equalsString:Lh,arrIncludes:Ah,arrIncludesAll:Ih,arrIncludesSome:Nh,equals:jh,weakEquals:_h,inNumberRange:xl};function rt(e){return e==null||e===""}const ty={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ke("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?$t.includesString:typeof r=="number"?$t.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?$t.equals:Array.isArray(r)?$t.arrIncludes:$t.weakEquals},e.getFilterFn=()=>{var n,r;return Vo(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:$t[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r==null?void 0:r.find(d=>d.id===e.id),a=Qt(n,o?o.value:void 0);if(Wu(i,a,e)){var s;return(s=r==null?void 0:r.filter(d=>d.id!==e.id))!=null?s:[]}const l={id:e.id,value:a};if(o){var u;return(u=r==null?void 0:r.map(d=>d.id===e.id?l:d))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=Qt(t,i))==null?void 0:o.filter(a=>{const s=n.find(l=>l.id===a.id);if(s){const l=s.getFilterFn();if(Wu(l,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Wu(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const ny=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),ry=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},iy=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},oy=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},ay=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},sy=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!G9(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},ly=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),uy=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,cy=(e,t)=>t.length,ga={sum:ny,min:ry,max:iy,extent:oy,mean:ay,median:sy,unique:ly,uniqueCount:uy,count:cy},dy={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ke("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return ga.sum;if(Object.prototype.toString.call(r)==="[object Date]")return ga.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Vo(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:ga[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function fy(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const hy={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ke("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Q(n=>[Br(t,n)],n=>n.findIndex(r=>r.id===e.id),Y(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=Br(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=Br(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Q(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const l=a.shift(),u=s.findIndex(d=>d.id===l);u>-1&&o.push(s.splice(u,1)[0])}o=[...o,...s]}return fy(o,n,r)},Y(e.options,"debugTable"))}},pa=()=>({left:[],right:[]}),gy={getInitialState:e=>({columnPinning:pa(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ke("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,l;return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(h=>!(r!=null&&r.includes(h))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(h=>!(r!=null&&r.includes(h))),...r]}}if(n==="left"){var u,d;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(h=>!(r!=null&&r.includes(h))),...r],right:((d=i==null?void 0:i.right)!=null?d:[]).filter(h=>!(r!=null&&r.includes(h)))}}return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(h=>!(r!=null&&r.includes(h))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(h=>!(r!=null&&r.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>i==null?void 0:i.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Y(t.options,"debugRows")),e.getLeftVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Y(t.options,"debugRows")),e.getRightVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Y(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?pa():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:pa())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Y(e.options,"debugColumns")),e.getRightLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Y(e.options,"debugColumns")),e.getCenterLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Y(e.options,"debugColumns"))}},Fi={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},ma=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),py={getDefaultColumnDef:()=>Fi,getInitialState:e=>({columnSizing:{},columnSizingInfo:ma(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ke("columnSizing",e),onColumnSizingInfoChange:Ke("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Fi.minSize,(r=o??e.columnDef.size)!=null?r:Fi.size),(i=e.columnDef.maxSize)!=null?i:Fi.maxSize)},e.getStart=Q(n=>[n,Br(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Y(t.options,"debugColumns")),e.getAfter=Q(n=>[n,Br(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Y(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),ba(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map($=>[$.column.id,$.column.getSize()]):[[r.id,r.getSize()]],l=ba(o)?Math.round(o.touches[0].clientX):o.clientX,u={},d=($,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(E=>{var M,C;const k=t.options.columnResizeDirection==="rtl"?-1:1,F=(x-((M=E==null?void 0:E.startOffset)!=null?M:0))*k,y=Math.max(F/((C=E==null?void 0:E.startSize)!=null?C:0),-.999999);return E.columnSizingStart.forEach(D=>{let[P,T]=D;u[P]=Math.round(Math.max(T+T*y,0)*100)/100}),{...E,deltaOffset:F,deltaPercentage:y}}),(t.options.columnResizeMode==="onChange"||$==="end")&&t.setColumnSizing(E=>({...E,...u})))},h=$=>d("move",$),g=$=>{d("end",$),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=n||typeof document<"u"?document:null,p={moveHandler:$=>h($.clientX),upHandler:$=>{f==null||f.removeEventListener("mousemove",p.moveHandler),f==null||f.removeEventListener("mouseup",p.upHandler),g($.clientX)}},m={moveHandler:$=>($.cancelable&&($.preventDefault(),$.stopPropagation()),h($.touches[0].clientX),!1),upHandler:$=>{var x;f==null||f.removeEventListener("touchmove",m.moveHandler),f==null||f.removeEventListener("touchend",m.upHandler),$.cancelable&&($.preventDefault(),$.stopPropagation()),g((x=$.touches[0])==null?void 0:x.clientX)}},b=my()?{passive:!1}:!1;ba(o)?(f==null||f.addEventListener("touchmove",m.moveHandler,b),f==null||f.addEventListener("touchend",m.upHandler,b)):(f==null||f.addEventListener("mousemove",p.moveHandler,b),f==null||f.addEventListener("mouseup",p.upHandler,b)),t.setColumnSizingInfo($=>({...$,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?ma():(n=e.initialState.columnSizingInfo)!=null?n:ma())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Li=null;function my(){if(typeof Li=="boolean")return Li;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Li=e,Li}function ba(e){return e.type==="touchstart"}const by={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ke("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Q(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Y(t.options,"debugRows")),e.getVisibleCells=Q(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Y(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Q(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Y(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function Br(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const vy={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},yy={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ke("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>$t.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Vo(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:$t[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},wy={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ke("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...l}=a;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Es=0,Ps=10,va=()=>({pageIndex:Es,pageSize:Ps}),xy={getInitialState:e=>({...e,pagination:{...va(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ke("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>Qt(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?va():(i=e.initialState.pagination)!=null?i:va())},e.setPageIndex=r=>{e.setPagination(i=>{let o=Qt(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?Es:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Es)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?Ps:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:Ps)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,Qt(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=Qt(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=Q(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Y(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},ya=()=>({top:[],bottom:[]}),Cy={getInitialState:e=>({rowPinning:ya(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ke("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],a=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(l=>{var u,d;if(n==="bottom"){var h,g;return{top:((h=l==null?void 0:l.top)!=null?h:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((g=l==null?void 0:l.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var f,p;return{top:[...((f=l==null?void 0:l.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((d=l==null?void 0:l.bottom)!=null?d:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>i==null?void 0:i.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?ya():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:ya())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Y(e.options,"debugRows")),e.getBottomRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Y(e.options,"debugRows")),e.getCenterRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Y(e.options,"debugRows"))}},$y={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ke("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{Rs(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?wa(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getFilteredSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?wa(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getGroupedSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?wa(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return Rs(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Cl(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Ms(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Ms(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Rs=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>Rs(e,s.id,n,r,i))};function wa(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(l=>{var u;const d=Cl(l,n);if(d&&(r.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:o(l.subRows)}),d)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function Cl(e,t){var n;return(n=t[e.id])!=null?n:!1}function Ms(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(Cl(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=Ms(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const ks=/([0-9]+)/gm,Sy=(e,t,n)=>Kh(nn(e.getValue(n)).toLowerCase(),nn(t.getValue(n)).toLowerCase()),Ey=(e,t,n)=>Kh(nn(e.getValue(n)),nn(t.getValue(n))),Py=(e,t,n)=>$l(nn(e.getValue(n)).toLowerCase(),nn(t.getValue(n)).toLowerCase()),Ry=(e,t,n)=>$l(nn(e.getValue(n)),nn(t.getValue(n))),My=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},ky=(e,t,n)=>$l(e.getValue(n),t.getValue(n));function $l(e,t){return e===t?0:e>t?1:-1}function nn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Kh(e,t){const n=e.split(ks).filter(Boolean),r=t.split(ks).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),l=[a,s].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Tr={alphanumeric:Sy,alphanumericCaseSensitive:Ey,text:Py,textCaseSensitive:Ry,datetime:My,basic:ky},Dy={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ke("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Tr.datetime;if(typeof o=="string"&&(r=!0,o.split(ks).length>1))return Tr.alphanumeric}return r?Tr.text:Tr.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return Vo(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Tr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(f=>f.id===e.id),l=a==null?void 0:a.findIndex(f=>f.id===e.id);let u=[],d,h=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?d="toggle":d="add":a!=null&&a.length&&l!==a.length-1?d="replace":s?d="toggle":d="replace",d==="toggle"&&(o||i||(d="remove")),d==="add"){var g;u=[...a,{id:e.id,desc:h}],u.splice(0,u.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else d==="toggle"?u=a.map(f=>f.id===e.id?{...f,desc:h}:f):d==="remove"?u=a.filter(f=>f.id!==e.id):u=[{id:e.id,desc:h}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},Ty=[X9,by,hy,gy,ey,ty,vy,yy,Dy,dy,wy,xy,Cy,$y,py];function Oy(e){var t,n;const r=[...Ty,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((g,f)=>Object.assign(g,f.getDefaultOptions==null?void 0:f.getDefaultOptions(i)),{}),a=g=>i.options.mergeOptions?i.options.mergeOptions(o,g):{...o,...g};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(g=>{var f;l=(f=g.getInitialState==null?void 0:g.getInitialState(l))!=null?f:l});const u=[];let d=!1;const h={_features:r,options:{...o,...e},initialState:l,_queue:g=>{u.push(g),d||(d=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();d=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{i.setState(i.initialState)},setOptions:g=>{const f=Qt(g,i.options);i.options=a(f)},getState:()=>i.options.state,setState:g=>{i.options.onStateChange==null||i.options.onStateChange(g)},_getRowId:(g,f,p)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(g,f,p))!=null?m:`${p?[p.id,f].join("."):f}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(g,f)=>{let p=(f?i.getPrePaginationRowModel():i.getRowModel()).rowsById[g];if(!p&&(p=i.getCoreRowModel().rowsById[g],!p))throw new Error;return p},_getDefaultColumnDef:Q(()=>[i.options.defaultColumn],g=>{var f;return g=(f=g)!=null?f:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,b;return(m=(b=p.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...g}},Y(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Q(()=>[i._getColumnDefs()],g=>{const f=function(p,m,b){return b===void 0&&(b=0),p.map($=>{const x=Z9(i,$,b,m),E=$;return x.columns=E.columns?f(E.columns,x,b+1):[],x})};return f(g)},Y(e,"debugColumns")),getAllFlatColumns:Q(()=>[i.getAllColumns()],g=>g.flatMap(f=>f.getFlatColumns()),Y(e,"debugColumns")),_getAllFlatColumnsById:Q(()=>[i.getAllFlatColumns()],g=>g.reduce((f,p)=>(f[p.id]=p,f),{}),Y(e,"debugColumns")),getAllLeafColumns:Q(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(g,f)=>{let p=g.flatMap(m=>m.getLeafColumns());return f(p)},Y(e,"debugColumns")),getColumn:g=>i._getAllFlatColumnsById()[g]};Object.assign(i,h);for(let g=0;g<i._features.length;g++){const f=i._features[g];f==null||f.createTable==null||f.createTable(i)}return i}function Fy(){return e=>Q(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let u=0;u<i.length;u++){const d=J9(e,e._getRowId(i[u],u,a),i[u],u,o,void 0,a==null?void 0:a.id);if(n.flatRows.push(d),n.rowsById[d.id]=d,s.push(d),e.options.getSubRows){var l;d.originalSubRows=e.options.getSubRows(i[u],u),(l=d.originalSubRows)!=null&&l.length&&(d.subRows=r(d.originalSubRows,o+1,d))}}return s};return n.rows=r(t),n},Y(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
46
+ color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n==null?void 0:n.key)}return i}}function Y(e,t,n,r){return{debug:()=>{var i;return(i=e==null?void 0:e.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function z9(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:Q(()=>[e,n,t,o],(a,s,l,u)=>({table:a,column:s,row:l,cell:u,getValue:u.getValue,renderValue:u.renderValue}),Y(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function U9(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},l=s.accessorKey;let u=(i=(o=s.id)!=null?o:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,g;if(s.accessorFn?g=s.accessorFn:l&&(l.includes(".")?g=h=>{let f=h;for(const m of l.split(".")){var p;f=(p=f)==null?void 0:p[m]}return f}:g=h=>h[s.accessorKey]),!u)throw new Error;let c={id:`${String(u)}`,accessorFn:g,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:Q(()=>[!0],()=>{var h;return[c,...(h=c.columns)==null?void 0:h.flatMap(f=>f.getFlatColumns())]},Y(e.options,"debugColumns")),getLeafColumns:Q(()=>[e._getOrderColumnsFn()],h=>{var f;if((f=c.columns)!=null&&f.length){let p=c.columns.flatMap(m=>m.getLeafColumns());return h(p)}return[c]},Y(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(c,e);return c}const Re="debugHeaders";function Ec(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(s),a.push(l)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const W9={createTable:e=>{e.getHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r==null?void 0:r.map(c=>n.find(h=>h.id===c)).filter(Boolean))!=null?o:[],l=(a=i==null?void 0:i.map(c=>n.find(h=>h.id===c)).filter(Boolean))!=null?a:[],u=n.filter(c=>!(r!=null&&r.includes(c.id))&&!(i!=null&&i.includes(c.id)));return Yi(t,[...s,...u,...l],e)},Y(e.options,Re)),e.getCenterHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Yi(t,n,e,"center")),Y(e.options,Re)),e.getLeftHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Yi(t,o,e,"left")},Y(e.options,Re)),e.getRightHeaderGroups=Q(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r==null?void 0:r.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Yi(t,o,e,"right")},Y(e.options,Re)),e.getFooterGroups=Q(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Y(e.options,Re)),e.getLeftFooterGroups=Q(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Y(e.options,Re)),e.getCenterFooterGroups=Q(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Y(e.options,Re)),e.getRightFooterGroups=Q(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Y(e.options,Re)),e.getFlatHeaders=Q(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Re)),e.getLeftFlatHeaders=Q(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Re)),e.getCenterFlatHeaders=Q(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Re)),e.getRightFlatHeaders=Q(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Y(e.options,Re)),e.getCenterLeafHeaders=Q(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Re)),e.getLeftLeafHeaders=Q(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Re)),e.getRightLeafHeaders=Q(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Y(e.options,Re)),e.getLeafHeaders=Q(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,l,u;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(l=(u=r[0])==null?void 0:u.headers)!=null?l:[]].map(g=>g.getLeafHeaders()).flat()},Y(e.options,Re))}};function Yi(e,t,n,r){var i,o;let a=0;const s=function(h,f){f===void 0&&(f=1),a=Math.max(a,f),h.filter(p=>p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&s(p.columns,f+1)},0)};s(e);let l=[];const u=(h,f)=>{const p={depth:f,id:[r,`${f}`].filter(Boolean).join("_"),headers:[]},m=[];h.forEach(b=>{const v=[...m].reverse()[0],w=b.column.depth===p.depth;let x,k=!1;if(w&&b.column.parent?x=b.column.parent:(x=b.column,k=!0),v&&(v==null?void 0:v.column)===x)v.subHeaders.push(b);else{const S=Ec(n,x,{id:[r,f,x.id,b==null?void 0:b.id].filter(Boolean).join("_"),isPlaceholder:k,placeholderId:k?`${m.filter(R=>R.column===x).length}`:void 0,depth:f,index:m.length});S.subHeaders.push(b),m.push(S)}p.headers.push(b),b.headerGroup=p}),l.push(p),f>0&&u(m,f-1)},g=t.map((h,f)=>Ec(n,h,{depth:a,index:f}));u(g,a-1),l.reverse();const c=h=>h.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,b=0,v=[0];p.subHeaders&&p.subHeaders.length?(v=[],c(p.subHeaders).forEach(x=>{let{colSpan:k,rowSpan:S}=x;m+=k,v.push(S)})):m=1;const w=Math.min(...v);return b=b+w,p.colSpan=m,p.rowSpan=b,{colSpan:m,rowSpan:b}});return c((i=(o=l[0])==null?void 0:o.headers)!=null?i:[]),l}const q9=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(s._valuesCache.hasOwnProperty(l))return s._valuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return s._valuesCache[l]=u.accessorFn(s.original,r),s._valuesCache[l]},getUniqueValues:l=>{if(s._uniqueValuesCache.hasOwnProperty(l))return s._uniqueValuesCache[l];const u=e.getColumn(l);if(u!=null&&u.accessorFn)return u.columnDef.getUniqueValues?(s._uniqueValuesCache[l]=u.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[l]):(s._uniqueValuesCache[l]=[s.getValue(l)],s._uniqueValuesCache[l])},renderValue:l=>{var u;return(u=s.getValue(l))!=null?u:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>V9(s.subRows,l=>l.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let l=[],u=s;for(;;){const g=u.getParentRow();if(!g)break;l.push(g),u=g}return l.reverse()},getAllCells:Q(()=>[e.getAllLeafColumns()],l=>l.map(u=>z9(e,s,u,u.id)),Y(e.options,"debugRows")),_getAllCellsByColumnId:Q(()=>[s.getAllCells()],l=>l.reduce((u,g)=>(u[g.column.id]=g,u),{}),Y(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const u=e._features[l];u==null||u.createRow==null||u.createRow(s,e)}return s},G9={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},b1=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};b1.autoRemove=e=>mt(e);const v1=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};v1.autoRemove=e=>mt(e);const y1=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===(n==null?void 0:n.toLowerCase())};y1.autoRemove=e=>mt(e);const w1=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};w1.autoRemove=e=>mt(e);const x1=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});x1.autoRemove=e=>mt(e)||!(e!=null&&e.length);const C1=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});C1.autoRemove=e=>mt(e)||!(e!=null&&e.length);const S1=(e,t,n)=>e.getValue(t)===n;S1.autoRemove=e=>mt(e);const $1=(e,t,n)=>e.getValue(t)==n;$1.autoRemove=e=>mt(e);const zl=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};zl.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};zl.autoRemove=e=>mt(e)||mt(e[0])&&mt(e[1]);const Lt={includesString:b1,includesStringSensitive:v1,equalsString:y1,arrIncludes:w1,arrIncludesAll:x1,arrIncludesSome:C1,equals:S1,weakEquals:$1,inNumberRange:zl};function mt(e){return e==null||e===""}const Q9={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Ye("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);return typeof r=="string"?Lt.includesString:typeof r=="number"?Lt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Lt.equals:Array.isArray(r)?Lt.arrIncludes:Lt.weakEquals},e.getFilterFn=()=>{var n,r;return ba(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:Lt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r==null?void 0:r.find(g=>g.id===e.id),a=on(n,o?o.value:void 0);if(Pc(i,a,e)){var s;return(s=r==null?void 0:r.filter(g=>g.id!==e.id))!=null?s:[]}const l={id:e.id,value:a};if(o){var u;return(u=r==null?void 0:r.map(g=>g.id===e.id?l:g))!=null?u:[]}return r!=null&&r.length?[...r,l]:[l]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=on(t,i))==null?void 0:o.filter(a=>{const s=n.find(l=>l.id===a.id);if(s){const l=s.getFilterFn();if(Pc(l,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function Pc(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Y9=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),X9=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},Z9=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r<o||r===void 0&&o>=o)&&(r=o)}),r},J9=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i<a&&(i=a)))}),[r,i]},e3=(e,t)=>{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},t3=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!H9(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},n3=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),r3=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,i3=(e,t)=>t.length,Ha={sum:Y9,min:X9,max:Z9,extent:J9,mean:e3,median:t3,unique:n3,uniqueCount:r3,count:i3},o3={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Ye("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n==null?void 0:n.getValue(e.id);if(typeof r=="number")return Ha.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Ha.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return ba(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:Ha[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function a3(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const s3={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Ye("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=Q(n=>[ii(t,n)],n=>n.findIndex(r=>r.id===e.id),Y(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=ii(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=ii(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=Q(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const l=a.shift(),u=s.findIndex(g=>g.id===l);u>-1&&o.push(s.splice(u,1)[0])}o=[...o,...s]}return a3(o,n,r)},Y(e.options,"debugTable"))}},Va=()=>({left:[],right:[]}),l3={getInitialState:e=>({columnPinning:Va(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Ye("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,l;return{left:((s=i==null?void 0:i.left)!=null?s:[]).filter(c=>!(r!=null&&r.includes(c))),right:[...((l=i==null?void 0:i.right)!=null?l:[]).filter(c=>!(r!=null&&r.includes(c))),...r]}}if(n==="left"){var u,g;return{left:[...((u=i==null?void 0:i.left)!=null?u:[]).filter(c=>!(r!=null&&r.includes(c))),...r],right:((g=i==null?void 0:i.right)!=null?g:[]).filter(c=>!(r!=null&&r.includes(c)))}}return{left:((o=i==null?void 0:i.left)!=null?o:[]).filter(c=>!(r!=null&&r.includes(c))),right:((a=i==null?void 0:i.right)!=null?a:[]).filter(c=>!(r!=null&&r.includes(c)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>i==null?void 0:i.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Y(t.options,"debugRows")),e.getLeftVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Y(t.options,"debugRows")),e.getRightVisibleCells=Q(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Y(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?Va():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Va())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Y(e.options,"debugColumns")),e.getRightLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Y(e.options,"debugColumns")),e.getCenterLeafColumns=Q(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Y(e.options,"debugColumns"))}};function u3(e){return e||(typeof document<"u"?document:null)}const Xi={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},za=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),c3={getDefaultColumnDef:()=>Xi,getInitialState:e=>({columnSizing:{},columnSizingInfo:za(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Ye("columnSizing",e),onColumnSizingInfoChange:Ye("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Xi.minSize,(r=o??e.columnDef.size)!=null?r:Xi.size),(i=e.columnDef.maxSize)!=null?i:Xi.maxSize)},e.getStart=Q(n=>[n,ii(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Y(t.options,"debugColumns")),e.getAfter=Q(n=>[n,ii(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Y(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r==null?void 0:r.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),Ua(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(v=>[v.column.id,v.column.getSize()]):[[r.id,r.getSize()]],l=Ua(o)?Math.round(o.touches[0].clientX):o.clientX,u={},g=(v,w)=>{typeof w=="number"&&(t.setColumnSizingInfo(x=>{var k,S;const R=t.options.columnResizeDirection==="rtl"?-1:1,P=(w-((k=x==null?void 0:x.startOffset)!=null?k:0))*R,I=Math.max(P/((S=x==null?void 0:x.startSize)!=null?S:0),-.999999);return x.columnSizingStart.forEach(D=>{let[L,E]=D;u[L]=Math.round(Math.max(E+E*I,0)*100)/100}),{...x,deltaOffset:P,deltaPercentage:I}}),(t.options.columnResizeMode==="onChange"||v==="end")&&t.setColumnSizing(x=>({...x,...u})))},c=v=>g("move",v),h=v=>{g("end",v),t.setColumnSizingInfo(w=>({...w,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},f=u3(n),p={moveHandler:v=>c(v.clientX),upHandler:v=>{f==null||f.removeEventListener("mousemove",p.moveHandler),f==null||f.removeEventListener("mouseup",p.upHandler),h(v.clientX)}},m={moveHandler:v=>(v.cancelable&&(v.preventDefault(),v.stopPropagation()),c(v.touches[0].clientX),!1),upHandler:v=>{var w;f==null||f.removeEventListener("touchmove",m.moveHandler),f==null||f.removeEventListener("touchend",m.upHandler),v.cancelable&&(v.preventDefault(),v.stopPropagation()),h((w=v.touches[0])==null?void 0:w.clientX)}},b=d3()?{passive:!1}:!1;Ua(o)?(f==null||f.addEventListener("touchmove",m.moveHandler,b),f==null||f.addEventListener("touchend",m.upHandler,b)):(f==null||f.addEventListener("mousemove",p.moveHandler,b),f==null||f.addEventListener("mouseup",p.upHandler,b)),t.setColumnSizingInfo(v=>({...v,startOffset:l,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?za():(n=e.initialState.columnSizingInfo)!=null?n:za())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Zi=null;function d3(){if(typeof Zi=="boolean")return Zi;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Zi=e,Zi}function Ua(e){return e.type==="touchstart"}const f3={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Ye("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=Q(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Y(t.options,"debugRows")),e.getVisibleCells=Q(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Y(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>Q(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Y(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function ii(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const h3={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},g3={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Ye("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Lt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return ba(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Lt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},p3={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Ye("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...l}=a;return l}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r!=null&&r[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Ys=0,Xs=10,Wa=()=>({pageIndex:Ys,pageSize:Xs}),m3={getInitialState:e=>({...e,pagination:{...Wa(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:Ye("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>on(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?Wa():(i=e.initialState.pagination)!=null?i:Wa())},e.setPageIndex=r=>{e.setPagination(i=>{let o=on(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?Ys:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:Ys)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?Xs:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:Xs)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,on(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=on(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=Q(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Y(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:r<i-1},e.previousPage=()=>e.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},qa=()=>({top:[],bottom:[]}),b3={getInitialState:e=>({rowPinning:qa(),...e}),getDefaultOptions:e=>({onRowPinningChange:Ye("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(l=>{let{id:u}=l;return u}):[],a=i?e.getParentRows().map(l=>{let{id:u}=l;return u}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(l=>{var u,g;if(n==="bottom"){var c,h;return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(m=>!(s!=null&&s.has(m))),bottom:[...((h=l==null?void 0:l.bottom)!=null?h:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)]}}if(n==="top"){var f,p;return{top:[...((f=l==null?void 0:l.top)!=null?f:[]).filter(m=>!(s!=null&&s.has(m))),...Array.from(s)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(m=>!(s!=null&&s.has(m)))}}return{top:((u=l==null?void 0:l.top)!=null?u:[]).filter(m=>!(s!=null&&s.has(m))),bottom:((g=l==null?void 0:l.bottom)!=null?g:[]).filter(m=>!(s!=null&&s.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r==null?void 0:r.includes(s)),a=n.some(s=>i==null?void 0:i.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o==null?void 0:o.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?qa():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:qa())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Y(e.options,"debugRows")),e.getBottomRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Y(e.options,"debugRows")),e.getCenterRows=Q(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Y(e.options,"debugRows"))}},v3={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Ye("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{Zs(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?Ga(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getFilteredSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?Ga(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getGroupedSelectedRowModel=Q(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?Ga(e,n):{rows:[],flatRows:[],rowsById:{}},Y(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return Zs(s,e.id,n,(a=r==null?void 0:r.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Ul(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return Js(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return Js(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},Zs=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>Zs(e,s.id,n,r,i))};function Ga(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(l=>{var u;const g=Ul(l,n);if(g&&(r.push(l),i[l.id]=l),(u=l.subRows)!=null&&u.length&&(l={...l,subRows:o(l.subRows)}),g)return l}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function Ul(e,t){var n;return(n=t[e.id])!=null?n:!1}function Js(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(Ul(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=Js(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const el=/([0-9]+)/gm,y3=(e,t,n)=>E1(fn(e.getValue(n)).toLowerCase(),fn(t.getValue(n)).toLowerCase()),w3=(e,t,n)=>E1(fn(e.getValue(n)),fn(t.getValue(n))),x3=(e,t,n)=>Wl(fn(e.getValue(n)).toLowerCase(),fn(t.getValue(n)).toLowerCase()),C3=(e,t,n)=>Wl(fn(e.getValue(n)),fn(t.getValue(n))),S3=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:r<i?-1:0},$3=(e,t,n)=>Wl(e.getValue(n),t.getValue(n));function Wl(e,t){return e===t?0:e>t?1:-1}function fn(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function E1(e,t){const n=e.split(el).filter(Boolean),r=t.split(el).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),l=[a,s].sort();if(isNaN(l[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(l[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Wr={alphanumeric:y3,alphanumericCaseSensitive:w3,text:x3,textCaseSensitive:C3,datetime:S3,basic:$3},E3={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Ye("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i==null?void 0:i.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Wr.datetime;if(typeof o=="string"&&(r=!0,o.split(el).length>1))return Wr.alphanumeric}return r?Wr.text:Wr.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return ba(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Wr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a==null?void 0:a.find(f=>f.id===e.id),l=a==null?void 0:a.findIndex(f=>f.id===e.id);let u=[],g,c=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?g="toggle":g="add":a!=null&&a.length&&l!==a.length-1?g="replace":s?g="toggle":g="replace",g==="toggle"&&(o||i||(g="remove")),g==="add"){var h;u=[...a,{id:e.id,desc:c}],u.splice(0,u.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else g==="toggle"?u=a.map(f=>f.id===e.id?{...f,desc:c}:f):g==="remove"?u=a.filter(f=>f.id!==e.id):u=[{id:e.id,desc:c}];return u})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},P3=[W9,f3,s3,l3,G9,Q9,h3,g3,E3,o3,p3,m3,b3,v3,c3];function R3(e){var t,n;const r=[...P3,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,f)=>Object.assign(h,f.getDefaultOptions==null?void 0:f.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let l={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var f;l=(f=h.getInitialState==null?void 0:h.getInitialState(l))!=null?f:l});const u=[];let g=!1;const c={_features:r,options:{...o,...e},initialState:l,_queue:h=>{u.push(h),g||(g=!0,Promise.resolve().then(()=>{for(;u.length;)u.shift()();g=!1}).catch(f=>setTimeout(()=>{throw f})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const f=on(h,i.options);i.options=a(f)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,f,p)=>{var m;return(m=i.options.getRowId==null?void 0:i.options.getRowId(h,f,p))!=null?m:`${p?[p.id,f].join("."):f}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,f)=>{let p=(f?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!p&&(p=i.getCoreRowModel().rowsById[h],!p))throw new Error;return p},_getDefaultColumnDef:Q(()=>[i.options.defaultColumn],h=>{var f;return h=(f=h)!=null?f:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,b;return(m=(b=p.renderValue())==null||b.toString==null?void 0:b.toString())!=null?m:null},...i._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...h}},Y(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:Q(()=>[i._getColumnDefs()],h=>{const f=function(p,m,b){return b===void 0&&(b=0),p.map(v=>{const w=U9(i,v,b,m),x=v;return w.columns=x.columns?f(x.columns,w,b+1):[],w})};return f(h)},Y(e,"debugColumns")),getAllFlatColumns:Q(()=>[i.getAllColumns()],h=>h.flatMap(f=>f.getFlatColumns()),Y(e,"debugColumns")),_getAllFlatColumnsById:Q(()=>[i.getAllFlatColumns()],h=>h.reduce((f,p)=>(f[p.id]=p,f),{}),Y(e,"debugColumns")),getAllLeafColumns:Q(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,f)=>{let p=h.flatMap(m=>m.getLeafColumns());return f(p)},Y(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,c);for(let h=0;h<i._features.length;h++){const f=i._features[h];f==null||f.createTable==null||f.createTable(i)}return i}function P1(){return e=>Q(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let u=0;u<i.length;u++){const g=q9(e,e._getRowId(i[u],u,a),i[u],u,o,void 0,a==null?void 0:a.id);if(n.flatRows.push(g),n.rowsById[g.id]=g,s.push(g),e.options.getSubRows){var l;g.originalSubRows=e.options.getSubRows(i[u],u),(l=g.originalSubRows)!=null&&l.length&&(g.subRows=r(g.originalSubRows,o+1,g))}}return s};return n.rows=r(t),n},Y(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}/**
41
47
  * react-table
42
48
  *
43
49
  * Copyright (c) TanStack
@@ -46,11 +52,10 @@ Please change the parent <Route path="${x}"> to <Route path="${x==="/"?"*":`${x}
46
52
  * LICENSE.md file in the root directory of this source tree.
47
53
  *
48
54
  * @license MIT
49
- */function Gu(e,t){return e?Ly(e)?S.createElement(e,t):e:null}function Ly(e){return Ay(e)||typeof e=="function"||Iy(e)}function Ay(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Iy(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Ny(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=S.useState(()=>({current:Oy(t)})),[r,i]=S.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const Bh=6048e5,jy=864e5,Qu=6e4,Yu=525600,zn=43200,vo=1440,Zu=Symbol.for("constructDateFrom");function Mt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Zu in e?e[Zu](t):e instanceof Date?new e.constructor(t):new Date(t)}function $e(e,t){return Mt(t||e,e)}let _y={};function $r(){return _y}function Xr(e,t){var s,l,u,d;const n=$r(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,i=$e(e,t==null?void 0:t.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function yo(e,t){return Xr(e,{...t,weekStartsOn:1})}function Hh(e,t){const n=$e(e,t==null?void 0:t.in),r=n.getFullYear(),i=Mt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=yo(i),a=Mt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=yo(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hr(e){const t=$e(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function gi(e,...t){const n=Mt.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Xu(e,t){const n=$e(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Ky(e,t,n){const[r,i]=gi(n==null?void 0:n.in,e,t),o=Xu(r),a=Xu(i),s=+o-hr(o),l=+a-hr(a);return Math.round((s-l)/jy)}function By(e,t){const n=Hh(e,t),r=Mt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),yo(r)}function Hr(e,t){const n=+$e(e)-+$e(t);return n<0?-1:n>0?1:n}function Hy(e){return Mt(e,Date.now())}function Vy(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zy(e){return!(!Vy(e)&&typeof e!="number"||isNaN(+$e(e)))}function Uy(e,t,n){const[r,i]=gi(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Vh(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function qy(e,t){return+$e(e)-+$e(t)}function Wy(e,t){const n=$e(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function Gy(e,t){const n=$e(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Qy(e,t){const n=$e(e,t==null?void 0:t.in);return+Wy(n,t)==+Gy(n,t)}function Yy(e,t,n){const[r,i,o]=gi(n==null?void 0:n.in,e,e,t),a=Hr(i,o),s=Math.abs(Uy(i,o));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=Hr(i,o)===-a;Qy(r)&&s===1&&Hr(r,o)===1&&(l=!1);const u=a*(s-+l);return u===0?0:u}function Zy(e,t,n){const r=qy(e,t)/1e3;return Vh(n==null?void 0:n.roundingMethod)(r)}function Xy(e,t){const n=$e(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const Jy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},e3=(e,t,n)=>{let r;const i=Jy[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function xa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const t3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},n3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},r3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},i3={date:xa({formats:t3,defaultWidth:"full"}),time:xa({formats:n3,defaultWidth:"full"}),dateTime:xa({formats:r3,defaultWidth:"full"})},o3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},a3=(e,t,n,r)=>o3[e];function Or(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const s3={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},l3={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},u3={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},c3={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},d3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},f3={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},h3=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},g3={ordinalNumber:h3,era:Or({values:s3,defaultWidth:"wide"}),quarter:Or({values:l3,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Or({values:u3,defaultWidth:"wide"}),day:Or({values:c3,defaultWidth:"wide"}),dayPeriod:Or({values:d3,defaultWidth:"wide",formattingValues:f3,defaultFormattingWidth:"wide"})};function Fr(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?m3(s,h=>h.test(a)):p3(s,h=>h.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(a.length);return{value:u,rest:d}}}function p3(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function m3(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function b3(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const v3=/^(\d+)(th|st|nd|rd)?/i,y3=/\d+/i,w3={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},x3={any:[/^b/i,/^(a|c)/i]},C3={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},$3={any:[/1/i,/2/i,/3/i,/4/i]},S3={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},E3={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},P3={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},R3={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},M3={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},k3={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},D3={ordinalNumber:b3({matchPattern:v3,parsePattern:y3,valueCallback:e=>parseInt(e,10)}),era:Fr({matchPatterns:w3,defaultMatchWidth:"wide",parsePatterns:x3,defaultParseWidth:"any"}),quarter:Fr({matchPatterns:C3,defaultMatchWidth:"wide",parsePatterns:$3,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Fr({matchPatterns:S3,defaultMatchWidth:"wide",parsePatterns:E3,defaultParseWidth:"any"}),day:Fr({matchPatterns:P3,defaultMatchWidth:"wide",parsePatterns:R3,defaultParseWidth:"any"}),dayPeriod:Fr({matchPatterns:M3,defaultMatchWidth:"any",parsePatterns:k3,defaultParseWidth:"any"})},Sl={code:"en-US",formatDistance:e3,formatLong:i3,formatRelative:a3,localize:g3,match:D3,options:{weekStartsOn:0,firstWeekContainsDate:1}};function T3(e,t){const n=$e(e,t==null?void 0:t.in);return Ky(n,Xy(n))+1}function O3(e,t){const n=$e(e,t==null?void 0:t.in),r=+yo(n)-+By(n);return Math.round(r/Bh)+1}function zh(e,t){var d,h,g,f;const n=$e(e,t==null?void 0:t.in),r=n.getFullYear(),i=$r(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(g=i.locale)==null?void 0:g.options)==null?void 0:f.firstWeekContainsDate)??1,a=Mt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=Xr(a,t),l=Mt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const u=Xr(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function F3(e,t){var s,l,u,d;const n=$r(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,i=zh(e,t),o=Mt((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),Xr(o,t)}function L3(e,t){const n=$e(e,t==null?void 0:t.in),r=+Xr(n,t)-+F3(n,t);return Math.round(r/Bh)+1}function ne(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const At={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ne(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ne(n+1,2)},d(e,t){return ne(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ne(e.getHours()%12||12,t.length)},H(e,t){return ne(e.getHours(),t.length)},m(e,t){return ne(e.getMinutes(),t.length)},s(e,t){return ne(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return ne(i,t.length)}},In={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ju={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return At.y(e,t)},Y:function(e,t,n,r){const i=zh(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return ne(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):ne(o,t.length)},R:function(e,t){const n=Hh(e);return ne(n,t.length)},u:function(e,t){const n=e.getFullYear();return ne(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ne(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ne(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return At.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ne(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=L3(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):ne(i,t.length)},I:function(e,t,n){const r=O3(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ne(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):At.d(e,t)},D:function(e,t,n){const r=T3(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ne(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return ne(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return ne(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return ne(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=In.noon:r===0?i=In.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=In.evening:r>=12?i=In.afternoon:r>=4?i=In.morning:i=In.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return At.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):At.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ne(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ne(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):At.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):At.s(e,t)},S:function(e,t){return At.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return tc(r);case"XXXX":case"XX":return un(r);case"XXXXX":case"XXX":default:return un(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return tc(r);case"xxxx":case"xx":return un(r);case"xxxxx":case"xxx":default:return un(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ec(r,":");case"OOOO":default:return"GMT"+un(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ec(r,":");case"zzzz":default:return"GMT"+un(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ne(r,t.length)},T:function(e,t,n){return ne(+e,t.length)}};function ec(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+ne(o,2)}function tc(e,t){return e%60===0?(e>0?"-":"+")+ne(Math.abs(e)/60,2):un(e,t)}function un(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=ne(Math.trunc(r/60),2),o=ne(r%60,2);return n+i+t+o}const nc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Uh=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},A3=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return nc(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",nc(r,t)).replace("{{time}}",Uh(i,t))},I3={p:Uh,P:A3},N3=/^D+$/,j3=/^Y+$/,_3=["D","DD","YY","YYYY"];function K3(e){return N3.test(e)}function B3(e){return j3.test(e)}function H3(e,t,n){const r=V3(e,t,n);if(console.warn(r),_3.includes(e))throw new RangeError(r)}function V3(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const z3=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,U3=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,q3=/^'([^]*?)'?$/,W3=/''/g,G3=/[a-zA-Z]/;function Q3(e,t,n){var d,h,g,f;const r=$r(),i=r.locale??Sl,o=r.firstWeekContainsDate??((h=(d=r.locale)==null?void 0:d.options)==null?void 0:h.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(g=r.locale)==null?void 0:g.options)==null?void 0:f.weekStartsOn)??0,s=$e(e,n==null?void 0:n.in);if(!zy(s))throw new RangeError("Invalid time value");let l=t.match(U3).map(p=>{const m=p[0];if(m==="p"||m==="P"){const b=I3[m];return b(p,i.formatLong)}return p}).join("").match(z3).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:Y3(p)};if(Ju[m])return{isToken:!0,value:p};if(m.match(G3))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(B3(m)||K3(m))&&H3(m,t,String(e));const b=Ju[m[0]];return b(s,m,i.localize,u)}).join("")}function Y3(e){const t=e.match(q3);return t?t[1].replace(W3,"'"):e}function Z3(e,t,n){const r=$r(),i=(n==null?void 0:n.locale)??r.locale??Sl,o=2520,a=Hr(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a}),[l,u]=gi(n==null?void 0:n.in,...a>0?[t,e]:[e,t]),d=Zy(u,l),h=(hr(u)-hr(l))/1e3,g=Math.round((d-h)/60);let f;if(g<2)return n!=null&&n.includeSeconds?d<5?i.formatDistance("lessThanXSeconds",5,s):d<10?i.formatDistance("lessThanXSeconds",10,s):d<20?i.formatDistance("lessThanXSeconds",20,s):d<40?i.formatDistance("halfAMinute",0,s):d<60?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",1,s):g===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",g,s);if(g<45)return i.formatDistance("xMinutes",g,s);if(g<90)return i.formatDistance("aboutXHours",1,s);if(g<vo){const p=Math.round(g/60);return i.formatDistance("aboutXHours",p,s)}else{if(g<o)return i.formatDistance("xDays",1,s);if(g<zn){const p=Math.round(g/vo);return i.formatDistance("xDays",p,s)}else if(g<zn*2)return f=Math.round(g/zn),i.formatDistance("aboutXMonths",f,s)}if(f=Yy(u,l),f<12){const p=Math.round(g/zn);return i.formatDistance("xMonths",p,s)}else{const p=f%12,m=Math.trunc(f/12);return p<3?i.formatDistance("aboutXYears",m,s):p<9?i.formatDistance("overXYears",m,s):i.formatDistance("almostXYears",m+1,s)}}function X3(e,t,n){const r=$r(),i=(n==null?void 0:n.locale)??r.locale??Sl,o=Hr(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o}),[s,l]=gi(n==null?void 0:n.in,...o>0?[t,e]:[e,t]),u=Vh((n==null?void 0:n.roundingMethod)??"round"),d=l.getTime()-s.getTime(),h=d/Qu,g=hr(l)-hr(s),f=(d-g)/Qu,p=n==null?void 0:n.unit;let m;if(p?m=p:h<1?m="second":h<60?m="minute":h<vo?m="hour":f<zn?m="day":f<Yu?m="month":m="year",m==="second"){const b=u(d/1e3);return i.formatDistance("xSeconds",b,a)}else if(m==="minute"){const b=u(h);return i.formatDistance("xMinutes",b,a)}else if(m==="hour"){const b=u(h/60);return i.formatDistance("xHours",b,a)}else if(m==="day"){const b=u(f/vo);return i.formatDistance("xDays",b,a)}else if(m==="month"){const b=u(f/zn);return b===12&&p!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",b,a)}else{const b=u(f/Yu);return i.formatDistance("xYears",b,a)}}function J3(e,t){return Z3(e,Hy(e),t)}var Ds=new Map,Ai=new WeakMap,rc=0,e4=void 0;function t4(e){return e?(Ai.has(e)||(rc+=1,Ai.set(e,rc.toString())),Ai.get(e)):"0"}function n4(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?t4(e.root):e[t]}`).toString()}function r4(e){const t=n4(e);let n=Ds.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(a=>{a.forEach(s=>{var l;const u=s.isIntersecting&&i.some(d=>s.intersectionRatio>=d);e.trackVisibility&&typeof s.isVisible>"u"&&(s.isVisible=u),(l=r.get(s.target))==null||l.forEach(d=>{d(u,s)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},Ds.set(t,n)}return n}function i4(e,t,n={},r=e4){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:o,elements:a}=r4(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),s.length===0&&(a.delete(e),o.unobserve(e)),a.size===0&&(o.disconnect(),Ds.delete(i))}}function o4({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:u}={}){var d;const[h,g]=S.useState(null),f=S.useRef(u),[p,m]=S.useState({inView:!!s,entry:void 0});f.current=u,S.useEffect(()=>{if(a||!h)return;let E;return E=i4(h,(M,C)=>{m({inView:M,entry:C}),f.current&&f.current(M,C),C.isIntersecting&&o&&E&&(E(),E=void 0)},{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{E&&E()}},[Array.isArray(e)?e.toString():e,h,i,r,o,a,n,l,t]);const b=(d=p.entry)==null?void 0:d.target,$=S.useRef(void 0);!h&&b&&!o&&!a&&$.current!==b&&($.current=b,m({inView:!!s,entry:void 0}));const x=[g,p.inView,p.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}var a4=function(e){var t=e.isLastRow,n=e.children,r=e.isSelected,i=e.onClick;return v.jsx(v.Fragment,{children:v.jsx("div",{onClick:i,"aria-label":"button",className:"group grid w-full cursor-pointer grid-cols-[auto,350px,576px,1fr] p-2 active:bg-slate-50/25 ".concat(t?"border-b border-slate-200 dark:border-slate-700":""," ").concat(r?"bg-slate-200/50":"hover:bg-slate-50/50 dark:hover:bg-slate-900"),children:n})})},Ts=30,Os=2e3,Fs=2,s4=function(){return v.jsxs("div",{children:[v.jsx("div",{className:"rounded-t-md border-b border-slate-200 bg-slate-50 p-2 text-left text-sm font-semibold dark:border-slate-700 dark:bg-slate-800",children:v.jsx("span",{className:"opacity-0",children:"Placeholder"})}),yn([],new Array(Ts),!0).map(function(e,t){return v.jsx("div",{className:dr("p-2",Ts!==t+1?"border-b border-slate-200 dark:border-slate-700":""),children:v.jsx(oo,{className:"h-6 w-full"})},t)})]})};function ic(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function qh(...e){return t=>{let n=!1;const r=e.map(i=>{const o=ic(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():ic(e[i],null)}}}}function Wh(...e){return S.useCallback(qh(...e),e)}function l4(e,t=[]){let n=[];function r(o,a){const s=S.createContext(a),l=n.length;n=[...n,a];const u=h=>{var $;const{scope:g,children:f,...p}=h,m=(($=g==null?void 0:g[e])==null?void 0:$[l])||s,b=S.useMemo(()=>p,Object.values(p));return v.jsx(m.Provider,{value:b,children:f})};u.displayName=o+"Provider";function d(h,g){var m;const f=((m=g==null?void 0:g[e])==null?void 0:m[l])||s,p=S.useContext(f);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${h}\` must be used within \`${o}\``)}return[u,d]}const i=()=>{const o=n.map(a=>S.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return S.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,u4(i,...t)]}function u4(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const h=l(o)[`__scope${u}`];return{...s,...h}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function oc(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function Gh(e){const t=S.useRef(e);return S.useEffect(()=>{t.current=e}),S.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function c4({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=d4({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Gh(n),l=S.useCallback(u=>{if(o){const h=typeof u=="function"?u(e):u;h!==e&&s(h)}else i(u)},[o,e,i,s]);return[a,l]}function d4({defaultProp:e,onChange:t}){const n=S.useState(e),[r]=n,i=S.useRef(r),o=Gh(t);return S.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function f4(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 Ls=globalThis!=null&&globalThis.document?S.useLayoutEffect:()=>{};function h4(e){const[t,n]=S.useState(void 0);return Ls(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function g4(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Qh=e=>{const{present:t,children:n}=e,r=p4(t),i=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),o=Wh(r.ref,m4(i));return typeof n=="function"||r.isPresent?S.cloneElement(i,{ref:o}):null};Qh.displayName="Presence";function p4(e){const[t,n]=S.useState(),r=S.useRef({}),i=S.useRef(e),o=S.useRef("none"),a=e?"mounted":"unmounted",[s,l]=g4(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const u=Ii(r.current);o.current=s==="mounted"?u:"none"},[s]),Ls(()=>{const u=r.current,d=i.current;if(d!==e){const g=o.current,f=Ii(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(d&&g!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Ls(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,h=f=>{const m=Ii(r.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},g=f=>{f.target===t&&(o.current=Ii(r.current))};return t.addEventListener("animationstart",g),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",g),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:S.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Ii(e){return(e==null?void 0:e.animationName)||"none"}function m4(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yh=S.forwardRef((e,t)=>{const{children:n,...r}=e,i=S.Children.toArray(n),o=i.find(v4);if(o){const a=o.props.children,s=i.map(l=>l===o?S.Children.count(a)>1?S.Children.only(null):S.isValidElement(a)?a.props.children:null:l);return v.jsx(As,{...r,ref:t,children:S.isValidElement(a)?S.cloneElement(a,void 0,s):null})}return v.jsx(As,{...r,ref:t,children:n})});Yh.displayName="Slot";var As=S.forwardRef((e,t)=>{const{children:n,...r}=e;if(S.isValidElement(n)){const i=w4(n);return S.cloneElement(n,{...y4(r,n.props),ref:t?qh(t,i):i})}return S.Children.count(n)>1?S.Children.only(null):null});As.displayName="SlotClone";var b4=({children:e})=>v.jsx(v.Fragment,{children:e});function v4(e){return S.isValidElement(e)&&e.type===b4}function y4(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function w4(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Zh=x4.reduce((e,t)=>{const n=S.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Yh:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),v.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),El="Checkbox",[C4,rC]=l4(El),[$4,S4]=C4(El),Xh=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:l="on",onCheckedChange:u,form:d,...h}=e,[g,f]=S.useState(null),p=Wh(t,M=>f(M)),m=S.useRef(!1),b=g?d||!!g.closest("form"):!0,[$=!1,x]=c4({prop:i,defaultProp:o,onChange:u}),E=S.useRef($);return S.useEffect(()=>{const M=g==null?void 0:g.form;if(M){const C=()=>x(E.current);return M.addEventListener("reset",C),()=>M.removeEventListener("reset",C)}},[g,x]),v.jsxs($4,{scope:n,state:$,disabled:s,children:[v.jsx(Zh.button,{type:"button",role:"checkbox","aria-checked":Zt($)?"mixed":$,"aria-required":a,"data-state":t1($),"data-disabled":s?"":void 0,disabled:s,value:l,...h,ref:p,onKeyDown:oc(e.onKeyDown,M=>{M.key==="Enter"&&M.preventDefault()}),onClick:oc(e.onClick,M=>{x(C=>Zt(C)?!0:!C),b&&(m.current=M.isPropagationStopped(),m.current||M.stopPropagation())})}),b&&v.jsx(E4,{control:g,bubbles:!m.current,name:r,value:l,checked:$,required:a,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Zt(o)?!1:o})]})});Xh.displayName=El;var Jh="CheckboxIndicator",e1=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=S4(Jh,n);return v.jsx(Qh,{present:r||Zt(o.state)||o.state===!0,children:v.jsx(Zh.span,{"data-state":t1(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});e1.displayName=Jh;var E4=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=S.useRef(null),s=f4(n),l=h4(t);S.useEffect(()=>{const d=a.current,h=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(h,"checked").set;if(s!==n&&f){const p=new Event("click",{bubbles:r});d.indeterminate=Zt(n),f.call(d,Zt(n)?!1:n),d.dispatchEvent(p)}},[s,n,r]);const u=S.useRef(Zt(n)?!1:n);return v.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??u.current,...o,tabIndex:-1,ref:a,style:{...e.style,...l,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Zt(e){return e==="indeterminate"}function t1(e){return Zt(e)?"indeterminate":e?"checked":"unchecked"}var P4=Xh,R4=e1,ac=function(e){var t=e.className,n=lp(e,["className"]);return v.jsx(P4,{className:dr("flex size-4 cursor-pointer rounded-sm border shadow-sm",t,{"border-slate-300 hover:border-slate-500 hover:bg-slate-100":!n.checked,"border-brand-500 bg-brand-500 text-brand-50 hover:border-brand-600 hover:bg-brand-600":n.checked===!0,"border-slate-500 text-slate-500 hover:border-slate-700 hover:bg-slate-100":n.checked==="indeterminate"}),onClick:function(r){return r.stopPropagation()},...n,children:v.jsxs(R4,{className:"flex size-full items-center justify-center",children:[n.checked==="indeterminate"&&v.jsx(gb,{height:12,width:12}),n.checked===!0&&v.jsx(nb,{height:12,width:12})]})})},Ni=function(e){var t=e.label,n=e.icon;return v.jsxs("div",{className:"flex cursor-default items-center justify-center space-x-1.5 rounded-md bg-slate-100 px-2 py-0.5 text-sm text-slate-900 transition duration-150 ease-in-out",children:[n,v.jsx("span",{children:t})]})},n1=function(e){var t=e.children,n=e.message;return v.jsxs(B9,{children:[v.jsx(dl,{children:t}),v.jsx(V9,{offset:6,className:"rounded-md bg-white px-2 py-1 text-sm text-slate-900 shadow-md",children:n})]})},r1={exports:{}},i1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},o1={exports:{}},M4=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},k4=M4,D4=Array.prototype.concat,T4=Array.prototype.slice,sc=o1.exports=function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];k4(o)?n=D4.call(n,T4.call(o)):n.push(o)}return n};sc.wrap=function(e){return function(){return e(sc(arguments))}};var O4=o1.exports,Vr=i1,pi=O4,a1=Object.hasOwnProperty,s1=Object.create(null);for(var Ca in Vr)a1.call(Vr,Ca)&&(s1[Vr[Ca]]=Ca);var _e=r1.exports={to:{},get:{}};_e.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case"hsl":n=_e.get.hsl(e),r="hsl";break;case"hwb":n=_e.get.hwb(e),r="hwb";break;default:n=_e.get.rgb(e),r="rgb";break}return n?{model:r,value:n}:null};_e.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,a=[0,0,0,1],s,l,u;if(s=e.match(n)){for(u=s[2],s=s[1],l=0;l<3;l++){var d=l*2;a[l]=parseInt(s.slice(d,d+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(s=e.match(t)){for(s=s[1],u=s[3],l=0;l<3;l++)a[l]=parseInt(s[l]+s[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(s=e.match(r)){for(l=0;l<3;l++)a[l]=parseInt(s[l+1],0);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else if(s=e.match(i)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(s[l+1])*2.55);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else return(s=e.match(o))?s[1]==="transparent"?[0,0,0,0]:a1.call(Vr,s[1])?(a=Vr[s[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=Xt(a[l],0,255);return a[3]=Xt(a[3],0,1),a};_e.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=Xt(parseFloat(n[2]),0,100),a=Xt(parseFloat(n[3]),0,100),s=Xt(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};_e.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=Xt(parseFloat(n[2]),0,100),a=Xt(parseFloat(n[3]),0,100),s=Xt(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};_e.to.hex=function(){var e=pi(arguments);return"#"+ji(e[0])+ji(e[1])+ji(e[2])+(e[3]<1?ji(Math.round(e[3]*255)):"")};_e.to.rgb=function(){var e=pi(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};_e.to.rgb.percent=function(){var e=pi(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"};_e.to.hsl=function(){var e=pi(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};_e.to.hwb=function(){var e=pi(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};_e.to.keyword=function(e){return s1[e.slice(0,3)]};function Xt(e,t,n){return Math.min(Math.max(t,e),n)}function ji(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var F4=r1.exports;const Jr=i1,l1={};for(const e of Object.keys(Jr))l1[Jr[e]]=e;const V={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var u1=V;for(const e of Object.keys(V)){if(!("channels"in V[e]))throw new Error("missing channels property: "+e);if(!("labels"in V[e]))throw new Error("missing channel labels property: "+e);if(V[e].labels.length!==V[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=V[e];delete V[e].channels,delete V[e].labels,Object.defineProperty(V[e],"channels",{value:t}),Object.defineProperty(V[e],"labels",{value:n})}V.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=o-i;let s,l;o===i?s=0:t===o?s=(n-r)/a:n===o?s=2+(r-t)/a:r===o&&(s=4+(t-n)/a),s=Math.min(s*60,360),s<0&&(s+=360);const u=(i+o)/2;return o===i?l=0:u<=.5?l=a/(o+i):l=a/(2-o-i),[s,l*100,u*100]};V.rgb.hsv=function(e){let t,n,r,i,o;const a=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(a,s,l),d=u-Math.min(a,s,l),h=function(g){return(u-g)/6/d+1/2};return d===0?(i=0,o=0):(o=d/u,t=h(a),n=h(s),r=h(l),a===u?i=r-n:s===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]};V.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=V.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};V.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,a=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[o*100,a*100,s*100,i*100]};function L4(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}V.rgb.keyword=function(e){const t=l1[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(Jr)){const o=Jr[i],a=L4(e,o);a<n&&(n=a,r=i)}return r};V.keyword.rgb=function(e){return Jr[e]};V.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,a=t*.0193+n*.1192+r*.9505;return[i*100,o*100,a*100]};V.rgb.lab=function(e){const t=V.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,a=500*(n-r),s=200*(r-i);return[o,a,s]};V.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,a;if(n===0)return a=r*255,[a,a,a];r<.5?i=r*(1+n):i=r+n-r*n;const s=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)o=t+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?a=s+(i-s)*6*o:2*o<1?a=i:3*o<2?a=s+(i-s)*(2/3-o)*6:a=s,l[u]=a*255;return l};V.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const a=(r+n)/2,s=r===0?2*i/(o+i):2*n/(r+n);return[t,s*100,a*100]};V.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}};V.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,a;a=(2-n)*r;const s=(2-n)*i;return o=n*i,o/=s<=1?s:2-s,o=o||0,a/=2,[t,o*100,a*100]};V.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const a=Math.floor(6*t),s=1-r;o=6*t-a,a&1&&(o=1-o);const l=n+o*(s-n);let u,d,h;switch(a){default:case 6:case 0:u=s,d=l,h=n;break;case 1:u=l,d=s,h=n;break;case 2:u=n,d=s,h=l;break;case 3:u=n,d=l,h=s;break;case 4:u=l,d=n,h=s;break;case 5:u=s,d=n,h=l;break}return[u*255,d*255,h*255]};V.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[o*255,a*255,s*255]};V.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,a;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,a=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]};V.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),a=200*(n-r);return[i,o,a]};V.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,a;o=(t+16)/116,i=n/500+o,a=o-r/200;const s=o**3,l=i**3,u=a**3;return o=s>.008856?s:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,i*=95.047,o*=100,a*=108.883,[i,o,a]};V.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(n*n+r*r);return[t,a,i]};V.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),a=n*Math.sin(i);return[t,o,a]};V.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?V.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(a+=60),a};V.hsv.ansi16=function(e){return V.rgb.ansi16(V.hsv.rgb(e),e[2])};V.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};V.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};V.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};V.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};V.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,a=r&255;return[i,o,a]};V.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),a=i-o;let s,l;return a<1?s=o/(1-a):s=0,a<=0?l=0:i===t?l=(n-r)/a%6:i===n?l=2+(r-t)/a:l=4+(t-n)/a,l/=6,l%=1,[l*360,a*100,s*100]};V.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};V.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};V.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,a=o%1,s=1-a;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};V.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};V.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};V.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};V.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};V.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};V.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};V.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};V.gray.hsl=function(e){return[0,0,e[0]]};V.gray.hsv=V.gray.hsl;V.gray.hwb=function(e){return[0,100,e[0]]};V.gray.cmyk=function(e){return[0,0,0,e[0]]};V.gray.lab=function(e){return[e[0],0,0]};V.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};V.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const wo=u1;function A4(){const e={},t=Object.keys(wo);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function I4(e){const t=A4(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),i=Object.keys(wo[r]);for(let o=i.length,a=0;a<o;a++){const s=i[a],l=t[s];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(s))}}return t}function N4(e,t){return function(n){return t(e(n))}}function j4(e,t){const n=[t[e].parent,e];let r=wo[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=N4(wo[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var _4=function(e){const t=I4(e),n={},r=Object.keys(t);for(let i=r.length,o=0;o<i;o++){const a=r[o];t[a].parent!==null&&(n[a]=j4(a,t))}return n};const Is=u1,K4=_4,Kn={},B4=Object.keys(Is);function H4(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function V4(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,a=0;a<o;a++)i[a]=Math.round(i[a]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}B4.forEach(e=>{Kn[e]={},Object.defineProperty(Kn[e],"channels",{value:Is[e].channels}),Object.defineProperty(Kn[e],"labels",{value:Is[e].labels});const t=K4(e);Object.keys(t).forEach(r=>{const i=t[r];Kn[e][r]=V4(i),Kn[e][r].raw=H4(i)})});var z4=Kn;const Bn=F4,Ne=z4,c1=["keyword","gray","hex"],Ns={};for(const e of Object.keys(Ne))Ns[[...Ne[e].labels].sort().join("")]=e;const xo={};function xe(e,t){if(!(this instanceof xe))return new xe(e,t);if(t&&t in c1&&(t=null),t&&!(t in Ne))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof xe)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=Bn.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=Ne[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=Ne[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=js(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in Ns))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=Ns[o];const{labels:a}=Ne[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=js(s)}if(xo[this.model])for(r=Ne[this.model].channels,n=0;n<r;n++){const i=xo[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}xe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Bn.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const n=t.valpha===1?t.color:[...t.color,this.valpha];return Bn.to[t.model](n)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return Bn.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=Ne[this.model],{labels:n}=Ne[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new xe([...this.color.map(q4(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new xe([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:fe("rgb",0,ve(255)),green:fe("rgb",1,ve(255)),blue:fe("rgb",2,ve(255)),hue:fe(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:fe("hsl",1,ve(100)),lightness:fe("hsl",2,ve(100)),saturationv:fe("hsv",1,ve(100)),value:fe("hsv",2,ve(100)),chroma:fe("hcg",1,ve(100)),gray:fe("hcg",2,ve(100)),white:fe("hwb",1,ve(100)),wblack:fe("hwb",2,ve(100)),cyan:fe("cmyk",0,ve(100)),magenta:fe("cmyk",1,ve(100)),yellow:fe("cmyk",2,ve(100)),black:fe("cmyk",3,ve(100)),x:fe("xyz",0,ve(95.047)),y:fe("xyz",1,ve(100)),z:fe("xyz",2,ve(108.833)),l:fe("lab",0,ve(100)),a:fe("lab",1),b:fe("lab",2),keyword(e){return e!==void 0?new xe(e):Ne[this.model].keyword(this.color)},hex(e){return e!==void 0?new xe(e):Bn.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new xe(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),Bn.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return xe.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return xe.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(Ne)){if(c1.includes(e))continue;const{channels:t}=Ne[e];xe.prototype[e]=function(...n){return this.model===e?new xe(this):n.length>0?new xe(n,e):new xe([...W4(Ne[this.model][e].raw(this.color)),this.valpha],e)},xe[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=js(n,t)),new xe(r,e)}}function U4(e,t){return Number(e.toFixed(t))}function q4(e){return function(t){return U4(t,e)}}function fe(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(xo[r]||(xo[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function ve(e){return function(t){return Math.max(0,Math.min(e,t))}}function W4(e){return Array.isArray(e)?e:[e]}function js(e,t){for(let n=0;n<t;n++)typeof e[n]!="number"&&(e[n]=0);return e}var G4=xe;const lc=J1(G4);var Q4=typeof global=="object"&&global&&global.Object===Object&&global,Y4=typeof self=="object"&&self&&self.Object===Object&&self,Dn=Q4||Y4||Function("return this")(),Co=Dn.Symbol,d1=Object.prototype,Z4=d1.hasOwnProperty,X4=d1.toString,Lr=Co?Co.toStringTag:void 0;function J4(e){var t=Z4.call(e,Lr),n=e[Lr];try{e[Lr]=void 0;var r=!0}catch{}var i=X4.call(e);return r&&(t?e[Lr]=n:delete e[Lr]),i}var e8=Object.prototype,t8=e8.toString;function n8(e){return t8.call(e)}var r8="[object Null]",i8="[object Undefined]",uc=Co?Co.toStringTag:void 0;function f1(e){return e==null?e===void 0?i8:r8:uc&&uc in Object(e)?J4(e):n8(e)}function h1(e){return e!=null&&typeof e=="object"}var o8="[object Symbol]";function a8(e){return typeof e=="symbol"||h1(e)&&f1(e)==o8}var s8=Array.isArray,l8=/\s/;function u8(e){for(var t=e.length;t--&&l8.test(e.charAt(t)););return t}var c8=/^\s+/;function d8(e){return e&&e.slice(0,u8(e)+1).replace(c8,"")}function gr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var cc=NaN,f8=/^[-+]0x[0-9a-f]+$/i,h8=/^0b[01]+$/i,g8=/^0o[0-7]+$/i,p8=parseInt;function m8(e){if(typeof e=="number")return e;if(a8(e))return cc;if(gr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=gr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=d8(e);var n=h8.test(e);return n||g8.test(e)?p8(e.slice(2),n?2:8):f8.test(e)?cc:+e}var dc=1/0,b8=17976931348623157e292;function v8(e){if(!e)return e===0?e:0;if(e=m8(e),e===dc||e===-dc){var t=e<0?-1:1;return t*b8}return e===e?e:0}function fc(e){var t=v8(e),n=t%1;return t===t?n?t-n:t:0}function g1(e){return e}var y8="[object AsyncFunction]",w8="[object Function]",x8="[object GeneratorFunction]",C8="[object Proxy]";function $8(e){if(!gr(e))return!1;var t=f1(e);return t==w8||t==x8||t==y8||t==C8}var $a=Dn["__core-js_shared__"],hc=function(){var e=/[^.]+$/.exec($a&&$a.keys&&$a.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function S8(e){return!!hc&&hc in e}var E8=Function.prototype,P8=E8.toString;function R8(e){if(e!=null){try{return P8.call(e)}catch{}try{return e+""}catch{}}return""}var M8=/[\\^$.*+?()[\]{}|]/g,k8=/^\[object .+?Constructor\]$/,D8=Function.prototype,T8=Object.prototype,O8=D8.toString,F8=T8.hasOwnProperty,L8=RegExp("^"+O8.call(F8).replace(M8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function A8(e){if(!gr(e)||S8(e))return!1;var t=$8(e)?L8:k8;return t.test(R8(e))}function I8(e,t){return e==null?void 0:e[t]}function p1(e,t){var n=I8(e,t);return A8(n)?n:void 0}var gc=p1(Dn,"WeakMap"),$o=gc&&new gc,m1=$o?function(e,t){return $o.set(e,t),e}:g1,pc=Object.create,Pl=function(){function e(){}return function(t){if(!gr(t))return{};if(pc)return pc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function ei(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Pl(e.prototype),r=e.apply(n,t);return gr(r)?r:n}}var N8=1;function j8(e,t,n){var r=t&N8,i=ei(e);function o(){var a=this&&this!==Dn&&this instanceof o?i:e;return a.apply(r?n:this,arguments)}return o}function b1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var _8=Math.max;function v1(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=_8(o-a,0),d=Array(l+u),h=!r;++s<l;)d[s]=t[s];for(;++i<a;)(h||i<o)&&(d[n[i]]=e[i]);for(;u--;)d[s++]=e[i++];return d}var K8=Math.max;function y1(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,d=K8(o-s,0),h=Array(d+u),g=!r;++i<d;)h[i]=e[i];for(var f=i;++l<u;)h[f+l]=t[l];for(;++a<s;)(g||i<o)&&(h[f+n[a]]=e[i++]);return h}function B8(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function Rl(){}var H8=4294967295;function pr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=H8,this.__views__=[]}pr.prototype=Pl(Rl.prototype);pr.prototype.constructor=pr;function V8(){}var w1=$o?function(e){return $o.get(e)}:V8,mc={},z8=Object.prototype,U8=z8.hasOwnProperty;function q8(e){for(var t=e.name+"",n=mc[t],r=U8.call(mc,t)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==e)return i.name}return t}function mr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}mr.prototype=Pl(Rl.prototype);mr.prototype.constructor=mr;function x1(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function W8(e){if(e instanceof pr)return e.clone();var t=new mr(e.__wrapped__,e.__chain__);return t.__actions__=x1(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var G8=Object.prototype,Q8=G8.hasOwnProperty;function So(e){if(h1(e)&&!s8(e)&&!(e instanceof pr)){if(e instanceof mr)return e;if(Q8.call(e,"__wrapped__"))return W8(e)}return new mr(e)}So.prototype=Rl.prototype;So.prototype.constructor=So;function Y8(e){var t=q8(e),n=So[t];if(typeof n!="function"||!(t in pr.prototype))return!1;if(e===n)return!0;var r=w1(n);return!!r&&e===r[0]}var Z8=800,X8=16,J8=Date.now;function C1(e){var t=0,n=0;return function(){var r=J8(),i=X8-(r-n);if(n=r,i>0){if(++t>=Z8)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var $1=C1(m1),e7=/\{\n\/\* \[wrapped with (.+)\] \*/,t7=/,? & /;function n7(e){var t=e.match(e7);return t?t[1].split(t7):[]}var r7=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function i7(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(r7,`{
55
+ */function No(e,t){return e?M3(e)?$.createElement(e,t):e:null}function M3(e){return k3(e)||typeof e=="function"||O3(e)}function k3(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function O3(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function R1(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=$.useState(()=>({current:R3(t)})),[r,i]=$.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const M1=6048e5,D3=864e5,Rc=6e4,Mc=525600,rr=43200,Ao=1440,kc=Symbol.for("constructDateFrom");function Kt(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&kc in e?e[kc](t):e instanceof Date?new e.constructor(t):new Date(t)}function Ce(e,t){return Kt(t||e,e)}let T3={};function Kr(){return T3}function bi(e,t){var s,l,u,g;const n=Kr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((g=(u=n.locale)==null?void 0:u.options)==null?void 0:g.weekStartsOn)??0,i=Ce(e,t==null?void 0:t.in),o=i.getDay(),a=(o<r?7:0)+o-r;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}function _o(e,t){return bi(e,{...t,weekStartsOn:1})}function k1(e,t){const n=Ce(e,t==null?void 0:t.in),r=n.getFullYear(),i=Kt(n,0);i.setFullYear(r+1,0,4),i.setHours(0,0,0,0);const o=_o(i),a=Kt(n,0);a.setFullYear(r,0,4),a.setHours(0,0,0,0);const s=_o(a);return n.getTime()>=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Or(e){const t=Ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Li(e,...t){const n=Kt.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function Oc(e,t){const n=Ce(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function F3(e,t,n){const[r,i]=Li(n==null?void 0:n.in,e,t),o=Oc(r),a=Oc(i),s=+o-Or(o),l=+a-Or(a);return Math.round((s-l)/D3)}function L3(e,t){const n=k1(e,t),r=Kt(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),_o(r)}function oi(e,t){const n=+Ce(e)-+Ce(t);return n<0?-1:n>0?1:n}function I3(e){return Kt(e,Date.now())}function N3(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function A3(e){return!(!N3(e)&&typeof e!="number"||isNaN(+Ce(e)))}function _3(e,t,n){const[r,i]=Li(n==null?void 0:n.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function O1(e){return t=>{const r=(e?Math[e]:Math.trunc)(t);return r===0?0:r}}function j3(e,t){return+Ce(e)-+Ce(t)}function K3(e,t){const n=Ce(e,t==null?void 0:t.in);return n.setHours(23,59,59,999),n}function B3(e,t){const n=Ce(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function H3(e,t){const n=Ce(e,t==null?void 0:t.in);return+K3(n,t)==+B3(n,t)}function V3(e,t,n){const[r,i,o]=Li(n==null?void 0:n.in,e,e,t),a=oi(i,o),s=Math.abs(_3(i,o));if(s<1)return 0;i.getMonth()===1&&i.getDate()>27&&i.setDate(30),i.setMonth(i.getMonth()-a*s);let l=oi(i,o)===-a;H3(r)&&s===1&&oi(r,o)===1&&(l=!1);const u=a*(s-+l);return u===0?0:u}function z3(e,t,n){const r=j3(e,t)/1e3;return O1(n==null?void 0:n.roundingMethod)(r)}function U3(e,t){const n=Ce(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const W3={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},q3=(e,t,n)=>{let r;const i=W3[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Qa(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const G3={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Q3={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Y3={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},X3={date:Qa({formats:G3,defaultWidth:"full"}),time:Qa({formats:Q3,defaultWidth:"full"}),dateTime:Qa({formats:Y3,defaultWidth:"full"})},Z3={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},J3=(e,t,n,r)=>Z3[e];function qr(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const e8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},t8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},n8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},r8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},i8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},o8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},a8=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},s8={ordinalNumber:a8,era:qr({values:e8,defaultWidth:"wide"}),quarter:qr({values:t8,defaultWidth:"wide",argumentCallback:e=>e-1}),month:qr({values:n8,defaultWidth:"wide"}),day:qr({values:r8,defaultWidth:"wide"}),dayPeriod:qr({values:i8,defaultWidth:"wide",formattingValues:o8,defaultFormattingWidth:"wide"})};function Gr(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?u8(s,c=>c.test(a)):l8(s,c=>c.test(a));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const g=t.slice(a.length);return{value:u,rest:g}}}function l8(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function u8(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function c8(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const d8=/^(\d+)(th|st|nd|rd)?/i,f8=/\d+/i,h8={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},g8={any:[/^b/i,/^(a|c)/i]},p8={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},m8={any:[/1/i,/2/i,/3/i,/4/i]},b8={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},v8={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},y8={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},w8={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},x8={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},C8={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},S8={ordinalNumber:c8({matchPattern:d8,parsePattern:f8,valueCallback:e=>parseInt(e,10)}),era:Gr({matchPatterns:h8,defaultMatchWidth:"wide",parsePatterns:g8,defaultParseWidth:"any"}),quarter:Gr({matchPatterns:p8,defaultMatchWidth:"wide",parsePatterns:m8,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Gr({matchPatterns:b8,defaultMatchWidth:"wide",parsePatterns:v8,defaultParseWidth:"any"}),day:Gr({matchPatterns:y8,defaultMatchWidth:"wide",parsePatterns:w8,defaultParseWidth:"any"}),dayPeriod:Gr({matchPatterns:x8,defaultMatchWidth:"any",parsePatterns:C8,defaultParseWidth:"any"})},ql={code:"en-US",formatDistance:q3,formatLong:X3,formatRelative:J3,localize:s8,match:S8,options:{weekStartsOn:0,firstWeekContainsDate:1}};function $8(e,t){const n=Ce(e,t==null?void 0:t.in);return F3(n,U3(n))+1}function E8(e,t){const n=Ce(e,t==null?void 0:t.in),r=+_o(n)-+L3(n);return Math.round(r/M1)+1}function D1(e,t){var g,c,h,f;const n=Ce(e,t==null?void 0:t.in),r=n.getFullYear(),i=Kr(),o=(t==null?void 0:t.firstWeekContainsDate)??((c=(g=t==null?void 0:t.locale)==null?void 0:g.options)==null?void 0:c.firstWeekContainsDate)??i.firstWeekContainsDate??((f=(h=i.locale)==null?void 0:h.options)==null?void 0:f.firstWeekContainsDate)??1,a=Kt((t==null?void 0:t.in)||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=bi(a,t),l=Kt((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,o),l.setHours(0,0,0,0);const u=bi(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function P8(e,t){var s,l,u,g;const n=Kr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((g=(u=n.locale)==null?void 0:u.options)==null?void 0:g.firstWeekContainsDate)??1,i=D1(e,t),o=Kt((t==null?void 0:t.in)||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),bi(o,t)}function R8(e,t){const n=Ce(e,t==null?void 0:t.in),r=+bi(n,t)-+P8(n,t);return Math.round(r/M1)+1}function oe(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Vt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return oe(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):oe(n+1,2)},d(e,t){return oe(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return oe(e.getHours()%12||12,t.length)},H(e,t){return oe(e.getHours(),t.length)},m(e,t){return oe(e.getMinutes(),t.length)},s(e,t){return oe(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return oe(i,t.length)}},Yn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Dc={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Vt.y(e,t)},Y:function(e,t,n,r){const i=D1(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return oe(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):oe(o,t.length)},R:function(e,t){const n=k1(e);return oe(n,t.length)},u:function(e,t){const n=e.getFullYear();return oe(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return oe(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return oe(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Vt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return oe(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=R8(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):oe(i,t.length)},I:function(e,t,n){const r=E8(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):oe(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Vt.d(e,t)},D:function(e,t,n){const r=$8(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):oe(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return oe(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return oe(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return oe(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Yn.noon:r===0?i=Yn.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Yn.evening:r>=12?i=Yn.afternoon:r>=4?i=Yn.morning:i=Yn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Vt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Vt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):oe(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):oe(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Vt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Vt.s(e,t)},S:function(e,t){return Vt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Fc(r);case"XXXX":case"XX":return Sn(r);case"XXXXX":case"XXX":default:return Sn(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Fc(r);case"xxxx":case"xx":return Sn(r);case"xxxxx":case"xxx":default:return Sn(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Tc(r,":");case"OOOO":default:return"GMT"+Sn(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Tc(r,":");case"zzzz":default:return"GMT"+Sn(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return oe(r,t.length)},T:function(e,t,n){return oe(+e,t.length)}};function Tc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+oe(o,2)}function Fc(e,t){return e%60===0?(e>0?"-":"+")+oe(Math.abs(e)/60,2):Sn(e,t)}function Sn(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=oe(Math.trunc(r/60),2),o=oe(r%60,2);return n+i+t+o}const Lc=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},T1=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},M8=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return Lc(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Lc(r,t)).replace("{{time}}",T1(i,t))},k8={p:T1,P:M8},O8=/^D+$/,D8=/^Y+$/,T8=["D","DD","YY","YYYY"];function F8(e){return O8.test(e)}function L8(e){return D8.test(e)}function I8(e,t,n){const r=N8(e,t,n);if(console.warn(r),T8.includes(e))throw new RangeError(r)}function N8(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const A8=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,_8=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,j8=/^'([^]*?)'?$/,K8=/''/g,B8=/[a-zA-Z]/;function F1(e,t,n){var g,c,h,f;const r=Kr(),i=r.locale??ql,o=r.firstWeekContainsDate??((c=(g=r.locale)==null?void 0:g.options)==null?void 0:c.firstWeekContainsDate)??1,a=r.weekStartsOn??((f=(h=r.locale)==null?void 0:h.options)==null?void 0:f.weekStartsOn)??0,s=Ce(e,n==null?void 0:n.in);if(!A3(s))throw new RangeError("Invalid time value");let l=t.match(_8).map(p=>{const m=p[0];if(m==="p"||m==="P"){const b=k8[m];return b(p,i.formatLong)}return p}).join("").match(A8).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const m=p[0];if(m==="'")return{isToken:!1,value:H8(p)};if(Dc[m])return{isToken:!0,value:p};if(m.match(B8))throw new RangeError("Format string contains an unescaped latin alphabet character `"+m+"`");return{isToken:!1,value:p}});i.localize.preprocessor&&(l=i.localize.preprocessor(s,l));const u={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return l.map(p=>{if(!p.isToken)return p.value;const m=p.value;(L8(m)||F8(m))&&I8(m,t,String(e));const b=Dc[m[0]];return b(s,m,i.localize,u)}).join("")}function H8(e){const t=e.match(j8);return t?t[1].replace(K8,"'"):e}function V8(e,t,n){const r=Kr(),i=(n==null?void 0:n.locale)??r.locale??ql,o=2520,a=oi(e,t);if(isNaN(a))throw new RangeError("Invalid time value");const s=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:a}),[l,u]=Li(n==null?void 0:n.in,...a>0?[t,e]:[e,t]),g=z3(u,l),c=(Or(u)-Or(l))/1e3,h=Math.round((g-c)/60);let f;if(h<2)return h===0?i.formatDistance("lessThanXMinutes",1,s):i.formatDistance("xMinutes",h,s);if(h<45)return i.formatDistance("xMinutes",h,s);if(h<90)return i.formatDistance("aboutXHours",1,s);if(h<Ao){const p=Math.round(h/60);return i.formatDistance("aboutXHours",p,s)}else{if(h<o)return i.formatDistance("xDays",1,s);if(h<rr){const p=Math.round(h/Ao);return i.formatDistance("xDays",p,s)}else if(h<rr*2)return f=Math.round(h/rr),i.formatDistance("aboutXMonths",f,s)}if(f=V3(u,l),f<12){const p=Math.round(h/rr);return i.formatDistance("xMonths",p,s)}else{const p=f%12,m=Math.trunc(f/12);return p<3?i.formatDistance("aboutXYears",m,s):p<9?i.formatDistance("overXYears",m,s):i.formatDistance("almostXYears",m+1,s)}}function z8(e,t,n){const r=Kr(),i=(n==null?void 0:n.locale)??r.locale??ql,o=oi(e,t);if(isNaN(o))throw new RangeError("Invalid time value");const a=Object.assign({},n,{addSuffix:n==null?void 0:n.addSuffix,comparison:o}),[s,l]=Li(n==null?void 0:n.in,...o>0?[t,e]:[e,t]),u=O1((n==null?void 0:n.roundingMethod)??"round"),g=l.getTime()-s.getTime(),c=g/Rc,h=Or(l)-Or(s),f=(g-h)/Rc,p=n==null?void 0:n.unit;let m;if(p?m=p:c<1?m="second":c<60?m="minute":c<Ao?m="hour":f<rr?m="day":f<Mc?m="month":m="year",m==="second"){const b=u(g/1e3);return i.formatDistance("xSeconds",b,a)}else if(m==="minute"){const b=u(c);return i.formatDistance("xMinutes",b,a)}else if(m==="hour"){const b=u(c/60);return i.formatDistance("xHours",b,a)}else if(m==="day"){const b=u(f/Ao);return i.formatDistance("xDays",b,a)}else if(m==="month"){const b=u(f/rr);return b===12&&p!=="month"?i.formatDistance("xYears",1,a):i.formatDistance("xMonths",b,a)}else{const b=u(f/Mc);return i.formatDistance("xYears",b,a)}}function L1(e,t){return V8(e,I3(e),t)}var tl=new Map,Ji=new WeakMap,Ic=0,U8=void 0;function W8(e){return e?(Ji.has(e)||(Ic+=1,Ji.set(e,Ic.toString())),Ji.get(e)):"0"}function q8(e){return Object.keys(e).sort().filter(t=>e[t]!==void 0).map(t=>`${t}_${t==="root"?W8(e.root):e[t]}`).toString()}function G8(e){const t=q8(e);let n=tl.get(t);if(!n){const r=new Map;let i;const o=new IntersectionObserver(a=>{a.forEach(s=>{var l;const u=s.isIntersecting&&i.some(g=>s.intersectionRatio>=g);e.trackVisibility&&typeof s.isVisible>"u"&&(s.isVisible=u),(l=r.get(s.target))==null||l.forEach(g=>{g(u,s)})})},e);i=o.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:o,elements:r},tl.set(t,n)}return n}function Q8(e,t,n={},r=U8){if(typeof window.IntersectionObserver>"u"&&r!==void 0){const l=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:typeof n.threshold=="number"?n.threshold:0,time:0,boundingClientRect:l,intersectionRect:l,rootBounds:l}),()=>{}}const{id:i,observer:o,elements:a}=G8(n),s=a.get(e)||[];return a.has(e)||a.set(e,s),s.push(t),o.observe(e),function(){s.splice(s.indexOf(t),1),s.length===0&&(a.delete(e),o.unobserve(e)),a.size===0&&(o.disconnect(),tl.delete(i))}}function Y8({threshold:e,delay:t,trackVisibility:n,rootMargin:r,root:i,triggerOnce:o,skip:a,initialInView:s,fallbackInView:l,onChange:u}={}){var g;const[c,h]=$.useState(null),f=$.useRef(u),[p,m]=$.useState({inView:!!s,entry:void 0});f.current=u,$.useEffect(()=>{if(a||!c)return;let x;return x=Q8(c,(k,S)=>{m({inView:k,entry:S}),f.current&&f.current(k,S),S.isIntersecting&&o&&x&&(x(),x=void 0)},{root:i,rootMargin:r,threshold:e,trackVisibility:n,delay:t},l),()=>{x&&x()}},[Array.isArray(e)?e.toString():e,c,i,r,o,a,n,l,t]);const b=(g=p.entry)==null?void 0:g.target,v=$.useRef(void 0);!c&&b&&!o&&!a&&v.current!==b&&(v.current=b,m({inView:!!s,entry:void 0}));const w=[h,p.inView,p.entry];return w.ref=w[0],w.inView=w[1],w.entry=w[2],w}var I1=function(e){var t=e.isLastRow,n=e.children,r=e.isSelected,i=e.onClick,o=e.layoutVariant;return y.jsx("div",{onClick:i,"aria-label":"button",className:"group grid w-full cursor-pointer p-2 active:bg-slate-50/25 ".concat(t?"border-b border-slate-200 dark:border-slate-700":""," ").concat(o==="job"?"grid-cols-[auto,350px,576px,1fr]":"grid-cols-[auto,350px,1fr,1fr]"," ").concat(r?"bg-slate-200/50":"hover:bg-slate-50/50 dark:hover:bg-slate-900"),children:n})},nl=30,rl=2e3,il=2,N1=function(){return y.jsxs("div",{children:[y.jsx("div",{className:"rounded-t-md border-b border-slate-200 bg-slate-50 p-2 text-left text-sm font-semibold dark:border-slate-700 dark:bg-slate-800",children:y.jsx("span",{className:"opacity-0",children:"Placeholder"})}),Fn([],new Array(nl),!0).map(function(e,t){return y.jsx("div",{className:Mr("p-2",nl!==t+1?"border-b border-slate-200 dark:border-slate-700":""),children:y.jsx(So,{className:"h-6 w-full"})},t)})]})};function Nc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function A1(...e){return t=>{let n=!1;const r=e.map(i=>{const o=Nc(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():Nc(e[i],null)}}}}function Gl(...e){return $.useCallback(A1(...e),e)}function X8(e,t=[]){let n=[];function r(o,a){const s=$.createContext(a),l=n.length;n=[...n,a];const u=c=>{var v;const{scope:h,children:f,...p}=c,m=((v=h==null?void 0:h[e])==null?void 0:v[l])||s,b=$.useMemo(()=>p,Object.values(p));return y.jsx(m.Provider,{value:b,children:f})};u.displayName=o+"Provider";function g(c,h){var m;const f=((m=h==null?void 0:h[e])==null?void 0:m[l])||s,p=$.useContext(f);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${c}\` must be used within \`${o}\``)}return[u,g]}const i=()=>{const o=n.map(a=>$.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Z8(i,...t)]}function Z8(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:u})=>{const c=l(o)[`__scope${u}`];return{...s,...c}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ac(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}var jo=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{},J8=$[" useInsertionEffect ".trim().toString()]||jo;function e4({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,a]=t4({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:i;{const g=$.useRef(e!==void 0);$.useEffect(()=>{const c=g.current;c!==s&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${s?"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.`),g.current=s},[s,r])}const u=$.useCallback(g=>{var c;if(s){const h=n4(g)?g(e):g;h!==e&&((c=a.current)==null||c.call(a,h))}else o(g)},[s,e,o,a]);return[l,u]}function t4({defaultProp:e,onChange:t}){const[n,r]=$.useState(e),i=$.useRef(n),o=$.useRef(t);return J8(()=>{o.current=t},[t]),$.useEffect(()=>{var a;i.current!==n&&((a=o.current)==null||a.call(o,n),i.current=n)},[n,i]),[n,r,o]}function n4(e){return typeof e=="function"}function r4(e){const t=$.useRef({value:e,previous:e});return $.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function i4(e){const[t,n]=$.useState(void 0);return jo(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const l=o.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,s=u.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function o4(e,t){return $.useReducer((n,r)=>t[n][r]??n,e)}var _1=e=>{const{present:t,children:n}=e,r=a4(t),i=typeof n=="function"?n({present:r.isPresent}):$.Children.only(n),o=Gl(r.ref,s4(i));return typeof n=="function"||r.isPresent?$.cloneElement(i,{ref:o}):null};_1.displayName="Presence";function a4(e){const[t,n]=$.useState(),r=$.useRef(null),i=$.useRef(e),o=$.useRef("none"),a=e?"mounted":"unmounted",[s,l]=o4(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect(()=>{const u=eo(r.current);o.current=s==="mounted"?u:"none"},[s]),jo(()=>{const u=r.current,g=i.current;if(g!==e){const h=o.current,f=eo(u);e?l("MOUNT"):f==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(g&&h!==f?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),jo(()=>{if(t){let u;const g=t.ownerDocument.defaultView??window,c=f=>{const m=eo(r.current).includes(f.animationName);if(f.target===t&&m&&(l("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",u=g.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=f=>{f.target===t&&(o.current=eo(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{g.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:$.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function eo(e){return(e==null?void 0:e.animationName)||"none"}function s4(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function l4(e){const t=u4(e),n=$.forwardRef((r,i)=>{const{children:o,...a}=r,s=$.Children.toArray(o),l=s.find(d4);if(l){const u=l.props.children,g=s.map(c=>c===l?$.Children.count(u)>1?$.Children.only(null):$.isValidElement(u)?u.props.children:null:c);return y.jsx(t,{...a,ref:i,children:$.isValidElement(u)?$.cloneElement(u,void 0,g):null})}return y.jsx(t,{...a,ref:i,children:o})});return n.displayName=`${e}.Slot`,n}function u4(e){const t=$.forwardRef((n,r)=>{const{children:i,...o}=n;if($.isValidElement(i)){const a=h4(i),s=f4(o,i.props);return i.type!==$.Fragment&&(s.ref=r?A1(r,a):a),$.cloneElement(i,s)}return $.Children.count(i)>1?$.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var c4=Symbol("radix.slottable");function d4(e){return $.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===c4}function f4(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{const l=o(...s);return i(...s),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function h4(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var g4=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ql=g4.reduce((e,t)=>{const n=l4(`Primitive.${t}`),r=$.forwardRef((i,o)=>{const{asChild:a,...s}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...s,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),va="Checkbox",[p4,oS]=X8(va),[m4,Yl]=p4(va);function b4(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:o,form:a,name:s,onCheckedChange:l,required:u,value:g="on",internal_do_not_use_render:c}=e,[h,f]=e4({prop:n,defaultProp:i??!1,onChange:l,caller:va}),[p,m]=$.useState(null),[b,v]=$.useState(null),w=$.useRef(!1),x=p?!!a||!!p.closest("form"):!0,k={checked:h,disabled:o,setChecked:f,control:p,setControl:m,name:s,form:a,value:g,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:sn(i)?!1:i,isFormControl:x,bubbleInput:b,setBubbleInput:v};return y.jsx(m4,{scope:t,...k,children:v4(c)?c(k):r})}var j1="CheckboxTrigger",K1=$.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{const{control:o,value:a,disabled:s,checked:l,required:u,setControl:g,setChecked:c,hasConsumerStoppedPropagationRef:h,isFormControl:f,bubbleInput:p}=Yl(j1,e),m=Gl(i,g),b=$.useRef(l);return $.useEffect(()=>{const v=o==null?void 0:o.form;if(v){const w=()=>c(b.current);return v.addEventListener("reset",w),()=>v.removeEventListener("reset",w)}},[o,c]),y.jsx(Ql.button,{type:"button",role:"checkbox","aria-checked":sn(l)?"mixed":l,"aria-required":u,"data-state":W1(l),"data-disabled":s?"":void 0,disabled:s,value:a,...r,ref:m,onKeyDown:Ac(t,v=>{v.key==="Enter"&&v.preventDefault()}),onClick:Ac(n,v=>{c(w=>sn(w)?!0:!w),p&&f&&(h.current=v.isPropagationStopped(),h.current||v.stopPropagation())})})});K1.displayName=j1;var B1=$.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:l,onCheckedChange:u,form:g,...c}=e;return y.jsx(b4,{__scopeCheckbox:n,checked:i,defaultChecked:o,disabled:s,required:a,onCheckedChange:u,name:r,form:g,value:l,internal_do_not_use_render:({isFormControl:h})=>y.jsxs(y.Fragment,{children:[y.jsx(K1,{...c,ref:t,__scopeCheckbox:n}),h&&y.jsx(U1,{__scopeCheckbox:n})]})})});B1.displayName=va;var H1="CheckboxIndicator",V1=$.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=Yl(H1,n);return y.jsx(_1,{present:r||sn(o.checked)||o.checked===!0,children:y.jsx(Ql.span,{"data-state":W1(o.checked),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});V1.displayName=H1;var z1="CheckboxBubbleInput",U1=$.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:i,checked:o,defaultChecked:a,required:s,disabled:l,name:u,value:g,form:c,bubbleInput:h,setBubbleInput:f}=Yl(z1,e),p=Gl(n,f),m=r4(o),b=i4(r);$.useEffect(()=>{const w=h;if(!w)return;const x=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(x,"checked").set,R=!i.current;if(m!==o&&S){const P=new Event("click",{bubbles:R});w.indeterminate=sn(o),S.call(w,sn(o)?!1:o),w.dispatchEvent(P)}},[h,m,o,i]);const v=$.useRef(sn(o)?!1:o);return y.jsx(Ql.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??v.current,required:s,disabled:l,name:u,value:g,form:c,...t,tabIndex:-1,ref:p,style:{...t.style,...b,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});U1.displayName=z1;function v4(e){return typeof e=="function"}function sn(e){return e==="indeterminate"}function W1(e){return sn(e)?"indeterminate":e?"checked":"unchecked"}var Ko=function(e){var t=e.className,n=nm(e,["className"]);return y.jsx(B1,{className:Mr("flex size-4 cursor-pointer rounded-sm border shadow-sm",t,{"border-slate-300 hover:border-slate-500 hover:bg-slate-100":!n.checked,"border-brand-500 bg-brand-500 text-brand-50 hover:border-brand-600 hover:bg-brand-600":n.checked===!0,"border-slate-500 text-slate-500 hover:border-slate-700 hover:bg-slate-100":n.checked==="indeterminate"}),onClick:function(r){return r.stopPropagation()},...n,children:y.jsxs(V1,{className:"flex size-full items-center justify-center",children:[n.checked==="indeterminate"&&y.jsx(uv,{height:12,width:12}),n.checked===!0&&y.jsx(Xb,{height:12,width:12})]})})},Qr=function(e){var t=e.label,n=e.icon;return y.jsxs("div",{className:"flex cursor-default items-center justify-center space-x-1.5 rounded-md bg-slate-100 px-2 py-0.5 text-sm text-slate-900 transition duration-150 ease-in-out",children:[n,y.jsx("span",{children:t})]})},Xl=function(e){var t=e.children,n=e.message;return y.jsxs(A9,{children:[y.jsx(_l,{children:t}),y.jsx(_9,{offset:6,className:"rounded-md bg-white px-2 py-1 text-sm text-slate-900 shadow-md",children:n})]})},q1={exports:{}},G1={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},Q1={exports:{}},y4=function(t){return!t||typeof t=="string"?!1:t instanceof Array||Array.isArray(t)||t.length>=0&&(t.splice instanceof Function||Object.getOwnPropertyDescriptor(t,t.length-1)&&t.constructor.name!=="String")},w4=y4,x4=Array.prototype.concat,C4=Array.prototype.slice,_c=Q1.exports=function(t){for(var n=[],r=0,i=t.length;r<i;r++){var o=t[r];w4(o)?n=x4.call(n,C4.call(o)):n.push(o)}return n};_c.wrap=function(e){return function(){return e(_c(arguments))}};var S4=Q1.exports,ai=G1,Ii=S4,Y1=Object.hasOwnProperty,X1=Object.create(null);for(var Ya in ai)Y1.call(ai,Ya)&&(X1[ai[Ya]]=Ya);var Ge=q1.exports={to:{},get:{}};Ge.get=function(e){var t=e.substring(0,3).toLowerCase(),n,r;switch(t){case"hsl":n=Ge.get.hsl(e),r="hsl";break;case"hwb":n=Ge.get.hwb(e),r="hwb";break;default:n=Ge.get.rgb(e),r="rgb";break}return n?{model:r,value:n}:null};Ge.get.rgb=function(e){if(!e)return null;var t=/^#([a-f0-9]{3,4})$/i,n=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,i=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,o=/^(\w+)$/,a=[0,0,0,1],s,l,u;if(s=e.match(n)){for(u=s[2],s=s[1],l=0;l<3;l++){var g=l*2;a[l]=parseInt(s.slice(g,g+2),16)}u&&(a[3]=parseInt(u,16)/255)}else if(s=e.match(t)){for(s=s[1],u=s[3],l=0;l<3;l++)a[l]=parseInt(s[l]+s[l],16);u&&(a[3]=parseInt(u+u,16)/255)}else if(s=e.match(r)){for(l=0;l<3;l++)a[l]=parseInt(s[l+1],0);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else if(s=e.match(i)){for(l=0;l<3;l++)a[l]=Math.round(parseFloat(s[l+1])*2.55);s[4]&&(s[5]?a[3]=parseFloat(s[4])*.01:a[3]=parseFloat(s[4]))}else return(s=e.match(o))?s[1]==="transparent"?[0,0,0,0]:Y1.call(ai,s[1])?(a=ai[s[1]],a[3]=1,a):null:null;for(l=0;l<3;l++)a[l]=ln(a[l],0,255);return a[3]=ln(a[3],0,1),a};Ge.get.hsl=function(e){if(!e)return null;var t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=ln(parseFloat(n[2]),0,100),a=ln(parseFloat(n[3]),0,100),s=ln(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};Ge.get.hwb=function(e){if(!e)return null;var t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=e.match(t);if(n){var r=parseFloat(n[4]),i=(parseFloat(n[1])%360+360)%360,o=ln(parseFloat(n[2]),0,100),a=ln(parseFloat(n[3]),0,100),s=ln(isNaN(r)?1:r,0,1);return[i,o,a,s]}return null};Ge.to.hex=function(){var e=Ii(arguments);return"#"+to(e[0])+to(e[1])+to(e[2])+(e[3]<1?to(Math.round(e[3]*255)):"")};Ge.to.rgb=function(){var e=Ii(arguments);return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Ge.to.rgb.percent=function(){var e=Ii(arguments),t=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),r=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+n+"%, "+r+"%)":"rgba("+t+"%, "+n+"%, "+r+"%, "+e[3]+")"};Ge.to.hsl=function(){var e=Ii(arguments);return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Ge.to.hwb=function(){var e=Ii(arguments),t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Ge.to.keyword=function(e){return X1[e.slice(0,3)]};function ln(e,t,n){return Math.min(Math.max(t,e),n)}function to(e){var t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var $4=q1.exports;const vi=G1,Z1={};for(const e of Object.keys(vi))Z1[vi[e]]=e;const U={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var J1=U;for(const e of Object.keys(U)){if(!("channels"in U[e]))throw new Error("missing channels property: "+e);if(!("labels"in U[e]))throw new Error("missing channel labels property: "+e);if(U[e].labels.length!==U[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=U[e];delete U[e].channels,delete U[e].labels,Object.defineProperty(U[e],"channels",{value:t}),Object.defineProperty(U[e],"labels",{value:n})}U.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=o-i;let s,l;o===i?s=0:t===o?s=(n-r)/a:n===o?s=2+(r-t)/a:r===o&&(s=4+(t-n)/a),s=Math.min(s*60,360),s<0&&(s+=360);const u=(i+o)/2;return o===i?l=0:u<=.5?l=a/(o+i):l=a/(2-o-i),[s,l*100,u*100]};U.rgb.hsv=function(e){let t,n,r,i,o;const a=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(a,s,l),g=u-Math.min(a,s,l),c=function(h){return(u-h)/6/g+1/2};return g===0?(i=0,o=0):(o=g/u,t=c(a),n=c(s),r=c(l),a===u?i=r-n:s===u?i=1/3+t-r:l===u&&(i=2/3+n-t),i<0?i+=1:i>1&&(i-=1)),[i*360,o*100,u*100]};U.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const i=U.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[i,o*100,r*100]};U.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(1-t,1-n,1-r),o=(1-t-i)/(1-i)||0,a=(1-n-i)/(1-i)||0,s=(1-r-i)/(1-i)||0;return[o*100,a*100,s*100,i*100]};function E4(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}U.rgb.keyword=function(e){const t=Z1[e];if(t)return t;let n=1/0,r;for(const i of Object.keys(vi)){const o=vi[i],a=E4(e,o);a<n&&(n=a,r=i)}return r};U.keyword.rgb=function(e){return vi[e]};U.rgb.xyz=function(e){let t=e[0]/255,n=e[1]/255,r=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const i=t*.4124+n*.3576+r*.1805,o=t*.2126+n*.7152+r*.0722,a=t*.0193+n*.1192+r*.9505;return[i*100,o*100,a*100]};U.rgb.lab=function(e){const t=U.rgb.xyz(e);let n=t[0],r=t[1],i=t[2];n/=95.047,r/=100,i/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,i=i>.008856?i**(1/3):7.787*i+16/116;const o=116*r-16,a=500*(n-r),s=200*(r-i);return[o,a,s]};U.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let i,o,a;if(n===0)return a=r*255,[a,a,a];r<.5?i=r*(1+n):i=r+n-r*n;const s=2*r-i,l=[0,0,0];for(let u=0;u<3;u++)o=t+1/3*-(u-1),o<0&&o++,o>1&&o--,6*o<1?a=s+(i-s)*6*o:2*o<1?a=i:3*o<2?a=s+(i-s)*(2/3-o)*6:a=s,l[u]=a*255;return l};U.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,i=n;const o=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,i*=o<=1?o:2-o;const a=(r+n)/2,s=r===0?2*i/(o+i):2*n/(r+n);return[t,s*100,a*100]};U.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const i=Math.floor(t)%6,o=t-Math.floor(t),a=255*r*(1-n),s=255*r*(1-n*o),l=255*r*(1-n*(1-o));switch(r*=255,i){case 0:return[r,l,a];case 1:return[s,r,a];case 2:return[a,r,l];case 3:return[a,s,r];case 4:return[l,a,r];case 5:return[r,a,s]}};U.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,i=Math.max(r,.01);let o,a;a=(2-n)*r;const s=(2-n)*i;return o=n*i,o/=s<=1?s:2-s,o=o||0,a/=2,[t,o*100,a*100]};U.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const i=n+r;let o;i>1&&(n/=i,r/=i);const a=Math.floor(6*t),s=1-r;o=6*t-a,a&1&&(o=1-o);const l=n+o*(s-n);let u,g,c;switch(a){default:case 6:case 0:u=s,g=l,c=n;break;case 1:u=l,g=s,c=n;break;case 2:u=n,g=s,c=l;break;case 3:u=n,g=l,c=s;break;case 4:u=l,g=n,c=s;break;case 5:u=s,g=n,c=l;break}return[u*255,g*255,c*255]};U.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100,o=1-Math.min(1,t*(1-i)+i),a=1-Math.min(1,n*(1-i)+i),s=1-Math.min(1,r*(1-i)+i);return[o*255,a*255,s*255]};U.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let i,o,a;return i=t*3.2406+n*-1.5372+r*-.4986,o=t*-.9689+n*1.8758+r*.0415,a=t*.0557+n*-.204+r*1.057,i=i>.0031308?1.055*i**(1/2.4)-.055:i*12.92,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]};U.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const i=116*n-16,o=500*(t-n),a=200*(n-r);return[i,o,a]};U.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let i,o,a;o=(t+16)/116,i=n/500+o,a=o-r/200;const s=o**3,l=i**3,u=a**3;return o=s>.008856?s:(o-16/116)/7.787,i=l>.008856?l:(i-16/116)/7.787,a=u>.008856?u:(a-16/116)/7.787,i*=95.047,o*=100,a*=108.883,[i,o,a]};U.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let i;i=Math.atan2(r,n)*360/2/Math.PI,i<0&&(i+=360);const a=Math.sqrt(n*n+r*r);return[t,a,i]};U.lch.lab=function(e){const t=e[0],n=e[1],i=e[2]/360*2*Math.PI,o=n*Math.cos(i),a=n*Math.sin(i);return[t,o,a]};U.rgb.ansi16=function(e,t=null){const[n,r,i]=e;let o=t===null?U.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),o===0)return 30;let a=30+(Math.round(i/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return o===2&&(a+=60),a};U.hsv.ansi16=function(e){return U.rgb.ansi16(U.hsv.rgb(e),e[2])};U.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};U.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,i=(t>>1&1)*n*255,o=(t>>2&1)*n*255;return[r,i,o]};U.ansi256.rgb=function(e){if(e>=232){const o=(e-232)*10+8;return[o,o,o]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,i=t%6/5*255;return[n,r,i]};U.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};U.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(s=>s+s).join(""));const r=parseInt(n,16),i=r>>16&255,o=r>>8&255,a=r&255;return[i,o,a]};U.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.max(Math.max(t,n),r),o=Math.min(Math.min(t,n),r),a=i-o;let s,l;return a<1?s=o/(1-a):s=0,a<=0?l=0:i===t?l=(n-r)/a%6:i===n?l=2+(r-t)/a:l=4+(t-n)/a,l/=6,l%=1,[l*360,a*100,s*100]};U.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let i=0;return r<1&&(i=(n-.5*r)/(1-r)),[e[0],r*100,i*100]};U.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],r*100,i*100]};U.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const i=[0,0,0],o=t%1*6,a=o%1,s=1-a;let l=0;switch(Math.floor(o)){case 0:i[0]=1,i[1]=a,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=a;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=a,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-n)*r,[(n*i[0]+l)*255,(n*i[1]+l)*255,(n*i[2]+l)*255]};U.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let i=0;return r>0&&(i=t/r),[e[0],i*100,r*100]};U.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let i=0;return r>0&&r<.5?i=t/(2*r):r>=.5&&r<1&&(i=t/(2*(1-r))),[e[0],i*100,r*100]};U.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};U.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,i=r-t;let o=0;return i<1&&(o=(r-i)/(1-i)),[e[0],i*100,o*100]};U.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};U.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};U.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};U.gray.hsl=function(e){return[0,0,e[0]]};U.gray.hsv=U.gray.hsl;U.gray.hwb=function(e){return[0,100,e[0]]};U.gray.cmyk=function(e){return[0,0,0,e[0]]};U.gray.lab=function(e){return[e[0],0,0]};U.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};U.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const Bo=J1;function P4(){const e={},t=Object.keys(Bo);for(let n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}function R4(e){const t=P4(),n=[e];for(t[e].distance=0;n.length;){const r=n.pop(),i=Object.keys(Bo[r]);for(let o=i.length,a=0;a<o;a++){const s=i[a],l=t[s];l.distance===-1&&(l.distance=t[r].distance+1,l.parent=r,n.unshift(s))}}return t}function M4(e,t){return function(n){return t(e(n))}}function k4(e,t){const n=[t[e].parent,e];let r=Bo[t[e].parent][e],i=t[e].parent;for(;t[i].parent;)n.unshift(t[i].parent),r=M4(Bo[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var O4=function(e){const t=R4(e),n={},r=Object.keys(t);for(let i=r.length,o=0;o<i;o++){const a=r[o];t[a].parent!==null&&(n[a]=k4(a,t))}return n};const ol=J1,D4=O4,Jn={},T4=Object.keys(ol);function F4(e){const t=function(...n){const r=n[0];return r==null?r:(r.length>1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function L4(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const i=e(n);if(typeof i=="object")for(let o=i.length,a=0;a<o;a++)i[a]=Math.round(i[a]);return i};return"conversion"in e&&(t.conversion=e.conversion),t}T4.forEach(e=>{Jn[e]={},Object.defineProperty(Jn[e],"channels",{value:ol[e].channels}),Object.defineProperty(Jn[e],"labels",{value:ol[e].labels});const t=D4(e);Object.keys(t).forEach(r=>{const i=t[r];Jn[e][r]=L4(i),Jn[e][r].raw=F4(i)})});var I4=Jn;const er=$4,We=I4,eg=["keyword","gray","hex"],al={};for(const e of Object.keys(We))al[[...We[e].labels].sort().join("")]=e;const Ho={};function xe(e,t){if(!(this instanceof xe))return new xe(e,t);if(t&&t in eg&&(t=null),t&&!(t in We))throw new Error("Unknown model: "+t);let n,r;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof xe)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){const i=er.get(e);if(i===null)throw new Error("Unable to parse color from string: "+e);this.model=i.model,r=We[this.model].channels,this.color=i.value.slice(0,r),this.valpha=typeof i.value[r]=="number"?i.value[r]:1}else if(e.length>0){this.model=t||"rgb",r=We[this.model].channels;const i=Array.prototype.slice.call(e,0,r);this.color=sl(i,r),this.valpha=typeof e[r]=="number"?e[r]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;const i=Object.keys(e);"alpha"in e&&(i.splice(i.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);const o=i.sort().join("");if(!(o in al))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=al[o];const{labels:a}=We[this.model],s=[];for(n=0;n<a.length;n++)s.push(e[a[n]]);this.color=sl(s)}if(Ho[this.model])for(r=We[this.model].channels,n=0;n<r;n++){const i=Ho[this.model][n];i&&(this.color[n]=i(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}xe.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in er.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);const n=t.valpha===1?t.color:[...t.color,this.valpha];return er.to[t.model](n)},percentString(e){const t=this.rgb().round(typeof e=="number"?e:1),n=t.valpha===1?t.color:[...t.color,this.valpha];return er.to.rgb.percent(n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){const e={},{channels:t}=We[this.model],{labels:n}=We[this.model];for(let r=0;r<t;r++)e[n[r]]=this.color[r];return this.valpha!==1&&(e.alpha=this.valpha),e},unitArray(){const e=this.rgb().color;return e[0]/=255,e[1]/=255,e[2]/=255,this.valpha!==1&&e.push(this.valpha),e},unitObject(){const e=this.rgb().object();return e.r/=255,e.g/=255,e.b/=255,this.valpha!==1&&(e.alpha=this.valpha),e},round(e){return e=Math.max(e||0,0),new xe([...this.color.map(A4(e)),this.valpha],this.model)},alpha(e){return e!==void 0?new xe([...this.color,Math.max(0,Math.min(1,e))],this.model):this.valpha},red:fe("rgb",0,ve(255)),green:fe("rgb",1,ve(255)),blue:fe("rgb",2,ve(255)),hue:fe(["hsl","hsv","hsl","hwb","hcg"],0,e=>(e%360+360)%360),saturationl:fe("hsl",1,ve(100)),lightness:fe("hsl",2,ve(100)),saturationv:fe("hsv",1,ve(100)),value:fe("hsv",2,ve(100)),chroma:fe("hcg",1,ve(100)),gray:fe("hcg",2,ve(100)),white:fe("hwb",1,ve(100)),wblack:fe("hwb",2,ve(100)),cyan:fe("cmyk",0,ve(100)),magenta:fe("cmyk",1,ve(100)),yellow:fe("cmyk",2,ve(100)),black:fe("cmyk",3,ve(100)),x:fe("xyz",0,ve(95.047)),y:fe("xyz",1,ve(100)),z:fe("xyz",2,ve(108.833)),l:fe("lab",0,ve(100)),a:fe("lab",1),b:fe("lab",2),keyword(e){return e!==void 0?new xe(e):We[this.model].keyword(this.color)},hex(e){return e!==void 0?new xe(e):er.to.hex(this.rgb().round().color)},hexa(e){if(e!==void 0)return new xe(e);const t=this.rgb().round().color;let n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),er.to.hex(t)+n},rgbNumber(){const e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){const e=this.rgb().color,t=[];for(const[n,r]of e.entries()){const i=r/255;t[n]=i<=.04045?i/12.92:((i+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){const t=this.luminosity(),n=e.luminosity();return t>n?(t+.05)/(n+.05):(n+.05)/(t+.05)},level(e){const t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){const e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){const e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){const t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){const t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){const t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){const t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){const t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){const t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){const e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return xe.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){const t=this.hsl();let n=t.color[0];return n=(n+e)%360,n=n<0?360+n:n,t.color[0]=n,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);const n=e.rgb(),r=this.rgb(),i=t===void 0?.5:t,o=2*i-1,a=n.alpha()-r.alpha(),s=((o*a===-1?o:(o+a)/(1+o*a))+1)/2,l=1-s;return xe.rgb(s*n.red()+l*r.red(),s*n.green()+l*r.green(),s*n.blue()+l*r.blue(),n.alpha()*i+r.alpha()*(1-i))}};for(const e of Object.keys(We)){if(eg.includes(e))continue;const{channels:t}=We[e];xe.prototype[e]=function(...n){return this.model===e?new xe(this):n.length>0?new xe(n,e):new xe([..._4(We[this.model][e].raw(this.color)),this.valpha],e)},xe[e]=function(...n){let r=n[0];return typeof r=="number"&&(r=sl(n,t)),new xe(r,e)}}function N4(e,t){return Number(e.toFixed(t))}function A4(e){return function(t){return N4(t,e)}}function fe(e,t,n){e=Array.isArray(e)?e:[e];for(const r of e)(Ho[r]||(Ho[r]=[]))[t]=n;return e=e[0],function(r){let i;return r!==void 0?(n&&(r=n(r)),i=this[e](),i.color[t]=r,i):(i=this[e]().color[t],n&&(i=n(i)),i)}}function ve(e){return function(t){return Math.max(0,Math.min(e,t))}}function _4(e){return Array.isArray(e)?e:[e]}function sl(e,t){for(let n=0;n<t;n++)typeof e[n]!="number"&&(e[n]=0);return e}var j4=xe;const jc=Id(j4);var K4=typeof global=="object"&&global&&global.Object===Object&&global,B4=typeof self=="object"&&self&&self.Object===Object&&self,Vn=K4||B4||Function("return this")(),Vo=Vn.Symbol,tg=Object.prototype,H4=tg.hasOwnProperty,V4=tg.toString,Yr=Vo?Vo.toStringTag:void 0;function z4(e){var t=H4.call(e,Yr),n=e[Yr];try{e[Yr]=void 0;var r=!0}catch{}var i=V4.call(e);return r&&(t?e[Yr]=n:delete e[Yr]),i}var U4=Object.prototype,W4=U4.toString;function q4(e){return W4.call(e)}var G4="[object Null]",Q4="[object Undefined]",Kc=Vo?Vo.toStringTag:void 0;function ng(e){return e==null?e===void 0?Q4:G4:Kc&&Kc in Object(e)?z4(e):q4(e)}function rg(e){return e!=null&&typeof e=="object"}var Y4="[object Symbol]";function X4(e){return typeof e=="symbol"||rg(e)&&ng(e)==Y4}var Z4=Array.isArray,J4=/\s/;function e7(e){for(var t=e.length;t--&&J4.test(e.charAt(t)););return t}var t7=/^\s+/;function n7(e){return e&&e.slice(0,e7(e)+1).replace(t7,"")}function Dr(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Bc=NaN,r7=/^[-+]0x[0-9a-f]+$/i,i7=/^0b[01]+$/i,o7=/^0o[0-7]+$/i,a7=parseInt;function s7(e){if(typeof e=="number")return e;if(X4(e))return Bc;if(Dr(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Dr(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=n7(e);var n=i7.test(e);return n||o7.test(e)?a7(e.slice(2),n?2:8):r7.test(e)?Bc:+e}var l7=1/0,u7=17976931348623157e292;function c7(e){if(!e)return e===0?e:0;if(e=s7(e),e===l7||e===-1/0){var t=e<0?-1:1;return t*u7}return e===e?e:0}function Hc(e){var t=c7(e),n=t%1;return t===t?n?t-n:t:0}function ig(e){return e}var d7="[object AsyncFunction]",f7="[object Function]",h7="[object GeneratorFunction]",g7="[object Proxy]";function p7(e){if(!Dr(e))return!1;var t=ng(e);return t==f7||t==h7||t==d7||t==g7}var Xa=Vn["__core-js_shared__"],Vc=function(){var e=/[^.]+$/.exec(Xa&&Xa.keys&&Xa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function m7(e){return!!Vc&&Vc in e}var b7=Function.prototype,v7=b7.toString;function y7(e){if(e!=null){try{return v7.call(e)}catch{}try{return e+""}catch{}}return""}var w7=/[\\^$.*+?()[\]{}|]/g,x7=/^\[object .+?Constructor\]$/,C7=Function.prototype,S7=Object.prototype,$7=C7.toString,E7=S7.hasOwnProperty,P7=RegExp("^"+$7.call(E7).replace(w7,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function R7(e){if(!Dr(e)||m7(e))return!1;var t=p7(e)?P7:x7;return t.test(y7(e))}function M7(e,t){return e==null?void 0:e[t]}function og(e,t){var n=M7(e,t);return R7(n)?n:void 0}var zc=og(Vn,"WeakMap"),zo=zc&&new zc,ag=zo?function(e,t){return zo.set(e,t),e}:ig,Uc=Object.create,Zl=function(){function e(){}return function(t){if(!Dr(t))return{};if(Uc)return Uc(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function yi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Zl(e.prototype),r=e.apply(n,t);return Dr(r)?r:n}}var k7=1;function O7(e,t,n){var r=t&k7,i=yi(e);function o(){var a=this&&this!==Vn&&this instanceof o?i:e;return a.apply(r?n:this,arguments)}return o}function sg(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var D7=Math.max;function lg(e,t,n,r){for(var i=-1,o=e.length,a=n.length,s=-1,l=t.length,u=D7(o-a,0),g=Array(l+u),c=!r;++s<l;)g[s]=t[s];for(;++i<a;)(c||i<o)&&(g[n[i]]=e[i]);for(;u--;)g[s++]=e[i++];return g}var T7=Math.max;function ug(e,t,n,r){for(var i=-1,o=e.length,a=-1,s=n.length,l=-1,u=t.length,g=T7(o-s,0),c=Array(g+u),h=!r;++i<g;)c[i]=e[i];for(var f=i;++l<u;)c[f+l]=t[l];for(;++a<s;)(h||i<o)&&(c[f+n[a]]=e[i++]);return c}function F7(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}function Jl(){}var L7=4294967295;function Tr(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=L7,this.__views__=[]}Tr.prototype=Zl(Jl.prototype);Tr.prototype.constructor=Tr;function I7(){}var cg=zo?function(e){return zo.get(e)}:I7,Wc={},N7=Object.prototype,A7=N7.hasOwnProperty;function _7(e){for(var t=e.name+"",n=Wc[t],r=A7.call(Wc,t)?n.length:0;r--;){var i=n[r],o=i.func;if(o==null||o==e)return i.name}return t}function Fr(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}Fr.prototype=Zl(Jl.prototype);Fr.prototype.constructor=Fr;function dg(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}function j7(e){if(e instanceof Tr)return e.clone();var t=new Fr(e.__wrapped__,e.__chain__);return t.__actions__=dg(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var K7=Object.prototype,B7=K7.hasOwnProperty;function Uo(e){if(rg(e)&&!Z4(e)&&!(e instanceof Tr)){if(e instanceof Fr)return e;if(B7.call(e,"__wrapped__"))return j7(e)}return new Fr(e)}Uo.prototype=Jl.prototype;Uo.prototype.constructor=Uo;function H7(e){var t=_7(e),n=Uo[t];if(typeof n!="function"||!(t in Tr.prototype))return!1;if(e===n)return!0;var r=cg(n);return!!r&&e===r[0]}var V7=800,z7=16,U7=Date.now;function fg(e){var t=0,n=0;return function(){var r=U7(),i=z7-(r-n);if(n=r,i>0){if(++t>=V7)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var hg=fg(ag),W7=/\{\n\/\* \[wrapped with (.+)\] \*/,q7=/,? & /;function G7(e){var t=e.match(W7);return t?t[1].split(q7):[]}var Q7=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function Y7(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Q7,`{
50
56
  /* [wrapped with `+t+`] */
51
- `)}function o7(e){return function(){return e}}var bc=function(){try{var e=p1(Object,"defineProperty");return e({},"",{}),e}catch{}}(),a7=bc?function(e,t){return bc(e,"toString",{configurable:!0,enumerable:!1,value:o7(t),writable:!0})}:g1,s7=C1(a7);function l7(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function u7(e,t,n,r){for(var i=e.length,o=n+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function c7(e){return e!==e}function d7(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function f7(e,t,n){return t===t?d7(e,t,n):u7(e,c7,n)}function h7(e,t){var n=e==null?0:e.length;return!!n&&f7(e,t,0)>-1}var g7=1,p7=2,m7=8,b7=16,v7=32,y7=64,w7=128,x7=256,C7=512,$7=[["ary",w7],["bind",g7],["bindKey",p7],["curry",m7],["curryRight",b7],["flip",C7],["partial",v7],["partialRight",y7],["rearg",x7]];function S7(e,t){return l7($7,function(n){var r="_."+n[0];t&n[1]&&!h7(e,r)&&e.push(r)}),e.sort()}function S1(e,t,n){var r=t+"";return s7(e,i7(r,S7(n7(r),n)))}var E7=1,P7=2,R7=4,M7=8,vc=32,yc=64;function E1(e,t,n,r,i,o,a,s,l,u){var d=t&M7,h=d?a:void 0,g=d?void 0:a,f=d?o:void 0,p=d?void 0:o;t|=d?vc:yc,t&=~(d?yc:vc),t&R7||(t&=~(E7|P7));var m=[e,t,i,f,h,p,g,s,l,u],b=n.apply(void 0,m);return Y8(e)&&$1(b,m),b.placeholder=r,S1(b,e,t)}function P1(e){var t=e;return t.placeholder}var k7=9007199254740991,D7=/^(?:0|[1-9]\d*)$/;function T7(e,t){var n=typeof e;return t=t??k7,!!t&&(n=="number"||n!="symbol"&&D7.test(e))&&e>-1&&e%1==0&&e<t}var O7=Math.min;function F7(e,t){for(var n=e.length,r=O7(t.length,n),i=x1(e);r--;){var o=t[r];e[r]=T7(o,n)?i[o]:void 0}return e}var wc="__lodash_placeholder__";function Eo(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];(a===t||a===wc)&&(e[n]=wc,o[i++]=n)}return o}var L7=1,A7=2,I7=8,N7=16,j7=128,_7=512;function Ml(e,t,n,r,i,o,a,s,l,u){var d=t&j7,h=t&L7,g=t&A7,f=t&(I7|N7),p=t&_7,m=g?void 0:ei(e);function b(){for(var $=arguments.length,x=Array($),E=$;E--;)x[E]=arguments[E];if(f)var M=P1(b),C=B8(x,M);if(r&&(x=v1(x,r,i,f)),o&&(x=y1(x,o,a,f)),$-=C,f&&$<u){var k=Eo(x,M);return E1(e,t,Ml,b.placeholder,n,x,k,s,l,u-$)}var F=h?n:this,y=g?F[e]:e;return $=x.length,s?x=F7(x,s):p&&$>1&&x.reverse(),d&&l<$&&(x.length=l),this&&this!==Dn&&this instanceof b&&(y=m||ei(y)),y.apply(F,x)}return b}function K7(e,t,n){var r=ei(e);function i(){for(var o=arguments.length,a=Array(o),s=o,l=P1(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:Eo(a,l);if(o-=u.length,o<n)return E1(e,t,Ml,i.placeholder,void 0,a,u,void 0,void 0,n-o);var d=this&&this!==Dn&&this instanceof i?r:e;return b1(d,this,a)}return i}var B7=1;function H7(e,t,n,r){var i=t&B7,o=ei(e);function a(){for(var s=-1,l=arguments.length,u=-1,d=r.length,h=Array(d+l),g=this&&this!==Dn&&this instanceof a?o:e;++u<d;)h[u]=r[u];for(;l--;)h[u++]=arguments[++s];return b1(g,i?n:this,h)}return a}var xc="__lodash_placeholder__",Sa=1,V7=2,z7=4,Cc=8,Ar=128,$c=256,U7=Math.min;function q7(e,t){var n=e[1],r=t[1],i=n|r,o=i<(Sa|V7|Ar),a=r==Ar&&n==Cc||r==Ar&&n==$c&&e[7].length<=t[8]||r==(Ar|$c)&&t[7].length<=t[8]&&n==Cc;if(!(o||a))return e;r&Sa&&(e[2]=t[2],i|=n&Sa?0:z7);var s=t[3];if(s){var l=e[3];e[3]=l?v1(l,s,t[4]):s,e[4]=l?Eo(e[3],xc):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?y1(l,s,t[6]):s,e[6]=l?Eo(e[5],xc):t[6]),s=t[7],s&&(e[7]=s),r&Ar&&(e[8]=e[8]==null?t[8]:U7(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}var W7="Expected a function",Sc=1,G7=2,Ea=8,Pa=16,Ra=32,Ec=64,Pc=Math.max;function Q7(e,t,n,r,i,o,a,s){var l=t&G7;if(!l&&typeof e!="function")throw new TypeError(W7);var u=r?r.length:0;if(u||(t&=~(Ra|Ec),r=i=void 0),a=a===void 0?a:Pc(fc(a),0),s=s===void 0?s:fc(s),u-=i?i.length:0,t&Ec){var d=r,h=i;r=i=void 0}var g=l?void 0:w1(e),f=[e,t,n,r,i,d,h,o,a,s];if(g&&q7(f,g),e=f[0],t=f[1],n=f[2],r=f[3],i=f[4],s=f[9]=f[9]===void 0?l?0:e.length:Pc(f[9]-u,0),!s&&t&(Ea|Pa)&&(t&=~(Ea|Pa)),!t||t==Sc)var p=j8(e,t,n);else t==Ea||t==Pa?p=K7(e,t,s):(t==Ra||t==(Sc|Ra))&&!i.length?p=H7(e,t,n,r):p=Ml.apply(void 0,f);var m=g?m1:$1;return S1(m(p,f),e,t)}var Y7=8;function Po(e,t,n){t=n?void 0:t;var r=Q7(e,Y7,void 0,void 0,void 0,void 0,void 0,t);return r.placeholder=Po.placeholder,r}Po.placeholder={};function Z7(e){const t=e[0],n=e[1],r=e[2];let i,o,a;return i=t*1+n*0+r*1.13983,o=t*1+n*-.39465+r*-.5806,a=t*1+n*2.02311+r*0,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]}function X7(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=t*.299+n*.587+r*.114,o=t*-.14713+n*-.28886+r*.436,a=t*.615+n*-.51499+r*-.10001;return[i,o,a]}const J7={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},e6={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},t6={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},n6={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},r6={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},i6={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},o6={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},a6={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},s6={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},l6={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},u6={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},c6={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},d6={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},f6={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},h6={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},g6={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},p6={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},m6={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},b6={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},v6={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},y6={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},w6={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},x6={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},C6={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},$6={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},S6={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},E6={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},P6={scheme:"nicinabox",author:"nicinabox (http://github.com/nicinabox)",base00:"#2A2F3A",base01:"#3C444F",base02:"#4F5A65",base03:"#BEBEBE",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#FFFFFF",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#FC6D24",base0A:"#ddb26f",base0B:"#A1C659",base0C:"#12cfc0",base0D:"#6FB3D2",base0E:"#D381C3",base0F:"#deaf8f"},R6={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},M6={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},k6={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},D6={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},T6={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},O6={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},F6={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},L6={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},A6={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},I6={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},R1={threezerotwofour:J7,apathy:e6,ashes:t6,atelierDune:n6,atelierForest:r6,atelierHeath:i6,atelierLakeside:o6,atelierSeaside:a6,bespin:s6,brewer:l6,bright:u6,chalk:c6,codeschool:d6,colors:f6,default:h6,eighties:g6,embers:p6,flat:m6,google:b6,grayscale:v6,greenscreen:y6,harmonic:w6,hopscotch:x6,isotope:C6,marrakesh:$6,mocha:S6,monokai:E6,nicinabox:P6,ocean:R6,paraiso:M6,pop:k6,railscasts:D6,shapeshifter:T6,solarized:O6,summerfruit:F6,tomorrow:L6,tube:A6,twilight:I6},M1=R1.default,Rc=Object.keys(M1),N6=e=>e<.25?1:e<.5?.9-e:1.1-e,j6=e=>{const t=lc(e),[n,r,i]=X7(t.array()),o=[N6(n),r,i],a=Z7(o);return lc.rgb(a).hex()},Nn=e=>t=>({className:[t.className,e.className].filter(Boolean).join(" "),style:{...t.style||{},...e.style||{}}}),_6=(e,t)=>{if(e===void 0)return t;if(t===void 0)return e;const n=typeof e,r=typeof t;switch(n){case"string":switch(r){case"string":return[t,e].filter(Boolean).join(" ");case"object":return Nn({className:e,style:t});case"function":return(i,...o)=>Nn({className:e})(t(i,...o))}break;case"object":switch(r){case"string":return Nn({className:t,style:e});case"object":return{...t,...e};case"function":return(i,...o)=>Nn({style:e})(t(i,...o))}break;case"function":switch(r){case"string":return(i,...o)=>e(Nn(i)({className:t}),...o);case"object":return(i,...o)=>e(Nn(i)({style:t}),...o);case"function":return(i,...o)=>e(t(i,...o),...o)}}},K6=(e,t)=>{const n=Object.keys(t);for(const r in e)n.indexOf(r)===-1&&n.push(r);return n.reduce((r,i)=>(r[i]=_6(e[i],t[i]),r),{})},B6=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);const i=t.map(o=>e[o]).filter(Boolean).reduce((o,a)=>(typeof a=="string"?o.className=[o.className,a].filter(Boolean).join(" "):typeof a=="object"?o.style={...o.style,...a}:typeof a=="function"&&(o={...o,...a(o,...n)}),o),{className:"",style:{}});return i.className||delete i.className,Object.keys(i.style).length===0&&delete i.style,i},_s=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?j6(e[n]):n==="scheme"?e[n]+":inverted":e[n],t),{}),H6=Po((e,t={},n={},...r)=>{const{defaultBase16:i=M1,base16Themes:o=null}=t,a=V6(n,o);a&&(n={...a,...n});const s=Rc.reduce((h,g)=>(h[g]=n[g]||i[g],h),{}),l=Object.keys(n).reduce((h,g)=>(Rc.indexOf(g)===-1&&(h[g]=n[g]),h),{}),u=e(s),d=K6(l,u);return Po(B6,2)(d,...r)},3),k1=e=>!!e.extend,V6=(e,t)=>{if(e&&k1(e)&&e.extend&&(e=e.extend),typeof e=="string"){const[n,r]=e.split(":");t?e=t[n]:e=R1[n],r==="inverted"&&(e=_s(e))}return e&&Object.prototype.hasOwnProperty.call(e,"base00")?e:void 0},z6=e=>typeof e=="string"?`${e}:inverted`:e&&k1(e)&&e.extend?typeof e.extend=="string"?{...e,extend:`${e.extend}:inverted`}:{...e,extend:_s(e.extend)}:e&&_s(e);function U6(e){const t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&typeof e[Symbol.iterator]=="function"?"Iterable":t==="Custom"&&e.constructor!==Object&&e instanceof Object?"Object":t}function D1({styling:e,arrowStyle:t="single",expanded:n,nodeType:r,onClick:i}){return c.createElement("div",{...e("arrowContainer",t),onClick:i},c.createElement("div",{...e(["arrow","arrowSign"],r,n,t)},"▶",t==="double"&&c.createElement("div",{...e(["arrowSign","arrowSignInner"])},"▶")))}function q6(e,t){return e==="Object"?Object.keys(t).length:e==="Array"?t.length:1/0}function W6(e){return typeof e.set=="function"}function G6(e,t,n,r=0,i=1/0){let o;if(e==="Object"){let a=Object.getOwnPropertyNames(t);n&&a.sort(n===!0?void 0:n),a=a.slice(r,i+1),o={entries:a.map(s=>({key:s,value:t[s]}))}}else if(e==="Array")o={entries:t.slice(r,i+1).map((a,s)=>({key:s+r,value:a}))};else{let a=0;const s=[];let l=!0;const u=W6(t);for(const d of t){if(a>i){l=!1;break}r<=a&&(u&&Array.isArray(d)?typeof d[0]=="string"||typeof d[0]=="number"?s.push({key:d[0],value:d[1]}):s.push({key:`[entry ${a}]`,value:{"[key]":d[0],"[value]":d[1]}}):s.push({key:a,value:d})),a++}o={hasMore:!l,entries:s}}return o}function Ma(e,t,n){const r=[];for(;t-e>n*n;)n=n*n;for(let i=e;i<=t;i+=n)r.push({from:i,to:Math.min(t,i+n-1)});return r}function Q6(e,t,n,r,i=0,o=1/0){const a=G6.bind(null,e,t,n);if(!r)return a().entries;const s=o<1/0,l=Math.min(o-i,q6(e,t));if(e!=="Iterable"){if(l<=r||r<7)return a(i,o).entries}else if(l<=r&&!s)return a(i,o).entries;let u;if(e==="Iterable"){const{hasMore:d,entries:h}=a(i,i+r-1);u=d?[...h,...Ma(i+r,i+2*r-1,r)]:h}else u=s?Ma(i,o,r):[...a(0,r-5).entries,...Ma(r-4,l-5,r),...a(l-4,l-1).entries];return u}function Y6(e){const{styling:t,from:n,to:r,renderChildNodes:i,nodeType:o}=e,[a,s]=c.useState(!1),l=c.useCallback(()=>{s(!a)},[a]);return a?c.createElement("div",{...t("itemRange",a)},i(e,n,r)):c.createElement("div",{...t("itemRange",a),onClick:l},c.createElement(D1,{nodeType:o,styling:t,expanded:!1,onClick:l,arrowStyle:"double"}),`${n} ... ${r}`)}function Z6(e){return e.to!==void 0}function T1(e,t,n){const{nodeType:r,data:i,collectionLimit:o,circularCache:a,keyPath:s,postprocessValue:l,sortObjectKeys:u}=e,d=[];return Q6(r,i,u,o,t,n).forEach(h=>{if(Z6(h))d.push(c.createElement(Y6,{...e,key:`ItemRange--${h.from}-${h.to}`,from:h.from,to:h.to,renderChildNodes:T1}));else{const{key:g,value:f}=h,p=a.indexOf(f)!==-1;d.push(c.createElement(O1,{...e,postprocessValue:l,collectionLimit:o,key:`Node--${g}`,keyPath:[g,...s],value:l(f),circularCache:[...a,f],isCircular:p,hideRoot:!1}))}}),d}function kl(e){const{circularCache:t=[],collectionLimit:n,createItemString:r,data:i,expandable:o,getItemString:a,hideRoot:s,isCircular:l,keyPath:u,labelRenderer:d,level:h=0,nodeType:g,nodeTypeIndicator:f,shouldExpandNodeInitially:p,styling:m}=e,[b,$]=c.useState(l?!1:p(u,i,h)),x=c.useCallback(()=>{o&&$(!b)},[o,b]),E=b||s&&h===0?T1({...e,circularCache:t,level:h+1}):null,M=c.createElement("span",{...m("nestedNodeItemType",b)},f),C=a(g,i,M,r(i,n),u),k=[u,g,b,o];return s?c.createElement("li",{...m("rootNode",...k)},c.createElement("ul",{...m("rootNodeChildren",...k)},E)):c.createElement("li",{...m("nestedNode",...k)},o&&c.createElement(D1,{styling:m,nodeType:g,expanded:b,onClick:x}),c.createElement("label",{...m(["label","nestedNodeLabel"],...k),onClick:x},d(...k)),c.createElement("span",{...m("nestedNodeItemString",...k),onClick:x},C),c.createElement("ul",{...m("nestedNodeChildren",...k)},E))}function X6(e){const t=Object.getOwnPropertyNames(e).length;return`${t} ${t!==1?"keys":"key"}`}function J6({data:e,...t}){return c.createElement(kl,{...t,data:e,nodeType:"Object",nodeTypeIndicator:t.nodeType==="Error"?"Error()":"{}",createItemString:X6,expandable:Object.getOwnPropertyNames(e).length>0})}function ew(e){return`${e.length} ${e.length!==1?"items":"item"}`}function tw({data:e,...t}){return c.createElement(kl,{...t,data:e,nodeType:"Array",nodeTypeIndicator:"[]",createItemString:ew,expandable:e.length>0})}function nw(e,t){let n=0,r=!1;if(Number.isSafeInteger(e.size))n=e.size;else for(const i of e){if(t&&n+1>t){r=!0;break}n+=1}return`${r?">":""}${n} ${n!==1?"entries":"entry"}`}function rw(e){return c.createElement(kl,{...e,nodeType:"Iterable",nodeTypeIndicator:"()",createItemString:nw,expandable:!0})}function xt({nodeType:e,styling:t,labelRenderer:n,keyPath:r,valueRenderer:i,value:o,valueGetter:a=s=>s}){return c.createElement("li",{...t("value",e,r)},c.createElement("label",{...t(["label","valueLabel"],e,r)},n(r,e,!1,!1)),c.createElement("span",{...t("valueText",e,r)},i(a(o),o,...r)))}function O1({getItemString:e,keyPath:t,labelRenderer:n,styling:r,value:i,valueRenderer:o,isCustomNode:a,...s}){const l=a(i)?"Custom":U6(i),u={getItemString:e,key:t[0],keyPath:t,labelRenderer:n,nodeType:l,styling:r,value:i,valueRenderer:o},d={...s,...u,data:i,isCustomNode:a};switch(l){case"Object":case"Error":case"WeakMap":case"WeakSet":return c.createElement(J6,{...d});case"Array":return c.createElement(tw,{...d});case"Iterable":case"Map":case"Set":return c.createElement(rw,{...d});case"String":return c.createElement(xt,{...u,valueGetter:h=>`"${h}"`});case"Number":return c.createElement(xt,{...u});case"Boolean":return c.createElement(xt,{...u,valueGetter:h=>h?"true":"false"});case"Date":return c.createElement(xt,{...u,valueGetter:h=>h.toISOString()});case"Null":return c.createElement(xt,{...u,valueGetter:()=>"null"});case"Undefined":return c.createElement(xt,{...u,valueGetter:()=>"undefined"});case"Function":case"Symbol":return c.createElement(xt,{...u,valueGetter:h=>h.toString()});case"Custom":return c.createElement(xt,{...u});default:return c.createElement(xt,{...u,valueGetter:()=>`<${l}>`})}}const iw={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},ow=e=>({BACKGROUND_COLOR:e.base00,TEXT_COLOR:e.base07,STRING_COLOR:e.base0B,DATE_COLOR:e.base0B,NUMBER_COLOR:e.base09,BOOLEAN_COLOR:e.base09,NULL_COLOR:e.base08,UNDEFINED_COLOR:e.base08,FUNCTION_COLOR:e.base08,SYMBOL_COLOR:e.base08,LABEL_COLOR:e.base0D,ARROW_COLOR:e.base0D,ITEM_STRING_COLOR:e.base0B,ITEM_STRING_EXPANDED_COLOR:e.base03}),aw=e=>({String:e.STRING_COLOR,Date:e.DATE_COLOR,Number:e.NUMBER_COLOR,Boolean:e.BOOLEAN_COLOR,Null:e.NULL_COLOR,Undefined:e.UNDEFINED_COLOR,Function:e.FUNCTION_COLOR,Symbol:e.SYMBOL_COLOR}),sw=e=>{const t=ow(e);return{tree:{border:0,padding:0,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"0.125em",marginRight:0,listStyle:"none",MozUserSelect:"none",WebkitUserSelect:"none",backgroundColor:t.BACKGROUND_COLOR},value:({style:n},r,i)=>({style:{...n,paddingTop:"0.25em",paddingRight:0,marginLeft:"0.875em",WebkitUserSelect:"text",MozUserSelect:"text",wordWrap:"break-word",paddingLeft:i.length>1?"2.125em":"1.25em",textIndent:"-0.5em",wordBreak:"break-all"}}),label:{display:"inline-block",color:t.LABEL_COLOR},valueLabel:{margin:"0 0.5em 0 0"},valueText:({style:n},r)=>({style:{...n,color:aw(t)[r]}}),itemRange:(n,r)=>({style:{paddingTop:r?0:"0.25em",cursor:"pointer",color:t.LABEL_COLOR}}),arrow:({style:n},r,i)=>({style:{...n,marginLeft:0,transition:"150ms",WebkitTransition:"150ms",MozTransition:"150ms",WebkitTransform:i?"rotateZ(90deg)":"rotateZ(0deg)",MozTransform:i?"rotateZ(90deg)":"rotateZ(0deg)",transform:i?"rotateZ(90deg)":"rotateZ(0deg)",transformOrigin:"45% 50%",WebkitTransformOrigin:"45% 50%",MozTransformOrigin:"45% 50%",position:"relative",lineHeight:"1.1em",fontSize:"0.75em"}}),arrowContainer:({style:n},r)=>({style:{...n,display:"inline-block",paddingRight:"0.5em",paddingLeft:r==="double"?"1em":0,cursor:"pointer"}}),arrowSign:{color:t.ARROW_COLOR},arrowSignInner:{position:"absolute",top:0,left:"-0.4em"},nestedNode:({style:n},r,i,o,a)=>({style:{...n,position:"relative",paddingTop:"0.25em",marginLeft:r.length>1?"0.875em":0,paddingLeft:a?0:"1.125em"}}),rootNode:{padding:0,margin:0},nestedNodeLabel:({style:n},r,i,o,a)=>({style:{...n,margin:0,padding:0,WebkitUserSelect:a?"inherit":"text",MozUserSelect:a?"inherit":"text",cursor:a?"pointer":"default"}}),nestedNodeItemString:({style:n},r,i,o)=>({style:{...n,paddingLeft:"0.5em",cursor:"default",color:o?t.ITEM_STRING_EXPANDED_COLOR:t.ITEM_STRING_COLOR}}),nestedNodeItemType:{marginLeft:"0.3em",marginRight:"0.3em"},nestedNodeChildren:({style:n},r,i)=>({style:{...n,padding:0,margin:0,listStyle:"none",display:i?"block":"none"}}),rootNodeChildren:{padding:0,margin:0,listStyle:"none"}}},lw=H6(sw,{defaultBase16:iw}),Mc=e=>e,uw=(e,t,n)=>n===0,cw=(e,t,n,r)=>c.createElement("span",null,n," ",r),dw=([e])=>c.createElement("span",null,e,":"),fw=()=>!1;function kc({data:e,theme:t,invertTheme:n,keyPath:r=["root"],labelRenderer:i=dw,valueRenderer:o=Mc,shouldExpandNodeInitially:a=uw,hideRoot:s=!1,getItemString:l=cw,postprocessValue:u=Mc,isCustomNode:d=fw,collectionLimit:h=50,sortObjectKeys:g=!1}){const f=c.useMemo(()=>lw(n?z6(t):t),[t,n]);return c.createElement("ul",{...f("tree")},c.createElement(O1,{keyPath:s?[]:r,value:u(e),isCustomNode:d,styling:f,labelRenderer:i,valueRenderer:o,shouldExpandNodeInitially:a,hideRoot:s,getItemString:l,postprocessValue:u,collectionLimit:h,sortObjectKeys:g}))}var F1=function(e){var t=e.actions;return v.jsxs(b9,{children:[v.jsx(dl,{className:"flex size-7 items-center justify-center rounded-md bg-slate-50 text-slate-900 outline-none transition duration-150 ease-in-out hover:bg-slate-100 focus:bg-slate-100 radix-state-open:bg-slate-100","aria-label":"Action menu",children:v.jsx(bb,{width:18,height:18})}),v.jsx(g9,{placement:"bottom left",className:"space-y-0.5 rounded-md border border-slate-50 bg-white/75 p-1 shadow-sm backdrop-blur-md ",offset:5,children:v.jsx(x9,{children:t.map(function(n){return v.jsxs(S9,{className:"flex cursor-default items-center space-x-1.5 rounded-md py-1.5 pl-1.5 pr-8 text-sm font-medium text-slate-900 outline-none transition duration-150 ease-in-out focus:bg-slate-100",onAction:n.onSelect,children:[n.icon,v.jsx("span",{children:n.label})]},n.label)})})})]})},hw=function(e){var t=e.job,n=e.queueName,r=e.onRemove,i={onSuccess:function(){r==null||r()}},o=be.job.retry.useMutation(i).mutate,a=be.job.discard.useMutation(i).mutate,s=be.job.rerun.useMutation(i).mutate,l=be.job.remove.useMutation(i).mutate,u={queueName:n,jobId:t.id};return v.jsx(F1,{actions:yn(yn(yn([],t.failedReason?[{label:"Retry",onSelect:function(){o(u)},icon:v.jsx(ur,{})}]:[],!0),t.finishedAt?[{label:"Rerun",onSelect:function(){s(u)},icon:v.jsx(ur,{})}]:[{label:"Discard",onSelect:function(){a(u)},icon:v.jsx($b,{})}],!0),[{label:"Remove",onSelect:function(){l(u)},icon:v.jsx(Lo,{})}],!1)})},Pn=function(e){var t=e.colorScheme,n=t===void 0?"slate":t,r=e.variant,i=r===void 0?"outline":r,o=e.size,a=o===void 0?"md":o,s=e.icon,l=e.label,u=e.isLoading,d=e.onClick,h=e.disabled;return v.jsxs("button",{onClick:d,disabled:u||h,className:dr("flex items-center space-x-1 rounded-md border text-sm font-medium",{"py-0.5":a==="sm","py-1":a==="md","py-1.5":a==="lg"},[a==="sm"&&s?"pl-1.5 pr-2.5":"px-2.5",a==="md"&&s?"pl-2 pr-3":"px-3",a==="lg"&&s?"pl-2.5 pr-4":"px-4"],{"cursor-not-allowed opacity-50":u||h,"border-yellow-900 text-yellow-900 hover:bg-yellow-50 focus:bg-yellow-50":n==="yellow"&&i==="outline","border-slate-900 text-slate-900 hover:bg-slate-50 focus:bg-slate-50":n==="slate"&&i==="outline","border-red-900 text-red-900 hover:bg-red-50 focus:bg-red-50":n==="red"&&i==="outline","border-yellow-800 bg-yellow-800 text-yellow-50 hover:border-yellow-900 hover:bg-yellow-900 focus:border-yellow-900 focus:bg-yellow-900":n==="yellow"&&i==="filled","border-slate-800 bg-slate-800 text-slate-50 hover:border-slate-900 hover:bg-slate-900 focus:border-slate-900 focus:bg-slate-900":n==="slate"&&i==="filled","border-red-800 bg-red-800 text-red-50 hover:border-red-900 hover:bg-red-900 focus:border-red-900 focus:bg-red-900":n==="red"&&i==="filled"}),children:[u?v.jsx("div",{className:"flex w-4 justify-center",children:v.jsx(el,{width:10,height:10,className:"animate-spin"})}):s?v.jsx("div",{className:"flex w-4 justify-center",children:s}):null,v.jsx("span",{children:l})]})},gw=function(e){var t=e.job,n=e.queueName,r=e.onDismiss,i=be.job.retry.useMutation().mutate;return v.jsx(pl,{isOpen:!0,onOpenChange:function(o){o||r()},children:v.jsx(yl,{isDismissable:!0,className:"fixed inset-0 bg-black/10",children:v.jsx(ml,{className:"fixed left-1/2 top-1/2 max-h-[85vh] w-full max-w-xl -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(o){var a=o.close;return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full text-slate-500 transition duration-150 ease-in-out hover:bg-slate-50","aria-label":"Close",onClick:function(){r(),a()},children:v.jsx(Jd,{})}),v.jsxs("div",{className:"flex items-center space-x-4",children:[v.jsxs(bl,{className:"mb-1 flex items-center space-x-2",children:[v.jsx("span",{className:"text-xl font-semibold text-slate-900",children:t.name}),v.jsxs("span",{className:"rounded-md text-slate-500",children:["#",t.id]})]}),v.jsx(hw,{queueName:n,job:t,onRemove:r})]}),v.jsxs("div",{children:[t.failedReason?v.jsxs("div",{className:"space-y-2 border-b border-b-slate-200 py-4",children:[v.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Error"}),v.jsx("p",{className:"text-sm text-red-600",children:t.failedReason}),v.jsx(Pn,{label:"Retry",size:"sm",icon:v.jsx(ur,{width:14}),onClick:function(){i({queueName:n,jobId:t.id}),r()}})]}):null,v.jsxs("div",{className:"space-y-2 border-b border-b-slate-200 py-4",children:[v.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Options"}),v.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:v.jsx(kc,{data:t.opts,theme:"monokai"})})]}),v.jsxs("div",{className:"space-y-2 pt-4",children:[v.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Data"}),v.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:v.jsx(kc,{data:t.data,theme:"monokai"})})]})]})]})}})})})},_i=W9(),pw=[_i.display({id:"select",header:function(e){var t=e.table;return v.jsx(ac,{checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),onCheckedChange:function(){t.toggleAllRowsSelected()}})},cell:function(e){var t=e.row,n=e.table;return v.jsx(ac,{className:n.getIsSomeRowsSelected()||n.getIsAllRowsSelected()?"":"opacity-0 transition group-hover:opacity-100",checked:t.getIsSomeSelected()?"indeterminate":t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})}}),_i.accessor("name",{cell:function(e){return v.jsxs("div",{className:"flex w-full items-center space-x-2",children:[v.jsx("span",{className:"max-w-fit grow basis-full truncate text-slate-900 dark:text-slate-200",children:e.cell.row.original.name}),v.jsxs("span",{className:"max-w-[20%] shrink truncate text-sm text-slate-500 dark:text-slate-400",children:["#",e.cell.row.original.id]})]})},header:"Name"}),_i.display({id:"lifecycle",header:function(){return"Lifecycle"},cell:function(e){var t=e.row.original,n=t.createdAt,r=t.processedAt,i=t.finishedAt,o=t.status,a=t.retriedAt;return v.jsxs("div",{className:"flex items-center space-x-3",children:[v.jsx(ka,{date:new Date(n),variant:"added"}),o==="waiting"?v.jsx(Dc,{}):null,r?v.jsxs(v.Fragment,{children:[v.jsx(Tc,{date:new Date(r),baseDate:new Date(n)}),v.jsx(ka,{date:new Date(r),variant:a?"retried":"processing"})]}):null,o==="active"?v.jsx(Dc,{}):null,i&&r?v.jsxs(v.Fragment,{children:[v.jsx(Tc,{date:new Date(i),baseDate:new Date(r)}),v.jsx(ka,{date:new Date(i),variant:o==="failed"?"failed":"completed"})]}):null]})}}),_i.display({id:"options",header:"Options",cell:function(e){var t=e.row.original.opts;return v.jsxs("div",{className:"flex items-center space-x-2",children:[t.priority?v.jsx(Ni,{icon:v.jsx(yb,{width:12,height:12}),label:t.priority}):null,t.attempts&&t.attempts>1?v.jsx(Ni,{icon:v.jsx(ur,{width:12,height:12}),label:t.attempts}):null,t.lifo?v.jsx(Ni,{icon:v.jsx(Vb,{width:12,height:12}),label:"LIFO"}):null,t.delay?v.jsx(Ni,{icon:v.jsx(Eb,{width:12,height:12}),label:t.delay}):null]})}})],mw=function(e){var t=e.jobs,n=e.totalJobs,r=e.onBottomInView,i=e.isLoading,o=e.isFetchingNextPage,a=e.queueName,s=e.status,l=c.useState({}),u=l[0],d=l[1],h=o4({threshold:0,onChange:function(C){C&&r()}}).ref,g=Ny({data:t,columns:pw,getCoreRowModel:Fy(),state:{rowSelection:u},onRowSelectionChange:d}),f=t.length===0,p=t.length/(n||0)*100,m=c.useState(null),b=m[0],$=m[1],x=be.job.retry.useMutation().mutate,E=be.job.rerun.useMutation().mutate,M=be.job.bulkRemove.useMutation().mutate;return c.useEffect(function(){g.resetRowSelection()},[s]),v.jsxs("div",{children:[b?v.jsx(gw,{queueName:a,job:b,onDismiss:function(){return $(null)}}):null,v.jsx("div",{className:"rounded-md border border-slate-200 shadow-sm dark:border-slate-700",children:i?v.jsx(s4,{}):v.jsxs("div",{children:[g.getHeaderGroups().map(function(C,k){return v.jsx("div",{className:"sticky top-0 grid grid-cols-[auto,350px,576px,1fr] rounded-t-md border-b border-slate-200 bg-slate-100/50 p-2 backdrop-blur-md dark:border-slate-700 dark:bg-slate-900/50",children:C.headers.map(function(F){return v.jsx("div",{className:"flex h-full items-center text-sm font-semibold text-slate-700 dark:text-slate-300 ".concat(k!==0?"pr-10":"pr-3"),children:F.isPlaceholder?null:Gu(F.column.columnDef.header,F.getContext())},F.id)})},C.id)}),g.getRowModel().rows.map(function(C,k){return v.jsx(a4,{isLastRow:g.getRowModel().rows.length!==k+1,isSelected:C.getIsSelected(),onClick:function(){return $(C.original)},children:C.getVisibleCells().map(function(F,y){return v.jsx("div",{className:"flex h-full items-center ".concat(y!==0?"pr-10":"pr-3"),children:Gu(F.column.columnDef.cell,F.getContext())},F.id)})},C.id)}),!i&&f?v.jsx("div",{className:"flex items-center justify-center py-10",children:v.jsx("p",{className:"text-slate-500",children:"No jobs found"})}):null]})}),!i&&f?null:v.jsx("div",{ref:h,className:"my-3 flex justify-center",children:v.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[v.jsxs("p",{className:"text-xs text-slate-500",children:["You've viewed ",t.length," of ",n," jobs"]}),v.jsx(k9,{value:p,children:function(C){var k=C.percentage;return v.jsx(v.Fragment,{children:v.jsx("div",{style:{transform:"translateZ(0)"},className:"relative h-0.5 w-[144px] overflow-hidden rounded-sm bg-slate-200",children:v.jsx("div",{className:"size-full bg-cyan-500 transition duration-300 ease-in-out",style:{transform:"translateX(-".concat(100-k,"%)")}})})})}}),o?v.jsx(el,{className:"animate-spin text-slate-300"}):null]})}),g.getSelectedRowModel().rows.length>0?v.jsx("div",{className:"pointer-events-none sticky bottom-0 flex w-full items-center justify-center pb-5",children:v.jsxs("div",{className:"pointer-events-auto flex items-center space-x-3 rounded-lg border-slate-100 bg-white/90 px-3 py-2 text-sm shadow-lg backdrop-blur",children:[v.jsxs("p",{children:[g.getSelectedRowModel().rows.length," selected"]}),s==="completed"||s==="failed"?v.jsx(Pn,{label:s==="failed"?"Retry":"Rerun",icon:v.jsx(ur,{}),size:"sm",onClick:function(){g.getSelectedRowModel().rows.forEach(function(C){s==="failed"?x({queueName:a,jobId:C.original.id}):E({queueName:a,jobId:C.original.id})}),g.resetRowSelection()}}):null,v.jsx(Pn,{label:"Delete",colorScheme:"red",icon:v.jsx(Lo,{}),size:"sm",onClick:function(){M({queueName:a,jobIds:g.getSelectedRowModel().rows.map(function(C){return C.original.id})}),g.resetRowSelection()}})]})}):null]})},ka=function(e){var t=e.variant,n=e.date,r={added:"Added to queue",completed:"Completed",failed:"Failed",processing:"Processed",retried:"Retried"};return v.jsx(n1,{message:"".concat(r[t]," ").concat(J3(n)," ago"),children:v.jsxs("div",{className:"flex items-center space-x-1.5",children:[t==="added"&&v.jsx(tf,{width:14,height:14,className:"rounded-full bg-cyan-50 text-cyan-900"}),t==="processing"&&v.jsx(ob,{width:14,height:14,className:"rounded-full bg-slate-50 text-slate-900"}),t==="retried"&&v.jsx(ur,{width:14,height:14,className:"rounded-full bg-amber-50 text-amber-900"}),t==="completed"&&v.jsx(Xd,{width:14,height:14,className:"rounded-full bg-green-50 text-green-900"}),t==="failed"&&v.jsx(ef,{width:14,height:14,className:"rounded-full bg-red-50 text-red-900"}),v.jsx("p",{className:"text-slate-900 dark:text-slate-200",children:Q3(n,"".concat(t==="added"?"MM/dd ":"","HH:mm:ss"))})]})})},Dc=function(){return v.jsxs("div",{className:"flex items-center space-x-1.5",children:[v.jsx(is,{width:14,height:14,className:"text-slate-300"}),v.jsx(el,{width:14,height:14,className:"animate-spin text-slate-300 dark:text-slate-600"})]})},Tc=function(e){var t=e.date,n=e.baseDate;return v.jsxs("div",{className:"flex items-center space-x-1.5",children:[v.jsx(is,{width:14,height:14,className:"text-slate-300"}),v.jsx("p",{className:"w-7 rounded-sm text-center text-xs text-slate-500 dark:text-slate-400",children:X3(t,n,{locale:{formatDistance:function(r,i){return r==="xSeconds"?"".concat(i,"s"):r==="xMinutes"?"".concat(i,"m"):r==="xHours"?"".concat(i,"h"):r==="xDays"?"".concat(i,"d"):r==="xMonths"?"".concat(i,"mo"):r==="xYears"?"".concat(i,"y"):""}}})}),v.jsx(is,{width:14,height:14,className:"text-slate-300 dark:text-slate-600"})]})},bw=function(e){var t=e.title,n=e.description,r=e.action,i=e.children;return v.jsxs(pl,{children:[v.jsx(dl,{children:i}),v.jsx(yl,{isDismissable:!0,className:"fixed inset-0 bg-black/10",children:v.jsx(ml,{role:"alertdialog",className:"fixed left-1/2 top-1/2 w-full max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(o){var a=o.close;return v.jsxs(v.Fragment,{children:[v.jsx(bl,{className:"mb-3 text-xl font-semibold text-slate-900",children:t}),v.jsx("p",{className:"mb-6 text-slate-600",children:n}),v.jsxs("div",{className:"flex justify-end space-x-3",children:[v.jsx(Pn,{onClick:a,label:"Cancel"}),r]})]})}})})]})},vw=e=>{switch(e){case"success":return xw;case"info":return $w;case"warning":return Cw;case"error":return Sw;default:return null}},yw=Array(12).fill(0),ww=({visible:e,className:t})=>c.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},c.createElement("div",{className:"sonner-spinner"},yw.map((n,r)=>c.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xw=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Cw=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),$w=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),Sw=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},c.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Ew=c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},c.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),Pw=()=>{let[e,t]=c.useState(document.hidden);return c.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},Ks=1,Rw=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:Ks++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async l=>{if(o=["resolve",l],c.isValidElement(l))i=!1,this.create({id:n,type:"default",message:l});else if(kw(l)&&!l.ok){i=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${l.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${l.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){i=!1;let u=typeof t.success=="function"?await t.success(l):t.success,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async l=>{if(o=["reject",l],t.error!==void 0){i=!1;let u=typeof t.error=="function"?await t.error(l):t.error,d=typeof t.description=="function"?await t.description(l):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var l;i&&(this.dismiss(n),n=void 0),(l=t.finally)==null||l.call(t)}),s=()=>new Promise((l,u)=>a.then(()=>o[0]==="reject"?u(o[1]):l(o[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Le=new Rw,Mw=(e,t)=>{let n=(t==null?void 0:t.id)||Ks++;return Le.addToast({title:e,...t,id:n}),n},kw=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Dw=Mw,Tw=()=>Le.toasts,Zi=Object.assign(Dw,{success:Le.success,info:Le.info,warning:Le.warning,error:Le.error,custom:Le.custom,message:Le.message,promise:Le.promise,dismiss:Le.dismiss,loading:Le.loading},{getHistory:Tw});function Ow(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Ow(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
52
- `);function Ki(e){return e.label!==void 0}var Fw=3,Lw="32px",Oc=4e3,Aw=356,Iw=14,Nw=20,jw=200;function _w(...e){return e.filter(Boolean).join(" ")}var Kw=e=>{var t,n,r,i,o,a,s,l,u,d,h;let{invert:g,toast:f,unstyled:p,interacting:m,setHeights:b,visibleToasts:$,heights:x,index:E,toasts:M,expanded:C,removeToast:k,defaultRichColors:F,closeButton:y,style:D,cancelButtonStyle:P,actionButtonStyle:T,className:L="",descriptionClassName:R="",duration:I,position:O,gap:K,loadingIcon:A,expandByDefault:W,classNames:B,icons:X,closeButtonAriaLabel:q="Close toast",pauseWhenPageIsHidden:j,cn:H}=e,[U,_]=c.useState(!1),[ye,ee]=c.useState(!1),[Tt,st]=c.useState(!1),[an,Ot]=c.useState(!1),[Uo,de]=c.useState(!1),[Sr,Er]=c.useState(0),[H1,Dl]=c.useState(0),bi=c.useRef(f.duration||I||Oc),Tl=c.useRef(null),Tn=c.useRef(null),V1=E===0,z1=E+1<=$,Be=f.type,On=f.dismissible!==!1,U1=f.className||"",q1=f.descriptionClassName||"",vi=c.useMemo(()=>x.findIndex(Z=>Z.toastId===f.id)||0,[x,f.id]),W1=c.useMemo(()=>{var Z;return(Z=f.closeButton)!=null?Z:y},[f.closeButton,y]);c.useMemo(()=>f.duration||I||Oc,[f.duration,I]);let qo=c.useRef(0),Fn=c.useRef(0),Ol=c.useRef(0),yi=c.useRef(null),[Fl,G1]=O.split("-"),Ll=c.useMemo(()=>x.reduce((Z,ie,ue)=>ue>=vi?Z:Z+ie.height,0),[x,vi]),Al=Pw(),Q1=f.invert||g,Wo=Be==="loading";Fn.current=c.useMemo(()=>vi*K+Ll,[vi,Ll]),c.useEffect(()=>{_(!0)},[]),c.useEffect(()=>{let Z=Tn.current;if(Z){let ie=Z.getBoundingClientRect().height;return Dl(ie),b(ue=>[{toastId:f.id,height:ie,position:f.position},...ue]),()=>b(ue=>ue.filter(Ze=>Ze.toastId!==f.id))}},[b,f.id]),c.useLayoutEffect(()=>{if(!U)return;let Z=Tn.current,ie=Z.style.height;Z.style.height="auto";let ue=Z.getBoundingClientRect().height;Z.style.height=ie,Dl(ue),b(Ze=>Ze.find(lt=>lt.toastId===f.id)?Ze.map(lt=>lt.toastId===f.id?{...lt,height:ue}:lt):[{toastId:f.id,height:ue,position:f.position},...Ze])},[U,f.title,f.description,b,f.id]);let Ft=c.useCallback(()=>{ee(!0),Er(Fn.current),b(Z=>Z.filter(ie=>ie.toastId!==f.id)),setTimeout(()=>{k(f)},jw)},[f,k,b,Fn]);c.useEffect(()=>{if(f.promise&&Be==="loading"||f.duration===1/0||f.type==="loading")return;let Z;return C||m||j&&Al?(()=>{if(Ol.current<qo.current){let ie=new Date().getTime()-qo.current;bi.current=bi.current-ie}Ol.current=new Date().getTime()})():bi.current!==1/0&&(qo.current=new Date().getTime(),Z=setTimeout(()=>{var ie;(ie=f.onAutoClose)==null||ie.call(f,f),Ft()},bi.current)),()=>clearTimeout(Z)},[C,m,f,Be,j,Al,Ft]),c.useEffect(()=>{f.delete&&Ft()},[Ft,f.delete]);function Y1(){var Z,ie,ue;return X!=null&&X.loading?c.createElement("div",{className:H(B==null?void 0:B.loader,(Z=f==null?void 0:f.classNames)==null?void 0:Z.loader,"sonner-loader"),"data-visible":Be==="loading"},X.loading):A?c.createElement("div",{className:H(B==null?void 0:B.loader,(ie=f==null?void 0:f.classNames)==null?void 0:ie.loader,"sonner-loader"),"data-visible":Be==="loading"},A):c.createElement(ww,{className:H(B==null?void 0:B.loader,(ue=f==null?void 0:f.classNames)==null?void 0:ue.loader),visible:Be==="loading"})}return c.createElement("li",{tabIndex:0,ref:Tn,className:H(L,U1,B==null?void 0:B.toast,(t=f==null?void 0:f.classNames)==null?void 0:t.toast,B==null?void 0:B.default,B==null?void 0:B[Be],(n=f==null?void 0:f.classNames)==null?void 0:n[Be]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:F,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":U,"data-promise":!!f.promise,"data-swiped":Uo,"data-removed":ye,"data-visible":z1,"data-y-position":Fl,"data-x-position":G1,"data-index":E,"data-front":V1,"data-swiping":Tt,"data-dismissible":On,"data-type":Be,"data-invert":Q1,"data-swipe-out":an,"data-expanded":!!(C||W&&U),style:{"--index":E,"--toasts-before":E,"--z-index":M.length-E,"--offset":`${ye?Sr:Fn.current}px`,"--initial-height":W?"auto":`${H1}px`,...D,...f.style},onPointerDown:Z=>{Wo||!On||(Tl.current=new Date,Er(Fn.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(st(!0),yi.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,ie,ue,Ze;if(an||!On)return;yi.current=null;let lt=Number(((Z=Tn.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount").replace("px",""))||0),wi=new Date().getTime()-((ie=Tl.current)==null?void 0:ie.getTime()),Z1=Math.abs(lt)/wi;if(Math.abs(lt)>=Nw||Z1>.11){Er(Fn.current),(ue=f.onDismiss)==null||ue.call(f,f),Ft(),Ot(!0),de(!1);return}(Ze=Tn.current)==null||Ze.style.setProperty("--swipe-amount","0px"),st(!1)},onPointerMove:Z=>{var ie,ue;if(!yi.current||!On)return;let Ze=Z.clientY-yi.current.y,lt=((ie=window.getSelection())==null?void 0:ie.toString().length)>0,wi=Fl==="top"?Math.min(0,Ze):Math.max(0,Ze);Math.abs(wi)>0&&de(!0),!lt&&((ue=Tn.current)==null||ue.style.setProperty("--swipe-amount",`${wi}px`))}},W1&&!f.jsx?c.createElement("button",{"aria-label":q,"data-disabled":Wo,"data-close-button":!0,onClick:Wo||!On?()=>{}:()=>{var Z;Ft(),(Z=f.onDismiss)==null||Z.call(f,f)},className:H(B==null?void 0:B.closeButton,(i=f==null?void 0:f.classNames)==null?void 0:i.closeButton)},(o=X==null?void 0:X.close)!=null?o:Ew):null,f.jsx||c.isValidElement(f.title)?f.jsx?f.jsx:typeof f.title=="function"?f.title():f.title:c.createElement(c.Fragment,null,Be||f.icon||f.promise?c.createElement("div",{"data-icon":"",className:H(B==null?void 0:B.icon,(a=f==null?void 0:f.classNames)==null?void 0:a.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||Y1():null,f.type!=="loading"?f.icon||(X==null?void 0:X[Be])||vw(Be):null):null,c.createElement("div",{"data-content":"",className:H(B==null?void 0:B.content,(s=f==null?void 0:f.classNames)==null?void 0:s.content)},c.createElement("div",{"data-title":"",className:H(B==null?void 0:B.title,(l=f==null?void 0:f.classNames)==null?void 0:l.title)},typeof f.title=="function"?f.title():f.title),f.description?c.createElement("div",{"data-description":"",className:H(R,q1,B==null?void 0:B.description,(u=f==null?void 0:f.classNames)==null?void 0:u.description)},typeof f.description=="function"?f.description():f.description):null),c.isValidElement(f.cancel)?f.cancel:f.cancel&&Ki(f.cancel)?c.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||P,onClick:Z=>{var ie,ue;Ki(f.cancel)&&On&&((ue=(ie=f.cancel).onClick)==null||ue.call(ie,Z),Ft())},className:H(B==null?void 0:B.cancelButton,(d=f==null?void 0:f.classNames)==null?void 0:d.cancelButton)},f.cancel.label):null,c.isValidElement(f.action)?f.action:f.action&&Ki(f.action)?c.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||T,onClick:Z=>{var ie,ue;Ki(f.action)&&((ue=(ie=f.action).onClick)==null||ue.call(ie,Z),!Z.defaultPrevented&&Ft())},className:H(B==null?void 0:B.actionButton,(h=f==null?void 0:f.classNames)==null?void 0:h.actionButton)},f.action.label):null))};function Fc(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var Bw=c.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:l,theme:u="light",richColors:d,duration:h,style:g,visibleToasts:f=Fw,toastOptions:p,dir:m=Fc(),gap:b=Iw,loadingIcon:$,icons:x,containerAriaLabel:E="Notifications",pauseWhenPageIsHidden:M,cn:C=_w}=e,[k,F]=c.useState([]),y=c.useMemo(()=>Array.from(new Set([r].concat(k.filter(j=>j.position).map(j=>j.position)))),[k,r]),[D,P]=c.useState([]),[T,L]=c.useState(!1),[R,I]=c.useState(!1),[O,K]=c.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),A=c.useRef(null),W=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=c.useRef(null),X=c.useRef(!1),q=c.useCallback(j=>{F(H=>{var U;return(U=H.find(_=>_.id===j.id))!=null&&U.delete||Le.dismiss(j.id),H.filter(({id:_})=>_!==j.id)})},[]);return c.useEffect(()=>Le.subscribe(j=>{if(j.dismiss){F(H=>H.map(U=>U.id===j.id?{...U,delete:!0}:U));return}setTimeout(()=>{Rn.flushSync(()=>{F(H=>{let U=H.findIndex(_=>_.id===j.id);return U!==-1?[...H.slice(0,U),{...H[U],...j},...H.slice(U+1)]:[j,...H]})})})}),[]),c.useEffect(()=>{if(u!=="system"){K(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?K("dark"):K("light")),typeof window>"u")return;let j=window.matchMedia("(prefers-color-scheme: dark)");try{j.addEventListener("change",({matches:H})=>{K(H?"dark":"light")})}catch{j.addListener(({matches:U})=>{try{K(U?"dark":"light")}catch(_){console.error(_)}})}},[u]),c.useEffect(()=>{k.length<=1&&L(!1)},[k]),c.useEffect(()=>{let j=H=>{var U,_;i.every(ye=>H[ye]||H.code===ye)&&(L(!0),(U=A.current)==null||U.focus()),H.code==="Escape"&&(document.activeElement===A.current||(_=A.current)!=null&&_.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[i]),c.useEffect(()=>{if(A.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,X.current=!1)}},[A.current]),c.createElement("section",{"aria-label":`${E} ${W}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},y.map((j,H)=>{var U;let[_,ye]=j.split("-");return k.length?c.createElement("ol",{key:j,dir:m==="auto"?Fc():m,tabIndex:-1,ref:A,className:s,"data-sonner-toaster":!0,"data-theme":O,"data-y-position":_,"data-lifted":T&&k.length>1&&!o,"data-x-position":ye,style:{"--front-toast-height":`${((U=D[0])==null?void 0:U.height)||0}px`,"--offset":typeof l=="number"?`${l}px`:l||Lw,"--width":`${Aw}px`,"--gap":`${b}px`,...g},onBlur:ee=>{X.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(X.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||X.current||(X.current=!0,B.current=ee.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{R||L(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||I(!0)},onPointerUp:()=>I(!1)},k.filter(ee=>!ee.position&&H===0||ee.position===j).map((ee,Tt)=>{var st,an;return c.createElement(Kw,{key:ee.id,icons:x,index:Tt,toast:ee,defaultRichColors:d,duration:(st=p==null?void 0:p.duration)!=null?st:h,className:p==null?void 0:p.className,descriptionClassName:p==null?void 0:p.descriptionClassName,invert:n,visibleToasts:f,closeButton:(an=p==null?void 0:p.closeButton)!=null?an:a,interacting:R,position:j,style:p==null?void 0:p.style,unstyled:p==null?void 0:p.unstyled,classNames:p==null?void 0:p.classNames,cancelButtonStyle:p==null?void 0:p.cancelButtonStyle,actionButtonStyle:p==null?void 0:p.actionButtonStyle,removeToast:q,toasts:k.filter(Ot=>Ot.position==ee.position),heights:D.filter(Ot=>Ot.position==ee.position),setHeights:P,expandByDefault:o,gap:b,loadingIcon:$,expanded:T,pauseWhenPageIsHidden:M,cn:C})})):null}))}),Hw=function(e){var t=e.showCleanAllButton,n=e.queueName,r=e.status,i=e.queue,o=be.queue.clean.useMutation({onSuccess:function(){Zi.success("All ".concat(r," jobs have been removed"))}}),a=o.mutate,s=o.status,l=yn(yn([{name:"Completed",status:"completed"},{name:"Failed",status:"failed"},{name:"Active",status:"active"}],i&&"prioritized"in i.counts?[{name:"Prioritized",status:"prioritized"}]:[],!0),[{name:"Waiting",status:"waiting"},{name:"Delayed",status:"delayed"},{name:"Paused",status:"paused"}],!1);return v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"flex items-center space-x-3",children:l.map(function(u){var d=u.status===r;return v.jsxs(Fo,{to:"?status=".concat(u.status),className:dr("flex items-center space-x-2 rounded-md px-3 py-1 font-medium transition duration-150 ease-in-out",{"text-slate-500 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-slate-800":!d,"bg-green-50 text-green-900 dark:bg-green-900 dark:text-green-50":d&&u.status==="completed","bg-red-50 text-red-900 dark:bg-red-900 dark:text-red-100":d&&u.status==="failed","bg-cyan-50 text-cyan-900":d&&u.status==="active","bg-purple-50 text-purple-900":d&&u.status==="prioritized","bg-amber-50 text-amber-900":d&&u.status==="waiting","bg-indigo-50 text-indigo-900":d&&u.status==="delayed","bg-stone-50 text-stone-900":d&&u.status==="paused"}),children:[v.jsx("span",{children:u.name}),i!=null&&i.counts[u.status]?v.jsx("span",{className:dr("rounded-md px-1.5 py-0.5 text-xs font-semibold",{"bg-slate-400 text-slate-50":!d,"bg-green-600 text-green-50":d&&u.status==="completed","bg-red-600 text-red-50":d&&u.status==="failed","bg-cyan-600 text-cyan-50":d&&u.status==="active","bg-purple-600 text-purple-50":d&&u.status==="prioritized","bg-amber-600 text-amber-50":d&&u.status==="waiting","bg-indigo-600 text-indigo-50":d&&u.status==="delayed","bg-stone-600 text-stone-50":d&&u.status==="paused"}),children:i.counts[u.status]}):null]},u.name)})}),t?v.jsx(bw,{title:"Are you absolutely sure?",description:"This action cannot be undone. This will permanently remove all ".concat(r," jobs from the queue."),action:v.jsx(Pn,{variant:"filled",colorScheme:"red",label:"Yes, remove jobs",onClick:function(){return a({queueName:n,status:r})}}),children:v.jsx(Pn,{colorScheme:"yellow",icon:v.jsx(Lo,{}),label:"Clean all",size:"sm",isLoading:s==="pending"})}):null]})};function Vw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ac(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Lc(Object(n),!0).forEach(function(r){Vw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zw(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Uw(e,t){if(e==null)return{};var n=zw(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qw(e,t){return Ww(e)||Gw(e,t)||Qw(e,t)||Yw()}function Ww(e){if(Array.isArray(e))return e}function Gw(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function Qw(e,t){if(e){if(typeof e=="string")return Ic(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ic(e,t)}}function Ic(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
53
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Zw(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nc(Object(n),!0).forEach(function(r){Zw(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xw(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function _r(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function Ro(e){return{}.toString.call(e).includes("Object")}function Jw(e){return!Object.keys(e).length}function ti(e){return typeof e=="function"}function ex(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function tx(e,t){return Ro(t)||Jt("changeType"),Object.keys(t).some(function(n){return!ex(e,n)})&&Jt("changeField"),t}function nx(e){ti(e)||Jt("selectorType")}function rx(e){ti(e)||Ro(e)||Jt("handlerType"),Ro(e)&&Object.values(e).some(function(t){return!ti(t)})&&Jt("handlersType")}function ix(e){e||Jt("initialIsRequired"),Ro(e)||Jt("initialType"),Jw(e)&&Jt("initialContent")}function ox(e,t){throw new Error(e[t]||e.default)}var ax={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Jt=_r(ox)(ax),Bi={changes:tx,selector:nx,handler:rx,initial:ix};function sx(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Bi.initial(e),Bi.handler(t);var n={current:e},r=_r(cx)(n,t),i=_r(ux)(n),o=_r(Bi.changes)(e),a=_r(lx)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(d){return d};return Bi.selector(u),u(n.current)}function l(u){Xw(r,i,o,a)(u)}return[s,l]}function lx(e,t){return ti(t)?t(e.current):t}function ux(e,t){return e.current=jc(jc({},e.current),t),t}function cx(e,t,n){return ti(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var dx={create:sx},fx={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function hx(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function gx(e){return{}.toString.call(e).includes("Object")}function px(e){return e||_c("configIsRequired"),gx(e)||_c("configType"),e.urls?(mx(),{paths:{vs:e.urls.monacoBase}}):e}function mx(){console.warn(L1.deprecation)}function bx(e,t){throw new Error(e[t]||e.default)}var L1={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
57
+ `)}function X7(e){return function(){return e}}var qc=function(){try{var e=og(Object,"defineProperty");return e({},"",{}),e}catch{}}(),Z7=qc?function(e,t){return qc(e,"toString",{configurable:!0,enumerable:!1,value:X7(t),writable:!0})}:ig,J7=fg(Z7);function e6(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function t6(e,t,n,r){for(var i=e.length,o=n+-1;++o<i;)if(t(e[o],o,e))return o;return-1}function n6(e){return e!==e}function r6(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function i6(e,t,n){return t===t?r6(e,t,n):t6(e,n6,n)}function o6(e,t){var n=e==null?0:e.length;return!!n&&i6(e,t,0)>-1}var a6=1,s6=2,l6=8,u6=16,c6=32,d6=64,f6=128,h6=256,g6=512,p6=[["ary",f6],["bind",a6],["bindKey",s6],["curry",l6],["curryRight",u6],["flip",g6],["partial",c6],["partialRight",d6],["rearg",h6]];function m6(e,t){return e6(p6,function(n){var r="_."+n[0];t&n[1]&&!o6(e,r)&&e.push(r)}),e.sort()}function gg(e,t,n){var r=t+"";return J7(e,Y7(r,m6(G7(r),n)))}var b6=4,v6=8,Gc=32,Qc=64;function pg(e,t,n,r,i,o,a,s,l,u){var g=t&v6,c=g?a:void 0,h=g?void 0:a,f=g?o:void 0,p=g?void 0:o;t|=g?Gc:Qc,t&=~(g?Qc:Gc),t&b6||(t&=-4);var m=[e,t,i,f,c,p,h,s,l,u],b=n.apply(void 0,m);return H7(e)&&hg(b,m),b.placeholder=r,gg(b,e,t)}function mg(e){var t=e;return t.placeholder}var y6=9007199254740991,w6=/^(?:0|[1-9]\d*)$/;function x6(e,t){var n=typeof e;return t=t??y6,!!t&&(n=="number"||n!="symbol"&&w6.test(e))&&e>-1&&e%1==0&&e<t}var C6=Math.min;function S6(e,t){for(var n=e.length,r=C6(t.length,n),i=dg(e);r--;){var o=t[r];e[r]=x6(o,n)?i[o]:void 0}return e}var Yc="__lodash_placeholder__";function Wo(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];(a===t||a===Yc)&&(e[n]=Yc,o[i++]=n)}return o}var $6=1,E6=2,P6=8,R6=16,M6=128,k6=512;function eu(e,t,n,r,i,o,a,s,l,u){var g=t&M6,c=t&$6,h=t&E6,f=t&(P6|R6),p=t&k6,m=h?void 0:yi(e);function b(){for(var v=arguments.length,w=Array(v),x=v;x--;)w[x]=arguments[x];if(f)var k=mg(b),S=F7(w,k);if(r&&(w=lg(w,r,i,f)),o&&(w=ug(w,o,a,f)),v-=S,f&&v<u){var R=Wo(w,k);return pg(e,t,eu,b.placeholder,n,w,R,s,l,u-v)}var P=c?n:this,I=h?P[e]:e;return v=w.length,s?w=S6(w,s):p&&v>1&&w.reverse(),g&&l<v&&(w.length=l),this&&this!==Vn&&this instanceof b&&(I=m||yi(I)),I.apply(P,w)}return b}function O6(e,t,n){var r=yi(e);function i(){for(var o=arguments.length,a=Array(o),s=o,l=mg(i);s--;)a[s]=arguments[s];var u=o<3&&a[0]!==l&&a[o-1]!==l?[]:Wo(a,l);if(o-=u.length,o<n)return pg(e,t,eu,i.placeholder,void 0,a,u,void 0,void 0,n-o);var g=this&&this!==Vn&&this instanceof i?r:e;return sg(g,this,a)}return i}var D6=1;function T6(e,t,n,r){var i=t&D6,o=yi(e);function a(){for(var s=-1,l=arguments.length,u=-1,g=r.length,c=Array(g+l),h=this&&this!==Vn&&this instanceof a?o:e;++u<g;)c[u]=r[u];for(;l--;)c[u++]=arguments[++s];return sg(h,i?n:this,c)}return a}var Xc="__lodash_placeholder__",Za=1,F6=2,L6=4,Zc=8,Xr=128,Jc=256,I6=Math.min;function N6(e,t){var n=e[1],r=t[1],i=n|r,o=i<(Za|F6|Xr),a=r==Xr&&n==Zc||r==Xr&&n==Jc&&e[7].length<=t[8]||r==(Xr|Jc)&&t[7].length<=t[8]&&n==Zc;if(!(o||a))return e;r&Za&&(e[2]=t[2],i|=n&Za?0:L6);var s=t[3];if(s){var l=e[3];e[3]=l?lg(l,s,t[4]):s,e[4]=l?Wo(e[3],Xc):t[4]}return s=t[5],s&&(l=e[5],e[5]=l?ug(l,s,t[6]):s,e[6]=l?Wo(e[5],Xc):t[6]),s=t[7],s&&(e[7]=s),r&Xr&&(e[8]=e[8]==null?t[8]:I6(e[8],t[8])),e[9]==null&&(e[9]=t[9]),e[0]=t[0],e[1]=i,e}var A6="Expected a function",ed=1,_6=2,td=8,nd=16,rd=32,j6=64,id=Math.max;function K6(e,t,n,r,i,o,a,s){var l=t&_6;if(!l&&typeof e!="function")throw new TypeError(A6);var u=r?r.length:0;if(u||(t&=-97,r=i=void 0),a=a===void 0?a:id(Hc(a),0),s=s===void 0?s:Hc(s),u-=i?i.length:0,t&j6){var g=r,c=i;r=i=void 0}var h=l?void 0:cg(e),f=[e,t,n,r,i,g,c,o,a,s];if(h&&N6(f,h),e=f[0],t=f[1],n=f[2],r=f[3],i=f[4],s=f[9]=f[9]===void 0?l?0:e.length:id(f[9]-u,0),!s&&t&(td|nd)&&(t&=-25),!t||t==ed)var p=O7(e,t,n);else t==td||t==nd?p=O6(e,t,s):(t==rd||t==(ed|rd))&&!i.length?p=T6(e,t,n,r):p=eu.apply(void 0,f);var m=h?ag:hg;return gg(m(p,f),e,t)}var B6=8;function qo(e,t,n){t=n?void 0:t;var r=K6(e,B6,void 0,void 0,void 0,void 0,void 0,t);return r.placeholder=qo.placeholder,r}qo.placeholder={};function H6(e){const t=e[0],n=e[1],r=e[2];let i,o,a;return i=t*1+n*0+r*1.13983,o=t*1+n*-.39465+r*-.5806,a=t*1+n*2.02311+r*0,i=Math.min(Math.max(0,i),1),o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),[i*255,o*255,a*255]}function V6(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,i=t*.299+n*.587+r*.114,o=t*-.14713+n*-.28886+r*.436,a=t*.615+n*-.51499+r*-.10001;return[i,o,a]}const z6={scheme:"threezerotwofour",author:"jan t. sott (http://github.com/idleberg)",base00:"#090300",base01:"#3a3432",base02:"#4a4543",base03:"#5c5855",base04:"#807d7c",base05:"#a5a2a2",base06:"#d6d5d4",base07:"#f7f7f7",base08:"#db2d20",base09:"#e8bbd0",base0A:"#fded02",base0B:"#01a252",base0C:"#b5e4f4",base0D:"#01a0e4",base0E:"#a16a94",base0F:"#cdab53"},U6={scheme:"apathy",author:"jannik siebert (https://github.com/janniks)",base00:"#031A16",base01:"#0B342D",base02:"#184E45",base03:"#2B685E",base04:"#5F9C92",base05:"#81B5AC",base06:"#A7CEC8",base07:"#D2E7E4",base08:"#3E9688",base09:"#3E7996",base0A:"#3E4C96",base0B:"#883E96",base0C:"#963E4C",base0D:"#96883E",base0E:"#4C963E",base0F:"#3E965B"},W6={scheme:"ashes",author:"jannik siebert (https://github.com/janniks)",base00:"#1C2023",base01:"#393F45",base02:"#565E65",base03:"#747C84",base04:"#ADB3BA",base05:"#C7CCD1",base06:"#DFE2E5",base07:"#F3F4F5",base08:"#C7AE95",base09:"#C7C795",base0A:"#AEC795",base0B:"#95C7AE",base0C:"#95AEC7",base0D:"#AE95C7",base0E:"#C795AE",base0F:"#C79595"},q6={scheme:"atelier dune",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune)",base00:"#20201d",base01:"#292824",base02:"#6e6b5e",base03:"#7d7a68",base04:"#999580",base05:"#a6a28c",base06:"#e8e4cf",base07:"#fefbec",base08:"#d73737",base09:"#b65611",base0A:"#cfb017",base0B:"#60ac39",base0C:"#1fad83",base0D:"#6684e1",base0E:"#b854d4",base0F:"#d43552"},G6={scheme:"atelier forest",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest)",base00:"#1b1918",base01:"#2c2421",base02:"#68615e",base03:"#766e6b",base04:"#9c9491",base05:"#a8a19f",base06:"#e6e2e0",base07:"#f1efee",base08:"#f22c40",base09:"#df5320",base0A:"#d5911a",base0B:"#5ab738",base0C:"#00ad9c",base0D:"#407ee7",base0E:"#6666ea",base0F:"#c33ff3"},Q6={scheme:"atelier heath",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath)",base00:"#1b181b",base01:"#292329",base02:"#695d69",base03:"#776977",base04:"#9e8f9e",base05:"#ab9bab",base06:"#d8cad8",base07:"#f7f3f7",base08:"#ca402b",base09:"#a65926",base0A:"#bb8a35",base0B:"#379a37",base0C:"#159393",base0D:"#516aec",base0E:"#7b59c0",base0F:"#cc33cc"},Y6={scheme:"atelier lakeside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside/)",base00:"#161b1d",base01:"#1f292e",base02:"#516d7b",base03:"#5a7b8c",base04:"#7195a8",base05:"#7ea2b4",base06:"#c1e4f6",base07:"#ebf8ff",base08:"#d22d72",base09:"#935c25",base0A:"#8a8a0f",base0B:"#568c3b",base0C:"#2d8f6f",base0D:"#257fad",base0E:"#5d5db1",base0F:"#b72dd2"},X6={scheme:"atelier seaside",author:"bram de haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside/)",base00:"#131513",base01:"#242924",base02:"#5e6e5e",base03:"#687d68",base04:"#809980",base05:"#8ca68c",base06:"#cfe8cf",base07:"#f0fff0",base08:"#e6193c",base09:"#87711d",base0A:"#c3c322",base0B:"#29a329",base0C:"#1999b3",base0D:"#3d62f5",base0E:"#ad2bee",base0F:"#e619c3"},Z6={scheme:"bespin",author:"jan t. sott",base00:"#28211c",base01:"#36312e",base02:"#5e5d5c",base03:"#666666",base04:"#797977",base05:"#8a8986",base06:"#9d9b97",base07:"#baae9e",base08:"#cf6a4c",base09:"#cf7d34",base0A:"#f9ee98",base0B:"#54be0d",base0C:"#afc4db",base0D:"#5ea6ea",base0E:"#9b859d",base0F:"#937121"},J6={scheme:"brewer",author:"timothée poisot (http://github.com/tpoisot)",base00:"#0c0d0e",base01:"#2e2f30",base02:"#515253",base03:"#737475",base04:"#959697",base05:"#b7b8b9",base06:"#dadbdc",base07:"#fcfdfe",base08:"#e31a1c",base09:"#e6550d",base0A:"#dca060",base0B:"#31a354",base0C:"#80b1d3",base0D:"#3182bd",base0E:"#756bb1",base0F:"#b15928"},ew={scheme:"bright",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#303030",base02:"#505050",base03:"#b0b0b0",base04:"#d0d0d0",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ffffff",base08:"#fb0120",base09:"#fc6d24",base0A:"#fda331",base0B:"#a1c659",base0C:"#76c7b7",base0D:"#6fb3d2",base0E:"#d381c3",base0F:"#be643c"},tw={scheme:"chalk",author:"chris kempson (http://chriskempson.com)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#eda987",base0A:"#ddb26f",base0B:"#acc267",base0C:"#12cfc0",base0D:"#6fc2ef",base0E:"#e1a3ee",base0F:"#deaf8f"},nw={scheme:"codeschool",author:"brettof86",base00:"#232c31",base01:"#1c3657",base02:"#2a343a",base03:"#3f4944",base04:"#84898c",base05:"#9ea7a6",base06:"#a7cfa3",base07:"#b5d8f6",base08:"#2a5491",base09:"#43820d",base0A:"#a03b1e",base0B:"#237986",base0C:"#b02f30",base0D:"#484d79",base0E:"#c59820",base0F:"#c98344"},rw={scheme:"colors",author:"mrmrs (http://clrs.cc)",base00:"#111111",base01:"#333333",base02:"#555555",base03:"#777777",base04:"#999999",base05:"#bbbbbb",base06:"#dddddd",base07:"#ffffff",base08:"#ff4136",base09:"#ff851b",base0A:"#ffdc00",base0B:"#2ecc40",base0C:"#7fdbff",base0D:"#0074d9",base0E:"#b10dc9",base0F:"#85144b"},iw={scheme:"default",author:"chris kempson (http://chriskempson.com)",base00:"#181818",base01:"#282828",base02:"#383838",base03:"#585858",base04:"#b8b8b8",base05:"#d8d8d8",base06:"#e8e8e8",base07:"#f8f8f8",base08:"#ab4642",base09:"#dc9656",base0A:"#f7ca88",base0B:"#a1b56c",base0C:"#86c1b9",base0D:"#7cafc2",base0E:"#ba8baf",base0F:"#a16946"},ow={scheme:"eighties",author:"chris kempson (http://chriskempson.com)",base00:"#2d2d2d",base01:"#393939",base02:"#515151",base03:"#747369",base04:"#a09f93",base05:"#d3d0c8",base06:"#e8e6df",base07:"#f2f0ec",base08:"#f2777a",base09:"#f99157",base0A:"#ffcc66",base0B:"#99cc99",base0C:"#66cccc",base0D:"#6699cc",base0E:"#cc99cc",base0F:"#d27b53"},aw={scheme:"embers",author:"jannik siebert (https://github.com/janniks)",base00:"#16130F",base01:"#2C2620",base02:"#433B32",base03:"#5A5047",base04:"#8A8075",base05:"#A39A90",base06:"#BEB6AE",base07:"#DBD6D1",base08:"#826D57",base09:"#828257",base0A:"#6D8257",base0B:"#57826D",base0C:"#576D82",base0D:"#6D5782",base0E:"#82576D",base0F:"#825757"},sw={scheme:"flat",author:"chris kempson (http://chriskempson.com)",base00:"#2C3E50",base01:"#34495E",base02:"#7F8C8D",base03:"#95A5A6",base04:"#BDC3C7",base05:"#e0e0e0",base06:"#f5f5f5",base07:"#ECF0F1",base08:"#E74C3C",base09:"#E67E22",base0A:"#F1C40F",base0B:"#2ECC71",base0C:"#1ABC9C",base0D:"#3498DB",base0E:"#9B59B6",base0F:"#be643c"},lw={scheme:"google",author:"seth wright (http://sethawright.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#CC342B",base09:"#F96A38",base0A:"#FBA922",base0B:"#198844",base0C:"#3971ED",base0D:"#3971ED",base0E:"#A36AC7",base0F:"#3971ED"},uw={scheme:"grayscale",author:"alexandre gavioli (https://github.com/alexx2/)",base00:"#101010",base01:"#252525",base02:"#464646",base03:"#525252",base04:"#ababab",base05:"#b9b9b9",base06:"#e3e3e3",base07:"#f7f7f7",base08:"#7c7c7c",base09:"#999999",base0A:"#a0a0a0",base0B:"#8e8e8e",base0C:"#868686",base0D:"#686868",base0E:"#747474",base0F:"#5e5e5e"},cw={scheme:"green screen",author:"chris kempson (http://chriskempson.com)",base00:"#001100",base01:"#003300",base02:"#005500",base03:"#007700",base04:"#009900",base05:"#00bb00",base06:"#00dd00",base07:"#00ff00",base08:"#007700",base09:"#009900",base0A:"#007700",base0B:"#00bb00",base0C:"#005500",base0D:"#009900",base0E:"#00bb00",base0F:"#005500"},dw={scheme:"harmonic16",author:"jannik siebert (https://github.com/janniks)",base00:"#0b1c2c",base01:"#223b54",base02:"#405c79",base03:"#627e99",base04:"#aabcce",base05:"#cbd6e2",base06:"#e5ebf1",base07:"#f7f9fb",base08:"#bf8b56",base09:"#bfbf56",base0A:"#8bbf56",base0B:"#56bf8b",base0C:"#568bbf",base0D:"#8b56bf",base0E:"#bf568b",base0F:"#bf5656"},fw={scheme:"hopscotch",author:"jan t. sott",base00:"#322931",base01:"#433b42",base02:"#5c545b",base03:"#797379",base04:"#989498",base05:"#b9b5b8",base06:"#d5d3d5",base07:"#ffffff",base08:"#dd464c",base09:"#fd8b19",base0A:"#fdcc59",base0B:"#8fc13e",base0C:"#149b93",base0D:"#1290bf",base0E:"#c85e7c",base0F:"#b33508"},hw={scheme:"isotope",author:"jan t. sott",base00:"#000000",base01:"#404040",base02:"#606060",base03:"#808080",base04:"#c0c0c0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#ff0000",base09:"#ff9900",base0A:"#ff0099",base0B:"#33ff00",base0C:"#00ffff",base0D:"#0066ff",base0E:"#cc00ff",base0F:"#3300ff"},gw={scheme:"marrakesh",author:"alexandre gavioli (http://github.com/alexx2/)",base00:"#201602",base01:"#302e00",base02:"#5f5b17",base03:"#6c6823",base04:"#86813b",base05:"#948e48",base06:"#ccc37a",base07:"#faf0a5",base08:"#c35359",base09:"#b36144",base0A:"#a88339",base0B:"#18974e",base0C:"#75a738",base0D:"#477ca1",base0E:"#8868b3",base0F:"#b3588e"},pw={scheme:"mocha",author:"chris kempson (http://chriskempson.com)",base00:"#3B3228",base01:"#534636",base02:"#645240",base03:"#7e705a",base04:"#b8afad",base05:"#d0c8c6",base06:"#e9e1dd",base07:"#f5eeeb",base08:"#cb6077",base09:"#d28b71",base0A:"#f4bc87",base0B:"#beb55b",base0C:"#7bbda4",base0D:"#8ab3b5",base0E:"#a89bb9",base0F:"#bb9584"},mw={scheme:"monokai",author:"wimer hazenberg (http://www.monokai.nl)",base00:"#272822",base01:"#383830",base02:"#49483e",base03:"#75715e",base04:"#a59f85",base05:"#f8f8f2",base06:"#f5f4f1",base07:"#f9f8f5",base08:"#f92672",base09:"#fd971f",base0A:"#f4bf75",base0B:"#a6e22e",base0C:"#a1efe4",base0D:"#66d9ef",base0E:"#ae81ff",base0F:"#cc6633"},bw={scheme:"nicinabox",author:"nicinabox (http://github.com/nicinabox)",base00:"#2A2F3A",base01:"#3C444F",base02:"#4F5A65",base03:"#BEBEBE",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#FFFFFF",base07:"#f5f5f5",base08:"#fb9fb1",base09:"#FC6D24",base0A:"#ddb26f",base0B:"#A1C659",base0C:"#12cfc0",base0D:"#6FB3D2",base0E:"#D381C3",base0F:"#deaf8f"},vw={scheme:"ocean",author:"chris kempson (http://chriskempson.com)",base00:"#2b303b",base01:"#343d46",base02:"#4f5b66",base03:"#65737e",base04:"#a7adba",base05:"#c0c5ce",base06:"#dfe1e8",base07:"#eff1f5",base08:"#bf616a",base09:"#d08770",base0A:"#ebcb8b",base0B:"#a3be8c",base0C:"#96b5b4",base0D:"#8fa1b3",base0E:"#b48ead",base0F:"#ab7967"},yw={scheme:"paraiso",author:"jan t. sott",base00:"#2f1e2e",base01:"#41323f",base02:"#4f424c",base03:"#776e71",base04:"#8d8687",base05:"#a39e9b",base06:"#b9b6b0",base07:"#e7e9db",base08:"#ef6155",base09:"#f99b15",base0A:"#fec418",base0B:"#48b685",base0C:"#5bc4bf",base0D:"#06b6ef",base0E:"#815ba4",base0F:"#e96ba8"},ww={scheme:"pop",author:"chris kempson (http://chriskempson.com)",base00:"#000000",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#b0b0b0",base05:"#d0d0d0",base06:"#e0e0e0",base07:"#ffffff",base08:"#eb008a",base09:"#f29333",base0A:"#f8ca12",base0B:"#37b349",base0C:"#00aabb",base0D:"#0e5a94",base0E:"#b31e8d",base0F:"#7a2d00"},xw={scheme:"railscasts",author:"ryan bates (http://railscasts.com)",base00:"#2b2b2b",base01:"#272935",base02:"#3a4055",base03:"#5a647e",base04:"#d4cfc9",base05:"#e6e1dc",base06:"#f4f1ed",base07:"#f9f7f3",base08:"#da4939",base09:"#cc7833",base0A:"#ffc66d",base0B:"#a5c261",base0C:"#519f50",base0D:"#6d9cbe",base0E:"#b6b3eb",base0F:"#bc9458"},Cw={scheme:"shapeshifter",author:"tyler benziger (http://tybenz.com)",base00:"#000000",base01:"#040404",base02:"#102015",base03:"#343434",base04:"#555555",base05:"#ababab",base06:"#e0e0e0",base07:"#f9f9f9",base08:"#e92f2f",base09:"#e09448",base0A:"#dddd13",base0B:"#0ed839",base0C:"#23edda",base0D:"#3b48e3",base0E:"#f996e2",base0F:"#69542d"},Sw={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},$w={scheme:"summerfruit",author:"christopher corley (http://cscorley.github.io/)",base00:"#151515",base01:"#202020",base02:"#303030",base03:"#505050",base04:"#B0B0B0",base05:"#D0D0D0",base06:"#E0E0E0",base07:"#FFFFFF",base08:"#FF0086",base09:"#FD8900",base0A:"#ABA800",base0B:"#00C918",base0C:"#1faaaa",base0D:"#3777E6",base0E:"#AD00A1",base0F:"#cc6633"},Ew={scheme:"tomorrow",author:"chris kempson (http://chriskempson.com)",base00:"#1d1f21",base01:"#282a2e",base02:"#373b41",base03:"#969896",base04:"#b4b7b4",base05:"#c5c8c6",base06:"#e0e0e0",base07:"#ffffff",base08:"#cc6666",base09:"#de935f",base0A:"#f0c674",base0B:"#b5bd68",base0C:"#8abeb7",base0D:"#81a2be",base0E:"#b294bb",base0F:"#a3685a"},Pw={scheme:"london tube",author:"jan t. sott",base00:"#231f20",base01:"#1c3f95",base02:"#5a5758",base03:"#737171",base04:"#959ca1",base05:"#d9d8d8",base06:"#e7e7e8",base07:"#ffffff",base08:"#ee2e24",base09:"#f386a1",base0A:"#ffd204",base0B:"#00853e",base0C:"#85cebc",base0D:"#009ddc",base0E:"#98005d",base0F:"#b06110"},Rw={scheme:"twilight",author:"david hart (http://hart-dev.com)",base00:"#1e1e1e",base01:"#323537",base02:"#464b50",base03:"#5f5a60",base04:"#838184",base05:"#a7a7a7",base06:"#c3c3c3",base07:"#ffffff",base08:"#cf6a4c",base09:"#cda869",base0A:"#f9ee98",base0B:"#8f9d6a",base0C:"#afc4db",base0D:"#7587a6",base0E:"#9b859d",base0F:"#9b703f"},bg={threezerotwofour:z6,apathy:U6,ashes:W6,atelierDune:q6,atelierForest:G6,atelierHeath:Q6,atelierLakeside:Y6,atelierSeaside:X6,bespin:Z6,brewer:J6,bright:ew,chalk:tw,codeschool:nw,colors:rw,default:iw,eighties:ow,embers:aw,flat:sw,google:lw,grayscale:uw,greenscreen:cw,harmonic:dw,hopscotch:fw,isotope:hw,marrakesh:gw,mocha:pw,monokai:mw,nicinabox:bw,ocean:vw,paraiso:yw,pop:ww,railscasts:xw,shapeshifter:Cw,solarized:Sw,summerfruit:$w,tomorrow:Ew,tube:Pw,twilight:Rw},vg=bg.default,od=Object.keys(vg),Mw=e=>e<.25?1:e<.5?.9-e:1.1-e,kw=e=>{const t=jc(e),[n,r,i]=V6(t.array()),o=[Mw(n),r,i],a=H6(o);return jc.rgb(a).hex()},Xn=e=>t=>({className:[t.className,e.className].filter(Boolean).join(" "),style:{...t.style||{},...e.style||{}}}),Ow=(e,t)=>{if(e===void 0)return t;if(t===void 0)return e;const n=typeof e,r=typeof t;switch(n){case"string":switch(r){case"string":return[t,e].filter(Boolean).join(" ");case"object":return Xn({className:e,style:t});case"function":return(i,...o)=>Xn({className:e})(t(i,...o))}break;case"object":switch(r){case"string":return Xn({className:t,style:e});case"object":return{...t,...e};case"function":return(i,...o)=>Xn({style:e})(t(i,...o))}break;case"function":switch(r){case"string":return(i,...o)=>e(Xn(i)({className:t}),...o);case"object":return(i,...o)=>e(Xn(i)({style:t}),...o);case"function":return(i,...o)=>e(t(i,...o),...o)}}},Dw=(e,t)=>{const n=Object.keys(t);for(const r in e)n.indexOf(r)===-1&&n.push(r);return n.reduce((r,i)=>(r[i]=Ow(e[i],t[i]),r),{})},Tw=(e,t,...n)=>{if(t===null)return e;Array.isArray(t)||(t=[t]);const i=t.map(o=>e[o]).filter(Boolean).reduce((o,a)=>(typeof a=="string"?o.className=[o.className,a].filter(Boolean).join(" "):typeof a=="object"?o.style={...o.style,...a}:typeof a=="function"&&(o={...o,...a(o,...n)}),o),{className:"",style:{}});return i.className||delete i.className,Object.keys(i.style).length===0&&delete i.style,i},ll=e=>Object.keys(e).reduce((t,n)=>(t[n]=/^base/.test(n)?kw(e[n]):n==="scheme"?e[n]+":inverted":e[n],t),{}),Fw=qo((e,t={},n={},...r)=>{const{defaultBase16:i=vg,base16Themes:o=null}=t,a=Lw(n,o);a&&(n={...a,...n});const s=od.reduce((c,h)=>(c[h]=n[h]||i[h],c),{}),l=Object.keys(n).reduce((c,h)=>(od.indexOf(h)===-1&&(c[h]=n[h]),c),{}),u=e(s),g=Dw(l,u);return qo(Tw,2)(g,...r)},3),yg=e=>!!e.extend,Lw=(e,t)=>{if(e&&yg(e)&&e.extend&&(e=e.extend),typeof e=="string"){const[n,r]=e.split(":");t?e=t[n]:e=bg[n],r==="inverted"&&(e=ll(e))}return e&&Object.prototype.hasOwnProperty.call(e,"base00")?e:void 0},Iw=e=>typeof e=="string"?`${e}:inverted`:e&&yg(e)&&e.extend?typeof e.extend=="string"?{...e,extend:`${e.extend}:inverted`}:{...e,extend:ll(e.extend)}:e&&ll(e);function Nw(e){const t=Object.prototype.toString.call(e).slice(8,-1);return t==="Object"&&typeof e[Symbol.iterator]=="function"?"Iterable":t==="Custom"&&e.constructor!==Object&&e instanceof Object?"Object":t}function wg({styling:e,arrowStyle:t="single",expanded:n,nodeType:r,onClick:i}){return d.createElement("div",{...e("arrowContainer",t),onClick:i},d.createElement("div",{...e(["arrow","arrowSign"],r,n,t)},"▶",t==="double"&&d.createElement("div",{...e(["arrowSign","arrowSignInner"])},"▶")))}function Aw(e,t){return e==="Object"?Object.keys(t).length:e==="Array"?t.length:1/0}function _w(e){return typeof e.set=="function"}function jw(e,t,n,r=0,i=1/0){let o;if(e==="Object"){let a=Object.getOwnPropertyNames(t);n&&a.sort(n===!0?void 0:n),a=a.slice(r,i+1),o={entries:a.map(s=>({key:s,value:t[s]}))}}else if(e==="Array")o={entries:t.slice(r,i+1).map((a,s)=>({key:s+r,value:a}))};else{let a=0;const s=[];let l=!0;const u=_w(t);for(const g of t){if(a>i){l=!1;break}r<=a&&(u&&Array.isArray(g)?typeof g[0]=="string"||typeof g[0]=="number"?s.push({key:g[0],value:g[1]}):s.push({key:`[entry ${a}]`,value:{"[key]":g[0],"[value]":g[1]}}):s.push({key:a,value:g})),a++}o={hasMore:!l,entries:s}}return o}function Ja(e,t,n){const r=[];for(;t-e>n*n;)n=n*n;for(let i=e;i<=t;i+=n)r.push({from:i,to:Math.min(t,i+n-1)});return r}function Kw(e,t,n,r,i=0,o=1/0){const a=jw.bind(null,e,t,n);if(!r)return a().entries;const s=o<1/0,l=Math.min(o-i,Aw(e,t));if(e!=="Iterable"){if(l<=r||r<7)return a(i,o).entries}else if(l<=r&&!s)return a(i,o).entries;let u;if(e==="Iterable"){const{hasMore:g,entries:c}=a(i,i+r-1);u=g?[...c,...Ja(i+r,i+2*r-1,r)]:c}else u=s?Ja(i,o,r):[...a(0,r-5).entries,...Ja(r-4,l-5,r),...a(l-4,l-1).entries];return u}function Bw(e){const{styling:t,from:n,to:r,renderChildNodes:i,nodeType:o}=e,[a,s]=d.useState(!1),l=d.useCallback(()=>{s(!a)},[a]);return a?d.createElement("div",{...t("itemRange",a)},i(e,n,r)):d.createElement("div",{...t("itemRange",a),onClick:l},d.createElement(wg,{nodeType:o,styling:t,expanded:!1,onClick:l,arrowStyle:"double"}),`${n} ... ${r}`)}function Hw(e){return e.to!==void 0}function xg(e,t,n){const{nodeType:r,data:i,collectionLimit:o,circularCache:a,keyPath:s,postprocessValue:l,sortObjectKeys:u}=e,g=[];return Kw(r,i,u,o,t,n).forEach(c=>{if(Hw(c))g.push(d.createElement(Bw,{...e,key:`ItemRange--${c.from}-${c.to}`,from:c.from,to:c.to,renderChildNodes:xg}));else{const{key:h,value:f}=c,p=a.includes(f);g.push(d.createElement(Cg,{...e,postprocessValue:l,collectionLimit:o,key:`Node--${h}`,keyPath:[h,...s],value:l(f),circularCache:[...a,f],isCircular:p,hideRoot:!1}))}}),g}function tu(e){const{circularCache:t=[],collectionLimit:n,createItemString:r,data:i,expandable:o,getItemString:a,hideRoot:s,isCircular:l,keyPath:u,labelRenderer:g,level:c=0,nodeType:h,nodeTypeIndicator:f,shouldExpandNodeInitially:p,styling:m}=e,[b,v]=d.useState(l?!1:p(u,i,c)),w=d.useCallback(()=>{o&&v(!b)},[o,b]),x=b||s&&c===0?xg({...e,circularCache:t,level:c+1}):null,k=d.createElement("span",{...m("nestedNodeItemType",b)},f),S=a(h,i,k,r(i,n),u),R=[u,h,b,o];return s?d.createElement("li",{...m("rootNode",...R)},d.createElement("ul",{...m("rootNodeChildren",...R)},x)):d.createElement("li",{...m("nestedNode",...R)},o&&d.createElement(wg,{styling:m,nodeType:h,expanded:b,onClick:w}),d.createElement("label",{...m(["label","nestedNodeLabel"],...R),onClick:w},g(...R)),d.createElement("span",{...m("nestedNodeItemString",...R),onClick:w},S),d.createElement("ul",{...m("nestedNodeChildren",...R)},x))}function Vw(e){const t=Object.getOwnPropertyNames(e).length;return`${t} ${t!==1?"keys":"key"}`}function zw({data:e,...t}){return d.createElement(tu,{...t,data:e,nodeType:"Object",nodeTypeIndicator:t.nodeType==="Error"?"Error()":"{}",createItemString:Vw,expandable:Object.getOwnPropertyNames(e).length>0})}function Uw(e){return`${e.length} ${e.length!==1?"items":"item"}`}function Ww({data:e,...t}){return d.createElement(tu,{...t,data:e,nodeType:"Array",nodeTypeIndicator:"[]",createItemString:Uw,expandable:e.length>0})}function qw(e,t){let n=0,r=!1;if(Number.isSafeInteger(e.size))n=e.size;else for(const i of e){if(t&&n+1>t){r=!0;break}n+=1}return`${r?">":""}${n} ${n!==1?"entries":"entry"}`}function Gw(e){return d.createElement(tu,{...e,nodeType:"Iterable",nodeTypeIndicator:"()",createItemString:qw,expandable:!0})}function Tt({nodeType:e,styling:t,labelRenderer:n,keyPath:r,valueRenderer:i,value:o,valueGetter:a=s=>s}){return d.createElement("li",{...t("value",e,r)},d.createElement("label",{...t(["label","valueLabel"],e,r)},n(r,e,!1,!1)),d.createElement("span",{...t("valueText",e,r)},i(a(o),o,...r)))}function Cg({getItemString:e,keyPath:t,labelRenderer:n,styling:r,value:i,valueRenderer:o,isCustomNode:a,...s}){const l=a(i)?"Custom":Nw(i),u={getItemString:e,key:t[0],keyPath:t,labelRenderer:n,nodeType:l,styling:r,value:i,valueRenderer:o},g={...s,...u,data:i,isCustomNode:a};switch(l){case"Object":case"Error":case"WeakMap":case"WeakSet":return d.createElement(zw,{...g});case"Array":return d.createElement(Ww,{...g});case"Iterable":case"Map":case"Set":return d.createElement(Gw,{...g});case"String":return d.createElement(Tt,{...u,valueGetter:c=>`"${c}"`});case"Number":return d.createElement(Tt,{...u});case"Boolean":return d.createElement(Tt,{...u,valueGetter:c=>c?"true":"false"});case"Date":return d.createElement(Tt,{...u,valueGetter:c=>c.toISOString()});case"Null":return d.createElement(Tt,{...u,valueGetter:()=>"null"});case"Undefined":return d.createElement(Tt,{...u,valueGetter:()=>"undefined"});case"Function":case"Symbol":return d.createElement(Tt,{...u,valueGetter:c=>c.toString()});case"Custom":return d.createElement(Tt,{...u});default:return d.createElement(Tt,{...u,valueGetter:()=>`<${l}>`})}}const Qw={scheme:"solarized",author:"ethan schoonover (http://ethanschoonover.com/solarized)",base00:"#002b36",base01:"#073642",base02:"#586e75",base03:"#657b83",base04:"#839496",base05:"#93a1a1",base06:"#eee8d5",base07:"#fdf6e3",base08:"#dc322f",base09:"#cb4b16",base0A:"#b58900",base0B:"#859900",base0C:"#2aa198",base0D:"#268bd2",base0E:"#6c71c4",base0F:"#d33682"},Yw=e=>({BACKGROUND_COLOR:e.base00,TEXT_COLOR:e.base07,STRING_COLOR:e.base0B,DATE_COLOR:e.base0B,NUMBER_COLOR:e.base09,BOOLEAN_COLOR:e.base09,NULL_COLOR:e.base08,UNDEFINED_COLOR:e.base08,FUNCTION_COLOR:e.base08,SYMBOL_COLOR:e.base08,LABEL_COLOR:e.base0D,ARROW_COLOR:e.base0D,ITEM_STRING_COLOR:e.base0B,ITEM_STRING_EXPANDED_COLOR:e.base03}),Xw=e=>({String:e.STRING_COLOR,Date:e.DATE_COLOR,Number:e.NUMBER_COLOR,Boolean:e.BOOLEAN_COLOR,Null:e.NULL_COLOR,Undefined:e.UNDEFINED_COLOR,Function:e.FUNCTION_COLOR,Symbol:e.SYMBOL_COLOR}),Zw=e=>{const t=Yw(e);return{tree:{border:0,padding:0,marginTop:"0.5em",marginBottom:"0.5em",marginLeft:"0.125em",marginRight:0,listStyle:"none",MozUserSelect:"none",WebkitUserSelect:"none",backgroundColor:t.BACKGROUND_COLOR},value:({style:n},r,i)=>({style:{...n,paddingTop:"0.25em",paddingRight:0,marginLeft:"0.875em",WebkitUserSelect:"text",MozUserSelect:"text",wordWrap:"break-word",paddingLeft:i.length>1?"2.125em":"1.25em",textIndent:"-0.5em",wordBreak:"break-all"}}),label:{display:"inline-block",color:t.LABEL_COLOR},valueLabel:{margin:"0 0.5em 0 0"},valueText:({style:n},r)=>({style:{...n,color:Xw(t)[r]}}),itemRange:(n,r)=>({style:{paddingTop:r?0:"0.25em",cursor:"pointer",color:t.LABEL_COLOR}}),arrow:({style:n},r,i)=>({style:{...n,marginLeft:0,transition:"150ms",WebkitTransition:"150ms",MozTransition:"150ms",WebkitTransform:i?"rotateZ(90deg)":"rotateZ(0deg)",MozTransform:i?"rotateZ(90deg)":"rotateZ(0deg)",transform:i?"rotateZ(90deg)":"rotateZ(0deg)",transformOrigin:"45% 50%",WebkitTransformOrigin:"45% 50%",MozTransformOrigin:"45% 50%",position:"relative",lineHeight:"1.1em",fontSize:"0.75em"}}),arrowContainer:({style:n},r)=>({style:{...n,display:"inline-block",paddingRight:"0.5em",paddingLeft:r==="double"?"1em":0,cursor:"pointer"}}),arrowSign:{color:t.ARROW_COLOR},arrowSignInner:{position:"absolute",top:0,left:"-0.4em"},nestedNode:({style:n},r,i,o,a)=>({style:{...n,position:"relative",paddingTop:"0.25em",marginLeft:r.length>1?"0.875em":0,paddingLeft:a?0:"1.125em"}}),rootNode:{padding:0,margin:0},nestedNodeLabel:({style:n},r,i,o,a)=>({style:{...n,margin:0,padding:0,WebkitUserSelect:a?"inherit":"text",MozUserSelect:a?"inherit":"text",cursor:a?"pointer":"default"}}),nestedNodeItemString:({style:n},r,i,o)=>({style:{...n,paddingLeft:"0.5em",cursor:"default",color:o?t.ITEM_STRING_EXPANDED_COLOR:t.ITEM_STRING_COLOR}}),nestedNodeItemType:{marginLeft:"0.3em",marginRight:"0.3em"},nestedNodeChildren:({style:n},r,i)=>({style:{...n,padding:0,margin:0,listStyle:"none",display:i?"block":"none"}}),rootNodeChildren:{padding:0,margin:0,listStyle:"none"}}},Jw=Fw(Zw,{defaultBase16:Qw}),ad=e=>e,ex=(e,t,n)=>n===0,tx=(e,t,n,r)=>d.createElement("span",null,n," ",r),nx=([e])=>d.createElement("span",null,e,":"),rx=()=>!1;function Go({data:e,theme:t,invertTheme:n,keyPath:r=["root"],labelRenderer:i=nx,valueRenderer:o=ad,shouldExpandNodeInitially:a=ex,hideRoot:s=!1,getItemString:l=tx,postprocessValue:u=ad,isCustomNode:g=rx,collectionLimit:c=50,sortObjectKeys:h=!1}){const f=d.useMemo(()=>Jw(n?Iw(t):t),[t,n]);return d.createElement("ul",{...f("tree")},d.createElement(Cg,{keyPath:s?[]:r,value:u(e),isCustomNode:g,styling:f,labelRenderer:i,valueRenderer:o,shouldExpandNodeInitially:a,hideRoot:s,getItemString:l,postprocessValue:u,collectionLimit:c,sortObjectKeys:h}))}var ya=function(e){var t=e.actions;return y.jsxs(w9,{children:[y.jsx(_l,{className:"flex size-7 items-center justify-center rounded-md bg-slate-50 text-slate-900 outline-none transition duration-150 ease-in-out hover:bg-slate-100 focus:bg-slate-100 radix-state-open:bg-slate-100","aria-label":"Action menu",children:y.jsx(fv,{width:18,height:18})}),y.jsx(b9,{placement:"bottom left",className:"space-y-0.5 rounded-md border border-slate-50 bg-white/75 p-1 shadow-sm backdrop-blur-md ",offset:5,children:y.jsx(C9,{children:t.map(function(n){return y.jsxs(P9,{className:"flex cursor-default items-center space-x-1.5 rounded-md py-1.5 pl-1.5 pr-8 text-sm font-medium text-slate-900 outline-none transition duration-150 ease-in-out focus:bg-slate-100",onAction:n.onSelect,children:[n.icon,y.jsx("span",{children:n.label})]},n.label)})})})]})},ix=function(e){var t=e.job,n=e.queueName,r=e.onRemove,i=se.job.retry.useMutation(),o=i.mutate,a=i.isSuccess,s=se.job.discard.useMutation(),l=s.mutate,u=s.isSuccess,g=se.job.rerun.useMutation(),c=g.mutate,h=g.isSuccess,f=se.job.remove.useMutation(),p=f.mutate,m=f.isSuccess;d.useEffect(function(){(a||u||h||m)&&(r==null||r())},[a,u,h,m,r]);var b={queueName:n,jobId:t.id};return y.jsx(ya,{actions:Fn(Fn(Fn([],t.failedReason?[{label:"Retry",onSelect:function(){o(b)},icon:y.jsx(Pr,{})}]:[],!0),t.finishedAt?[{label:"Rerun",onSelect:function(){c(b)},icon:y.jsx(Pr,{})}]:[{label:"Discard",onSelect:function(){l(b)},icon:y.jsx(vv,{})}],!0),[{label:"Remove",onSelect:function(){p(b)},icon:y.jsx(Ar,{})}],!1)})},hn=function(e){var t=e.colorScheme,n=t===void 0?"slate":t,r=e.variant,i=r===void 0?"outline":r,o=e.size,a=o===void 0?"md":o,s=e.icon,l=e.label,u=e.isLoading,g=e.onClick,c=e.disabled;return y.jsxs("button",{onClick:g,disabled:u||c,className:Mr("flex items-center space-x-1 rounded-md border text-sm font-medium",{"py-0.5":a==="sm","py-1":a==="md","py-1.5":a==="lg"},[a==="sm"&&s?"pl-1.5 pr-2.5":"px-2.5",a==="md"&&s?"pl-2 pr-3":"px-3",a==="lg"&&s?"pl-2.5 pr-4":"px-4"],{"cursor-not-allowed opacity-50":u||c,"border-yellow-900 text-yellow-900 hover:bg-yellow-50 focus:bg-yellow-50":n==="yellow"&&i==="outline","border-slate-900 text-slate-900 hover:bg-slate-50 focus:bg-slate-50":n==="slate"&&i==="outline","border-red-900 text-red-900 hover:bg-red-50 focus:bg-red-50":n==="red"&&i==="outline","border-yellow-800 bg-yellow-800 text-yellow-50 hover:border-yellow-900 hover:bg-yellow-900 focus:border-yellow-900 focus:bg-yellow-900":n==="yellow"&&i==="filled","border-slate-800 bg-slate-800 text-slate-50 hover:border-slate-900 hover:bg-slate-900 focus:border-slate-900 focus:bg-slate-900":n==="slate"&&i==="filled","border-red-800 bg-red-800 text-red-50 hover:border-red-900 hover:bg-red-900 focus:border-red-900 focus:bg-red-900":n==="red"&&i==="filled"}),children:[u?y.jsx("div",{className:"flex w-4 justify-center",children:y.jsx($l,{width:10,height:10,className:"animate-spin"})}):s?y.jsx("div",{className:"flex w-4 justify-center",children:s}):null,y.jsx("span",{children:l})]})},ox=function(e){var t=e.job,n=e.queueName,r=e.onDismiss,i=se.queue.byName.useQuery({queueName:n}),o=se.job.retry.useMutation().mutate,a=se.job.logs.useQuery({jobId:t.id,queueName:n}).data;return y.jsx(ma,{isOpen:!0,isDismissable:!0,onOpenChange:function(s){s||r()},className:"fixed inset-0 bg-black/10",children:y.jsx(ga,{className:"fixed left-1/2 top-1/2 max-h-[85vh] w-full max-w-xl -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(s){var l,u=s.close;return y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full text-slate-500 transition duration-150 ease-in-out hover:bg-slate-50","aria-label":"Close",onClick:function(){r(),u()},children:y.jsx(Sl,{})}),y.jsxs("div",{className:"flex items-center space-x-4",children:[y.jsxs(pa,{className:"mb-1 flex items-center space-x-2",children:[y.jsx("span",{className:"text-xl font-semibold text-slate-900",children:t.name}),y.jsxs("span",{className:"rounded-md text-slate-500",children:["#",t.id]})]}),y.jsx(ix,{queueName:n,job:t,onRemove:r})]}),y.jsxs("div",{children:[t.failedReason?y.jsxs("div",{className:"space-y-2 border-b border-b-slate-200 py-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Error"}),y.jsx("p",{className:"text-sm text-red-600",children:t.failedReason}),y.jsx(hn,{label:"Retry",size:"sm",icon:y.jsx(Pr,{width:14}),onClick:function(){o({queueName:n,jobId:t.id}),r()}})]}):null,y.jsxs("div",{className:"space-y-2 border-b border-b-slate-200 py-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Options"}),y.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:y.jsx(Go,{data:t.opts,theme:"monokai"})})]}),y.jsxs("div",{className:"space-y-2 pt-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Data"}),y.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:y.jsx(Go,{data:t.data,theme:"monokai"})})]}),((l=i.data)===null||l===void 0?void 0:l.type)==="bullmq"?y.jsxs("div",{className:"mt-4 space-y-2 border-t border-t-slate-200 pt-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Logs"}),y.jsx("div",{className:"space-y-1",children:a==null?void 0:a.map(function(g,c){return y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx("div",{className:"h-4 w-1 rounded-sm bg-slate-300"}),y.jsx("p",{className:"font-mono text-sm",children:g})]},c)})})]}):null]})]})}})})},no=m1(),ax=[no.display({id:"select",header:function(e){var t=e.table;return y.jsx(Ko,{checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),onCheckedChange:function(){t.toggleAllRowsSelected()}})},cell:function(e){var t=e.row,n=e.table;return y.jsx(Ko,{className:n.getIsSomeRowsSelected()||n.getIsAllRowsSelected()?"":"opacity-0 transition group-hover:opacity-100",checked:t.getIsSomeSelected()?"indeterminate":t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})}}),no.accessor("name",{cell:function(e){return y.jsxs("div",{className:"flex w-full items-center space-x-2",children:[y.jsx("span",{className:"max-w-fit grow basis-full truncate text-slate-900 dark:text-slate-200",children:e.cell.row.original.name}),y.jsxs("span",{className:"max-w-[20%] shrink truncate text-sm text-slate-500 dark:text-slate-400",children:["#",e.cell.row.original.id]})]})},header:"Name"}),no.display({id:"lifecycle",header:function(){return"Lifecycle"},cell:function(e){var t=e.row.original,n=t.createdAt,r=t.processedAt,i=t.finishedAt,o=t.status,a=t.retriedAt;return y.jsxs("div",{className:"flex items-center space-x-3",children:[y.jsx(es,{date:new Date(n),variant:"added"}),o==="waiting"?y.jsx(sd,{}):null,r?y.jsxs(y.Fragment,{children:[y.jsx(ld,{date:new Date(r),baseDate:new Date(n)}),y.jsx(es,{date:new Date(r),variant:a?"retried":"processing"})]}):null,o==="active"?y.jsx(sd,{}):null,i&&r?y.jsxs(y.Fragment,{children:[y.jsx(ld,{date:new Date(i),baseDate:new Date(r)}),y.jsx(es,{date:new Date(i),variant:o==="failed"?"failed":"completed"})]}):null]})}}),no.display({id:"options",header:"Options",cell:function(e){var t=e.row.original.opts;return y.jsxs("div",{className:"flex items-center space-x-2",children:[t.priority?y.jsx(Qr,{icon:y.jsx(gv,{width:12,height:12}),label:t.priority}):null,t.attempts&&t.attempts>1?y.jsx(Qr,{icon:y.jsx(Pr,{width:12,height:12}),label:t.attempts}):null,t.lifo?y.jsx(Qr,{icon:y.jsx(_v,{width:12,height:12}),label:"LIFO"}):null,t.delay?y.jsx(Qr,{icon:y.jsx(wv,{width:12,height:12}),label:t.delay}):null,t.repeat?y.jsx(Qr,{icon:y.jsx(Cv,{width:12,height:12}),label:t.repeat.count}):null]})}})],sx=function(e){var t=e.jobs,n=e.totalJobs,r=e.onBottomInView,i=e.isLoading,o=e.isFetchingNextPage,a=e.queueName,s=e.status,l=d.useState({}),u=l[0],g=l[1],c=Y8({threshold:0,onChange:function(S){S&&r()}}).ref,h=R1({data:t,columns:ax,getCoreRowModel:P1(),state:{rowSelection:u},onRowSelectionChange:g}),f=t.length===0,p=t.length/(n||0)*100,m=d.useState(null),b=m[0],v=m[1],w=se.job.retry.useMutation().mutate,x=se.job.rerun.useMutation().mutate,k=se.job.bulkRemove.useMutation().mutate;return d.useEffect(function(){h.resetRowSelection()},[s]),y.jsxs("div",{children:[b?y.jsx(ox,{queueName:a,job:b,onDismiss:function(){return v(null)}}):null,y.jsx("div",{className:"rounded-md border border-slate-200 shadow-sm dark:border-slate-700",children:i?y.jsx(N1,{}):y.jsxs("div",{children:[h.getHeaderGroups().map(function(S,R){return y.jsx("div",{className:"sticky top-0 grid grid-cols-[auto,350px,576px,1fr] rounded-t-md border-b border-slate-200 bg-slate-100/50 p-2 backdrop-blur-md dark:border-slate-700 dark:bg-slate-900/50",children:S.headers.map(function(P){return y.jsx("div",{className:"flex h-full items-center text-sm font-semibold text-slate-700 dark:text-slate-300 ".concat(R!==0?"pr-10":"pr-3"),children:P.isPlaceholder?null:No(P.column.columnDef.header,P.getContext())},P.id)})},S.id)}),h.getRowModel().rows.map(function(S,R){return y.jsx(I1,{isLastRow:h.getRowModel().rows.length!==R+1,isSelected:S.getIsSelected(),onClick:function(){return v(S.original)},layoutVariant:"job",children:S.getVisibleCells().map(function(P,I){return y.jsx("div",{className:"flex h-full items-center ".concat(I!==0?"pr-10":"pr-3"),children:No(P.column.columnDef.cell,P.getContext())},P.id)})},S.id)}),!i&&f?y.jsx("div",{className:"flex items-center justify-center py-10",children:y.jsx("p",{className:"text-slate-500",children:"No jobs found"})}):null]})}),!i&&f?null:y.jsx("div",{ref:c,className:"my-3 flex justify-center",children:y.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[y.jsxs("p",{className:"text-xs text-slate-500",children:["You've viewed ",t.length," of ",n," jobs"]}),y.jsx(M9,{value:p,children:function(S){var R=S.percentage;return y.jsx(y.Fragment,{children:y.jsx("div",{style:{transform:"translateZ(0)"},className:"relative h-0.5 w-[144px] overflow-hidden rounded-sm bg-slate-200",children:y.jsx("div",{className:"size-full bg-cyan-500 transition duration-300 ease-in-out",style:{transform:"translateX(-".concat(100-R,"%)")}})})})}}),o?y.jsx($l,{className:"animate-spin text-slate-300"}):null]})}),h.getSelectedRowModel().rows.length>0?y.jsx("div",{className:"pointer-events-none sticky bottom-0 flex w-full items-center justify-center pb-5",children:y.jsxs("div",{className:"pointer-events-auto flex items-center space-x-3 rounded-lg border-slate-100 bg-white/90 px-3 py-2 text-sm shadow-lg backdrop-blur",children:[y.jsxs("p",{children:[h.getSelectedRowModel().rows.length," selected"]}),s==="completed"||s==="failed"?y.jsx(hn,{label:s==="failed"?"Retry":"Rerun",icon:y.jsx(Pr,{}),size:"sm",onClick:function(){h.getSelectedRowModel().rows.forEach(function(S){s==="failed"?w({queueName:a,jobId:S.original.id}):x({queueName:a,jobId:S.original.id})}),h.resetRowSelection()}}):null,y.jsx(hn,{label:"Delete",colorScheme:"red",icon:y.jsx(Ar,{}),size:"sm",onClick:function(){k({queueName:a,jobIds:h.getSelectedRowModel().rows.map(function(S){return S.original.id})}),h.resetRowSelection()}})]})}):null]})},es=function(e){var t=e.variant,n=e.date,r={added:"Added to queue",completed:"Completed",failed:"Failed",processing:"Processed",retried:"Retried"};return y.jsx(Xl,{message:"".concat(r[t]," ").concat(L1(n)," ago"),children:y.jsxs("div",{className:"flex items-center space-x-1.5",children:[t==="added"&&y.jsx(_f,{width:14,height:14,className:"rounded-full bg-cyan-50 text-cyan-900"}),t==="processing"&&y.jsx(ev,{width:14,height:14,className:"rounded-full bg-slate-50 text-slate-900"}),t==="retried"&&y.jsx(Pr,{width:14,height:14,className:"rounded-full bg-amber-50 text-amber-900"}),t==="completed"&&y.jsx(Lf,{width:14,height:14,className:"rounded-full bg-green-50 text-green-900"}),t==="failed"&&y.jsx(If,{width:14,height:14,className:"rounded-full bg-red-50 text-red-900"}),y.jsx("p",{className:"text-slate-900 dark:text-slate-200",children:F1(n,"".concat(t==="added"?"MM/dd ":"","HH:mm:ss"))})]})})},sd=function(){return y.jsxs("div",{className:"flex items-center space-x-1.5",children:[y.jsx(Os,{width:14,height:14,className:"text-slate-300"}),y.jsx($l,{width:14,height:14,className:"animate-spin text-slate-300 dark:text-slate-600"})]})},ld=function(e){var t=e.date,n=e.baseDate;return y.jsxs("div",{className:"flex items-center space-x-1.5",children:[y.jsx(Os,{width:14,height:14,className:"text-slate-300"}),y.jsx("p",{className:"w-7 rounded-sm text-center text-xs text-slate-500 dark:text-slate-400",children:z8(t,n,{locale:{formatDistance:function(r,i){return r==="xSeconds"?"".concat(i,"s"):r==="xMinutes"?"".concat(i,"m"):r==="xHours"?"".concat(i,"h"):r==="xDays"?"".concat(i,"d"):r==="xMonths"?"".concat(i,"mo"):r==="xYears"?"".concat(i,"y"):""}}})}),y.jsx(Os,{width:14,height:14,className:"text-slate-300 dark:text-slate-600"})]})},lx=function(e){var t=e.title,n=e.description,r=e.action,i=e.children;return y.jsxs(f1,{children:[y.jsx(_l,{children:i}),y.jsx(ma,{isDismissable:!0,className:"fixed inset-0 bg-black/10",children:y.jsx(ga,{role:"alertdialog",className:"fixed left-1/2 top-1/2 w-full max-w-md -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(o){var a=o.close;return y.jsxs(y.Fragment,{children:[y.jsx(pa,{className:"mb-3 text-xl font-semibold text-slate-900",children:t}),y.jsx("p",{className:"mb-6 text-slate-600",children:n}),y.jsxs("div",{className:"flex justify-end space-x-3",children:[y.jsx(hn,{onClick:a,label:"Cancel"}),r]})]})}})})]})};function ux(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const cx=e=>{switch(e){case"success":return hx;case"info":return px;case"warning":return gx;case"error":return mx;default:return null}},dx=Array(12).fill(0),fx=({visible:e,className:t})=>d.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},d.createElement("div",{className:"sonner-spinner"},dx.map((n,r)=>d.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hx=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),gx=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),px=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mx=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},d.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),bx=d.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},d.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),d.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),vx=()=>{const[e,t]=d.useState(document.hidden);return d.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ul=1;class yx{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...i}=t,o=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ul++,a=this.toasts.find(l=>l.id===o),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),a?this.toasts=this.toasts.map(l=>l.id===o?(this.publish({...l,...t,id:o,title:r}),{...l,...t,id:o,dismissible:s,title:r}):l):this.addToast({title:r,...i,dismissible:s,id:o}),o},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const i=Promise.resolve(t instanceof Function?t():t);let o=r!==void 0,a;const s=i.then(async u=>{if(a=["resolve",u],d.isValidElement(u))o=!1,this.create({id:r,type:"default",message:u});else if(xx(u)&&!u.ok){o=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,h=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,p=typeof c=="object"&&!d.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...p})}else if(u instanceof Error){o=!1;const c=typeof n.error=="function"?await n.error(u):n.error,h=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"&&!d.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:h,...p})}else if(n.success!==void 0){o=!1;const c=typeof n.success=="function"?await n.success(u):n.success,h=typeof n.description=="function"?await n.description(u):n.description,p=typeof c=="object"&&!d.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:h,...p})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){o=!1;const g=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,f=typeof g=="object"&&!d.isValidElement(g)?g:{message:g};this.create({id:r,type:"error",description:c,...f})}}).finally(()=>{o&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,g)=>s.then(()=>a[0]==="reject"?g(a[1]):u(a[1])).catch(g));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||ul++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const _e=new yx,wx=(e,t)=>{const n=(t==null?void 0:t.id)||ul++;return _e.addToast({title:e,...t,id:n}),n},xx=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",Cx=wx,Sx=()=>_e.toasts,$x=()=>_e.getActiveToasts(),mo=Object.assign(Cx,{success:_e.success,info:_e.info,warning:_e.warning,error:_e.error,custom:_e.custom,message:_e.message,promise:_e.promise,dismiss:_e.dismiss,loading:_e.loading},{getHistory:Sx,getToasts:$x});ux("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}[data-sonner-toaster][data-lifted=true]{transform:translateY(-8px)}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ro(e){return e.label!==void 0}const Ex=3,Px="24px",Rx="16px",ud=4e3,Mx=356,kx=14,Ox=45,Dx=200;function Ct(...e){return e.filter(Boolean).join(" ")}function Tx(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const Fx=e=>{var t,n,r,i,o,a,s,l,u;const{invert:g,toast:c,unstyled:h,interacting:f,setHeights:p,visibleToasts:m,heights:b,index:v,toasts:w,expanded:x,removeToast:k,defaultRichColors:S,closeButton:R,style:P,cancelButtonStyle:I,actionButtonStyle:D,className:L="",descriptionClassName:E="",duration:N,position:_,gap:T,expandByDefault:A,classNames:M,icons:F,closeButtonAriaLabel:O="Close toast"}=e,[V,X]=d.useState(null),[j,K]=d.useState(null),[H,q]=d.useState(!1),[ue,ee]=d.useState(!1),[Xe,Ze]=d.useState(!1),[st,lt]=d.useState(!1),[bn,W]=d.useState(!1),[Je,Be]=d.useState(0),[ne,zn]=d.useState(0),vn=d.useRef(c.duration||N||ud),nu=d.useRef(null),Ot=d.useRef(null),Tg=v===0,Fg=v+1<=m,He=c.type,Un=c.dismissible!==!1,Lg=c.className||"",Ig=c.descriptionClassName||"",Ai=d.useMemo(()=>b.findIndex(Z=>Z.toastId===c.id)||0,[b,c.id]),Ng=d.useMemo(()=>{var Z;return(Z=c.closeButton)!=null?Z:R},[c.closeButton,R]),ru=d.useMemo(()=>c.duration||N||ud,[c.duration,N]),xa=d.useRef(0),Wn=d.useRef(0),iu=d.useRef(0),qn=d.useRef(null),[Ag,_g]=_.split("-"),ou=d.useMemo(()=>b.reduce((Z,ye,Pe)=>Pe>=Ai?Z:Z+ye.height,0),[b,Ai]),au=vx(),jg=c.invert||g,Ca=He==="loading";Wn.current=d.useMemo(()=>Ai*T+ou,[Ai,ou]),d.useEffect(()=>{vn.current=ru},[ru]),d.useEffect(()=>{q(!0)},[]),d.useEffect(()=>{const Z=Ot.current;if(Z){const ye=Z.getBoundingClientRect().height;return zn(ye),p(Pe=>[{toastId:c.id,height:ye,position:c.position},...Pe]),()=>p(Pe=>Pe.filter(Ve=>Ve.toastId!==c.id))}},[p,c.id]),d.useLayoutEffect(()=>{if(!H)return;const Z=Ot.current,ye=Z.style.height;Z.style.height="auto";const Pe=Z.getBoundingClientRect().height;Z.style.height=ye,zn(Pe),p(Ve=>Ve.find(Se=>Se.toastId===c.id)?Ve.map(Se=>Se.toastId===c.id?{...Se,height:Pe}:Se):[{toastId:c.id,height:Pe,position:c.position},...Ve])},[H,c.title,c.description,p,c.id]);const Ht=d.useCallback(()=>{ee(!0),Be(Wn.current),p(Z=>Z.filter(ye=>ye.toastId!==c.id)),setTimeout(()=>{k(c)},Dx)},[c,k,p,Wn]);d.useEffect(()=>{if(c.promise&&He==="loading"||c.duration===1/0||c.type==="loading")return;let Z;return x||f||au?(()=>{if(iu.current<xa.current){const Ve=new Date().getTime()-xa.current;vn.current=vn.current-Ve}iu.current=new Date().getTime()})():(()=>{vn.current!==1/0&&(xa.current=new Date().getTime(),Z=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),Ht()},vn.current))})(),()=>clearTimeout(Z)},[x,f,c,He,au,Ht]),d.useEffect(()=>{c.delete&&Ht()},[Ht,c.delete]);function Kg(){var Z;if(F!=null&&F.loading){var ye;return d.createElement("div",{className:Ct(M==null?void 0:M.loader,c==null||(ye=c.classNames)==null?void 0:ye.loader,"sonner-loader"),"data-visible":He==="loading"},F.loading)}return d.createElement(fx,{className:Ct(M==null?void 0:M.loader,c==null||(Z=c.classNames)==null?void 0:Z.loader),visible:He==="loading"})}const Bg=c.icon||(F==null?void 0:F[He])||cx(He);var su,lu;return d.createElement("li",{tabIndex:0,ref:Ot,className:Ct(L,Lg,M==null?void 0:M.toast,c==null||(t=c.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[He],c==null||(n=c.classNames)==null?void 0:n[He]),"data-sonner-toast":"","data-rich-colors":(su=c.richColors)!=null?su:S,"data-styled":!(c.jsx||c.unstyled||h),"data-mounted":H,"data-promise":!!c.promise,"data-swiped":bn,"data-removed":ue,"data-visible":Fg,"data-y-position":Ag,"data-x-position":_g,"data-index":v,"data-front":Tg,"data-swiping":Xe,"data-dismissible":Un,"data-type":He,"data-invert":jg,"data-swipe-out":st,"data-swipe-direction":j,"data-expanded":!!(x||A&&H),style:{"--index":v,"--toasts-before":v,"--z-index":w.length-v,"--offset":`${ue?Je:Wn.current}px`,"--initial-height":A?"auto":`${ne}px`,...P,...c.style},onDragEnd:()=>{Ze(!1),X(null),qn.current=null},onPointerDown:Z=>{Ca||!Un||(nu.current=new Date,Be(Wn.current),Z.target.setPointerCapture(Z.pointerId),Z.target.tagName!=="BUTTON"&&(Ze(!0),qn.current={x:Z.clientX,y:Z.clientY}))},onPointerUp:()=>{var Z,ye,Pe;if(st||!Un)return;qn.current=null;const Ve=Number(((Z=Ot.current)==null?void 0:Z.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_i=Number(((ye=Ot.current)==null?void 0:ye.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Se=new Date().getTime()-((Pe=nu.current)==null?void 0:Pe.getTime()),et=V==="x"?Ve:_i,ji=Math.abs(et)/Se;if(Math.abs(et)>=Ox||ji>.11){Be(Wn.current),c.onDismiss==null||c.onDismiss.call(c,c),K(V==="x"?Ve>0?"right":"left":_i>0?"down":"up"),Ht(),lt(!0);return}else{var ut,ct;(ut=Ot.current)==null||ut.style.setProperty("--swipe-amount-x","0px"),(ct=Ot.current)==null||ct.style.setProperty("--swipe-amount-y","0px")}W(!1),Ze(!1),X(null)},onPointerMove:Z=>{var ye,Pe,Ve;if(!qn.current||!Un||((ye=window.getSelection())==null?void 0:ye.toString().length)>0)return;const Se=Z.clientY-qn.current.y,et=Z.clientX-qn.current.x;var ji;const ut=(ji=e.swipeDirections)!=null?ji:Tx(_);!V&&(Math.abs(et)>1||Math.abs(Se)>1)&&X(Math.abs(et)>Math.abs(Se)?"x":"y");let ct={x:0,y:0};const uu=yn=>1/(1.5+Math.abs(yn)/20);if(V==="y"){if(ut.includes("top")||ut.includes("bottom"))if(ut.includes("top")&&Se<0||ut.includes("bottom")&&Se>0)ct.y=Se;else{const yn=Se*uu(Se);ct.y=Math.abs(yn)<Math.abs(Se)?yn:Se}}else if(V==="x"&&(ut.includes("left")||ut.includes("right")))if(ut.includes("left")&&et<0||ut.includes("right")&&et>0)ct.x=et;else{const yn=et*uu(et);ct.x=Math.abs(yn)<Math.abs(et)?yn:et}(Math.abs(ct.x)>0||Math.abs(ct.y)>0)&&W(!0),(Pe=Ot.current)==null||Pe.style.setProperty("--swipe-amount-x",`${ct.x}px`),(Ve=Ot.current)==null||Ve.style.setProperty("--swipe-amount-y",`${ct.y}px`)}},Ng&&!c.jsx&&He!=="loading"?d.createElement("button",{"aria-label":O,"data-disabled":Ca,"data-close-button":!0,onClick:Ca||!Un?()=>{}:()=>{Ht(),c.onDismiss==null||c.onDismiss.call(c,c)},className:Ct(M==null?void 0:M.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(lu=F==null?void 0:F.close)!=null?lu:bx):null,(He||c.icon||c.promise)&&c.icon!==null&&((F==null?void 0:F[He])!==null||c.icon)?d.createElement("div",{"data-icon":"",className:Ct(M==null?void 0:M.icon,c==null||(i=c.classNames)==null?void 0:i.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||Kg():null,c.type!=="loading"?Bg:null):null,d.createElement("div",{"data-content":"",className:Ct(M==null?void 0:M.content,c==null||(o=c.classNames)==null?void 0:o.content)},d.createElement("div",{"data-title":"",className:Ct(M==null?void 0:M.title,c==null||(a=c.classNames)==null?void 0:a.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?d.createElement("div",{"data-description":"",className:Ct(E,Ig,M==null?void 0:M.description,c==null||(s=c.classNames)==null?void 0:s.description)},typeof c.description=="function"?c.description():c.description):null),d.isValidElement(c.cancel)?c.cancel:c.cancel&&ro(c.cancel)?d.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||I,onClick:Z=>{ro(c.cancel)&&Un&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,Z),Ht())},className:Ct(M==null?void 0:M.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,d.isValidElement(c.action)?c.action:c.action&&ro(c.action)?d.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||D,onClick:Z=>{ro(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,Z),!Z.defaultPrevented&&Ht())},className:Ct(M==null?void 0:M.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function cd(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Lx(e,t){const n={};return[e,t].forEach((r,i)=>{const o=i===1,a=o?"--mobile-offset":"--offset",s=o?Rx:Px;function l(u){["top","right","bottom","left"].forEach(g=>{n[`${a}-${g}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=s:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),n}const Ix=d.forwardRef(function(t,n){const{invert:r,position:i="bottom-right",hotkey:o=["altKey","KeyT"],expand:a,closeButton:s,className:l,offset:u,mobileOffset:g,theme:c="light",richColors:h,duration:f,style:p,visibleToasts:m=Ex,toastOptions:b,dir:v=cd(),gap:w=kx,icons:x,containerAriaLabel:k="Notifications"}=t,[S,R]=d.useState([]),P=d.useMemo(()=>Array.from(new Set([i].concat(S.filter(j=>j.position).map(j=>j.position)))),[S,i]),[I,D]=d.useState([]),[L,E]=d.useState(!1),[N,_]=d.useState(!1),[T,A]=d.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=d.useRef(null),F=o.join("+").replace(/Key/g,"").replace(/Digit/g,""),O=d.useRef(null),V=d.useRef(!1),X=d.useCallback(j=>{R(K=>{var H;return(H=K.find(q=>q.id===j.id))!=null&&H.delete||_e.dismiss(j.id),K.filter(({id:q})=>q!==j.id)})},[]);return d.useEffect(()=>_e.subscribe(j=>{if(j.dismiss){requestAnimationFrame(()=>{R(K=>K.map(H=>H.id===j.id?{...H,delete:!0}:H))});return}setTimeout(()=>{Lr.flushSync(()=>{R(K=>{const H=K.findIndex(q=>q.id===j.id);return H!==-1?[...K.slice(0,H),{...K[H],...j},...K.slice(H+1)]:[j,...K]})})})}),[S]),d.useEffect(()=>{if(c!=="system"){A(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A("dark"):A("light")),typeof window>"u")return;const j=window.matchMedia("(prefers-color-scheme: dark)");try{j.addEventListener("change",({matches:K})=>{A(K?"dark":"light")})}catch{j.addListener(({matches:H})=>{try{A(H?"dark":"light")}catch(q){console.error(q)}})}},[c]),d.useEffect(()=>{S.length<=1&&E(!1)},[S]),d.useEffect(()=>{const j=K=>{var H;if(o.every(ee=>K[ee]||K.code===ee)){var ue;E(!0),(ue=M.current)==null||ue.focus()}K.code==="Escape"&&(document.activeElement===M.current||(H=M.current)!=null&&H.contains(document.activeElement))&&E(!1)};return document.addEventListener("keydown",j),()=>document.removeEventListener("keydown",j)},[o]),d.useEffect(()=>{if(M.current)return()=>{O.current&&(O.current.focus({preventScroll:!0}),O.current=null,V.current=!1)}},[M.current]),d.createElement("section",{ref:n,"aria-label":`${k} ${F}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},P.map((j,K)=>{var H;const[q,ue]=j.split("-");return S.length?d.createElement("ol",{key:j,dir:v==="auto"?cd():v,tabIndex:-1,ref:M,className:l,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":q,"data-lifted":L&&S.length>1&&!a,"data-x-position":ue,style:{"--front-toast-height":`${((H=I[0])==null?void 0:H.height)||0}px`,"--width":`${Mx}px`,"--gap":`${w}px`,...p,...Lx(u,g)},onBlur:ee=>{V.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(V.current=!1,O.current&&(O.current.focus({preventScroll:!0}),O.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||V.current||(V.current=!0,O.current=ee.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{N||E(!1)},onDragEnd:()=>E(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||_(!0)},onPointerUp:()=>_(!1)},S.filter(ee=>!ee.position&&K===0||ee.position===j).map((ee,Xe)=>{var Ze,st;return d.createElement(Fx,{key:ee.id,icons:x,index:Xe,toast:ee,defaultRichColors:h,duration:(Ze=b==null?void 0:b.duration)!=null?Ze:f,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:m,closeButton:(st=b==null?void 0:b.closeButton)!=null?st:s,interacting:N,position:j,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:X,toasts:S.filter(lt=>lt.position==ee.position),heights:I.filter(lt=>lt.position==ee.position),setHeights:D,expandByDefault:a,gap:w,expanded:L,swipeDirections:t.swipeDirections})})):null}))});var Nx=function(e){var t=e.showCleanAllButton,n=e.queueName,r=e.status,i=e.queue,o=se.queue.clean.useMutation({onSuccess:function(){mo.success("All ".concat(r," jobs have been removed"))}}),a=o.mutate,s=o.status,l=Fn(Fn([{name:"Completed",status:"completed"},{name:"Failed",status:"failed"},{name:"Active",status:"active"}],i&&"prioritized"in i.counts?[{name:"Prioritized",status:"prioritized"}]:[],!0),[{name:"Waiting",status:"waiting"},{name:"Delayed",status:"delayed"},{name:"Paused",status:"paused"}],!1);return y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{className:"flex items-center space-x-3",children:l.map(function(u){var g=u.status===r;return y.jsxs(ra,{to:"?status=".concat(u.status),className:Mr("flex items-center space-x-2 rounded-md px-3 py-1 font-medium transition duration-150 ease-in-out",{"text-slate-500 hover:bg-slate-50 dark:text-slate-300 dark:hover:bg-slate-800":!g,"bg-green-50 text-green-900 dark:bg-green-900 dark:text-green-50":g&&u.status==="completed","bg-red-50 text-red-900 dark:bg-red-900 dark:text-red-100":g&&u.status==="failed","bg-cyan-50 text-cyan-900":g&&u.status==="active","bg-purple-50 text-purple-900":g&&u.status==="prioritized","bg-amber-50 text-amber-900":g&&u.status==="waiting","bg-indigo-50 text-indigo-900":g&&u.status==="delayed","bg-stone-50 text-stone-900":g&&u.status==="paused"}),children:[y.jsx("span",{children:u.name}),i!=null&&i.counts[u.status]?y.jsx("span",{className:Mr("rounded-md px-1.5 py-0.5 text-xs font-semibold",{"bg-slate-400 text-slate-50":!g,"bg-green-600 text-green-50":g&&u.status==="completed","bg-red-600 text-red-50":g&&u.status==="failed","bg-cyan-600 text-cyan-50":g&&u.status==="active","bg-purple-600 text-purple-50":g&&u.status==="prioritized","bg-amber-600 text-amber-50":g&&u.status==="waiting","bg-indigo-600 text-indigo-50":g&&u.status==="delayed","bg-stone-600 text-stone-50":g&&u.status==="paused"}),children:i.counts[u.status]}):null]},u.name)})}),t?y.jsx(lx,{title:"Are you absolutely sure?",description:"This action cannot be undone. This will permanently remove all ".concat(r," jobs from the queue."),action:y.jsx(hn,{variant:"filled",colorScheme:"red",label:"Yes, remove jobs",onClick:function(){return a({queueName:n,status:r})}}),children:y.jsx(hn,{colorScheme:"yellow",icon:y.jsx(Ar,{}),label:"Clean all",size:"sm",isLoading:s==="pending"})}):null]})};function Ax(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function dd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?dd(Object(n),!0).forEach(function(r){Ax(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _x(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function jx(e,t){if(e==null)return{};var n=_x(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Kx(e,t){return Bx(e)||Hx(e,t)||Vx(e,t)||zx()}function Bx(e){if(Array.isArray(e))return e}function Hx(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){i=!0,o=l}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function Vx(e,t){if(e){if(typeof e=="string")return hd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hd(e,t)}}function hd(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zx(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
58
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ux(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?gd(Object(n),!0).forEach(function(r){Ux(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):gd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Wx(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(i,o){return o(i)},r)}}function ni(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function Qo(e){return{}.toString.call(e).includes("Object")}function qx(e){return!Object.keys(e).length}function wi(e){return typeof e=="function"}function Gx(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Qx(e,t){return Qo(t)||un("changeType"),Object.keys(t).some(function(n){return!Gx(e,n)})&&un("changeField"),t}function Yx(e){wi(e)||un("selectorType")}function Xx(e){wi(e)||Qo(e)||un("handlerType"),Qo(e)&&Object.values(e).some(function(t){return!wi(t)})&&un("handlersType")}function Zx(e){e||un("initialIsRequired"),Qo(e)||un("initialType"),qx(e)&&un("initialContent")}function Jx(e,t){throw new Error(e[t]||e.default)}var eC={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},un=ni(Jx)(eC),io={changes:Qx,selector:Yx,handler:Xx,initial:Zx};function tC(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};io.initial(e),io.handler(t);var n={current:e},r=ni(iC)(n,t),i=ni(rC)(n),o=ni(io.changes)(e),a=ni(nC)(n);function s(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(g){return g};return io.selector(u),u(n.current)}function l(u){Wx(r,i,o,a)(u)}return[s,l]}function nC(e,t){return wi(t)?t(e.current):t}function rC(e,t){return e.current=pd(pd({},e.current),t),t}function iC(e,t,n){return wi(t)?t(e.current):Object.keys(n).forEach(function(r){var i;return(i=t[r])===null||i===void 0?void 0:i.call(t,e.current[r])}),n}var oC={create:tC},aC={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"}};function sC(e){return function t(){for(var n=this,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return i.length>=e.length?e.apply(this,i):function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];return t.apply(n,[].concat(i,s))}}}function lC(e){return{}.toString.call(e).includes("Object")}function uC(e){return e||md("configIsRequired"),lC(e)||md("configType"),e.urls?(cC(),{paths:{vs:e.urls.monacoBase}}):e}function cC(){console.warn(Sg.deprecation)}function dC(e,t){throw new Error(e[t]||e.default)}var Sg={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
54
59
  You are using deprecated way of configuration.
55
60
 
56
61
  Instead of using
@@ -59,4 +64,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
59
64
  monaco.config({ paths: { vs: '...' } })
60
65
 
61
66
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
62
- `},_c=hx(bx)(L1),vx={config:px},yx=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,a){return a(o)},i)}};function A1(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],A1(e[n],t[n]))}),Ac(Ac({},e),t)}var wx={type:"cancelation",msg:"operation is manually canceled"};function Da(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(wx):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var xx=dx.create({config:fx,isInitialized:!1,resolve:null,reject:null,monaco:null}),I1=qw(xx,2),mi=I1[0],zo=I1[1];function Cx(e){var t=vx.config(e),n=t.monaco,r=Uw(t,["monaco"]);zo(function(i){return{config:A1(i.config,r),monaco:n}})}function $x(){var e=mi(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(zo({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Da(Ta);if(window.monaco&&window.monaco.editor)return N1(window.monaco),e.resolve(window.monaco),Da(Ta);yx(Sx,Px)(Rx)}return Da(Ta)}function Sx(e){return document.body.appendChild(e)}function Ex(e){var t=document.createElement("script");return e&&(t.src=e),t}function Px(e){var t=mi(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=Ex("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function Rx(){var e=mi(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){N1(n),e.resolve(n)},function(n){e.reject(n)})}function N1(e){mi().monaco||zo({monaco:e})}function Mx(){return mi(function(e){var t=e.monaco;return t})}var Ta=new Promise(function(e,t){return zo({resolve:e,reject:t})}),j1={config:Cx,init:$x,__getMonacoInstance:Mx},kx={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Oa=kx,Dx={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},Tx=Dx;function Ox({children:e}){return c.createElement("div",{style:Tx.container},e)}var Fx=Ox,Lx=Fx;function Ax({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return c.createElement("section",{style:{...Oa.wrapper,width:e,height:t},...a},!n&&c.createElement(Lx,null,r),c.createElement("div",{ref:i,style:{...Oa.fullWidth,...!n&&Oa.hide},className:o}))}var Ix=Ax,_1=c.memo(Ix);function Nx(e){c.useEffect(e,[])}var K1=Nx;function jx(e,t,n=!0){let r=c.useRef(!0);c.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var Ae=jx;function zr(){}function Un(e,t,n,r){return _x(e,r)||Kx(e,t,n,r)}function _x(e,t){return e.editor.getModel(B1(e,t))}function Kx(e,t,n,r){return e.editor.createModel(t,n,r?B1(e,r):void 0)}function B1(e,t){return e.Uri.parse(t)}function Bx({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:d="Loading...",options:h={},height:g="100%",width:f="100%",className:p,wrapperProps:m={},beforeMount:b=zr,onMount:$=zr}){let[x,E]=c.useState(!1),[M,C]=c.useState(!0),k=c.useRef(null),F=c.useRef(null),y=c.useRef(null),D=c.useRef($),P=c.useRef(b),T=c.useRef(!1);K1(()=>{let O=j1.init();return O.then(K=>(F.current=K)&&C(!1)).catch(K=>(K==null?void 0:K.type)!=="cancelation"&&console.error("Monaco initialization: error:",K)),()=>k.current?I():O.cancel()}),Ae(()=>{if(k.current&&F.current){let O=k.current.getOriginalEditor(),K=Un(F.current,e||"",r||n||"text",o||"");K!==O.getModel()&&O.setModel(K)}},[o],x),Ae(()=>{if(k.current&&F.current){let O=k.current.getModifiedEditor(),K=Un(F.current,t||"",i||n||"text",a||"");K!==O.getModel()&&O.setModel(K)}},[a],x),Ae(()=>{let O=k.current.getModifiedEditor();O.getOption(F.current.editor.EditorOption.readOnly)?O.setValue(t||""):t!==O.getValue()&&(O.executeEdits("",[{range:O.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),O.pushUndoStop())},[t],x),Ae(()=>{var O,K;(K=(O=k.current)==null?void 0:O.getModel())==null||K.original.setValue(e||"")},[e],x),Ae(()=>{let{original:O,modified:K}=k.current.getModel();F.current.editor.setModelLanguage(O,r||n||"text"),F.current.editor.setModelLanguage(K,i||n||"text")},[n,r,i],x),Ae(()=>{var O;(O=F.current)==null||O.editor.setTheme(u)},[u],x),Ae(()=>{var O;(O=k.current)==null||O.updateOptions(h)},[h],x);let L=c.useCallback(()=>{var A;if(!F.current)return;P.current(F.current);let O=Un(F.current,e||"",r||n||"text",o||""),K=Un(F.current,t||"",i||n||"text",a||"");(A=k.current)==null||A.setModel({original:O,modified:K})},[n,t,i,e,r,o,a]),R=c.useCallback(()=>{var O;!T.current&&y.current&&(k.current=F.current.editor.createDiffEditor(y.current,{automaticLayout:!0,...h}),L(),(O=F.current)==null||O.editor.setTheme(u),E(!0),T.current=!0)},[h,u,L]);c.useEffect(()=>{x&&D.current(k.current,F.current)},[x]),c.useEffect(()=>{!M&&!x&&R()},[M,x,R]);function I(){var K,A,W,B;let O=(K=k.current)==null?void 0:K.getModel();s||((A=O==null?void 0:O.original)==null||A.dispose()),l||((W=O==null?void 0:O.modified)==null||W.dispose()),(B=k.current)==null||B.dispose()}return c.createElement(_1,{width:f,height:g,isEditorReady:x,loading:d,_ref:y,className:p,wrapperProps:m})}var Hx=Bx;c.memo(Hx);function Vx(e){let t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}var zx=Vx,Hi=new Map;function Ux({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:s,loading:l="Loading...",options:u={},overrideServices:d={},saveViewState:h=!0,keepCurrentModel:g=!1,width:f="100%",height:p="100%",className:m,wrapperProps:b={},beforeMount:$=zr,onMount:x=zr,onChange:E,onValidate:M=zr}){let[C,k]=c.useState(!1),[F,y]=c.useState(!0),D=c.useRef(null),P=c.useRef(null),T=c.useRef(null),L=c.useRef(x),R=c.useRef($),I=c.useRef(),O=c.useRef(r),K=zx(o),A=c.useRef(!1),W=c.useRef(!1);K1(()=>{let q=j1.init();return q.then(j=>(D.current=j)&&y(!1)).catch(j=>(j==null?void 0:j.type)!=="cancelation"&&console.error("Monaco initialization: error:",j)),()=>P.current?X():q.cancel()}),Ae(()=>{var j,H,U,_;let q=Un(D.current,e||r||"",t||i||"",o||n||"");q!==((j=P.current)==null?void 0:j.getModel())&&(h&&Hi.set(K,(H=P.current)==null?void 0:H.saveViewState()),(U=P.current)==null||U.setModel(q),h&&((_=P.current)==null||_.restoreViewState(Hi.get(o))))},[o],C),Ae(()=>{var q;(q=P.current)==null||q.updateOptions(u)},[u],C),Ae(()=>{!P.current||r===void 0||(P.current.getOption(D.current.editor.EditorOption.readOnly)?P.current.setValue(r):r!==P.current.getValue()&&(W.current=!0,P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),P.current.pushUndoStop(),W.current=!1))},[r],C),Ae(()=>{var j,H;let q=(j=P.current)==null?void 0:j.getModel();q&&i&&((H=D.current)==null||H.editor.setModelLanguage(q,i))},[i],C),Ae(()=>{var q;s!==void 0&&((q=P.current)==null||q.revealLine(s))},[s],C),Ae(()=>{var q;(q=D.current)==null||q.editor.setTheme(a)},[a],C);let B=c.useCallback(()=>{var q;if(!(!T.current||!D.current)&&!A.current){R.current(D.current);let j=o||n,H=Un(D.current,r||e||"",t||i||"",j||"");P.current=(q=D.current)==null?void 0:q.editor.create(T.current,{model:H,automaticLayout:!0,...u},d),h&&P.current.restoreViewState(Hi.get(j)),D.current.editor.setTheme(a),s!==void 0&&P.current.revealLine(s),k(!0),A.current=!0}},[e,t,n,r,i,o,u,d,h,a,s]);c.useEffect(()=>{C&&L.current(P.current,D.current)},[C]),c.useEffect(()=>{!F&&!C&&B()},[F,C,B]),O.current=r,c.useEffect(()=>{var q,j;C&&E&&((q=I.current)==null||q.dispose(),I.current=(j=P.current)==null?void 0:j.onDidChangeModelContent(H=>{W.current||E(P.current.getValue(),H)}))},[C,E]),c.useEffect(()=>{if(C){let q=D.current.editor.onDidChangeMarkers(j=>{var U;let H=(U=P.current.getModel())==null?void 0:U.uri;if(H&&j.find(_=>_.path===H.path)){let _=D.current.editor.getModelMarkers({resource:H});M==null||M(_)}});return()=>{q==null||q.dispose()}}return()=>{}},[C,M]);function X(){var q,j;(q=I.current)==null||q.dispose(),g?h&&Hi.set(o,P.current.saveViewState()):(j=P.current.getModel())==null||j.dispose(),P.current.dispose()}return c.createElement(_1,{width:f,height:p,isEditorReady:C,loading:l,_ref:T,className:m,wrapperProps:b})}var qx=Ux,Wx=c.memo(qx),Gx=Wx,Qx=function(e){var t=e.queue,n=e.onDismiss,r=be.queue.addJob.useMutation({onSuccess:function(){Zi.success("New job has been added")},onError:function(g){Zi.error(g.message)}}),i=r.mutate,o=r.status,a=c.useState("{}"),s=a[0],l=a[1],u=c.useRef(null),d=function(){var g,f;(f=(g=u.current)===null||g===void 0?void 0:g.getAction("editor.action.formatDocument"))===null||f===void 0||f.run()},h=function(g){var f=String.fromCharCode(g.which).toLowerCase();(g.ctrlKey||g.metaKey)&&f==="s"&&(g.preventDefault(),d())};return v.jsx(pl,{isOpen:!0,onOpenChange:function(g){g||n()},children:v.jsx(yl,{isDismissable:!0,className:"fixed inset-0 bg-black/10",children:v.jsx(ml,{className:"fixed left-1/2 top-1/2 max-h-[85vh] w-full max-w-xl -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(g){var f=g.close;return v.jsxs(v.Fragment,{children:[v.jsx("button",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full text-slate-500 transition duration-150 ease-in-out hover:bg-slate-50","aria-label":"Close",onClick:function(){f(),n()},children:v.jsx(Jd,{})}),v.jsx("div",{className:"flex items-center space-x-4",children:v.jsxs(bl,{className:"mb-1 text-xl font-semibold text-slate-900",children:["Add job to ",t.displayName.toLocaleLowerCase()]})}),v.jsx("div",{onKeyDown:h,onBlur:d,className:"mb-6 border border-slate-200",children:v.jsx(Gx,{height:"300px",language:"json",className:"rounded-md",options:{minimap:{enabled:!1},formatOnPaste:!0,formatOnType:!0,padding:{top:8,bottom:8},tabSize:2},defaultValue:s,onChange:function(p){p&&l(p)},onMount:function(p,m){u.current=p,m.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{background:"ffffff",token:""},{foreground:"6a737d",token:"comment"},{foreground:"6a737d",token:"punctuation.definition.comment"},{foreground:"6a737d",token:"string.comment"},{foreground:"005cc5",token:"constant"},{foreground:"005cc5",token:"entity.name.constant"},{foreground:"005cc5",token:"variable.other.constant"},{foreground:"005cc5",token:"variable.language"},{foreground:"6f42c1",token:"entity"},{foreground:"6f42c1",token:"entity.name"},{foreground:"24292e",token:"variable.parameter.function"},{foreground:"22863a",token:"entity.name.tag"},{foreground:"d73a49",token:"keyword"},{foreground:"d73a49",token:"storage"},{foreground:"d73a49",token:"storage.type"},{foreground:"24292e",token:"storage.modifier.package"},{foreground:"24292e",token:"storage.modifier.import"},{foreground:"24292e",token:"storage.type.java"},{foreground:"032f62",token:"string"},{foreground:"032f62",token:"punctuation.definition.string"},{foreground:"032f62",token:"string punctuation.section.embedded source"},{foreground:"005cc5",token:"support"},{foreground:"005cc5",token:"meta.property-name"},{foreground:"e36209",token:"variable"},{foreground:"24292e",token:"variable.other"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"b31d28",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"b31d28",token:"message.error"},{foreground:"24292e",token:"string source"},{foreground:"005cc5",token:"string variable"},{foreground:"032f62",token:"source.regexp"},{foreground:"032f62",token:"string.regexp"},{foreground:"032f62",token:"string.regexp.character-class"},{foreground:"032f62",token:"string.regexp constant.character.escape"},{foreground:"032f62",token:"string.regexp source.ruby.embedded"},{foreground:"032f62",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"22863a",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"005cc5",token:"support.constant"},{foreground:"005cc5",token:"support.variable"},{foreground:"005cc5",token:"meta.module-reference"},{foreground:"735c0f",token:"markup.list"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"22863a",token:"markup.quote"},{foreground:"24292e",fontStyle:"italic",token:"markup.italic"},{foreground:"24292e",fontStyle:"bold",token:"markup.bold"},{foreground:"005cc5",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"22863a",background:"f0fff4",token:"markup.inserted"},{foreground:"22863a",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"22863a",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"e36209",background:"ffebda",token:"markup.changed"},{foreground:"e36209",background:"ffebda",token:"punctuation.definition.changed"},{foreground:"f6f8fa",background:"005cc5",token:"markup.ignored"},{foreground:"f6f8fa",background:"005cc5",token:"markup.untracked"},{foreground:"6f42c1",fontStyle:"bold",token:"meta.diff.range"},{foreground:"005cc5",token:"meta.diff.header"},{foreground:"005cc5",fontStyle:"bold",token:"meta.separator"},{foreground:"005cc5",token:"meta.output"},{foreground:"586069",token:"brackethighlighter.tag"},{foreground:"586069",token:"brackethighlighter.curly"},{foreground:"586069",token:"brackethighlighter.round"},{foreground:"586069",token:"brackethighlighter.square"},{foreground:"586069",token:"brackethighlighter.angle"},{foreground:"586069",token:"brackethighlighter.quote"},{foreground:"b31d28",token:"brackethighlighter.unmatched"},{foreground:"b31d28",token:"sublimelinter.mark.error"},{foreground:"e36209",token:"sublimelinter.mark.warning"},{foreground:"959da5",token:"sublimelinter.gutter-mark"},{foreground:"032f62",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"032f62",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#24292e","editor.background":"#ffffff","editor.selectionBackground":"#c8c8fa","editor.inactiveSelectionBackground":"#fafbfc","editor.lineHighlightBackground":"#fafbfc","editorCursor.foreground":"#24292e","editorWhitespace.foreground":"#959da5","editorIndentGuide.background":"#959da5","editorIndentGuide.activeBackground":"#24292e","editor.selectionHighlightBorder":"#fafbfc"}}),m.editor.setTheme("solarized-light")}})}),v.jsx("div",{children:v.jsx(Pn,{label:"Add job",variant:"filled",disabled:o==="pending",onClick:function(){var p;if(u.current){(p=u.current.getAction("editor.action.formatDocument"))===null||p===void 0||p.run();try{var m=JSON.parse(u.current.getValue());i({queueName:t.name,data:m})}catch{Zi.error("Invalid JSON")}}}})})]})}})})})},Yx=function(e){var t=e.queue,n=be.queue.pause.useMutation().mutate,r=be.queue.resume.useMutation().mutate,i=be.queue.empty.useMutation().mutate,o=c.useState(!1),a=o[0],s=o[1],l={queueName:t.name};return v.jsxs(v.Fragment,{children:[v.jsx(F1,{actions:[{label:t.paused?"Resume":"Pause",onSelect:function(){t.paused?r(l):n(l)},icon:t.paused?v.jsx(Fb,{}):v.jsx(Tb,{})},{label:"Add job",onSelect:function(){s(!0)},icon:v.jsx(Ab,{})},{label:"Empty",onSelect:function(){i(l)},icon:v.jsx(Lo,{})}]}),a?v.jsx(Qx,{queue:t,onDismiss:function(){return s(!1)}}):null]})},Fa=new Intl.NumberFormat("en-US").format,Zx=function(){var e,t,n,r=om().id,i=r,o=Qm()[0],a=c.useState("completed"),s=a[0],l=a[1],u=be.job.list.useInfiniteQuery({queueName:i,limit:Ts,status:s},{getNextPageParam:function(x){return x.nextCursor},enabled:!!i,refetchInterval:Os,retry:Fs}),d=u.data,h=u.fetchNextPage,g=u.isLoading,f=u.isError,p=u.isFetchingNextPage,m=u.hasNextPage;c.useEffect(function(){var x=o.get("status");x&&l(x),!x&&s&&l("completed")},[o,s]);var b=be.queue.byName.useQuery({queueName:i},{enabled:!!i,refetchInterval:Os,retry:Fs}),$=(e=d==null?void 0:d.pages.map(function(x){return x.jobs}).flat())!==null&&e!==void 0?e:[];return v.jsx(Th,{children:b.data===null?v.jsx(Ss,{message:"No queue found"}):f?v.jsx(Ss,{message:"Could not fetch jobs"}):v.jsxs("div",{children:[v.jsx("div",{className:"mb-2 flex justify-between",children:v.jsxs("div",{className:"flex items-center space-x-4",children:[v.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-slate-50",children:b.data?b.data.displayName:v.jsx(oo,{className:"h-8 w-52 rounded-md"})}),v.jsxs("div",{className:"flex items-center space-x-2",children:[b.data?v.jsx(Yx,{queue:b.data}):null,!((t=b.data)===null||t===void 0)&&t.paused?v.jsx("div",{className:"flex h-7 cursor-default items-center justify-center space-x-1.5 rounded-md bg-yellow-50 px-2 text-sm font-medium text-yellow-900 transition duration-150 ease-in-out",children:v.jsx("span",{children:"Paused"})}):null]})]})}),v.jsx("div",{className:"mb-5",children:v.jsx("div",{className:"flex items-center space-x-2",children:b.data?v.jsxs(v.Fragment,{children:[v.jsxs("p",{className:"text-slate-600",children:[v.jsxs("span",{className:"text-green-800",children:[Fa(b.data.client.connectedClients)," ","connected"]})," ","and"," ",v.jsxs("span",{className:"text-red-800",children:[Fa(b.data.client.blockedClients)," ","blocked"]})," ","out of"," ",v.jsxs("span",{className:"text-slate-900",children:[Fa(b.data.client.maxClients)," max clients"]})]}),v.jsx("p",{className:"text-slate-600",children:"·"}),v.jsxs("p",{className:"text-slate-600",children:[b.data.client.usedMemoryHuman," /"," ",b.data.client.totalMemoryHuman," (",(b.data.client.usedMemoryPercentage*100).toFixed(2),"%)"]}),v.jsx("p",{className:"text-slate-600",children:"·"}),v.jsxs("p",{className:"text-slate-600",children:["Redis v",b.data.client.version]})]}):v.jsx(oo,{className:"h-6 w-80"})})}),v.jsxs("div",{className:"space-y-4",children:[v.jsx(Hw,{showCleanAllButton:$.length>0,queueName:i,status:s,queue:b.data}),v.jsx(mw,{onBottomInView:function(){p||!m||h()},status:s,totalJobs:((n=d==null?void 0:d.pages.at(-1))===null||n===void 0?void 0:n.totalCount)||0,jobs:$.map(function(x){return ro(ro({},x),{status:s})}),isLoading:g,isFetchingNextPage:p,queueName:i})]})]})})},Vi=function(e){var t=e.count,n=e.variant,r={active:"text-cyan-600",completed:"text-green-600",failed:"text-red-600",waiting:"text-amber-600"},i={active:v.jsx(tf,{width:16,height:16}),completed:v.jsx(Xd,{width:16,height:16}),failed:v.jsx(ef,{width:16,height:16}),waiting:v.jsx(Rb,{width:16,height:16})};return v.jsx("div",{children:v.jsx(n1,{message:n.charAt(0).toUpperCase()+n.slice(1),children:v.jsxs("div",{className:"flex items-center space-x-1 text-sm ".concat(r[n]),children:[v.jsx("p",{className:"text-lg",children:t})," ",i[n]]})})})},Xx=function(e){var t=e.queueName,n=be.queue.byName.useQuery({queueName:t},{refetchInterval:Os,retry:Fs});return n.data?v.jsxs(Fo,{to:"../".concat(n.data.name),className:"group flex items-center justify-between transition",children:[v.jsx("p",{className:"py-3 text-lg font-medium text-slate-900 transition group-hover:text-brand-900 dark:text-slate-200 dark:group-hover:text-brand-100",children:n.data.displayName}),v.jsxs("div",{className:"flex space-x-5",children:[v.jsx(Vi,{count:n.data.counts.completed,variant:"completed"}),v.jsx(Vi,{count:n.data.counts.failed,variant:"failed"}),v.jsx(Vi,{count:n.data.counts.active,variant:"active"}),v.jsx(Vi,{count:n.data.counts.waiting,variant:"waiting"})]})]}):null},Jx=function(){var e=be.queue.list.useQuery().data;return v.jsx(Th,{children:v.jsxs("div",{children:[v.jsx("h1",{className:"mb-6 text-2xl font-bold text-slate-900 dark:text-slate-50",children:"Queues"}),v.jsx("div",{className:"xl:max-w-2xl",children:e==null?void 0:e.map(function(t,n){return v.jsx("div",{className:(e==null?void 0:e.length)-1!==n?"border-b border-slate-100 dark:border-slate-700":"",children:v.jsx(Xx,{queueName:t.name},t.name)},t.name)})})]})})},eC=function(e){var t=e.apiUrl,n=e.basename,r=c.useState(!1),i=r[0],o=r[1],a=c.useState(function(){return new bg})[0],s=c.useState(function(){return be.createClient({links:[sp({url:t})]})})[0];return c.useEffect(function(){var l=JSON.parse(localStorage.getItem("user-preferences")||"null");l?l.theme==="dark"||l.theme==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),o(!0)},[]),i?v.jsx(be.Provider,{client:s,queryClient:a,children:v.jsxs($g,{client:a,children:[v.jsx(Bw,{}),v.jsx(Um,{basename:n,children:v.jsxs(wm,{children:[v.jsx(ts,{path:"/",element:v.jsx(Jx,{})}),v.jsx(ts,{path:"/:id",element:v.jsx(Zx,{})})]})})]})}):null};exports.QueueDashApp=eC;
67
+ `},md=sC(dC)(Sg),fC={config:uC},hC=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(i){return n.reduceRight(function(o,a){return a(o)},i)}};function $g(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],$g(e[n],t[n]))}),fd(fd({},e),t)}var gC={type:"cancelation",msg:"operation is manually canceled"};function ts(e){var t=!1,n=new Promise(function(r,i){e.then(function(o){return t?i(gC):r(o)}),e.catch(i)});return n.cancel=function(){return t=!0},n}var pC=oC.create({config:aC,isInitialized:!1,resolve:null,reject:null,monaco:null}),Eg=Kx(pC,2),Ni=Eg[0],wa=Eg[1];function mC(e){var t=fC.config(e),n=t.monaco,r=jx(t,["monaco"]);wa(function(i){return{config:$g(i.config,r),monaco:n}})}function bC(){var e=Ni(function(t){var n=t.monaco,r=t.isInitialized,i=t.resolve;return{monaco:n,isInitialized:r,resolve:i}});if(!e.isInitialized){if(wa({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),ts(ns);if(window.monaco&&window.monaco.editor)return Pg(window.monaco),e.resolve(window.monaco),ts(ns);hC(vC,wC)(xC)}return ts(ns)}function vC(e){return document.body.appendChild(e)}function yC(e){var t=document.createElement("script");return e&&(t.src=e),t}function wC(e){var t=Ni(function(r){var i=r.config,o=r.reject;return{config:i,reject:o}}),n=yC("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function xC(){var e=Ni(function(n){var r=n.config,i=n.resolve,o=n.reject;return{config:r,resolve:i,reject:o}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){Pg(n),e.resolve(n)},function(n){e.reject(n)})}function Pg(e){Ni().monaco||wa({monaco:e})}function CC(){return Ni(function(e){var t=e.monaco;return t})}var ns=new Promise(function(e,t){return wa({resolve:e,reject:t})}),Rg={config:mC,init:bC,__getMonacoInstance:CC},SC={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},rs=SC,$C={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},EC=$C;function PC({children:e}){return d.createElement("div",{style:EC.container},e)}var RC=PC,MC=RC;function kC({width:e,height:t,isEditorReady:n,loading:r,_ref:i,className:o,wrapperProps:a}){return d.createElement("section",{style:{...rs.wrapper,width:e,height:t},...a},!n&&d.createElement(MC,null,r),d.createElement("div",{ref:i,style:{...rs.fullWidth,...!n&&rs.hide},className:o}))}var OC=kC,Mg=d.memo(OC);function DC(e){d.useEffect(e,[])}var kg=DC;function TC(e,t,n=!0){let r=d.useRef(!0);d.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var ze=TC;function si(){}function ir(e,t,n,r){return FC(e,r)||LC(e,t,n,r)}function FC(e,t){return e.editor.getModel(Og(e,t))}function LC(e,t,n,r){return e.editor.createModel(t,n,r?Og(e,r):void 0)}function Og(e,t){return e.Uri.parse(t)}function IC({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:i,originalModelPath:o,modifiedModelPath:a,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:u="light",loading:g="Loading...",options:c={},height:h="100%",width:f="100%",className:p,wrapperProps:m={},beforeMount:b=si,onMount:v=si}){let[w,x]=d.useState(!1),[k,S]=d.useState(!0),R=d.useRef(null),P=d.useRef(null),I=d.useRef(null),D=d.useRef(v),L=d.useRef(b),E=d.useRef(!1);kg(()=>{let A=Rg.init();return A.then(M=>(P.current=M)&&S(!1)).catch(M=>(M==null?void 0:M.type)!=="cancelation"&&console.error("Monaco initialization: error:",M)),()=>R.current?T():A.cancel()}),ze(()=>{if(R.current&&P.current){let A=R.current.getOriginalEditor(),M=ir(P.current,e||"",r||n||"text",o||"");M!==A.getModel()&&A.setModel(M)}},[o],w),ze(()=>{if(R.current&&P.current){let A=R.current.getModifiedEditor(),M=ir(P.current,t||"",i||n||"text",a||"");M!==A.getModel()&&A.setModel(M)}},[a],w),ze(()=>{let A=R.current.getModifiedEditor();A.getOption(P.current.editor.EditorOption.readOnly)?A.setValue(t||""):t!==A.getValue()&&(A.executeEdits("",[{range:A.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),A.pushUndoStop())},[t],w),ze(()=>{var A,M;(M=(A=R.current)==null?void 0:A.getModel())==null||M.original.setValue(e||"")},[e],w),ze(()=>{let{original:A,modified:M}=R.current.getModel();P.current.editor.setModelLanguage(A,r||n||"text"),P.current.editor.setModelLanguage(M,i||n||"text")},[n,r,i],w),ze(()=>{var A;(A=P.current)==null||A.editor.setTheme(u)},[u],w),ze(()=>{var A;(A=R.current)==null||A.updateOptions(c)},[c],w);let N=d.useCallback(()=>{var F;if(!P.current)return;L.current(P.current);let A=ir(P.current,e||"",r||n||"text",o||""),M=ir(P.current,t||"",i||n||"text",a||"");(F=R.current)==null||F.setModel({original:A,modified:M})},[n,t,i,e,r,o,a]),_=d.useCallback(()=>{var A;!E.current&&I.current&&(R.current=P.current.editor.createDiffEditor(I.current,{automaticLayout:!0,...c}),N(),(A=P.current)==null||A.editor.setTheme(u),x(!0),E.current=!0)},[c,u,N]);d.useEffect(()=>{w&&D.current(R.current,P.current)},[w]),d.useEffect(()=>{!k&&!w&&_()},[k,w,_]);function T(){var M,F,O,V;let A=(M=R.current)==null?void 0:M.getModel();s||((F=A==null?void 0:A.original)==null||F.dispose()),l||((O=A==null?void 0:A.modified)==null||O.dispose()),(V=R.current)==null||V.dispose()}return d.createElement(Mg,{width:f,height:h,isEditorReady:w,loading:g,_ref:I,className:p,wrapperProps:m})}var NC=IC;d.memo(NC);function AC(e){let t=d.useRef();return d.useEffect(()=>{t.current=e},[e]),t.current}var _C=AC,oo=new Map;function jC({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:i,path:o,theme:a="light",line:s,loading:l="Loading...",options:u={},overrideServices:g={},saveViewState:c=!0,keepCurrentModel:h=!1,width:f="100%",height:p="100%",className:m,wrapperProps:b={},beforeMount:v=si,onMount:w=si,onChange:x,onValidate:k=si}){let[S,R]=d.useState(!1),[P,I]=d.useState(!0),D=d.useRef(null),L=d.useRef(null),E=d.useRef(null),N=d.useRef(w),_=d.useRef(v),T=d.useRef(),A=d.useRef(r),M=_C(o),F=d.useRef(!1),O=d.useRef(!1);kg(()=>{let j=Rg.init();return j.then(K=>(D.current=K)&&I(!1)).catch(K=>(K==null?void 0:K.type)!=="cancelation"&&console.error("Monaco initialization: error:",K)),()=>L.current?X():j.cancel()}),ze(()=>{var K,H,q,ue;let j=ir(D.current,e||r||"",t||i||"",o||n||"");j!==((K=L.current)==null?void 0:K.getModel())&&(c&&oo.set(M,(H=L.current)==null?void 0:H.saveViewState()),(q=L.current)==null||q.setModel(j),c&&((ue=L.current)==null||ue.restoreViewState(oo.get(o))))},[o],S),ze(()=>{var j;(j=L.current)==null||j.updateOptions(u)},[u],S),ze(()=>{!L.current||r===void 0||(L.current.getOption(D.current.editor.EditorOption.readOnly)?L.current.setValue(r):r!==L.current.getValue()&&(O.current=!0,L.current.executeEdits("",[{range:L.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),L.current.pushUndoStop(),O.current=!1))},[r],S),ze(()=>{var K,H;let j=(K=L.current)==null?void 0:K.getModel();j&&i&&((H=D.current)==null||H.editor.setModelLanguage(j,i))},[i],S),ze(()=>{var j;s!==void 0&&((j=L.current)==null||j.revealLine(s))},[s],S),ze(()=>{var j;(j=D.current)==null||j.editor.setTheme(a)},[a],S);let V=d.useCallback(()=>{var j;if(!(!E.current||!D.current)&&!F.current){_.current(D.current);let K=o||n,H=ir(D.current,r||e||"",t||i||"",K||"");L.current=(j=D.current)==null?void 0:j.editor.create(E.current,{model:H,automaticLayout:!0,...u},g),c&&L.current.restoreViewState(oo.get(K)),D.current.editor.setTheme(a),s!==void 0&&L.current.revealLine(s),R(!0),F.current=!0}},[e,t,n,r,i,o,u,g,c,a,s]);d.useEffect(()=>{S&&N.current(L.current,D.current)},[S]),d.useEffect(()=>{!P&&!S&&V()},[P,S,V]),A.current=r,d.useEffect(()=>{var j,K;S&&x&&((j=T.current)==null||j.dispose(),T.current=(K=L.current)==null?void 0:K.onDidChangeModelContent(H=>{O.current||x(L.current.getValue(),H)}))},[S,x]),d.useEffect(()=>{if(S){let j=D.current.editor.onDidChangeMarkers(K=>{var q;let H=(q=L.current.getModel())==null?void 0:q.uri;if(H&&K.find(ue=>ue.path===H.path)){let ue=D.current.editor.getModelMarkers({resource:H});k==null||k(ue)}});return()=>{j==null||j.dispose()}}return()=>{}},[S,k]);function X(){var j,K;(j=T.current)==null||j.dispose(),h?c&&oo.set(o,L.current.saveViewState()):(K=L.current.getModel())==null||K.dispose(),L.current.dispose()}return d.createElement(Mg,{width:f,height:p,isEditorReady:S,loading:l,_ref:E,className:m,wrapperProps:b})}var KC=jC,BC=d.memo(KC),HC=BC,VC=function(e){var t=e.queue,n=e.onDismiss,r=se.queue.addJob.useMutation({onSuccess:function(){mo.success("New job has been added")},onError:function(h){mo.error(h.message)}}),i=r.mutate,o=r.status,a=d.useState("{}"),s=a[0],l=a[1],u=d.useRef(null),g=function(){var h,f;(f=(h=u.current)===null||h===void 0?void 0:h.getAction("editor.action.formatDocument"))===null||f===void 0||f.run()},c=function(h){var f=String.fromCharCode(h.which).toLowerCase();(h.ctrlKey||h.metaKey)&&f==="s"&&(h.preventDefault(),g())};return y.jsx(f1,{isOpen:!0,onOpenChange:function(h){h||n()},children:y.jsx(ma,{isDismissable:!0,className:"fixed inset-0 bg-black/10",children:y.jsx(ga,{className:"fixed left-1/2 top-1/2 max-h-[85vh] w-full max-w-xl -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(h){var f=h.close;return y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full text-slate-500 transition duration-150 ease-in-out hover:bg-slate-50","aria-label":"Close",onClick:function(){f(),n()},children:y.jsx(Sl,{})}),y.jsx("div",{className:"flex items-center space-x-4",children:y.jsxs(pa,{className:"mb-1 text-xl font-semibold text-slate-900",children:["Add job to ",t.displayName.toLocaleLowerCase()]})}),y.jsx("div",{onKeyDown:c,onBlur:g,className:"mb-6 border border-slate-200",children:y.jsx(HC,{height:"300px",language:"json",className:"rounded-md",options:{minimap:{enabled:!1},formatOnPaste:!0,formatOnType:!0,padding:{top:8,bottom:8},tabSize:2},defaultValue:s,onChange:function(p){p&&l(p)},onMount:function(p,m){u.current=p,m.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{background:"ffffff",token:""},{foreground:"6a737d",token:"comment"},{foreground:"6a737d",token:"punctuation.definition.comment"},{foreground:"6a737d",token:"string.comment"},{foreground:"005cc5",token:"constant"},{foreground:"005cc5",token:"entity.name.constant"},{foreground:"005cc5",token:"variable.other.constant"},{foreground:"005cc5",token:"variable.language"},{foreground:"6f42c1",token:"entity"},{foreground:"6f42c1",token:"entity.name"},{foreground:"24292e",token:"variable.parameter.function"},{foreground:"22863a",token:"entity.name.tag"},{foreground:"d73a49",token:"keyword"},{foreground:"d73a49",token:"storage"},{foreground:"d73a49",token:"storage.type"},{foreground:"24292e",token:"storage.modifier.package"},{foreground:"24292e",token:"storage.modifier.import"},{foreground:"24292e",token:"storage.type.java"},{foreground:"032f62",token:"string"},{foreground:"032f62",token:"punctuation.definition.string"},{foreground:"032f62",token:"string punctuation.section.embedded source"},{foreground:"005cc5",token:"support"},{foreground:"005cc5",token:"meta.property-name"},{foreground:"e36209",token:"variable"},{foreground:"24292e",token:"variable.other"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.broken"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.deprecated"},{foreground:"fafbfc",background:"b31d28",fontStyle:"italic underline",token:"invalid.illegal"},{foreground:"fafbfc",background:"d73a49",fontStyle:"italic underline",token:"carriage-return"},{foreground:"b31d28",fontStyle:"bold italic underline",token:"invalid.unimplemented"},{foreground:"b31d28",token:"message.error"},{foreground:"24292e",token:"string source"},{foreground:"005cc5",token:"string variable"},{foreground:"032f62",token:"source.regexp"},{foreground:"032f62",token:"string.regexp"},{foreground:"032f62",token:"string.regexp.character-class"},{foreground:"032f62",token:"string.regexp constant.character.escape"},{foreground:"032f62",token:"string.regexp source.ruby.embedded"},{foreground:"032f62",token:"string.regexp string.regexp.arbitrary-repitition"},{foreground:"22863a",fontStyle:"bold",token:"string.regexp constant.character.escape"},{foreground:"005cc5",token:"support.constant"},{foreground:"005cc5",token:"support.variable"},{foreground:"005cc5",token:"meta.module-reference"},{foreground:"735c0f",token:"markup.list"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading"},{foreground:"005cc5",fontStyle:"bold",token:"markup.heading entity.name"},{foreground:"22863a",token:"markup.quote"},{foreground:"24292e",fontStyle:"italic",token:"markup.italic"},{foreground:"24292e",fontStyle:"bold",token:"markup.bold"},{foreground:"005cc5",token:"markup.raw"},{foreground:"b31d28",background:"ffeef0",token:"markup.deleted"},{foreground:"b31d28",background:"ffeef0",token:"meta.diff.header.from-file"},{foreground:"b31d28",background:"ffeef0",token:"punctuation.definition.deleted"},{foreground:"22863a",background:"f0fff4",token:"markup.inserted"},{foreground:"22863a",background:"f0fff4",token:"meta.diff.header.to-file"},{foreground:"22863a",background:"f0fff4",token:"punctuation.definition.inserted"},{foreground:"e36209",background:"ffebda",token:"markup.changed"},{foreground:"e36209",background:"ffebda",token:"punctuation.definition.changed"},{foreground:"f6f8fa",background:"005cc5",token:"markup.ignored"},{foreground:"f6f8fa",background:"005cc5",token:"markup.untracked"},{foreground:"6f42c1",fontStyle:"bold",token:"meta.diff.range"},{foreground:"005cc5",token:"meta.diff.header"},{foreground:"005cc5",fontStyle:"bold",token:"meta.separator"},{foreground:"005cc5",token:"meta.output"},{foreground:"586069",token:"brackethighlighter.tag"},{foreground:"586069",token:"brackethighlighter.curly"},{foreground:"586069",token:"brackethighlighter.round"},{foreground:"586069",token:"brackethighlighter.square"},{foreground:"586069",token:"brackethighlighter.angle"},{foreground:"586069",token:"brackethighlighter.quote"},{foreground:"b31d28",token:"brackethighlighter.unmatched"},{foreground:"b31d28",token:"sublimelinter.mark.error"},{foreground:"e36209",token:"sublimelinter.mark.warning"},{foreground:"959da5",token:"sublimelinter.gutter-mark"},{foreground:"032f62",fontStyle:"underline",token:"constant.other.reference.link"},{foreground:"032f62",fontStyle:"underline",token:"string.other.link"}],colors:{"editor.foreground":"#24292e","editor.background":"#ffffff","editor.selectionBackground":"#c8c8fa","editor.inactiveSelectionBackground":"#fafbfc","editor.lineHighlightBackground":"#fafbfc","editorCursor.foreground":"#24292e","editorWhitespace.foreground":"#959da5","editorIndentGuide.background":"#959da5","editorIndentGuide.activeBackground":"#24292e","editor.selectionHighlightBorder":"#fafbfc"}}),m.editor.setTheme("solarized-light")}})}),y.jsx("div",{children:y.jsx(hn,{label:"Add job",variant:"filled",disabled:o==="pending",onClick:function(){var p;if(u.current){(p=u.current.getAction("editor.action.formatDocument"))===null||p===void 0||p.run();try{var m=JSON.parse(u.current.getValue());i({queueName:t.name,data:m})}catch{mo.error("Invalid JSON")}}}})})]})}})})})},zC=function(e){var t=e.queue,n=se.queue.pause.useMutation().mutate,r=se.queue.resume.useMutation().mutate,i=se.queue.empty.useMutation().mutate,o=d.useState(!1),a=o[0],s=o[1],l={queueName:t.name};return y.jsxs(y.Fragment,{children:[y.jsx(ya,{actions:[{label:t.paused?"Resume":"Pause",onSelect:function(){t.paused?r(l):n(l)},icon:t.paused?y.jsx(Af,{}):y.jsx(Nf,{})},{label:"Add job",onSelect:function(){s(!0)},icon:y.jsx(Ov,{})},{label:"Empty",onSelect:function(){i(l)},icon:y.jsx(Ar,{})}]}),a?y.jsx(VC,{queue:t,onDismiss:function(){return s(!1)}}):null]})},Dg={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var n={949:(a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.CronParser=void 0;var u=l(515),g=function(){function c(h,f,p){f===void 0&&(f=!0),p===void 0&&(p=!1),this.expression=h,this.dayOfWeekStartIndexZero=f,this.monthStartIndexZero=p}return c.prototype.parse=function(){var h,f,p=(h=this.expression)!==null&&h!==void 0?h:"";if(p==="@reboot")return f=["@reboot","","","","","",""],f;if(p.startsWith("@")){var m=this.parseSpecial(this.expression);f=this.extractParts(m)}else f=this.extractParts(this.expression);return this.normalize(f),this.validate(f),f},c.prototype.parseSpecial=function(h){var f={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},p=f[h];if(!p)throw new Error("Unknown special expression.");return p},c.prototype.extractParts=function(h){if(!this.expression)throw new Error("cron expression is empty");for(var f=h.trim().split(/[ ]+/),p=0;p<f.length;p++)if(f[p].includes(",")){var m=f[p].split(",").map(function(v){return v.trim()}).filter(function(v){return v!==""}).map(function(v){return isNaN(Number(v))?v:Number(v)}).filter(function(v){return v!==null&&v!==""});m.length===0&&m.push("*"),m.sort(function(v,w){return v!==null&&w!==null?v-w:0}),f[p]=m.map(function(v){return v!==null?v.toString():""}).join(",")}if(f.length<5)throw new Error("Expression has only ".concat(f.length," part").concat(f.length==1?"":"s",". At least 5 parts are required."));if(f.length==5)f.unshift(""),f.push("");else if(f.length==6){var b=/\d{4}$/.test(f[5])||f[4]=="?"||f[2]=="?";b?f.unshift(""):f.push("")}else if(f.length>7)throw new Error("Expression has ".concat(f.length," parts; too many!"));return f},c.prototype.normalize=function(h){var f=this;if(h[3]=h[3].replace("?","*"),h[5]=h[5].replace("?","*"),h[2]=h[2].replace("?","*"),h[0].indexOf("0/")==0&&(h[0]=h[0].replace("0/","*/")),h[1].indexOf("0/")==0&&(h[1]=h[1].replace("0/","*/")),h[2].indexOf("0/")==0&&(h[2]=h[2].replace("0/","*/")),h[3].indexOf("1/")==0&&(h[3]=h[3].replace("1/","*/")),h[4].indexOf("1/")==0&&(h[4]=h[4].replace("1/","*/")),h[6].indexOf("1/")==0&&(h[6]=h[6].replace("1/","*/")),h[5]=h[5].replace(/(^\d)|([^#/\s]\d)/g,function(S){var R=S.replace(/\D/,""),P=R;return f.dayOfWeekStartIndexZero?R=="7"&&(P="0"):P=(parseInt(R)-1).toString(),S.replace(R,P)}),h[5]=="L"&&(h[5]="6"),h[3]=="?"&&(h[3]="*"),h[3].indexOf("W")>-1&&(h[3].indexOf(",")>-1||h[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var p={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var m in p)h[5]=h[5].replace(new RegExp(m,"gi"),p[m].toString());h[4]=h[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(S){var R=S.replace(/\D/,""),P=R;return f.monthStartIndexZero&&(P=(parseInt(R)+1).toString()),S.replace(R,P)});var b={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var v in b)h[4]=h[4].replace(new RegExp(v,"gi"),b[v].toString());h[0]=="0"&&(h[0]=""),!/\*|\-|\,|\//.test(h[2])&&(/\*|\//.test(h[1])||/\*|\//.test(h[0]))&&(h[2]+="-".concat(h[2]));for(var w=0;w<h.length;w++)if(h[w].indexOf(",")!=-1&&(h[w]=h[w].split(",").filter(function(S){return S!==""}).join(",")||"*"),h[w]=="*/1"&&(h[w]="*"),h[w].indexOf("/")>-1&&!/^\*|\-|\,/.test(h[w])){var x=null;switch(w){case 4:x="12";break;case 5:x="6";break;case 6:x="9999";break;default:x=null;break}if(x!==null){var k=h[w].split("/");h[w]="".concat(k[0],"-").concat(x,"/").concat(k[1])}}},c.prototype.validate=function(h){var f="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(h[0],f),this.validateOnlyExpectedCharactersFound(h[1],f),this.validateOnlyExpectedCharactersFound(h[2],f),this.validateOnlyExpectedCharactersFound(h[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(h[4],f),this.validateOnlyExpectedCharactersFound(h[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(h[6],f),this.validateAnyRanges(h)},c.prototype.validateAnyRanges=function(h){u.default.secondRange(h[0]),u.default.minuteRange(h[1]),u.default.hourRange(h[2]),u.default.dayOfMonthRange(h[3]),u.default.monthRange(h[4],this.monthStartIndexZero),u.default.dayOfWeekRange(h[5],this.dayOfWeekStartIndexZero)},c.prototype.validateOnlyExpectedCharactersFound=function(h,f){var p=h.match(new RegExp("[^".concat(f,"]+"),"gi"));if(p&&p.length)throw new Error("Expression contains invalid values: '".concat(p.toString(),"'"))},c}();s.CronParser=g},333:(a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.ExpressionDescriptor=void 0;var u=l(823),g=l(949),c=function(){function h(f,p){if(this.expression=f,this.options=p,this.expressionParts=new Array(5),!this.options.locale&&h.defaultLocale&&(this.options.locale=h.defaultLocale),!h.locales[this.options.locale]){var m=Object.keys(h.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(m,"'.")),this.options.locale=m}this.i18n=h.locales[this.options.locale],p.use24HourTimeFormat===void 0&&(p.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return h.toString=function(f,p){var m=p===void 0?{}:p,b=m.throwExceptionOnParseError,v=b===void 0?!0:b,w=m.verbose,x=w===void 0?!1:w,k=m.dayOfWeekStartIndexZero,S=k===void 0?!0:k,R=m.monthStartIndexZero,P=R===void 0?!1:R,I=m.use24HourTimeFormat,D=m.locale,L=D===void 0?null:D,E={throwExceptionOnParseError:v,verbose:x,dayOfWeekStartIndexZero:S,monthStartIndexZero:P,use24HourTimeFormat:I,locale:L};E.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var N=new h(f,E);return N.getFullDescription()},h.initialize=function(f,p){p===void 0&&(p="en"),h.specialCharacters=["/","-",",","*"],h.defaultLocale=p,f.load(h.locales)},h.prototype.getFullDescription=function(){var f,p,m="";try{var b=new g.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=b.parse(),this.expressionParts[0]==="@reboot")return((p=(f=this.i18n).atReboot)===null||p===void 0?void 0:p.call(f))||"Run once, at startup";var v=this.getTimeOfDayDescription(),w=this.getDayOfMonthDescription(),x=this.getMonthDescription(),k=this.getDayOfWeekDescription(),S=this.getYearDescription();m+=v+w+k+x+S,m=this.transformVerbosity(m,!!this.options.verbose),m=m.charAt(0).toLocaleUpperCase()+m.substr(1)}catch(R){if(!this.options.throwExceptionOnParseError)m=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(R)}return m},h.prototype.getTimeOfDayDescription=function(){var f=this.expressionParts[0],p=this.expressionParts[1],m=this.expressionParts[2],b="";if(!u.StringUtilities.containsAny(p,h.specialCharacters)&&!u.StringUtilities.containsAny(m,h.specialCharacters)&&!u.StringUtilities.containsAny(f,h.specialCharacters))b+=this.i18n.atSpace()+this.formatTime(m,p,f);else if(!f&&p.indexOf("-")>-1&&!(p.indexOf(",")>-1)&&!(p.indexOf("/")>-1)&&!u.StringUtilities.containsAny(m,h.specialCharacters)){var v=p.split("-");b+=u.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(m,v[0],""),this.formatTime(m,v[1],""))}else if(!f&&m.indexOf(",")>-1&&m.indexOf("-")==-1&&m.indexOf("/")==-1&&!u.StringUtilities.containsAny(p,h.specialCharacters)){var w=m.split(",");b+=this.i18n.at();for(var x=0;x<w.length;x++)b+=" ",b+=this.formatTime(w[x],p,""),x<w.length-2&&(b+=","),x==w.length-2&&(b+=this.i18n.spaceAnd())}else{var k=this.getSecondsDescription(),S=this.getMinutesDescription(),R=this.getHoursDescription();if(b+=k,b&&S&&(b+=", "),b+=S,S===R)return b;b&&R&&(b+=", "),b+=R}return b},h.prototype.getSecondsDescription=function(){var f=this,p=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(m){return m},function(m){return u.StringUtilities.format(f.i18n.everyX0Seconds(m),m)},function(m){return f.i18n.secondsX0ThroughX1PastTheMinute()},function(m){return m=="0"?"":parseInt(m)<20?f.i18n.atX0SecondsPastTheMinute(m):f.i18n.atX0SecondsPastTheMinuteGt20()||f.i18n.atX0SecondsPastTheMinute(m)});return p},h.prototype.getMinutesDescription=function(){var f=this,p=this.expressionParts[0],m=this.expressionParts[2],b=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(v){return v},function(v){return u.StringUtilities.format(f.i18n.everyX0Minutes(v),v)},function(v){return f.i18n.minutesX0ThroughX1PastTheHour()},function(v){try{return v=="0"&&m.indexOf("/")==-1&&p==""?f.i18n.everyHour():parseInt(v)<20?f.i18n.atX0MinutesPastTheHour(v):f.i18n.atX0MinutesPastTheHourGt20()||f.i18n.atX0MinutesPastTheHour(v)}catch{return f.i18n.atX0MinutesPastTheHour(v)}});return b},h.prototype.getHoursDescription=function(){var f=this,p=this.expressionParts[2],m=0,b=[];p.split("/")[0].split(",").forEach(function(x){var k=x.split("-");k.length===2&&b.push({value:k[1],index:m+1}),m+=k.length});var v=0,w=this.getSegmentDescription(p,this.i18n.everyHour(),function(x){var k=b.find(function(R){return R.value===x&&R.index===v}),S=k&&f.expressionParts[1]!=="0";return v++,S?f.formatTime(x,"59",""):f.formatTime(x,"0","")},function(x){return u.StringUtilities.format(f.i18n.everyX0Hours(x),x)},function(x){return f.i18n.betweenX0AndX1()},function(x){return f.i18n.atX0()});return w},h.prototype.getDayOfWeekDescription=function(){var f=this,p=this.i18n.daysOfTheWeek(),m=null;return this.expressionParts[5]=="*"?m="":m=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(b,v){var w=b;b.indexOf("#")>-1?w=b.substring(0,b.indexOf("#")):b.indexOf("L")>-1&&(w=w.replace("L",""));var x=parseInt(w),k=f.i18n.daysOfTheWeekInCase?f.i18n.daysOfTheWeekInCase(v)[x]:p[x];if(b.indexOf("#")>-1){var S=null,R=b.substring(b.indexOf("#")+1),P=b.substring(0,b.indexOf("#"));switch(R){case"1":S=f.i18n.first(P);break;case"2":S=f.i18n.second(P);break;case"3":S=f.i18n.third(P);break;case"4":S=f.i18n.fourth(P);break;case"5":S=f.i18n.fifth(P);break}k=S+" "+k}return k},function(b){return parseInt(b)==1?"":u.StringUtilities.format(f.i18n.commaEveryX0DaysOfTheWeek(b),b)},function(b){var v=b.substring(0,b.indexOf("-")),w=f.expressionParts[3]!="*";return w?f.i18n.commaAndX0ThroughX1(v):f.i18n.commaX0ThroughX1(v)},function(b){var v=null;if(b.indexOf("#")>-1){var w=b.substring(b.indexOf("#")+1),x=b.substring(0,b.indexOf("#"));v=f.i18n.commaOnThe(w,x).trim()+f.i18n.spaceX0OfTheMonth()}else if(b.indexOf("L")>-1)v=f.i18n.commaOnTheLastX0OfTheMonth(b.replace("L",""));else{var k=f.expressionParts[3]!="*";v=k?f.i18n.commaAndOnX0():f.i18n.commaOnlyOnX0(b)}return v}),m},h.prototype.getMonthDescription=function(){var f=this,p=this.i18n.monthsOfTheYear(),m=this.getSegmentDescription(this.expressionParts[4],"",function(b,v){return v&&f.i18n.monthsOfTheYearInCase?f.i18n.monthsOfTheYearInCase(v)[parseInt(b)-1]:p[parseInt(b)-1]},function(b){return parseInt(b)==1?"":u.StringUtilities.format(f.i18n.commaEveryX0Months(b),b)},function(b){return f.i18n.commaMonthX0ThroughMonthX1()||f.i18n.commaX0ThroughX1()},function(b){return f.i18n.commaOnlyInMonthX0?f.i18n.commaOnlyInMonthX0():f.i18n.commaOnlyInX0()});return m},h.prototype.getDayOfMonthDescription=function(){var f=this,p=null,m=this.expressionParts[3];switch(m){case"L":p=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":p=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var b=m.match(/(\d{1,2}W)|(W\d{1,2})/);if(b){var v=parseInt(b[0].replace("W","")),w=v==1?this.i18n.firstWeekday():u.StringUtilities.format(this.i18n.weekdayNearestDayX0(),v.toString());p=u.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),w);break}else{var x=m.match(/L-(\d{1,2})/);if(x){var k=x[1];p=u.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(k),k);break}else{if(m=="*"&&this.expressionParts[5]!="*")return"";p=this.getSegmentDescription(m,this.i18n.commaEveryDay(),function(S){return S=="L"?f.i18n.lastDay():f.i18n.dayX0?u.StringUtilities.format(f.i18n.dayX0(),S):S},function(S){return S=="1"?f.i18n.commaEveryDay():f.i18n.commaEveryX0Days(S)},function(S){return f.i18n.commaBetweenDayX0AndX1OfTheMonth(S)},function(S){return f.i18n.commaOnDayX0OfTheMonth(S)})}break}}return p},h.prototype.getYearDescription=function(){var f=this,p=this.getSegmentDescription(this.expressionParts[6],"",function(m){return/^\d+$/.test(m)?new Date(parseInt(m),1).getFullYear().toString():m},function(m){return u.StringUtilities.format(f.i18n.commaEveryX0Years(m),m)},function(m){return f.i18n.commaYearX0ThroughYearX1()||f.i18n.commaX0ThroughX1()},function(m){return f.i18n.commaOnlyInYearX0?f.i18n.commaOnlyInYearX0():f.i18n.commaOnlyInX0()});return p},h.prototype.getSegmentDescription=function(f,p,m,b,v,w){var x=null,k=f.indexOf("/")>-1,S=f.indexOf("-")>-1,R=f.indexOf(",")>-1;if(!f)x="";else if(f==="*")x=p;else if(!k&&!S&&!R)x=u.StringUtilities.format(w(f),m(f));else if(R){for(var P=f.split(","),I="",D=0;D<P.length;D++)if(D>0&&P.length>2&&(I+=",",D<P.length-1&&(I+=" ")),D>0&&P.length>1&&(D==P.length-1||P.length==2)&&(I+="".concat(this.i18n.spaceAnd()," ")),P[D].indexOf("/")>-1||P[D].indexOf("-")>-1){var L=P[D].indexOf("-")>-1&&P[D].indexOf("/")==-1,E=this.getSegmentDescription(P[D],p,m,b,L?this.i18n.commaX0ThroughX1:v,w);L&&(E=E.replace(", ","")),I+=E}else k?I+=this.getSegmentDescription(P[D],p,m,b,v,w):I+=m(P[D]);k?x=I:x=u.StringUtilities.format(w(f),I)}else if(k){var P=f.split("/");if(x=u.StringUtilities.format(b(P[1]),P[1]),P[0].indexOf("-")>-1){var N=this.generateRangeSegmentDescription(P[0],v,m);N.indexOf(", ")!=0&&(x+=", "),x+=N}else if(P[0].indexOf("*")==-1){var _=u.StringUtilities.format(w(P[0]),m(P[0]));_=_.replace(", ",""),x+=u.StringUtilities.format(this.i18n.commaStartingX0(),_)}}else S&&(x=this.generateRangeSegmentDescription(f,v,m));return x},h.prototype.generateRangeSegmentDescription=function(f,p,m){var b="",v=f.split("-"),w=m(v[0],1),x=m(v[1],2),k=p(f);return b+=u.StringUtilities.format(k,w,x),b},h.prototype.formatTime=function(f,p,m){var b=0,v=0,w=parseInt(f)+b,x=parseInt(p)+v;x>=60?(x-=60,w+=1):x<0&&(x+=60,w-=1),w>=24?w=w-24:w<0&&(w=24+w);var k="",S=!1;this.options.use24HourTimeFormat||(S=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),k=S?"".concat(this.getPeriod(w)," "):" ".concat(this.getPeriod(w)),w>12&&(w-=12),w===0&&(w=12));var R="";return m&&(R=":".concat(("00"+m).substring(m.length))),"".concat(S?k:"").concat(("00"+w.toString()).substring(w.toString().length),":").concat(("00"+x.toString()).substring(x.toString().length)).concat(R).concat(S?"":k)},h.prototype.transformVerbosity=function(f,p){if(!p&&(f=f.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),f=f.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),f=f.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),f=f.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var m=0,b=Object.entries(this.i18n.conciseVerbosityReplacements());m<b.length;m++){var v=b[m],w=v[0],x=v[1];f=f.replace(new RegExp(w,"g"),x)}return f},h.prototype.getPeriod=function(f){return f>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},h.locales={},h}();s.ExpressionDescriptor=c},747:(a,s,l)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.enLocaleLoader=void 0;var u=l(486),g=function(){function c(){}return c.prototype.load=function(h){h.en=new u.en},c}();s.enLocaleLoader=g},486:(a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.en=void 0;var l=function(){function u(){}return u.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},u.prototype.atX0MinutesPastTheHourGt20=function(){return null},u.prototype.commaMonthX0ThroughMonthX1=function(){return null},u.prototype.commaYearX0ThroughYearX1=function(){return null},u.prototype.use24HourTimeFormatByDefault=function(){return!1},u.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},u.prototype.everyMinute=function(){return"every minute"},u.prototype.everyHour=function(){return"every hour"},u.prototype.atSpace=function(){return"At "},u.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},u.prototype.at=function(){return"At"},u.prototype.spaceAnd=function(){return" and"},u.prototype.everySecond=function(){return"every second"},u.prototype.everyX0Seconds=function(){return"every %s seconds"},u.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},u.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},u.prototype.everyX0Minutes=function(){return"every %s minutes"},u.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},u.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},u.prototype.everyX0Hours=function(){return"every %s hours"},u.prototype.betweenX0AndX1=function(){return"between %s and %s"},u.prototype.atX0=function(){return"at %s"},u.prototype.commaEveryDay=function(){return", every day"},u.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},u.prototype.commaX0ThroughX1=function(){return", %s through %s"},u.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},u.prototype.first=function(){return"first"},u.prototype.second=function(){return"second"},u.prototype.third=function(){return"third"},u.prototype.fourth=function(){return"fourth"},u.prototype.fifth=function(){return"fifth"},u.prototype.commaOnThe=function(){return", on the "},u.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},u.prototype.lastDay=function(){return"the last day"},u.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},u.prototype.commaOnlyOnX0=function(){return", only on %s"},u.prototype.commaAndOnX0=function(){return", and on %s"},u.prototype.commaEveryX0Months=function(){return", every %s months"},u.prototype.commaOnlyInX0=function(){return", only in %s"},u.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},u.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},u.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},u.prototype.firstWeekday=function(){return"first weekday"},u.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},u.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},u.prototype.commaEveryX0Days=function(){return", every %s days"},u.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},u.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},u.prototype.commaEveryHour=function(){return", every hour"},u.prototype.commaEveryX0Years=function(){return", every %s years"},u.prototype.commaStartingX0=function(){return", starting %s"},u.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},u.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},u.prototype.atReboot=function(){return"Run once, at startup"},u}();s.en=l},515:(a,s)=>{Object.defineProperty(s,"__esModule",{value:!0});function l(g,c){if(!g)throw new Error(c)}var u=function(){function g(){}return g.secondRange=function(c){for(var h=c.split(","),f=0;f<h.length;f++)if(!isNaN(parseInt(h[f],10))){var p=parseInt(h[f],10);l(p>=0&&p<=59,"seconds part must be >= 0 and <= 59")}},g.minuteRange=function(c){for(var h=c.split(","),f=0;f<h.length;f++)if(!isNaN(parseInt(h[f],10))){var p=parseInt(h[f],10);l(p>=0&&p<=59,"minutes part must be >= 0 and <= 59")}},g.hourRange=function(c){for(var h=c.split(","),f=0;f<h.length;f++)if(!isNaN(parseInt(h[f],10))){var p=parseInt(h[f],10);l(p>=0&&p<=23,"hours part must be >= 0 and <= 23")}},g.dayOfMonthRange=function(c){for(var h=c.split(","),f=0;f<h.length;f++)if(!isNaN(parseInt(h[f],10))){var p=parseInt(h[f],10);l(p>=1&&p<=31,"DOM part must be >= 1 and <= 31")}},g.monthRange=function(c,h){for(var f=c.split(","),p=0;p<f.length;p++)if(!isNaN(parseInt(f[p],10))){var m=parseInt(f[p],10);l(m>=1&&m<=12,h?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},g.dayOfWeekRange=function(c,h){for(var f=c.split(","),p=0;p<f.length;p++)if(!isNaN(parseInt(f[p],10))){var m=parseInt(f[p],10);l(m>=0&&m<=6,h?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},g}();s.default=u},823:(a,s)=>{Object.defineProperty(s,"__esModule",{value:!0}),s.StringUtilities=void 0;var l=function(){function u(){}return u.format=function(g){for(var c=[],h=1;h<arguments.length;h++)c[h-1]=arguments[h];return g.replace(/%s/g,function(f){return c.shift()})},u.containsAny=function(g,c){return c.some(function(h){return g.indexOf(h)>-1})},u}();s.StringUtilities=l}},r={};function i(a){var s=r[a];if(s!==void 0)return s.exports;var l=r[a]={exports:{}};return n[a](l,l.exports,i),l.exports}var o={};return(()=>{var a=o;Object.defineProperty(a,"__esModule",{value:!0}),a.toString=void 0;var s=i(333),l=i(747);s.ExpressionDescriptor.initialize(new l.enLocaleLoader),a.default=s.ExpressionDescriptor;var u=s.ExpressionDescriptor.toString;a.toString=u})(),o})())})(Dg);var UC=Dg.exports;const WC=Id(UC);var qC=function(e){var t=e.scheduler,n=e.queueName,r=e.onRemove,i=se.scheduler.remove.useMutation(),o=i.mutate,a=i.isSuccess;return d.useEffect(function(){a&&(r==null||r())},[a,r]),y.jsx(ya,{actions:[{label:"Remove",onSelect:function(){o({queueName:n,jobSchedulerId:t.key})},icon:y.jsx(Ar,{})}]})},GC=function(e){var t=e.scheduler,n=e.queueName,r=e.onDismiss,i=t.template,o=ui({},t);return delete o.template,y.jsx(ma,{isOpen:!0,isDismissable:!0,onOpenChange:function(a){a||r()},className:"fixed inset-0 bg-black/10",children:y.jsx(ga,{className:"fixed left-1/2 top-1/2 max-h-[85vh] w-full max-w-xl -translate-x-1/2 -translate-y-1/2 overflow-y-scroll rounded-lg bg-white p-4 shadow-xl",children:function(a){var s=a.close;return y.jsxs(y.Fragment,{children:[y.jsx("button",{className:"absolute right-2 top-2 flex size-7 items-center justify-center rounded-full text-slate-500 transition duration-150 ease-in-out hover:bg-slate-50","aria-label":"Close",onClick:function(){r(),s()},children:y.jsx(Sl,{})}),y.jsxs("div",{className:"flex items-center space-x-4",children:[y.jsxs(pa,{className:"mb-1 flex items-center space-x-2",children:[y.jsx("span",{className:"text-xl font-semibold text-slate-900",children:t.name}),y.jsxs("span",{className:"rounded-md text-slate-500",children:["#",t.id]})]}),y.jsx(qC,{queueName:n,scheduler:t,onRemove:r})]}),y.jsxs("div",{children:[y.jsxs("div",{className:"space-y-2 border-b border-b-slate-200 py-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Options"}),y.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:y.jsx(Go,{data:o,theme:"monokai"})})]}),y.jsxs("div",{className:"space-y-2 pt-4",children:[y.jsx("p",{className:"text-xs font-semibold uppercase text-slate-600",children:"Template"}),y.jsx("div",{className:"data-json-renderer [&>ul]:max-h-[400px]",children:y.jsx(Go,{data:i,theme:"monokai"})})]})]})]})}})})},ao=m1();function QC(e,t){t===void 0&&(t=new Date);var n=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"short"}),r=n.formatToParts(t),i=r.find(function(o){return o.type==="timeZoneName"});return(i==null?void 0:i.value)||""}var YC=[ao.display({id:"select",header:function(e){var t=e.table;return y.jsx(Ko,{checked:t.getIsSomeRowsSelected()?"indeterminate":t.getIsAllRowsSelected(),onCheckedChange:function(){t.toggleAllRowsSelected()}})},cell:function(e){var t=e.row,n=e.table;return y.jsx(Ko,{className:n.getIsSomeRowsSelected()||n.getIsAllRowsSelected()?"":"opacity-0 transition group-hover:opacity-100",checked:t.getIsSomeSelected()?"indeterminate":t.getIsSelected(),onCheckedChange:t.getToggleSelectedHandler()})}}),ao.accessor("name",{cell:function(e){return y.jsx("div",{className:"flex w-full items-center space-x-2",children:y.jsx("span",{className:"max-w-fit grow basis-full truncate text-slate-900 dark:text-slate-200",children:e.cell.row.original.name})})},header:"Scheduler"}),ao.accessor("pattern",{cell:function(e){return y.jsxs("span",{className:"grow basis-full truncate text-slate-900 dark:text-slate-200",children:[e.cell.row.original.pattern?WC.toString(e.cell.row.original.pattern,{verbose:!0}):e.cell.row.original.every?"Every ".concat(e.cell.row.original.every):""," ",e.cell.row.original.tz?"(".concat(QC(e.cell.row.original.tz),")"):""]})},header:"Pattern"}),ao.accessor("next",{cell:function(e){return e.cell.row.original.next?y.jsx(Xl,{message:F1(new Date(e.cell.row.original.next),"dd MMM yyyy HH:mm:ss zzz"),children:y.jsx("div",{className:"flex items-center space-x-1.5",children:y.jsxs("p",{className:"text-slate-900 dark:text-slate-200",children:["In ",L1(new Date(e.cell.row.original.next))," ",y.jsxs("span",{className:"text-sm text-slate-700",children:["(",e.cell.row.original.iterationCount," run",e.cell.row.original.iterationCount===1?"":"s"," total)"]})]})})}):y.jsx("p",{className:"text-slate-900 dark:text-slate-200",children:"No next run"})},header:"Next Run"})],XC=function(e){var t=e.queueName,n=d.useState({}),r=n[0],i=n[1],o=se.scheduler.list.useQuery({queueName:t}),a=o.data,s=o.isLoading,l=(a==null?void 0:a.length)===0,u=R1({data:a||[],columns:YC,getCoreRowModel:P1(),state:{rowSelection:r},onRowSelectionChange:i}),g=d.useState(null),c=g[0],h=g[1],f=se.scheduler.bulkRemove.useMutation().mutate;return!s&&l?null:y.jsxs("div",{children:[c?y.jsx(GC,{scheduler:c,queueName:t,onDismiss:function(){return h(null)}}):null,y.jsx("div",{className:"rounded-md border border-slate-200 shadow-sm dark:border-slate-700",children:s?y.jsx(N1,{}):y.jsxs("div",{children:[u.getHeaderGroups().map(function(p,m){return y.jsx("div",{className:"sticky top-0 grid grid-cols-[auto,350px,1fr,1fr] rounded-t-md border-b border-slate-200 bg-slate-100/50 p-2 backdrop-blur-md dark:border-slate-700 dark:bg-slate-900/50",children:p.headers.map(function(b){return y.jsx("div",{className:"flex h-full items-center text-sm font-semibold text-slate-700 dark:text-slate-300 ".concat(m!==0?"pr-10":"pr-3"),children:b.isPlaceholder?null:No(b.column.columnDef.header,b.getContext())},b.id)})},p.id)}),u.getRowModel().rows.map(function(p,m){return y.jsx(I1,{isLastRow:u.getRowModel().rows.length!==m+1,isSelected:p.getIsSelected(),onClick:function(){return h(p.original)},layoutVariant:"scheduler",children:p.getVisibleCells().map(function(b,v){return y.jsx("div",{className:"flex h-full items-center ".concat(v!==0?"pr-10":"pr-3"),children:No(b.column.columnDef.cell,b.getContext())},b.id)})},p.id)})]})}),u.getSelectedRowModel().rows.length>0?y.jsx("div",{className:"pointer-events-none sticky bottom-0 flex w-full items-center justify-center pb-5",children:y.jsxs("div",{className:"pointer-events-auto flex items-center space-x-3 rounded-lg border-slate-100 bg-white/90 px-3 py-2 text-sm shadow-lg backdrop-blur",children:[y.jsxs("p",{children:[u.getSelectedRowModel().rows.length," selected"]}),y.jsx(hn,{label:"Delete",colorScheme:"red",icon:y.jsx(Ar,{}),size:"sm",onClick:function(){f({queueName:t,jobSchedulerIds:u.getSelectedRowModel().rows.map(function(p){return p.original.key})}),u.resetRowSelection()}})]})}):null]})},is=new Intl.NumberFormat("en-US").format,ZC=function(){var e,t,n,r,i=eb().id,o=i,a=zb()[0],s=d.useState("completed"),l=s[0],u=s[1],g=se.job.list.useInfiniteQuery({queueName:o,limit:nl,status:l},{getNextPageParam:function(x){return x.nextCursor},enabled:!!o,refetchInterval:rl,retry:il}),c=g.data,h=g.fetchNextPage,f=g.isLoading,p=g.isError,m=g.isFetchingNextPage,b=g.hasNextPage;d.useEffect(function(){var x=a.get("status");x&&u(x),!x&&l&&u("completed")},[a,l]);var v=se.queue.byName.useQuery({queueName:o},{enabled:!!o,refetchInterval:rl,retry:il}),w=(e=c==null?void 0:c.pages.map(function(x){return x.jobs}).flat())!==null&&e!==void 0?e:[];return y.jsx(p1,{children:v.data===null?y.jsx(Qs,{message:"No queue found"}):p?y.jsx(Qs,{message:"Could not fetch jobs"}):y.jsxs("div",{children:[y.jsx("div",{className:"mb-2 flex justify-between",children:y.jsxs("div",{className:"flex items-center space-x-4",children:[y.jsx("h1",{className:"text-2xl font-bold text-slate-900 dark:text-slate-50",children:v.data?v.data.displayName:y.jsx(So,{className:"h-8 w-52 rounded-md"})}),y.jsxs("div",{className:"flex items-center space-x-2",children:[v.data?y.jsx(zC,{queue:v.data}):null,!((t=v.data)===null||t===void 0)&&t.paused?y.jsx("div",{className:"flex h-7 cursor-default items-center justify-center space-x-1.5 rounded-md bg-yellow-50 px-2 text-sm font-medium text-yellow-900 transition duration-150 ease-in-out",children:y.jsx("span",{children:"Paused"})}):null]})]})}),y.jsx("div",{className:"mb-5",children:y.jsx("div",{className:"flex items-center space-x-2",children:v.data?y.jsxs(y.Fragment,{children:[y.jsxs("p",{className:"text-slate-600",children:[y.jsxs("span",{className:"text-green-800",children:[is(v.data.client.connectedClients)," ","connected"]})," ","and"," ",y.jsxs("span",{className:"text-red-800",children:[is(v.data.client.blockedClients)," ","blocked"]})," ","out of"," ",y.jsxs("span",{className:"text-slate-900",children:[is(v.data.client.maxClients)," max clients"]})]}),y.jsx("p",{className:"text-slate-600",children:"·"}),y.jsxs("p",{className:"text-slate-600",children:[v.data.client.usedMemoryHuman," /"," ",v.data.client.totalMemoryHuman," (",(v.data.client.usedMemoryPercentage*100).toFixed(2),"%)"]}),y.jsx("p",{className:"text-slate-600",children:"·"}),y.jsxs("p",{className:"text-slate-600",children:["Redis v",v.data.client.version]})]}):y.jsx(So,{className:"h-6 w-80"})})}),y.jsxs("div",{className:"space-y-8",children:[((n=v.data)===null||n===void 0?void 0:n.type)==="bullmq"?y.jsx(XC,{queueName:o}):null,y.jsxs("div",{className:"space-y-4",children:[y.jsx(Nx,{showCleanAllButton:w.length>0,queueName:o,status:l,queue:v.data}),y.jsx(sx,{onBottomInView:function(){m||!b||h()},status:l,totalJobs:((r=c==null?void 0:c.pages.at(-1))===null||r===void 0?void 0:r.totalCount)||0,jobs:w.map(function(x){return ui(ui({},x),{status:l})}),isLoading:f,isFetchingNextPage:m,queueName:o})]})]})]})})},so=function(e){var t=e.count,n=e.variant,r={active:"text-cyan-600",completed:"text-green-600",failed:"text-red-600",waiting:"text-amber-600"},i={active:y.jsx(_f,{width:16,height:16}),completed:y.jsx(Lf,{width:16,height:16}),failed:y.jsx(If,{width:16,height:16}),waiting:y.jsx($v,{width:16,height:16})};return y.jsx("div",{children:y.jsx(Xl,{message:n.charAt(0).toUpperCase()+n.slice(1),children:y.jsxs("div",{className:"flex items-center space-x-1 text-sm ".concat(r[n]),children:[y.jsx("p",{className:"text-lg",children:t}),i[n]]})})})},JC=function(e){var t=e.queueName,n=se.queue.byName.useQuery({queueName:t},{refetchInterval:rl,retry:il});return n.data?y.jsxs(ra,{to:"../".concat(n.data.name),className:"group flex items-center justify-between transition",children:[y.jsxs("div",{className:"flex items-center space-x-2",children:[y.jsx("p",{className:"py-3 text-lg font-medium text-slate-900 transition group-hover:text-brand-900 dark:text-slate-200 dark:group-hover:text-brand-100",children:n.data.displayName}),y.jsx("div",{children:n.data.paused?y.jsx("div",{className:"flex h-7 items-center justify-center space-x-1.5 rounded-md bg-yellow-50 px-2 text-sm font-medium text-yellow-900 transition duration-150 ease-in-out",children:y.jsx("span",{children:"Paused"})}):null})]}),y.jsxs("div",{className:"flex space-x-5",children:[y.jsx(so,{count:n.data.counts.completed,variant:"completed"}),y.jsx(so,{count:n.data.counts.failed,variant:"failed"}),y.jsx(so,{count:n.data.counts.active,variant:"active"}),y.jsx(so,{count:n.data.counts.waiting,variant:"waiting"})]})]}):null},eS=function(){var e=se.queue.list.useQuery().data,t=se.queue.pauseAll.useMutation().mutate,n=se.queue.resumeAll.useMutation().mutate;return y.jsx(p1,{children:y.jsxs("div",{className:"xl:max-w-2xl",children:[y.jsxs("div",{className:"flex justify-between",children:[y.jsx("h1",{className:"mb-6 text-2xl font-bold text-slate-900 dark:text-slate-50",children:"Queues"}),y.jsx("div",{children:y.jsx(ya,{actions:[{label:"Resume all",icon:y.jsx(Af,{}),onSelect:function(){return n()}},{label:"Pause all",icon:y.jsx(Nf,{}),onSelect:function(){return t()}}]})})]}),y.jsx("div",{children:e==null?void 0:e.map(function(r,i){return y.jsx("div",{className:(e==null?void 0:e.length)-1!==i?"border-b border-slate-100 dark:border-slate-700":"",children:y.jsx(JC,{queueName:r.name},r.name)},r.name)})})]})})},tS=function(e){var t=e.apiUrl,n=e.basename,r=d.useState(!1),i=r[0],o=r[1],a=d.useState(function(){return new sp})[0],s=d.useState(function(){return se.createClient({links:[Yp({url:t})]})})[0];return d.useEffect(function(){var l=JSON.parse(localStorage.getItem("user-preferences")||"null");l?l.theme==="dark"||l.theme==="system"&&window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"):window.matchMedia("(prefers-color-scheme: dark)").matches?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),o(!0)},[]),i?y.jsx(se.Provider,{client:s,queryClient:a,children:y.jsxs(hp,{client:a,children:[y.jsx(Ix,{}),y.jsx(Kb,{basename:n,children:y.jsxs(pb,{children:[y.jsx(Rs,{path:"/",element:y.jsx(eS,{})}),y.jsx(Rs,{path:"/:id",element:y.jsx(ZC,{})})]})})]})}):null};exports.QueueDashApp=tS;