@hot-updater/console 0.18.4 → 0.19.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.
- package/dist/assets/index-9iY4CVPq.css +1 -0
- package/dist/assets/index-B7wIrWdR.js +27 -0
- package/dist/index.cjs +18 -1
- package/dist/index.d.cts +34 -0
- package/dist/index.d.ts +34 -0
- package/dist/index.html +2 -2
- package/dist/index.js +18 -1
- package/package.json +8 -8
- package/dist/assets/index-BFsYBw_S.js +0 -27
- package/dist/assets/index-Q65436jZ.css +0 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var If=Object.defineProperty;var La=e=>{throw TypeError(e)};var $f=(e,t,n)=>t in e?If(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Re=(e,t,n)=>$f(e,typeof t!="symbol"?t+"":t,n),Vo=(e,t,n)=>t.has(e)||La("Cannot "+n);var R=(e,t,n)=>(Vo(e,t,"read from private field"),n?n.call(e):t.get(e)),Z=(e,t,n)=>t.has(e)?La("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),q=(e,t,n,r)=>(Vo(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),fe=(e,t,n)=>(Vo(e,t,"access private method"),n);var Br=(e,t,n,r)=>({set _(o){q(e,t,o,n)},get _(){return R(e,t,r)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const s of i.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();const te={context:void 0,registry:void 0,effects:void 0,done:!1,getContextId(){return ka(this.context.count)},getNextContextId(){return ka(this.context.count++)}};function ka(e){const t=String(e),n=t.length-1;return te.context.id+(n?String.fromCharCode(96+n):"")+t}function fr(e){te.context=e}const Mf=(e,t)=>e===t,st=Symbol("solid-proxy"),zu=typeof Proxy=="function",Pi=Symbol("solid-track"),so={equals:Mf};let Bu=qu;const at=1,wr=2,Hu={owned:null,cleanups:null,context:null,owner:null},No={};var ue=null;let G=null,Ff=null,ge=null,ke=null,_e=null,po=0;function dn(e,t){const n=ge,r=ue,o=e.length===0,i=t===void 0?r:t,s=o?Hu:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>Me(()=>Ut(s)));ue=s,ge=null;try{return Ue(a,!0)}finally{ge=n,ue=r}}function j(e,t){t=t?Object.assign({},so,t):so;const n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(G&&G.running&&G.sources.has(n)?o=o(n.tValue):o=o(n.value)),Uu(n,o));return[Gu.bind(n),r]}function Ft(e,t,n){const r=yo(e,t,!0,at);Xn(r)}function je(e,t,n){const r=yo(e,t,!1,at);Xn(r)}function H(e,t,n){Bu=kf;const r=yo(e,t,!1,at),o=fn&&ye(fn);o&&(r.suspense=o),(!n||!n.render)&&(r.user=!0),_e?_e.push(r):Xn(r)}function k(e,t,n){n=n?Object.assign({},so,n):so;const r=yo(e,t,!0,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Xn(r),Gu.bind(r)}function Of(e){return e&&typeof e=="object"&&"then"in e}function Af(e,t,n){let r,o,i;arguments.length===2&&typeof t=="object"||arguments.length===1?(r=!0,o=e,i=t||{}):(r=e,o=t,i={});let s=null,a=No,l=null,c=!1,u=!1,d="initialValue"in i,f=typeof r=="function"&&k(r);const h=new Set,[p,g]=(i.storage||j)(i.initialValue),[v,m]=j(void 0),[y,w]=j(void 0,{equals:!1}),[S,C]=j(d?"ready":"unresolved");te.context&&(l=te.getNextContextId(),i.ssrLoadFrom==="initial"?a=i.initialValue:te.load&&te.has(l)&&(a=te.load(l)));function $(K,N,z,re){return s===K&&(s=null,re!==void 0&&(d=!0),(K===a||N===a)&&i.onHydrated&&queueMicrotask(()=>i.onHydrated(re,{value:N})),a=No,G&&K&&c?(G.promises.delete(K),c=!1,Ue(()=>{G.running=!0,A(N,z)},!1)):A(N,z)),N}function A(K,N){Ue(()=>{N===void 0&&g(()=>K),C(N!==void 0?"errored":d?"ready":"unresolved"),m(N);for(const z of h.keys())z.decrement();h.clear()},!1)}function _(){const K=fn&&ye(fn),N=p(),z=v();if(z!==void 0&&!s)throw z;return ge&&!ge.user&&K&&Ft(()=>{y(),s&&(K.resolved&&G&&c?G.promises.add(s):h.has(K)||(K.increment(),h.add(K)))}),N}function T(K=!0){if(K!==!1&&u)return;u=!1;const N=f?f():r;if(c=G&&G.running,N==null||N===!1){$(s,Me(p));return}G&&s&&G.promises.delete(s);const z=a!==No?a:Me(()=>o(N,{value:p(),refetching:K}));return Of(z)?(s=z,"value"in z?(z.status==="success"?$(s,z.value,void 0,N):$(s,void 0,$i(z.value),N),z):(u=!0,queueMicrotask(()=>u=!1),Ue(()=>{C(d?"refreshing":"pending"),w()},!1),z.then(re=>$(z,re,void 0,N),re=>$(z,void 0,$i(re),N)))):($(s,z,void 0,N),z)}return Object.defineProperties(_,{state:{get:()=>S()},error:{get:()=>v()},loading:{get(){const K=S();return K==="pending"||K==="refreshing"}},latest:{get(){if(!d)return _();const K=v();if(K&&!s)throw K;return p()}}}),f?Ft(()=>T(!1)):T(!1),[_,{refetch:T,mutate:g}]}function mo(e){return Ue(e,!1)}function Me(e){if(ge===null)return e();const t=ge;ge=null;try{return e()}finally{ge=t}}function Ce(e,t,n){const r=Array.isArray(e);let o,i=n&&n.defer;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]()}else a=e();if(i)return i=!1,s;const l=Me(()=>t(a,o,s));return o=a,l}}function Wn(e){H(()=>Me(e))}function W(e){return ue===null||(ue.cleanups===null?ue.cleanups=[e]:ue.cleanups.push(e)),e}function Ii(){return ge}function br(){return ue}function ps(e,t){const n=ue,r=ge;ue=e,ge=null;try{return Ue(t,!0)}catch(o){ms(o)}finally{ue=n,ge=r}}function Tf(e){if(G&&G.running)return e(),G.done;const t=ge,n=ue;return Promise.resolve().then(()=>{ge=t,ue=n;let r;return fn&&(r=G||(G={sources:new Set,effects:[],promises:new Set,disposed:new Set,queue:new Set,running:!0}),r.done||(r.done=new Promise(o=>r.resolve=o)),r.running=!0),Ue(e,!1),ge=ue=null,r?r.done:void 0})}const[J0,Va]=j(!1);function Df(e){_e.push.apply(_e,e),e.length=0}function we(e,t){const n=Symbol("context");return{id:n,Provider:Vf(n),defaultValue:e}}function ye(e){let t;return ue&&ue.context&&(t=ue.context[e.id])!==void 0?t:e.defaultValue}function vo(e){const t=k(e),n=k(()=>Mi(t()));return n.toArray=()=>{const r=n();return Array.isArray(r)?r:r!=null?[r]:[]},n}let fn;function _f(){return fn||(fn=we())}function Gu(){const e=G&&G.running;if(this.sources&&(e?this.tState:this.state))if((e?this.tState:this.state)===at)Xn(this);else{const t=ke;ke=null,Ue(()=>lo(this),!1),ke=t}if(ge){const t=this.observers?this.observers.length:0;ge.sources?(ge.sources.push(this),ge.sourceSlots.push(t)):(ge.sources=[this],ge.sourceSlots=[t]),this.observers?(this.observers.push(ge),this.observerSlots.push(ge.sources.length-1)):(this.observers=[ge],this.observerSlots=[ge.sources.length-1])}return e&&G.sources.has(this)?this.tValue:this.value}function Uu(e,t,n){let r=G&&G.running&&G.sources.has(e)?e.tValue:e.value;if(!e.comparator||!e.comparator(r,t)){if(G){const o=G.running;(o||!n&&G.sources.has(e))&&(G.sources.add(e),e.tValue=t),o||(e.value=t)}else e.value=t;e.observers&&e.observers.length&&Ue(()=>{for(let o=0;o<e.observers.length;o+=1){const i=e.observers[o],s=G&&G.running;s&&G.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?ke.push(i):_e.push(i),i.observers&&Wu(i)),s?i.tState=at:i.state=at)}if(ke.length>1e6)throw ke=[],new Error},!1)}return t}function Xn(e){if(!e.fn)return;Ut(e);const t=po;Na(e,G&&G.running&&G.sources.has(e)?e.tValue:e.value,t),G&&!G.running&&G.sources.has(e)&&queueMicrotask(()=>{Ue(()=>{G&&(G.running=!0),ge=ue=e,Na(e,e.tValue,t),ge=ue=null},!1)})}function Na(e,t,n){let r;const o=ue,i=ge;ge=ue=e;try{r=e.fn(t)}catch(s){return e.pure&&(G&&G.running?(e.tState=at,e.tOwned&&e.tOwned.forEach(Ut),e.tOwned=void 0):(e.state=at,e.owned&&e.owned.forEach(Ut),e.owned=null)),e.updatedAt=n+1,ms(s)}finally{ge=i,ue=o}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Uu(e,r,!0):G&&G.running&&e.pure?(G.sources.add(e),e.tValue=r):e.value=r,e.updatedAt=n)}function yo(e,t,n,r=at,o){const i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:ue,context:ue?ue.context:null,pure:n};return G&&G.running&&(i.state=0,i.tState=r),ue===null||ue!==Hu&&(G&&G.running&&ue.pure?ue.tOwned?ue.tOwned.push(i):ue.tOwned=[i]:ue.owned?ue.owned.push(i):ue.owned=[i]),i}function ao(e){const t=G&&G.running;if((t?e.tState:e.state)===0)return;if((t?e.tState:e.state)===wr)return lo(e);if(e.suspense&&Me(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<po);){if(t&&G.disposed.has(e))return;(t?e.tState:e.state)&&n.push(e)}for(let r=n.length-1;r>=0;r--){if(e=n[r],t){let o=e,i=n[r+1];for(;(o=o.owner)&&o!==i;)if(G.disposed.has(o))return}if((t?e.tState:e.state)===at)Xn(e);else if((t?e.tState:e.state)===wr){const o=ke;ke=null,Ue(()=>lo(e,n[0]),!1),ke=o}}}function Ue(e,t){if(ke)return e();let n=!1;t||(ke=[]),_e?n=!0:_e=[],po++;try{const r=e();return Lf(n),r}catch(r){n||(_e=null),ke=null,ms(r)}}function Lf(e){if(ke&&(qu(ke),ke=null),e)return;let t;if(G){if(!G.promises.size&&!G.queue.size){const r=G.sources,o=G.disposed;_e.push.apply(_e,G.effects),t=G.resolve;for(const i of _e)"tState"in i&&(i.state=i.tState),delete i.tState;G=null,Ue(()=>{for(const i of o)Ut(i);for(const i of r){if(i.value=i.tValue,i.owned)for(let s=0,a=i.owned.length;s<a;s++)Ut(i.owned[s]);i.tOwned&&(i.owned=i.tOwned),delete i.tValue,delete i.tOwned,i.tState=0}Va(!1)},!1)}else if(G.running){G.running=!1,G.effects.push.apply(G.effects,_e),_e=null,Va(!0);return}}const n=_e;_e=null,n.length&&Ue(()=>Bu(n),!1),t&&t()}function qu(e){for(let t=0;t<e.length;t++)ao(e[t])}function kf(e){let t,n=0;for(t=0;t<e.length;t++){const r=e[t];r.user?e[n++]=r:ao(r)}if(te.context){if(te.count){te.effects||(te.effects=[]),te.effects.push(...e.slice(0,n));return}fr()}for(te.effects&&(te.done||!te.count)&&(e=[...te.effects,...e],n+=te.effects.length,delete te.effects),t=0;t<n;t++)ao(e[t])}function lo(e,t){const n=G&&G.running;n?e.tState=0:e.state=0;for(let r=0;r<e.sources.length;r+=1){const o=e.sources[r];if(o.sources){const i=n?o.tState:o.state;i===at?o!==t&&(!o.updatedAt||o.updatedAt<po)&&ao(o):i===wr&&lo(o,t)}}}function Wu(e){const t=G&&G.running;for(let n=0;n<e.observers.length;n+=1){const r=e.observers[n];(t?!r.tState:!r.state)&&(t?r.tState=wr:r.state=wr,r.pure?ke.push(r):_e.push(r),r.observers&&Wu(r))}}function Ut(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){const i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s)}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Ut(e.tOwned[t]);delete e.tOwned}if(G&&G.running&&e.pure)Xu(e,!0);else if(e.owned){for(t=e.owned.length-1;t>=0;t--)Ut(e.owned[t]);e.owned=null}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null}G&&G.running?e.tState=0:e.state=0}function Xu(e,t){if(t||(e.tState=0,G.disposed.add(e)),e.owned)for(let n=0;n<e.owned.length;n++)Xu(e.owned[n])}function $i(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ms(e,t=ue){throw $i(e)}function Mi(e){if(typeof e=="function"&&!e.length)return Mi(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const r=Mi(e[n]);Array.isArray(r)?t.push.apply(t,r):t.push(r)}return t}return e}function Vf(e,t){return function(r){let o;return je(()=>o=Me(()=>(ue.context={...ue.context,[e]:r.value},vo(()=>r.children))),void 0),o}}const Nf=Symbol("fallback");function Ka(e){for(let t=0;t<e.length;t++)e[t]()}function Kf(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return W(()=>Ka(i)),()=>{let l=e()||[],c=l.length,u,d;return l[Pi],Me(()=>{let h,p,g,v,m,y,w,S,C;if(c===0)s!==0&&(Ka(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Nf],o[0]=dn($=>(i[0]=$,n.fallback())),s=1);else if(s===0){for(o=new Array(c),d=0;d<c;d++)r[d]=l[d],o[d]=dn(f);s=c}else{for(g=new Array(c),v=new Array(c),a&&(m=new Array(c)),y=0,w=Math.min(s,c);y<w&&r[y]===l[y];y++);for(w=s-1,S=c-1;w>=y&&S>=y&&r[w]===l[S];w--,S--)g[S]=o[w],v[S]=i[w],a&&(m[S]=a[w]);for(h=new Map,p=new Array(S+1),d=S;d>=y;d--)C=l[d],u=h.get(C),p[d]=u===void 0?-1:u,h.set(C,d);for(u=y;u<=w;u++)C=r[u],d=h.get(C),d!==void 0&&d!==-1?(g[d]=o[u],v[d]=i[u],a&&(m[d]=a[u]),d=p[d],h.set(C,d)):i[u]();for(d=y;d<c;d++)d in g?(o[d]=g[d],i[d]=v[d],a&&(a[d]=m[d],a[d](d))):o[d]=dn(f);o=o.slice(0,s=c),r=l.slice(0)}return o});function f(h){if(i[d]=h,a){const[p,g]=j(d);return a[d]=g,t(l[d],p)}return t(l[d])}}}function b(e,t){return Me(()=>e(t||{}))}function Hr(){return!0}const Fi={get(e,t,n){return t===st?n:e.get(t)},has(e,t){return t===st?!0:e.has(t)},set:Hr,deleteProperty:Hr,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:Hr,deleteProperty:Hr}},ownKeys(e){return e.keys()}};function Ko(e){return(e=typeof e=="function"?e():e)?e:{}}function jf(){for(let e=0,t=this.length;e<t;++e){const n=this[e]();if(n!==void 0)return n}}function F(...e){let t=!1;for(let s=0;s<e.length;s++){const a=e[s];t=t||!!a&&st in a,e[s]=typeof a=="function"?(t=!0,k(a)):a}if(zu&&t)return new Proxy({get(s){for(let a=e.length-1;a>=0;a--){const l=Ko(e[a])[s];if(l!==void 0)return l}},has(s){for(let a=e.length-1;a>=0;a--)if(s in Ko(e[a]))return!0;return!1},keys(){const s=[];for(let a=0;a<e.length;a++)s.push(...Object.keys(Ko(e[a])));return[...new Set(s)]}},Fi);const n={},r=Object.create(null);for(let s=e.length-1;s>=0;s--){const a=e[s];if(!a)continue;const l=Object.getOwnPropertyNames(a);for(let c=l.length-1;c>=0;c--){const u=l[c];if(u==="__proto__"||u==="constructor")continue;const d=Object.getOwnPropertyDescriptor(a,u);if(!r[u])r[u]=d.get?{enumerable:!0,configurable:!0,get:jf.bind(n[u]=[d.get.bind(a)])}:d.value!==void 0?d:void 0;else{const f=n[u];f&&(d.get?f.push(d.get.bind(a)):d.value!==void 0&&f.push(()=>d.value))}}}const o={},i=Object.keys(r);for(let s=i.length-1;s>=0;s--){const a=i[s],l=r[a];l&&l.get?Object.defineProperty(o,a,l):o[a]=l?l.value:void 0}return o}function V(e,...t){if(zu&&st in e){const o=new Set(t.length>1?t.flat():t[0]),i=t.map(s=>new Proxy({get(a){return s.includes(a)?e[a]:void 0},has(a){return s.includes(a)&&a in e},keys(){return s.filter(a=>a in e)}},Fi));return i.push(new Proxy({get(s){return o.has(s)?void 0:e[s]},has(s){return o.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!o.has(s))}},Fi)),i}const n={},r=t.map(()=>({}));for(const o of Object.getOwnPropertyNames(e)){const i=Object.getOwnPropertyDescriptor(e,o),s=!i.get&&!i.set&&i.enumerable&&i.writable&&i.configurable;let a=!1,l=0;for(const c of t)c.includes(o)&&(a=!0,s?r[l][o]=i.value:Object.defineProperty(r[l],o,i)),++l;a||(s?n[o]=i.value:Object.defineProperty(n,o,i))}return[...r,n]}let zf=0;function Ee(){return te.context?te.getNextContextId():`cl-${zf++}`}const Bf=e=>`Stale read from <${e}>.`;function rt(e){const t="fallback"in e&&{fallback:()=>e.fallback};return k(Kf(()=>e.each,e.children,t||void 0))}function pe(e){const t=e.keyed,n=k(()=>e.when,void 0,{equals:(r,o)=>t?r===o:!r==!o});return k(()=>{const r=n();if(r){const o=e.children;return typeof o=="function"&&o.length>0?Me(()=>o(t?r:()=>{if(!Me(n))throw Bf("Show");return e.when})):o}return e.fallback},void 0,void 0)}const Hf=we();function Gf(e){let t=0,n,r,o,i,s;const[a,l]=j(!1),c=_f(),u={increment:()=>{++t===1&&l(!0)},decrement:()=>{--t===0&&l(!1)},inFallback:a,effects:[],resolved:!1},d=br();if(te.context&&te.load){const p=te.getContextId();let g=te.load(p);if(g&&(typeof g!="object"||g.status!=="success"?o=g:te.gather(p)),o&&o!=="$$f"){const[v,m]=j(void 0,{equals:!1});i=v,o.then(()=>{if(te.done)return m();te.gather(p),fr(r),m(),fr()},y=>{s=y,m()})}}const f=ye(Hf);f&&(n=f.register(u.inFallback));let h;return W(()=>h&&h()),b(c.Provider,{value:u,get children(){return k(()=>{if(s)throw s;if(r=te.context,i)return i(),i=void 0;r&&o==="$$f"&&fr();const p=k(()=>e.children);return k(g=>{const v=u.inFallback(),{showContent:m=!0,showFallback:y=!0}=n?n():{};if((!v||o&&o!=="$$f")&&m)return u.resolved=!0,h&&h(),h=r=o=void 0,Df(u.effects),p();if(y)return h?g:dn(w=>(h=w,r&&(fr({id:r.id+"F",count:0}),r=void 0),e.fallback),d)})})}})}const Uf=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],qf=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Uf]),Wf=new Set(["innerHTML","textContent","innerText","children"]),Xf=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),Qf=Object.assign(Object.create(null),{class:"className",formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1}});function Yf(e,t){const n=Qf[e];return typeof n=="object"?n[t]?n.$:void 0:n}const Zf=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Jf=new Set(["altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignObject","g","glyph","glyphRef","hkern","image","line","linearGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","stop","svg","switch","symbol","text","textPath","tref","tspan","use","view","vkern"]),eh={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function th(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){const u=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],u)}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){const u=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],u),t[o]=n[i]}else{if(!c){c=new Map;let d=a;for(;d<i;)c.set(n[d],d++)}const u=c.get(t[s]);if(u!=null)if(a<u&&u<i){let d=s,f=1,h;for(;++d<o&&d<i&&!((h=c.get(t[d]))==null||h!==u+f);)f++;if(f>u-a){const p=t[s];for(;a<u;)e.insertBefore(n[a++],p)}else e.replaceChild(n[a++],t[s++])}else s++;else t[s++].remove()}}}const ja="_$DX_DELEGATE";function nh(e,t,n,r={}){let o;return dn(i=>{o=i,t===document?e():X(t,e(),t.firstChild?null:void 0,n)},r.owner),()=>{o(),t.textContent=""}}function ie(e,t,n){let r;const o=()=>{const s=document.createElement("template");return s.innerHTML=e,s.content.firstChild},i=()=>(r||(r=o())).cloneNode(!0);return i.cloneNode=i,i}function Qu(e,t=window.document){const n=t[ja]||(t[ja]=new Set);for(let r=0,o=e.length;r<o;r++){const i=e[r];n.has(i)||(n.add(i),t.addEventListener(i,fh))}}function Hn(e,t,n){vn(e)||(n==null?e.removeAttribute(t):e.setAttribute(t,n))}function rh(e,t,n,r){vn(e)||(r==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,r))}function oh(e,t,n){vn(e)||(n?e.setAttribute(t,""):e.removeAttribute(t))}function Yu(e,t){vn(e)||(t==null?e.removeAttribute("class"):e.className=t)}function ih(e,t,n,r){if(r)Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n;else if(Array.isArray(n)){const o=n[0];e.addEventListener(t,n[0]=i=>o.call(e,n[1],i))}else e.addEventListener(t,n,typeof n!="function"&&n)}function sh(e,t,n={}){const r=Object.keys(t||{}),o=Object.keys(n);let i,s;for(i=0,s=o.length;i<s;i++){const a=o[i];!a||a==="undefined"||t[a]||(za(e,a,!1),delete n[a])}for(i=0,s=r.length;i<s;i++){const a=r[i],l=!!t[a];!a||a==="undefined"||n[a]===l||!l||(za(e,a,!0),n[a]=l)}return n}function ah(e,t,n){if(!t)return n?Hn(e,"style"):t;const r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function Je(e,t={},n,r){const o={};return r||je(()=>o.children=Sr(e,t.children,o.children)),je(()=>typeof t.ref=="function"&&lh(t.ref,e)),je(()=>uh(e,t,n,!0,o,!0)),o}function lh(e,t,n){return Me(()=>e(t,n))}function X(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return Sr(e,t,r,n);je(o=>Sr(e,t(),o,n),r)}function uh(e,t,n,r,o={},i=!1){t||(t={});for(const s in o)if(!(s in t)){if(s==="children")continue;o[s]=Ba(e,s,null,o[s],n,i,t)}for(const s in t){if(s==="children")continue;const a=t[s];o[s]=Ba(e,s,a,o[s],n,i,t)}}function ch(e){let t,n;return!vn()||!(t=te.registry.get(n=hh()))?e():(te.completed&&te.completed.add(t),te.registry.delete(n),t)}function vn(e){return!!te.context&&!te.done&&(!e||e.isConnected)}function dh(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function za(e,t,n){const r=t.trim().split(/\s+/);for(let o=0,i=r.length;o<i;o++)e.classList.toggle(r[o],n)}function Ba(e,t,n,r,o,i,s){let a,l,c,u,d;if(t==="style")return ah(e,n,r);if(t==="classList")return sh(e,n,r);if(n===r)return r;if(t==="ref")i||n(e);else if(t.slice(0,3)==="on:"){const f=t.slice(3);r&&e.removeEventListener(f,r,typeof r!="function"&&r),n&&e.addEventListener(f,n,typeof n!="function"&&n)}else if(t.slice(0,10)==="oncapture:"){const f=t.slice(10);r&&e.removeEventListener(f,r,!0),n&&e.addEventListener(f,n,!0)}else if(t.slice(0,2)==="on"){const f=t.slice(2).toLowerCase(),h=Zf.has(f);if(!h&&r){const p=Array.isArray(r)?r[0]:r;e.removeEventListener(f,p)}(h||n)&&(ih(e,f,n,h),h&&Qu([f]))}else if(t.slice(0,5)==="attr:")Hn(e,t.slice(5),n);else if(t.slice(0,5)==="bool:")oh(e,t.slice(5),n);else if((d=t.slice(0,5)==="prop:")||(c=Wf.has(t))||!o&&((u=Yf(t,e.tagName))||(l=qf.has(t)))||(a=e.nodeName.includes("-")||"is"in s)){if(d)t=t.slice(5),l=!0;else if(vn(e))return n;t==="class"||t==="className"?Yu(e,n):a&&!l&&!c?e[dh(t)]=n:e[u||t]=n}else{const f=o&&t.indexOf(":")>-1&&eh[t.split(":")[0]];f?rh(e,f,t,n):Hn(e,Xf[t]||t,n)}return n}function fh(e){if(te.registry&&te.events&&te.events.find(([l,c])=>c===e))return;let t=e.target;const n=`$$${e.type}`,r=e.target,o=e.currentTarget,i=l=>Object.defineProperty(e,"target",{configurable:!0,value:l}),s=()=>{const l=t[n];if(l&&!t.disabled){const c=t[`${n}Data`];if(c!==void 0?l.call(t,c,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&i(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return t||document}}),te.registry&&!te.done&&(te.done=_$HY.done=!0),e.composedPath){const l=e.composedPath();i(l[0]);for(let c=0;c<l.length-2&&(t=l[c],!!s());c++){if(t._$host){t=t._$host,a();break}if(t.parentNode===o)break}}else a();i(r)}function Sr(e,t,n,r,o){const i=vn(e);if(i){!n&&(n=[...e.childNodes]);let l=[];for(let c=0;c<n.length;c++){const u=n[c];u.nodeType===8&&u.data.slice(0,2)==="!$"?u.remove():l.push(u)}n=l}for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(i||s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=bn(e,n,r,l)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t}else if(t==null||s==="boolean"){if(i)return n;n=bn(e,n,r)}else{if(s==="function")return je(()=>{let l=t();for(;typeof l=="function";)l=l();n=Sr(e,l,n,r)}),()=>n;if(Array.isArray(t)){const l=[],c=n&&Array.isArray(n);if(Oi(l,t,n,o))return je(()=>n=Sr(e,l,n,r,!0)),()=>n;if(i){if(!l.length)return n;if(r===void 0)return n=[...e.childNodes];let u=l[0];if(u.parentNode!==e)return n;const d=[u];for(;(u=u.nextSibling)!==r;)d.push(u);return n=d}if(l.length===0){if(n=bn(e,n,r),a)return n}else c?n.length===0?Ha(e,l,r):th(e,n,l):(n&&bn(e),Ha(e,l));n=l}else if(t.nodeType){if(i&&t.parentNode)return n=a?[t]:t;if(Array.isArray(n)){if(a)return n=bn(e,n,r,t);bn(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function Oi(e,t,n,r){let o=!1;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===!0||a===!1))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Oi(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Oi(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o}else e.push(a),o=!0;else{const u=String(a);l&&l.nodeType===3&&l.data===u?e.push(l):e.push(document.createTextNode(u))}}return o}function Ha(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n)}function bn(e,t,n,r){if(n===void 0)return e.textContent="";const o=r||document.createTextNode("");if(t.length){let i=!1;for(let s=t.length-1;s>=0;s--){const a=t[s];if(o!==a){const l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove()}else i=!0}}else e.insertBefore(o,n);return[o]}function hh(){return te.getNextContextId()}const Zu=!1,gh="http://www.w3.org/2000/svg";function Ju(e,t=!1){return t?document.createElementNS(gh,e):document.createElement(e)}function wo(e){const{useShadow:t}=e,n=document.createTextNode(""),r=()=>e.mount||document.body,o=br();let i,s=!!te.context;return H(()=>{s&&(br().user=s=!1),i||(i=ps(o,()=>k(()=>e.children)));const a=r();if(a instanceof HTMLHeadElement){const[l,c]=j(!1),u=()=>c(!0);dn(d=>X(a,()=>l()?d():i(),null)),W(u)}else{const l=Ju(e.isSVG?"g":"div",e.isSVG),c=t&&l.attachShadow?l.attachShadow({mode:"open"}):l;Object.defineProperty(l,"_$host",{get(){return n.parentNode},configurable:!0}),X(c,i),a.appendChild(l),e.ref&&e.ref(l),W(()=>a.removeChild(l))}},void 0,{render:!s}),n}function ec(e){const[t,n]=V(e,["component"]),r=k(()=>t.component);return k(()=>{const o=r();switch(typeof o){case"function":return Me(()=>o(n));case"string":const i=Jf.has(o),s=te.context?ch():Ju(o,i);return Je(s,n,i),s}})}const tc=we(),ph=["title","meta"],Ga=[],Ua=["name","http-equiv","content","charset","media"].concat(["property"]),qa=(e,t)=>{const n=Object.fromEntries(Object.entries(e.props).filter(([r])=>t.includes(r)).sort());return(Object.hasOwn(n,"name")||Object.hasOwn(n,"property"))&&(n.name=n.name||n.property,delete n.property),e.tag+JSON.stringify(n)};function mh(){if(!te.context){const n=document.head.querySelectorAll("[data-sm]");Array.prototype.forEach.call(n,r=>r.parentNode.removeChild(r))}const e=new Map;function t(n){if(n.ref)return n.ref;let r=document.querySelector(`[data-sm="${n.id}"]`);return r?(r.tagName.toLowerCase()!==n.tag&&(r.parentNode&&r.parentNode.removeChild(r),r=document.createElement(n.tag)),r.removeAttribute("data-sm")):r=document.createElement(n.tag),r}return{addTag(n){if(ph.indexOf(n.tag)!==-1){const i=n.tag==="title"?Ga:Ua,s=qa(n,i);e.has(s)||e.set(s,[]);let a=e.get(s),l=a.length;a=[...a,n],e.set(s,a);let c=t(n);n.ref=c,Je(c,n.props);let u=null;for(var r=l-1;r>=0;r--)if(a[r]!=null){u=a[r];break}return c.parentNode!=document.head&&document.head.appendChild(c),u&&u.ref&&u.ref.parentNode&&document.head.removeChild(u.ref),l}let o=t(n);return n.ref=o,Je(o,n.props),o.parentNode!=document.head&&document.head.appendChild(o),-1},removeTag(n,r){const o=n.tag==="title"?Ga:Ua,i=qa(n,o);if(n.ref){const s=e.get(i);if(s){if(n.ref.parentNode){n.ref.parentNode.removeChild(n.ref);for(let a=r-1;a>=0;a--)s[a]!=null&&document.head.appendChild(s[a].ref)}s[r]=null,e.set(i,s)}else n.ref.parentNode&&n.ref.parentNode.removeChild(n.ref)}}}}const vh=e=>{const t=mh();return b(tc.Provider,{value:t,get children(){return e.children}})},yh=(e,t,n)=>(wh({tag:e,props:t,setting:n,id:Ee(),get name(){return t.name||t.property}}),null);function wh(e){const t=ye(tc);if(!t)throw new Error("<MetaProvider /> should be in the tree");je(()=>{const n=t.addTag(e);W(()=>t.removeTag(e,n))})}const bh=e=>yh("title",e,{escape:!0,close:!0});function nc(){let e=new Set;function t(o){return e.add(o),()=>e.delete(o)}let n=!1;function r(o,i){if(n)return!(n=!1);const s={to:o,options:i,defaultPrevented:!1,preventDefault:()=>s.defaultPrevented=!0};for(const a of e)a.listener({...s,from:a.location,retry:l=>{l&&(n=!0),a.navigate(o,{...i,resolve:!1})}});return!s.defaultPrevented}return{subscribe:t,confirm:r}}let Ai;function vs(){(!window.history.state||window.history.state._depth==null)&&window.history.replaceState({...window.history.state,_depth:window.history.length-1},""),Ai=window.history.state._depth}vs();function Sh(e){return{...e,_depth:window.history.state&&window.history.state._depth}}function xh(e,t){let n=!1;return()=>{const r=Ai;vs();const o=r==null?null:Ai-r;if(n){n=!1;return}o&&t(o)?(n=!0,window.history.go(-o)):e()}}const Ch=/^(?:[a-z0-9]+:)?\/\//i,Eh=/^\/+|(\/)\/+$/g,rc="http://sr";function vr(e,t=!1){const n=e.replace(Eh,"$1");return n?t||/^[?#]/.test(n)?n:"/"+n:""}function oo(e,t,n){if(Ch.test(t))return;const r=vr(e),o=n&&vr(n);let i="";return!o||t.startsWith("/")?i=r:o.toLowerCase().indexOf(r.toLowerCase())!==0?i=r+o:i=o,(i||"/")+vr(t,!i)}function Rh(e,t){if(e==null)throw new Error(t);return e}function Ph(e,t){return vr(e).replace(/\/*(\*.*)?$/g,"")+vr(t)}function oc(e){const t={};return e.searchParams.forEach((n,r)=>{r in t?Array.isArray(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n}),t}function Ih(e,t,n){const[r,o]=e.split("/*",2),i=r.split("/").filter(Boolean),s=i.length;return a=>{const l=a.split("/").filter(Boolean),c=l.length-s;if(c<0||c>0&&o===void 0&&!t)return null;const u={path:s?"":"/",params:{}},d=f=>n===void 0?void 0:n[f];for(let f=0;f<s;f++){const h=i[f],p=h[0]===":",g=p?l[f]:l[f].toLowerCase(),v=p?h.slice(1):h.toLowerCase();if(p&&jo(g,d(v)))u.params[v]=g;else if(p||!jo(g,v))return null;u.path+=`/${g}`}if(o){const f=c?l.slice(-c).join("/"):"";if(jo(f,d(o)))u.params[o]=f;else return null}return u}}function jo(e,t){const n=r=>r===e;return t===void 0?!0:typeof t=="string"?n(t):typeof t=="function"?t(e):Array.isArray(t)?t.some(n):t instanceof RegExp?t.test(e):!1}function $h(e){const[t,n]=e.pattern.split("/*",2),r=t.split("/").filter(Boolean);return r.reduce((o,i)=>o+(i.startsWith(":")?2:3),r.length-(n===void 0?0:1))}function ic(e){const t=new Map,n=br();return new Proxy({},{get(r,o){return t.has(o)||ps(n,()=>t.set(o,k(()=>e()[o]))),t.get(o)()},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}},ownKeys(){return Reflect.ownKeys(e())}})}function Mh(e,t){const n=new URLSearchParams(e);Object.entries(t).forEach(([o,i])=>{i==null||i===""||i instanceof Array&&!i.length?n.delete(o):i instanceof Array?(n.delete(o),i.forEach(s=>{n.append(o,String(s))})):n.set(o,String(i))});const r=n.toString();return r?`?${r}`:""}function sc(e){let t=/(\/?\:[^\/]+)\?/.exec(e);if(!t)return[e];let n=e.slice(0,t.index),r=e.slice(t.index+t[0].length);const o=[n,n+=t[1]];for(;t=/^(\/\:[^\/]+)\?/.exec(r);)o.push(n+=t[1]),r=r.slice(t[0].length);return sc(r).reduce((i,s)=>[...i,...o.map(a=>a+s)],[])}const Fh=100,ac=we(),lc=we(),uc=()=>Rh(ye(ac),"<A> and 'use' router primitives can be only used inside a Route."),Oh=()=>uc().navigatorFactory(),Ah=()=>uc().location,Th=()=>{const e=Ah(),t=Oh(),n=(r,o)=>{const i=Me(()=>Mh(e.search,r)+e.hash);t(i,{scroll:!1,resolve:!1,...o})};return[e.query,n]};function Dh(e,t=""){const{component:n,preload:r,load:o,children:i,info:s}=e,a=!i||Array.isArray(i)&&!i.length,l={key:e,component:n,preload:r||o,info:s};return cc(e.path).reduce((c,u)=>{for(const d of sc(u)){const f=Ph(t,d);let h=a?f:f.split("/*",1)[0];h=h.split("/").map(p=>p.startsWith(":")||p.startsWith("*")?p:encodeURIComponent(p)).join("/"),c.push({...l,originalPath:u,pattern:h,matcher:Ih(h,!a,e.matchFilters)})}return c},[])}function _h(e,t=0){return{routes:e,score:$h(e[e.length-1])*1e4-t,matcher(n){const r=[];for(let o=e.length-1;o>=0;o--){const i=e[o],s=i.matcher(n);if(!s)return null;r.unshift({...s,route:i})}return r}}}function cc(e){return Array.isArray(e)?e:[e]}function dc(e,t="",n=[],r=[]){const o=cc(e);for(let i=0,s=o.length;i<s;i++){const a=o[i];if(a&&typeof a=="object"){a.hasOwnProperty("path")||(a.path="");const l=Dh(a,t);for(const c of l){n.push(c);const u=Array.isArray(a.children)&&a.children.length===0;if(a.children&&!u)dc(a.children,c.pattern,n,r);else{const d=_h([...n],r.length);r.push(d)}n.pop()}}}return n.length?r:r.sort((i,s)=>s.score-i.score)}function zo(e,t){for(let n=0,r=e.length;n<r;n++){const o=e[n].matcher(t);if(o)return o}return[]}function Lh(e,t,n){const r=new URL(rc),o=k(u=>{const d=e();try{return new URL(d,r)}catch{return console.error(`Invalid path ${d}`),u}},r,{equals:(u,d)=>u.href===d.href}),i=k(()=>o().pathname),s=k(()=>o().search,!0),a=k(()=>o().hash),l=()=>"",c=Ce(s,()=>oc(o()));return{get pathname(){return i()},get search(){return s()},get hash(){return a()},get state(){return t()},get key(){return l()},query:n?n(c):ic(c)}}let tn;function kh(){return tn}function Vh(e,t,n,r={}){const{signal:[o,i],utils:s={}}=e,a=s.parsePath||(P=>P),l=s.renderPath||(P=>P),c=s.beforeLeave||nc(),u=oo("",r.base||"");if(u===void 0)throw new Error(`${u} is not a valid base path`);u&&!o().value&&i({value:u,replace:!0,scroll:!1});const[d,f]=j(!1);let h;const p=(P,E)=>{E.value===g()&&E.state===m()||(h===void 0&&f(!0),tn=P,h=E,Tf(()=>{h===E&&(v(h.value),y(h.state),C[1]([]))}).finally(()=>{h===E&&mo(()=>{tn=void 0,P==="navigate"&&z(h),f(!1),h=void 0})}))},[g,v]=j(o().value),[m,y]=j(o().state),w=Lh(g,m,s.queryWrapper),S=[],C=j([]),$=k(()=>typeof r.transformUrl=="function"?zo(t(),r.transformUrl(w.pathname)):zo(t(),w.pathname)),A=()=>{const P=$(),E={};for(let x=0;x<P.length;x++)Object.assign(E,P[x].params);return E},_=s.paramsWrapper?s.paramsWrapper(A,t):ic(A),T={pattern:u,path:()=>u,outlet:()=>null,resolvePath(P){return oo(u,P)}};return je(Ce(o,P=>p("native",P),{defer:!0})),{base:T,location:w,params:_,isRouting:d,renderPath:l,parsePath:a,navigatorFactory:N,matches:$,beforeLeave:c,preloadRoute:re,singleFlight:r.singleFlight===void 0?!0:r.singleFlight,submissions:C};function K(P,E,x){Me(()=>{if(typeof E=="number"){E&&(s.go?s.go(E):console.warn("Router integration does not support relative routing"));return}const I=!E||E[0]==="?",{replace:M,resolve:O,scroll:L,state:B}={replace:!1,resolve:!I,scroll:!0,...x},U=O?P.resolvePath(E):oo(I&&w.pathname||"",E);if(U===void 0)throw new Error(`Path '${E}' is not a routable path`);if(S.length>=Fh)throw new Error("Too many redirects");const Y=g();(U!==Y||B!==m())&&(Zu||c.confirm(U,x)&&(S.push({value:Y,replace:M,scroll:L,state:m()}),p("navigate",{value:U,state:B})))})}function N(P){return P=P||ye(lc)||T,(E,x)=>K(P,E,x)}function z(P){const E=S[0];E&&(i({...P,replace:E.replace,scroll:E.scroll}),S.length=0)}function re(P,E){const x=zo(t(),P.pathname),I=tn;tn="preload";for(let M in x){const{route:O,params:L}=x[M];O.component&&O.component.preload&&O.component.preload();const{preload:B}=O;E&&B&&ps(n(),()=>B({params:L,location:{pathname:P.pathname,search:P.search,hash:P.hash,query:oc(P),state:null,key:""},intent:"preload"}))}tn=I}}function Nh(e,t,n,r){const{base:o,location:i,params:s}=e,{pattern:a,component:l,preload:c}=r().route,u=k(()=>r().path);l&&l.preload&&l.preload();const d=c?c({params:s,location:i,intent:tn||"initial"}):void 0;return{parent:t,pattern:a,path:u,outlet:()=>l?b(l,{params:s,location:i,data:d,get children(){return n()}}):n(),resolvePath(h){return oo(o.path(),h,u())}}}const Kh=e=>t=>{const{base:n}=t,r=vo(()=>t.children),o=k(()=>dc(r(),t.base||""));let i;const s=Vh(e,o,()=>i,{base:n,singleFlight:t.singleFlight,transformUrl:t.transformUrl});return e.create&&e.create(s),b(ac.Provider,{value:s,get children(){return b(jh,{routerState:s,get root(){return t.root},get preload(){return t.rootPreload||t.rootLoad},get children(){return[k(()=>(i=br())&&null),b(zh,{routerState:s,get branches(){return o()}})]}})}})};function jh(e){const t=e.routerState.location,n=e.routerState.params,r=k(()=>e.preload&&Me(()=>{e.preload({params:n,location:t,intent:kh()||"initial"})}));return b(pe,{get when(){return e.root},keyed:!0,get fallback(){return e.children},children:o=>b(o,{params:n,location:t,get data(){return r()},get children(){return e.children}})})}function zh(e){const t=[];let n;const r=k(Ce(e.routerState.matches,(o,i,s)=>{let a=i&&o.length===i.length;const l=[];for(let c=0,u=o.length;c<u;c++){const d=i&&i[c],f=o[c];s&&d&&f.route.key===d.route.key?l[c]=s[c]:(a=!1,t[c]&&t[c](),dn(h=>{t[c]=h,l[c]=Nh(e.routerState,l[c-1]||e.routerState.base,Wa(()=>r()[c+1]),()=>e.routerState.matches()[c])}))}return t.splice(o.length).forEach(c=>c()),s&&a?s:(n=l[0],l)}));return Wa(()=>r()&&n)()}const Wa=e=>()=>b(pe,{get when(){return e()},keyed:!0,children:t=>b(lc.Provider,{value:t,get children(){return t.outlet()}})}),Bh=e=>{const t=vo(()=>e.children);return F(e,{get children(){return t()}})};function Hh([e,t],n,r){return[e,r?o=>t(r(o)):t]}function Gh(e){let t=!1;const n=o=>typeof o=="string"?{value:o}:o,r=Hh(j(n(e.get()),{equals:(o,i)=>o.value===i.value&&o.state===i.state}),void 0,o=>(!t&&e.set(o),te.registry&&!te.done&&(te.done=!0),o));return e.init&&W(e.init((o=e.get())=>{t=!0,r[1](n(o)),t=!1})),Kh({signal:r,create:e.create,utils:e.utils})}function Uh(e,t,n){return e.addEventListener(t,n),()=>e.removeEventListener(t,n)}function qh(e,t){const n=e&&document.getElementById(e);n?n.scrollIntoView():t&&window.scrollTo(0,0)}const Wh=new Map;function Xh(e=!0,t=!1,n="/_server",r){return o=>{const i=o.base.path(),s=o.navigatorFactory(o.base);let a,l;function c(g){return g.namespaceURI==="http://www.w3.org/2000/svg"}function u(g){if(g.defaultPrevented||g.button!==0||g.metaKey||g.altKey||g.ctrlKey||g.shiftKey)return;const v=g.composedPath().find($=>$ instanceof Node&&$.nodeName.toUpperCase()==="A");if(!v||t&&!v.hasAttribute("link"))return;const m=c(v),y=m?v.href.baseVal:v.href;if((m?v.target.baseVal:v.target)||!y&&!v.hasAttribute("state"))return;const S=(v.getAttribute("rel")||"").split(/\s+/);if(v.hasAttribute("download")||S&&S.includes("external"))return;const C=m?new URL(y,document.baseURI):new URL(y);if(!(C.origin!==window.location.origin||i&&C.pathname&&!C.pathname.toLowerCase().startsWith(i.toLowerCase())))return[v,C]}function d(g){const v=u(g);if(!v)return;const[m,y]=v,w=o.parsePath(y.pathname+y.search+y.hash),S=m.getAttribute("state");g.preventDefault(),s(w,{resolve:!1,replace:m.hasAttribute("replace"),scroll:!m.hasAttribute("noscroll"),state:S?JSON.parse(S):void 0})}function f(g){const v=u(g);if(!v)return;const[m,y]=v;r&&(y.pathname=r(y.pathname)),o.preloadRoute(y,m.getAttribute("preload")!=="false")}function h(g){clearTimeout(a);const v=u(g);if(!v)return l=null;const[m,y]=v;l!==m&&(r&&(y.pathname=r(y.pathname)),a=setTimeout(()=>{o.preloadRoute(y,m.getAttribute("preload")!=="false"),l=m},20))}function p(g){if(g.defaultPrevented)return;let v=g.submitter&&g.submitter.hasAttribute("formaction")?g.submitter.getAttribute("formaction"):g.target.getAttribute("action");if(!v)return;if(!v.startsWith("https://action/")){const y=new URL(v,rc);if(v=o.parsePath(y.pathname+y.search),!v.startsWith(n))return}if(g.target.method.toUpperCase()!=="POST")throw new Error("Only POST forms are supported for Actions");const m=Wh.get(v);if(m){g.preventDefault();const y=new FormData(g.target,g.submitter);m.call({r:o,f:g.target},g.target.enctype==="multipart/form-data"?y:new URLSearchParams(y))}}Qu(["click","submit"]),document.addEventListener("click",d),e&&(document.addEventListener("mousemove",h,{passive:!0}),document.addEventListener("focusin",f,{passive:!0}),document.addEventListener("touchstart",f,{passive:!0})),document.addEventListener("submit",p),W(()=>{document.removeEventListener("click",d),e&&(document.removeEventListener("mousemove",h),document.removeEventListener("focusin",f),document.removeEventListener("touchstart",f)),document.removeEventListener("submit",p)})}}function Qh(e){const t=()=>{const r=window.location.pathname.replace(/^\/+/,"/")+window.location.search,o=window.history.state&&window.history.state._depth&&Object.keys(window.history.state).length===1?void 0:window.history.state;return{value:r+window.location.hash,state:o}},n=nc();return Gh({get:t,set({value:r,replace:o,scroll:i,state:s}){o?window.history.replaceState(Sh(s),"",r):window.history.pushState(s,"",r),qh(decodeURIComponent(window.location.hash.slice(1)),i),vs()},init:r=>Uh(window,"popstate",xh(r,o=>{if(o&&o<0)return!n.confirm(o);{const i=t();return!n.confirm(i.value,{state:i.state})}})),create:Xh(e.preload,e.explicitLinks,e.actionBase,e.transformUrl),utils:{go:r=>window.history.go(r),beforeLeave:n}})(e)}const Ti=Symbol("store-raw"),In=Symbol("store-node"),It=Symbol("store-has"),fc=Symbol("store-self");function hc(e){let t=e[st];if(!t&&(Object.defineProperty(e,st,{value:t=new Proxy(e,Jh)}),!Array.isArray(e))){const n=Object.keys(e),r=Object.getOwnPropertyDescriptors(e);for(let o=0,i=n.length;o<i;o++){const s=n[o];r[s].get&&Object.defineProperty(e,s,{enumerable:r[s].enumerable,get:r[s].get.bind(t)})}}return t}function qt(e){let t;return e!=null&&typeof e=="object"&&(e[st]||!(t=Object.getPrototypeOf(e))||t===Object.prototype||Array.isArray(e))}function hn(e,t=new Set){let n,r,o,i;if(n=e!=null&&e[Ti])return n;if(!qt(e)||t.has(e))return e;if(Array.isArray(e)){Object.isFrozen(e)?e=e.slice(0):t.add(e);for(let s=0,a=e.length;s<a;s++)o=e[s],(r=hn(o,t))!==o&&(e[s]=r)}else{Object.isFrozen(e)?e=Object.assign({},e):t.add(e);const s=Object.keys(e),a=Object.getOwnPropertyDescriptors(e);for(let l=0,c=s.length;l<c;l++)i=s[l],!a[i].get&&(o=e[i],(r=hn(o,t))!==o&&(e[i]=r))}return e}function uo(e,t){let n=e[t];return n||Object.defineProperty(e,t,{value:n=Object.create(null)}),n}function xr(e,t,n){if(e[t])return e[t];const[r,o]=j(n,{equals:!1,internal:!0});return r.$=o,e[t]=r}function Yh(e,t){const n=Reflect.getOwnPropertyDescriptor(e,t);return!n||n.get||!n.configurable||t===st||t===In||(delete n.value,delete n.writable,n.get=()=>e[st][t]),n}function gc(e){Ii()&&xr(uo(e,In),fc)()}function Zh(e){return gc(e),Reflect.ownKeys(e)}const Jh={get(e,t,n){if(t===Ti)return e;if(t===st)return n;if(t===Pi)return gc(e),n;const r=uo(e,In),o=r[t];let i=o?o():e[t];if(t===In||t===It||t==="__proto__")return i;if(!o){const s=Object.getOwnPropertyDescriptor(e,t);Ii()&&(typeof i!="function"||e.hasOwnProperty(t))&&!(s&&s.get)&&(i=xr(r,t,i)())}return qt(i)?hc(i):i},has(e,t){return t===Ti||t===st||t===Pi||t===In||t===It||t==="__proto__"?!0:(Ii()&&xr(uo(e,It),t)(),t in e)},set(){return!0},deleteProperty(){return!0},ownKeys:Zh,getOwnPropertyDescriptor:Yh};function Ye(e,t,n,r=!1){if(!r&&e[t]===n)return;const o=e[t],i=e.length;n===void 0?(delete e[t],e[It]&&e[It][t]&&o!==void 0&&e[It][t].$()):(e[t]=n,e[It]&&e[It][t]&&o===void 0&&e[It][t].$());let s=uo(e,In),a;if((a=xr(s,t,o))&&a.$(()=>n),Array.isArray(e)&&e.length!==i){for(let l=e.length;l<i;l++)(a=s[l])&&a.$();(a=xr(s,"length",i))&&a.$(e.length)}(a=s[fc])&&a.$()}function pc(e,t){const n=Object.keys(t);for(let r=0;r<n.length;r+=1){const o=n[r];Ye(e,o,t[o])}}function eg(e,t){if(typeof t=="function"&&(t=t(e)),t=hn(t),Array.isArray(t)){if(e===t)return;let n=0,r=t.length;for(;n<r;n++){const o=t[n];e[n]!==o&&Ye(e,n,o)}Ye(e,"length",r)}else pc(e,t)}function hr(e,t,n=[]){let r,o=e;if(t.length>1){r=t.shift();const s=typeof r,a=Array.isArray(e);if(Array.isArray(r)){for(let l=0;l<r.length;l++)hr(e,[r[l]].concat(t),n);return}else if(a&&s==="function"){for(let l=0;l<e.length;l++)r(e[l],l)&&hr(e,[l].concat(t),n);return}else if(a&&s==="object"){const{from:l=0,to:c=e.length-1,by:u=1}=r;for(let d=l;d<=c;d+=u)hr(e,[d].concat(t),n);return}else if(t.length>1){hr(e[r],t,[r].concat(n));return}o=e[r],n=[r].concat(n)}let i=t[0];typeof i=="function"&&(i=i(o,n),i===o)||r===void 0&&i==null||(i=hn(i),r===void 0||qt(o)&&qt(i)&&!Array.isArray(i)?pc(o,i):Ye(e,r,i))}function bo(...[e,t]){const n=hn(e||{}),r=Array.isArray(n),o=hc(n);function i(...s){mo(()=>{r&&s.length===1?eg(n,s[0]):hr(n,s)})}return[o,i]}const Di=Symbol("store-root");function En(e,t,n,r,o){const i=t[n];if(e===i)return;const s=Array.isArray(e);if(n!==Di&&(!qt(e)||!qt(i)||s!==Array.isArray(i)||o&&e[o]!==i[o])){Ye(t,n,e);return}if(s){if(e.length&&i.length&&(!r||o&&e[0]&&e[0][o]!=null)){let c,u,d,f,h,p,g,v;for(d=0,f=Math.min(i.length,e.length);d<f&&(i[d]===e[d]||o&&i[d]&&e[d]&&i[d][o]===e[d][o]);d++)En(e[d],i,d,r,o);const m=new Array(e.length),y=new Map;for(f=i.length-1,h=e.length-1;f>=d&&h>=d&&(i[f]===e[h]||o&&i[d]&&e[d]&&i[f][o]===e[h][o]);f--,h--)m[h]=i[f];if(d>h||d>f){for(u=d;u<=h;u++)Ye(i,u,e[u]);for(;u<e.length;u++)Ye(i,u,m[u]),En(e[u],i,u,r,o);i.length>e.length&&Ye(i,"length",e.length);return}for(g=new Array(h+1),u=h;u>=d;u--)p=e[u],v=o&&p?p[o]:p,c=y.get(v),g[u]=c===void 0?-1:c,y.set(v,u);for(c=d;c<=f;c++)p=i[c],v=o&&p?p[o]:p,u=y.get(v),u!==void 0&&u!==-1&&(m[u]=i[c],u=g[u],y.set(v,u));for(u=d;u<e.length;u++)u in m?(Ye(i,u,m[u]),En(e[u],i,u,r,o)):Ye(i,u,e[u])}else for(let c=0,u=e.length;c<u;c++)En(e[c],i,c,r,o);i.length>e.length&&Ye(i,"length",e.length);return}const a=Object.keys(e);for(let c=0,u=a.length;c<u;c++)En(e[a[c]],i,a[c],r,o);const l=Object.keys(i);for(let c=0,u=l.length;c<u;c++)e[l[c]]===void 0&&Ye(i,l[c],void 0)}function mc(e,t={}){const{merge:n,key:r="id"}=t,o=hn(e);return i=>{if(!qt(i)||!qt(o))return o;const s=En(o,{[Di]:i},Di,n,r);return s===void 0?i:s}}const tg="/assets/logo-BYNFyja1.png";var ng=ie('<main class="w-full space-y-2.5"><div class="flex flex-row items-center gap-1"><img alt="Hot Updater Console"class="w-12 h-12"><a href=https://github.com/gronxb/hot-updater target=_blank class="text-2xl font-light"rel=noreferrer>Hot Updater Console');function rg({children:e}){return(()=>{var t=ng(),n=t.firstChild,r=n.firstChild;return Hn(r,"src",tg),X(t,e,null),t})()}var Dr=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(){}},Gn=typeof window>"u"||"Deno"in globalThis;function Ze(){}function og(e,t){return typeof e=="function"?e(t):e}function _i(e){return typeof e=="number"&&e>=0&&e!==1/0}function vc(e,t){return Math.max(e+(t||0)-Date.now(),0)}function $n(e,t){return typeof e=="function"?e(t):e}function ot(e,t){return typeof e=="function"?e(t):e}function Xa(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==ys(s,t.options))return!1}else if(!Er(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||o&&o!==t.state.fetchStatus||i&&!i(t))}function Qa(e,t){const{exact:n,status:r,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Cr(t.options.mutationKey)!==Cr(i))return!1}else if(!Er(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function ys(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cr)(e)}function Cr(e){return JSON.stringify(e,(t,n)=>ki(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Er(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Er(e[n],t[n])):!1}function yc(e,t){if(e===t)return e;const n=Ya(e)&&Ya(t);if(n||ki(e)&&ki(t)){const r=n?e:Object.keys(e),o=r.length,i=n?t:Object.keys(t),s=i.length,a=n?[]:{};let l=0;for(let c=0;c<s;c++){const u=n?c:i[c];(!n&&r.includes(u)||n)&&e[u]===void 0&&t[u]===void 0?(a[u]=void 0,l++):(a[u]=yc(e[u],t[u]),a[u]===e[u]&&e[u]!==void 0&&l++)}return o===s&&l===o?e:a}return t}function Li(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 Ya(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ki(e){if(!Za(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Za(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Za(e){return Object.prototype.toString.call(e)==="[object Object]"}function ig(e){return new Promise(t=>{setTimeout(t,e)})}function Vi(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yc(e,t):t}function sg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function ag(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ws=Symbol();function wc(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===ws?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var nn,Vt,On,Tu,lg=(Tu=class extends Dr{constructor(){super();Z(this,nn);Z(this,Vt);Z(this,On);q(this,On,t=>{if(!Gn&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){R(this,Vt)||this.setEventListener(R(this,On))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Vt))==null||t.call(this),q(this,Vt,void 0))}setEventListener(t){var n;q(this,On,t),(n=R(this,Vt))==null||n.call(this),q(this,Vt,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){R(this,nn)!==t&&(q(this,nn,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof R(this,nn)=="boolean"?R(this,nn):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},nn=new WeakMap,Vt=new WeakMap,On=new WeakMap,Tu),bs=new lg,An,Nt,Tn,Du,ug=(Du=class extends Dr{constructor(){super();Z(this,An,!0);Z(this,Nt);Z(this,Tn);q(this,Tn,t=>{if(!Gn&&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(){R(this,Nt)||this.setEventListener(R(this,Tn))}onUnsubscribe(){var t;this.hasListeners()||((t=R(this,Nt))==null||t.call(this),q(this,Nt,void 0))}setEventListener(t){var n;q(this,Tn,t),(n=R(this,Nt))==null||n.call(this),q(this,Nt,t(this.setOnline.bind(this)))}setOnline(t){R(this,An)!==t&&(q(this,An,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return R(this,An)}},An=new WeakMap,Nt=new WeakMap,Tn=new WeakMap,Du),co=new ug;function Ni(){let e,t;const n=new Promise((o,i)=>{e=o,t=i});n.status="pending",n.catch(()=>{});function r(o){Object.assign(n,o),delete n.resolve,delete n.reject}return n.resolve=o=>{r({status:"fulfilled",value:o}),e(o)},n.reject=o=>{r({status:"rejected",reason:o}),t(o)},n}function cg(e){return Math.min(1e3*2**e,3e4)}function bc(e){return(e??"online")==="online"?co.isOnline():!0}var Sc=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Bo(e){return e instanceof Sc}function xc(e){let t=!1,n=0,r=!1,o;const i=Ni(),s=g=>{var v;r||(f(new Sc(g)),(v=e.abort)==null||v.call(e))},a=()=>{t=!0},l=()=>{t=!1},c=()=>bs.isFocused()&&(e.networkMode==="always"||co.isOnline())&&e.canRun(),u=()=>bc(e.networkMode)&&e.canRun(),d=g=>{var v;r||(r=!0,(v=e.onSuccess)==null||v.call(e,g),o==null||o(),i.resolve(g))},f=g=>{var v;r||(r=!0,(v=e.onError)==null||v.call(e,g),o==null||o(),i.reject(g))},h=()=>new Promise(g=>{var v;o=m=>{(r||c())&&g(m)},(v=e.onPause)==null||v.call(e)}).then(()=>{var g;o=void 0,r||(g=e.onContinue)==null||g.call(e)}),p=()=>{if(r)return;let g;const v=n===0?e.initialPromise:void 0;try{g=v??e.fn()}catch(m){g=Promise.reject(m)}Promise.resolve(g).then(d).catch(m=>{var $;if(r)return;const y=e.retry??(Gn?0:3),w=e.retryDelay??cg,S=typeof w=="function"?w(n,m):w,C=y===!0||typeof y=="number"&&n<y||typeof y=="function"&&y(n,m);if(t||!C){f(m);return}n++,($=e.onFail)==null||$.call(e,n,m),ig(S).then(()=>c()?void 0:h()).then(()=>{t?f(m):p()})})};return{promise:i,cancel:s,continue:()=>(o==null||o(),i),cancelRetry:a,continueRetry:l,canStart:u,start:()=>(u()?p():h().then(p),i)}}function dg(){let e=[],t=0,n=a=>{a()},r=a=>{a()},o=a=>setTimeout(a,0);const i=a=>{t?e.push(a):o(()=>{n(a)})},s=()=>{const a=e;e=[],a.length&&o(()=>{r(()=>{a.forEach(l=>{n(l)})})})};return{batch:a=>{let l;t++;try{l=a()}finally{t--,t||s()}return l},batchCalls:a=>(...l)=>{i(()=>{a(...l)})},schedule:i,setNotifyFunction:a=>{n=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{o=a}}}var Le=dg(),rn,_u,Cc=(_u=class{constructor(){Z(this,rn)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),_i(this.gcTime)&&q(this,rn,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gn?1/0:5*60*1e3))}clearGcTimeout(){R(this,rn)&&(clearTimeout(R(this,rn)),q(this,rn,void 0))}},rn=new WeakMap,_u),Dn,_n,Qe,on,Te,Fr,sn,tt,Rt,Lu,fg=(Lu=class extends Cc{constructor(t){super();Z(this,tt);Z(this,Dn);Z(this,_n);Z(this,Qe);Z(this,on);Z(this,Te);Z(this,Fr);Z(this,sn);q(this,sn,!1),q(this,Fr,t.defaultOptions),this.setOptions(t.options),this.observers=[],q(this,on,t.client),q(this,Qe,R(this,on).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,q(this,Dn,hg(this.options)),this.state=t.state??R(this,Dn),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=R(this,Te))==null?void 0:t.promise}setOptions(t){this.options={...R(this,Fr),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,Qe).remove(this)}setData(t,n){const r=Vi(this.state.data,t,this.options);return fe(this,tt,Rt).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){fe(this,tt,Rt).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,o;const n=(r=R(this,Te))==null?void 0:r.promise;return(o=R(this,Te))==null||o.cancel(t),n?n.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Dn))}isActive(){return this.observers.some(t=>ot(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ws||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||!vc(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Te))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=R(this,Te))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),R(this,Qe).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(R(this,Te)&&(R(this,sn)?R(this,Te).cancel({revert:!0}):R(this,Te).cancelRetry()),this.scheduleGc()),R(this,Qe).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||fe(this,tt,Rt).call(this,{type:"invalidate"})}fetch(t,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(R(this,Te))return R(this,Te).continueRetry(),R(this,Te).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,o=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(q(this,sn,!0),r.signal)})},i=()=>{const d=wc(this.options,n),f={client:R(this,on),queryKey:this.queryKey,meta:this.meta};return o(f),q(this,sn,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:R(this,on),state:this.state,fetchFn:i};o(s),(l=this.options.behavior)==null||l.onFetch(s,this),q(this,_n,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=s.fetchOptions)==null?void 0:c.meta))&&fe(this,tt,Rt).call(this,{type:"fetch",meta:(u=s.fetchOptions)==null?void 0:u.meta});const a=d=>{var f,h,p,g;Bo(d)&&d.silent||fe(this,tt,Rt).call(this,{type:"error",error:d}),Bo(d)||((h=(f=R(this,Qe).config).onError)==null||h.call(f,d,this),(g=(p=R(this,Qe).config).onSettled)==null||g.call(p,this.state.data,d,this)),this.scheduleGc()};return q(this,Te,xc({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,p,g;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(v){a(v);return}(h=(f=R(this,Qe).config).onSuccess)==null||h.call(f,d,this),(g=(p=R(this,Qe).config).onSettled)==null||g.call(p,d,this.state.error,this),this.scheduleGc()},onError:a,onFail:(d,f)=>{fe(this,tt,Rt).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{fe(this,tt,Rt).call(this,{type:"pause"})},onContinue:()=>{fe(this,tt,Rt).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),R(this,Te).start()}},Dn=new WeakMap,_n=new WeakMap,Qe=new WeakMap,on=new WeakMap,Te=new WeakMap,Fr=new WeakMap,sn=new WeakMap,tt=new WeakSet,Rt=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,...Ec(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 o=t.error;return Bo(o)&&o.revert&&R(this,_n)?{...R(this,_n),fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Le.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),R(this,Qe).notify({query:this,type:"updated",action:t})})},Lu);function Ec(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bc(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function hg(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 ht,ku,gg=(ku=class extends Dr{constructor(t={}){super();Z(this,ht);this.config=t,q(this,ht,new Map)}build(t,n,r){const o=n.queryKey,i=n.queryHash??ys(o,n);let s=this.get(i);return s||(s=new fg({client:t,queryKey:o,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o)}),this.add(s)),s}add(t){R(this,ht).has(t.queryHash)||(R(this,ht).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=R(this,ht).get(t.queryHash);n&&(t.destroy(),n===t&&R(this,ht).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Le.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return R(this,ht).get(t)}getAll(){return[...R(this,ht).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Xa(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>Xa(t,r)):n}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Le.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Le.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ht=new WeakMap,ku),gt,Ve,an,pt,kt,Vu,pg=(Vu=class extends Cc{constructor(t){super();Z(this,pt);Z(this,gt);Z(this,Ve);Z(this,an);this.mutationId=t.mutationId,q(this,Ve,t.mutationCache),q(this,gt,[]),this.state=t.state||mg(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){R(this,gt).includes(t)||(R(this,gt).push(t),this.clearGcTimeout(),R(this,Ve).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){q(this,gt,R(this,gt).filter(n=>n!==t)),this.scheduleGc(),R(this,Ve).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){R(this,gt).length||(this.state.status==="pending"?this.scheduleGc():R(this,Ve).remove(this))}continue(){var t;return((t=R(this,an))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,i,s,a,l,c,u,d,f,h,p,g,v,m,y,w,S,C,$,A;q(this,an,xc({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(_,T)=>{fe(this,pt,kt).call(this,{type:"failed",failureCount:_,error:T})},onPause:()=>{fe(this,pt,kt).call(this,{type:"pause"})},onContinue:()=>{fe(this,pt,kt).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Ve).canRun(this)}));const n=this.state.status==="pending",r=!R(this,an).canStart();try{if(!n){fe(this,pt,kt).call(this,{type:"pending",variables:t,isPaused:r}),await((i=(o=R(this,Ve).config).onMutate)==null?void 0:i.call(o,t,this));const T=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));T!==this.state.context&&fe(this,pt,kt).call(this,{type:"pending",context:T,variables:t,isPaused:r})}const _=await R(this,an).start();return await((c=(l=R(this,Ve).config).onSuccess)==null?void 0:c.call(l,_,t,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,_,t,this.state.context)),await((h=(f=R(this,Ve).config).onSettled)==null?void 0:h.call(f,_,null,this.state.variables,this.state.context,this)),await((g=(p=this.options).onSettled)==null?void 0:g.call(p,_,null,t,this.state.context)),fe(this,pt,kt).call(this,{type:"success",data:_}),_}catch(_){try{throw await((m=(v=R(this,Ve).config).onError)==null?void 0:m.call(v,_,t,this.state.context,this)),await((w=(y=this.options).onError)==null?void 0:w.call(y,_,t,this.state.context)),await((C=(S=R(this,Ve).config).onSettled)==null?void 0:C.call(S,void 0,_,this.state.variables,this.state.context,this)),await((A=($=this.options).onSettled)==null?void 0:A.call($,void 0,_,t,this.state.context)),_}finally{fe(this,pt,kt).call(this,{type:"error",error:_})}}finally{R(this,Ve).runNext(this)}}},gt=new WeakMap,Ve=new WeakMap,an=new WeakMap,pt=new WeakSet,kt=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),Le.batch(()=>{R(this,gt).forEach(r=>{r.onMutationUpdate(t)}),R(this,Ve).notify({mutation:this,type:"updated",action:t})})},Vu);function mg(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Mt,nt,Or,Nu,vg=(Nu=class extends Dr{constructor(t={}){super();Z(this,Mt);Z(this,nt);Z(this,Or);this.config=t,q(this,Mt,new Set),q(this,nt,new Map),q(this,Or,0)}build(t,n,r){const o=new pg({mutationCache:this,mutationId:++Br(this,Or)._,options:t.defaultMutationOptions(n),state:r});return this.add(o),o}add(t){R(this,Mt).add(t);const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n);r?r.push(t):R(this,nt).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(R(this,Mt).delete(t)){const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n);if(r)if(r.length>1){const o=r.indexOf(t);o!==-1&&r.splice(o,1)}else r[0]===t&&R(this,nt).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Gr(t);if(typeof n=="string"){const r=R(this,nt).get(n),o=r==null?void 0:r.find(i=>i.state.status==="pending");return!o||o===t}else return!0}runNext(t){var r;const n=Gr(t);if(typeof n=="string"){const o=(r=R(this,nt).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(o==null?void 0:o.continue())??Promise.resolve()}else return Promise.resolve()}clear(){Le.batch(()=>{R(this,Mt).forEach(t=>{this.notify({type:"removed",mutation:t})}),R(this,Mt).clear(),R(this,nt).clear()})}getAll(){return Array.from(R(this,Mt))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Qa(n,r))}findAll(t={}){return this.getAll().filter(n=>Qa(t,n))}notify(t){Le.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Le.batch(()=>Promise.all(t.map(n=>n.continue().catch(Ze))))}},Mt=new WeakMap,nt=new WeakMap,Or=new WeakMap,Nu);function Gr(e){var t;return(t=e.options.scope)==null?void 0:t.id}function Ja(e){return{onFetch:(t,n)=>{var u,d,f,h,p;const r=t.options,o=(f=(d=(u=t.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],s=((p=t.state.data)==null?void 0:p.pageParams)||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let g=!1;const v=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(t.signal.aborted?g=!0:t.signal.addEventListener("abort",()=>{g=!0}),t.signal)})},m=wc(t.options,t.fetchOptions),y=async(w,S,C)=>{if(g)return Promise.reject();if(S==null&&w.pages.length)return Promise.resolve(w);const $={client:t.client,queryKey:t.queryKey,pageParam:S,direction:C?"backward":"forward",meta:t.options.meta};v($);const A=await m($),{maxPages:_}=t.options,T=C?ag:sg;return{pages:T(w.pages,A,_),pageParams:T(w.pageParams,S,_)}};if(o&&i.length){const w=o==="backward",S=w?yg:el,C={pages:i,pageParams:s},$=S(r,C);a=await y(C,$,w)}else{const w=e??i.length;do{const S=l===0?s[0]??r.initialPageParam:el(r,a);if(l>0&&S==null)break;a=await y(a,S),l++}while(l<w)}return a};t.options.persister?t.fetchFn=()=>{var g,v;return(v=(g=t.options).persister)==null?void 0:v.call(g,c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=c}}}function el(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 yg(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}var xe,Kt,jt,Ln,kn,zt,Vn,Nn,Ku,wg=(Ku=class{constructor(t={}){Z(this,xe);Z(this,Kt);Z(this,jt);Z(this,Ln);Z(this,kn);Z(this,zt);Z(this,Vn);Z(this,Nn);q(this,xe,t.queryCache||new gg),q(this,Kt,t.mutationCache||new vg),q(this,jt,t.defaultOptions||{}),q(this,Ln,new Map),q(this,kn,new Map),q(this,zt,0)}mount(){Br(this,zt)._++,R(this,zt)===1&&(q(this,Vn,bs.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,xe).onFocus())})),q(this,Nn,co.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,xe).onOnline())})))}unmount(){var t,n;Br(this,zt)._--,R(this,zt)===0&&((t=R(this,Vn))==null||t.call(this),q(this,Vn,void 0),(n=R(this,Nn))==null||n.call(this),q(this,Nn,void 0))}isFetching(t){return R(this,xe).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Kt).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=R(this,xe).get(n.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const n=this.defaultQueryOptions(t),r=R(this,xe).build(this,n),o=r.state.data;return o===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime($n(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(o))}getQueriesData(t){return R(this,xe).findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.defaultQueryOptions({queryKey:t}),i=R(this,xe).get(o.queryHash),s=i==null?void 0:i.state.data,a=og(n,s);if(a!==void 0)return R(this,xe).build(this,o).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Le.batch(()=>R(this,xe).findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t){var r;const n=this.defaultQueryOptions({queryKey:t});return(r=R(this,xe).get(n.queryHash))==null?void 0:r.state}removeQueries(t){const n=R(this,xe);Le.batch(()=>{n.findAll(t).forEach(r=>{n.remove(r)})})}resetQueries(t,n){const r=R(this,xe),o={type:"active",...t};return Le.batch(()=>(r.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries(o,n)))}cancelQueries(t,n={}){const r={revert:!0,...n},o=Le.batch(()=>R(this,xe).findAll(t).map(i=>i.cancel(r)));return Promise.all(o).then(Ze).catch(Ze)}invalidateQueries(t,n={}){return Le.batch(()=>{if(R(this,xe).findAll(t).forEach(o=>{o.invalidate()}),(t==null?void 0:t.refetchType)==="none")return Promise.resolve();const r={...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"};return this.refetchQueries(r,n)})}refetchQueries(t,n={}){const r={...n,cancelRefetch:n.cancelRefetch??!0},o=Le.batch(()=>R(this,xe).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,r);return r.throwOnError||(s=s.catch(Ze)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(o).then(Ze)}fetchQuery(t){const n=this.defaultQueryOptions(t);n.retry===void 0&&(n.retry=!1);const r=R(this,xe).build(this,n);return r.isStaleByTime($n(n.staleTime,r))?r.fetch(n):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ze).catch(Ze)}fetchInfiniteQuery(t){return t.behavior=Ja(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ze).catch(Ze)}ensureInfiniteQueryData(t){return t.behavior=Ja(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return co.isOnline()?R(this,Kt).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,xe)}getMutationCache(){return R(this,Kt)}getDefaultOptions(){return R(this,jt)}setDefaultOptions(t){q(this,jt,t)}setQueryDefaults(t,n){R(this,Ln).set(Cr(t),{queryKey:t,defaultOptions:n})}getQueryDefaults(t){const n=[...R(this,Ln).values()],r={};return n.forEach(o=>{Er(t,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(t,n){R(this,kn).set(Cr(t),{mutationKey:t,defaultOptions:n})}getMutationDefaults(t){const n=[...R(this,kn).values()];let r={};return n.forEach(o=>{Er(t,o.mutationKey)&&(r={...r,...o.defaultOptions})}),r}defaultQueryOptions(t){if(t._defaulted)return t;const n={...R(this,jt).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return n.queryHash||(n.queryHash=ys(n.queryKey,n)),n.refetchOnReconnect===void 0&&(n.refetchOnReconnect=n.networkMode!=="always"),n.throwOnError===void 0&&(n.throwOnError=!!n.suspense),!n.networkMode&&n.persister&&(n.networkMode="offlineFirst"),n.queryFn===ws&&(n.enabled=!1),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,jt).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,xe).clear(),R(this,Kt).clear()}},xe=new WeakMap,Kt=new WeakMap,jt=new WeakMap,Ln=new WeakMap,kn=new WeakMap,zt=new WeakMap,Vn=new WeakMap,Nn=new WeakMap,Ku),Be,he,Ar,Ne,ln,Kn,Bt,mt,Tr,jn,zn,un,cn,Ht,Bn,me,gr,Ki,ji,zi,Bi,Hi,Gi,Ui,Rc,ju,bg=(ju=class extends Dr{constructor(t,n){super();Z(this,me);Z(this,Be);Z(this,he);Z(this,Ar);Z(this,Ne);Z(this,ln);Z(this,Kn);Z(this,Bt);Z(this,mt);Z(this,Tr);Z(this,jn);Z(this,zn);Z(this,un);Z(this,cn);Z(this,Ht);Z(this,Bn,new Set);this.options=n,q(this,Be,t),q(this,mt,null),q(this,Bt,Ni()),this.options.experimental_prefetchInRender||R(this,Bt).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&&(R(this,he).addObserver(this),tl(R(this,he),this.options)?fe(this,me,gr).call(this):this.updateResult(),fe(this,me,Bi).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qi(R(this,he),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qi(R(this,he),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,fe(this,me,Hi).call(this),fe(this,me,Gi).call(this),R(this,he).removeObserver(this)}setOptions(t,n){const r=this.options,o=R(this,he);if(this.options=R(this,Be).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ot(this.options.enabled,R(this,he))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");fe(this,me,Ui).call(this),R(this,he).setOptions(this.options),r._defaulted&&!Li(this.options,r)&&R(this,Be).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,he),observer:this});const i=this.hasListeners();i&&nl(R(this,he),o,this.options,r)&&fe(this,me,gr).call(this),this.updateResult(n),i&&(R(this,he)!==o||ot(this.options.enabled,R(this,he))!==ot(r.enabled,R(this,he))||$n(this.options.staleTime,R(this,he))!==$n(r.staleTime,R(this,he)))&&fe(this,me,Ki).call(this);const s=fe(this,me,ji).call(this);i&&(R(this,he)!==o||ot(this.options.enabled,R(this,he))!==ot(r.enabled,R(this,he))||s!==R(this,Ht))&&fe(this,me,zi).call(this,s)}getOptimisticResult(t){const n=R(this,Be).getQueryCache().build(R(this,Be),t),r=this.createResult(n,t);return xg(this,r)&&(q(this,Ne,r),q(this,Kn,this.options),q(this,ln,R(this,he).state)),r}getCurrentResult(){return R(this,Ne)}trackResult(t,n){const r={};return Object.keys(t).forEach(o=>{Object.defineProperty(r,o,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(o),n==null||n(o),t[o])})}),r}trackProp(t){R(this,Bn).add(t)}getCurrentQuery(){return R(this,he)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=R(this,Be).defaultQueryOptions(t),r=R(this,Be).getQueryCache().build(R(this,Be),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return fe(this,me,gr).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Ne)))}createResult(t,n){var _;const r=R(this,he),o=this.options,i=R(this,Ne),s=R(this,ln),a=R(this,Kn),c=t!==r?t.state:R(this,Ar),{state:u}=t;let d={...u},f=!1,h;if(n._optimisticResults){const T=this.hasListeners(),K=!T&&tl(t,n),N=T&&nl(t,r,n,o);(K||N)&&(d={...d,...Ec(u.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:p,errorUpdatedAt:g,status:v}=d;if(n.select&&d.data!==void 0)if(i&&d.data===(s==null?void 0:s.data)&&n.select===R(this,Tr))h=R(this,jn);else try{q(this,Tr,n.select),h=n.select(d.data),h=Vi(i==null?void 0:i.data,h,n),q(this,jn,h),q(this,mt,null)}catch(T){q(this,mt,T)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&v==="pending"){let T;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))T=i.data;else if(T=typeof n.placeholderData=="function"?n.placeholderData((_=R(this,zn))==null?void 0:_.state.data,R(this,zn)):n.placeholderData,n.select&&T!==void 0)try{T=n.select(T),q(this,mt,null)}catch(K){q(this,mt,K)}T!==void 0&&(v="success",h=Vi(i==null?void 0:i.data,T,n),f=!0)}R(this,mt)&&(p=R(this,mt),h=R(this,jn),g=Date.now(),v="error");const m=d.fetchStatus==="fetching",y=v==="pending",w=v==="error",S=y&&m,C=h!==void 0,A={status:v,fetchStatus:d.fetchStatus,isPending:y,isSuccess:v==="success",isError:w,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:d.dataUpdatedAt,error:p,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>c.dataUpdateCount||d.errorUpdateCount>c.errorUpdateCount,isFetching:m,isRefetching:m&&!y,isLoadingError:w&&!C,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:w&&C,isStale:Ss(t,n),refetch:this.refetch,promise:R(this,Bt)};if(this.options.experimental_prefetchInRender){const T=z=>{A.status==="error"?z.reject(A.error):A.data!==void 0&&z.resolve(A.data)},K=()=>{const z=q(this,Bt,A.promise=Ni());T(z)},N=R(this,Bt);switch(N.status){case"pending":t.queryHash===r.queryHash&&T(N);break;case"fulfilled":(A.status==="error"||A.data!==N.value)&&K();break;case"rejected":(A.status!=="error"||A.error!==N.reason)&&K();break}}return A}updateResult(t){const n=R(this,Ne),r=this.createResult(R(this,he),this.options);if(q(this,ln,R(this,he).state),q(this,Kn,this.options),R(this,ln).data!==void 0&&q(this,zn,R(this,he)),Li(r,n))return;q(this,Ne,r);const o={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!R(this,Bn).size)return!0;const l=new Set(a??R(this,Bn));return this.options.throwOnError&&l.add("error"),Object.keys(R(this,Ne)).some(c=>{const u=c;return R(this,Ne)[u]!==n[u]&&l.has(u)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),fe(this,me,Rc).call(this,{...o,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&fe(this,me,Bi).call(this)}},Be=new WeakMap,he=new WeakMap,Ar=new WeakMap,Ne=new WeakMap,ln=new WeakMap,Kn=new WeakMap,Bt=new WeakMap,mt=new WeakMap,Tr=new WeakMap,jn=new WeakMap,zn=new WeakMap,un=new WeakMap,cn=new WeakMap,Ht=new WeakMap,Bn=new WeakMap,me=new WeakSet,gr=function(t){fe(this,me,Ui).call(this);let n=R(this,he).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n},Ki=function(){fe(this,me,Hi).call(this);const t=$n(this.options.staleTime,R(this,he));if(Gn||R(this,Ne).isStale||!_i(t))return;const r=vc(R(this,Ne).dataUpdatedAt,t)+1;q(this,un,setTimeout(()=>{R(this,Ne).isStale||this.updateResult()},r))},ji=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,he)):this.options.refetchInterval)??!1},zi=function(t){fe(this,me,Gi).call(this),q(this,Ht,t),!(Gn||ot(this.options.enabled,R(this,he))===!1||!_i(R(this,Ht))||R(this,Ht)===0)&&q(this,cn,setInterval(()=>{(this.options.refetchIntervalInBackground||bs.isFocused())&&fe(this,me,gr).call(this)},R(this,Ht)))},Bi=function(){fe(this,me,Ki).call(this),fe(this,me,zi).call(this,fe(this,me,ji).call(this))},Hi=function(){R(this,un)&&(clearTimeout(R(this,un)),q(this,un,void 0))},Gi=function(){R(this,cn)&&(clearInterval(R(this,cn)),q(this,cn,void 0))},Ui=function(){const t=R(this,Be).getQueryCache().build(R(this,Be),this.options);if(t===R(this,he))return;const n=R(this,he);q(this,he,t),q(this,Ar,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Rc=function(t){Le.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(R(this,Ne))}),R(this,Be).getQueryCache().notify({query:R(this,he),type:"observerResultsUpdated"})})},ju);function Sg(e,t){return ot(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function tl(e,t){return Sg(e,t)||e.state.data!==void 0&&qi(e,t,t.refetchOnMount)}function qi(e,t,n){if(ot(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Ss(e,t)}return!1}function nl(e,t,n,r){return(e!==t||ot(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Ss(e,n)}function Ss(e,t){return ot(t.enabled,e)!==!1&&e.isStaleByTime($n(t.staleTime,e))}function xg(e,t){return!Li(e.getCurrentResult(),t)}function Cg(e){return e}function Eg(e,t,n){var l;if(typeof t!="object"||t===null)return;const r=e.getMutationCache(),o=e.getQueryCache(),i=((l=e.getDefaultOptions().hydrate)==null?void 0:l.deserializeData)??Cg,s=t.mutations||[],a=t.queries||[];s.forEach(({state:c,...u})=>{var d,f;r.build(e,{...(d=e.getDefaultOptions().hydrate)==null?void 0:d.mutations,...(f=n==null?void 0:n.defaultOptions)==null?void 0:f.mutations,...u},c)}),a.forEach(({queryKey:c,state:u,queryHash:d,meta:f,promise:h})=>{var v,m;let p=o.get(d);const g=u.data===void 0?u.data:i(u.data);if(p){if(p.state.dataUpdatedAt<u.dataUpdatedAt){const{fetchStatus:y,...w}=u;p.setState({...w,data:g})}}else p=o.build(e,{...(v=e.getDefaultOptions().hydrate)==null?void 0:v.queries,...(m=n==null?void 0:n.defaultOptions)==null?void 0:m.queries,queryKey:c,queryHash:d,meta:f},{...u,data:g,fetchStatus:"idle"});if(h){const y=Promise.resolve(h).then(i);p.fetch(void 0,{initialPromise:y})}})}var Rg=class extends wg{constructor(e={}){super(e)}},Pc=we(void 0),Ic=e=>{const t=ye(Pc);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t()},Pg=e=>(je(t=>(t==null||t(),e.client.mount(),e.client.unmount.bind(e.client))),W(()=>e.client.unmount()),b(Pc.Provider,{value:()=>e.client,get children(){return e.children}}));function Ig(e,t){return typeof e=="function"?e(...t):!!e}var $c=we(()=>!1),$g=()=>ye($c);$c.Provider;function Mg(e,t,n,r){if(n===!1)return t;if(typeof n=="function"){const s=n(e.data,t.data);return{...t,data:s}}let o=t.data;if(e.data===void 0)try{o=structuredClone(o)}catch{}const i=mc(o,{key:n})(e.data);return{...t,data:i}}var Fg=(e,t)=>t;function Og(e,t,n){const r=k(()=>Ic()),o=$g(),i=k(()=>{const S=r().defaultQueryOptions(e());return S._optimisticResults=o()?"isRestoring":"optimistic",S.structuralSharing=!1,S}),s=i(),[a,l]=j(new t(r(),i()));let c=a().getOptimisticResult(i());const[u,d]=bo(c),f=()=>a().subscribe(C=>{c=C,queueMicrotask(()=>{g&&y()})});function h(S){const C=a().options,$=C.reconcile;d(A=>Mg(A,S,$===void 0?!1:$,C.queryHash))}function p(){return[()=>u,S=>{const C=hn(u);if(typeof S=="function"&&(S=S(C)),S!=null&&S.hydrationData){const{hydrationData:$,...A}=S;S=A}h(S)}]}let g=null,v=null;const[m,{refetch:y}]=Af(()=>{const S=a();return new Promise((C,$)=>{if(v=C,!g&&!o()&&(g=f()),S.updateResult(),c.isError&&!c.isFetching&&!o()&&Ig(S.options.throwOnError,[c.error,S.getCurrentQuery()]))return h(c),$(c.error);if(!c.isLoading)return v=null,C(Fg(S.getCurrentQuery(),c));h(c)})},{storage:p,get deferStream(){return e().deferStream},onHydrated(S,C){if(C.value&&"hydrationData"in C.value&&Eg(r(),{queries:[{...C.value.hydrationData}]}),g)return;const $={...s};(s.staleTime||!s.initialData)&&C.value&&($.refetchOnMount=!1),a().setOptions($),h(a().getOptimisticResult($)),g=f()}});Ft(Ce(r,S=>{g&&g();const C=new t(S,i());g=f(),l(C)},{defer:!0})),Ft(Ce(o,S=>{S||y()},{defer:!0})),W(()=>{g&&(g(),g=null),v&&(v(c),v=null)}),Ft(Ce([a,i],([S,C])=>{S.setOptions(C),h(S.getOptimisticResult(C)),y()},{defer:!0}));const w={get(S,C){var $,A;return C==="data"?u.data!==void 0?($=m.latest)==null?void 0:$.data:(A=m())==null?void 0:A.data:Reflect.get(S,C)}};return new Proxy(u,w)}function So(e,t){return Og(k(()=>e()),bg)}function Ag(e){return(...t)=>{for(const n of e)n&&n(...t)}}var D=e=>typeof e=="function"&&!e.length?e():e,rl=e=>Array.isArray(e)?e:e?[e]:[];function Tg(e,...t){return typeof e=="function"?e(...t):e}var Dg=W;function _g(e,t,n,r){return e.addEventListener(t,n,r),Dg(e.removeEventListener.bind(e,t,n,r))}function Lg(e,t,n,r){const o=()=>{rl(D(e)).forEach(i=>{i&&rl(D(t)).forEach(s=>_g(i,s,n,r))})};typeof e=="function"?H(o):je(o)}var kg=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g;function ol(e){const t={};let n;for(;n=kg.exec(e);)t[n[1]]=n[2];return t}function ct(e,t){if(typeof e=="string"){if(typeof t=="string")return`${e};${t}`;e=ol(e)}else typeof t=="string"&&(t=ol(t));return{...e,...t}}function ve(...e){return Ag(e)}function Vg(e,t,n=-1){return n in e?[...e.slice(0,n),t,...e.slice(n)]:[...e,t]}function Wi(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ng(e){return typeof e=="number"}function Rn(e){return Object.prototype.toString.call(e)==="[object String]"}function xs(e){return typeof e=="function"}function dt(e){return t=>`${e()}-${t}`}function Pe(e,t){return e?e===t||e.contains(t):!1}function pr(e,t=!1){const{activeElement:n}=ze(e);if(!(n!=null&&n.nodeName))return null;if(Mc(n)&&n.contentDocument)return pr(n.contentDocument.body,t);if(t){const r=n.getAttribute("aria-activedescendant");if(r){const o=ze(n).getElementById(r);if(o)return o}}return n}function Cs(e){return ze(e).defaultView||window}function ze(e){return e?e.ownerDocument||e:document}function Mc(e){return e.tagName==="IFRAME"}var Es=(e=>(e.Escape="Escape",e.Enter="Enter",e.Tab="Tab",e.Space=" ",e.ArrowDown="ArrowDown",e.ArrowLeft="ArrowLeft",e.ArrowRight="ArrowRight",e.ArrowUp="ArrowUp",e.End="End",e.Home="Home",e.PageDown="PageDown",e.PageUp="PageUp",e))(Es||{});function Rs(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function xo(){return Rs(/^Mac/i)}function Kg(){return Rs(/^iPhone/i)}function jg(){return Rs(/^iPad/i)||xo()&&navigator.maxTouchPoints>1}function zg(){return Kg()||jg()}function Bg(){return xo()||zg()}function ne(e,t){return t&&(xs(t)?t(e):t[0](t[1],e)),e==null?void 0:e.defaultPrevented}function Se(e){return t=>{for(const n of e)ne(t,n)}}function Hg(e){return xo()?e.metaKey&&!e.ctrlKey:e.ctrlKey&&!e.metaKey}function $e(e){if(e)if(Gg())e.focus({preventScroll:!0});else{const t=Ug(e);e.focus(),qg(t)}}var Ur=null;function Gg(){if(Ur==null){Ur=!1;try{document.createElement("div").focus({get preventScroll(){return Ur=!0,!0}})}catch{}}return Ur}function Ug(e){let t=e.parentNode;const 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 qg(e){for(const{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}var Fc=["input:not([type='hidden']):not([disabled])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","[tabindex]","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]:not([contenteditable='false'])"],Wg=[...Fc,'[tabindex]:not([tabindex="-1"]):not([disabled])'],Ps=`${Fc.join(":not([hidden]),")},[tabindex]:not([disabled]):not([hidden])`,Xg=Wg.join(':not([hidden]):not([tabindex="-1"]),');function Oc(e,t){const r=Array.from(e.querySelectorAll(Ps)).filter(il);return t&&il(e)&&r.unshift(e),r.forEach((o,i)=>{if(Mc(o)&&o.contentDocument){const s=o.contentDocument.body,a=Oc(s,!1);r.splice(i,1,...a)}}),r}function il(e){return Ac(e)&&!Qg(e)}function Ac(e){return e.matches(Ps)&&Is(e)}function Qg(e){return Number.parseInt(e.getAttribute("tabindex")||"0",10)<0}function Is(e,t){return e.nodeName!=="#comment"&&Yg(e)&&Zg(e,t)&&(!e.parentElement||Is(e.parentElement,e))}function Yg(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;const{display:t,visibility:n}=e.style;let r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){if(!e.ownerDocument.defaultView)return r;const{getComputedStyle:o}=e.ownerDocument.defaultView,{display:i,visibility:s}=o(e);r=i!=="none"&&s!=="hidden"&&s!=="collapse"}return r}function Zg(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function Jg(e,t,n){const r=t!=null&&t.tabbable?Xg:Ps,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var s;return(s=t==null?void 0:t.from)!=null&&s.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&Is(i)&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(o.currentNode=t.from),o}function sl(e){let t=e;for(;t&&!ep(t);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function ep(e){const t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function tp(){}function np(e){return[e.clientX,e.clientY]}function Tc(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let s=i,a=0,l=s-1;a<s;l=a++){const[c,u]=t[a],[d,f]=t[l],[,h]=t[l===0?s-1:l-1]||[0,0],p=(u-f)*(n-c)-(c-d)*(r-u);if(f<u){if(r>=f&&r<u){if(p===0)return!0;p>0&&(r===f?r>h&&(o=!o):o=!o)}}else if(u<f){if(r>u&&r<=f){if(p===0)return!0;p<0&&(r===f?r<h&&(o=!o):o=!o)}}else if(r===u&&(n>=d&&n<=c||n>=c&&n<=d))return!0}return o}function Q(e,t){return F(e,t)}var or=new Map,al=new Set;function ll(){if(typeof window>"u")return;const e=n=>{if(!n.target)return;let r=or.get(n.target);r||(r=new Set,or.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{if(!n.target)return;const r=or.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),or.delete(n.target)),or.size===0)){for(const o of al)o();al.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?ll():document.addEventListener("DOMContentLoaded",ll));function Xi(e,t){const n=ul(e,t,"left"),r=ul(e,t,"top"),o=t.offsetWidth,i=t.offsetHeight;let s=e.scrollLeft,a=e.scrollTop;const l=s+e.offsetWidth,c=a+e.offsetHeight;n<=s?s=n:n+o>l&&(s+=n+o-l),r<=a?a=r:r+i>c&&(a+=r+i-c),e.scrollLeft=s,e.scrollTop=a}function ul(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let o=0;for(;t.offsetParent&&(o+=t[r],t.offsetParent!==e);){if(t.offsetParent.contains(e)){o-=e[r];break}t=t.offsetParent}return o}function rp(e,t){var n,r;if(document.contains(e)){const o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let s=sl(e);for(;e&&s&&e!==o&&s!==o;)Xi(s,e),e=s,s=sl(e)}else{const{left:s,top:a}=e.getBoundingClientRect();(n=e==null?void 0:e.scrollIntoView)==null||n.call(e,{block:"nearest"});const{left:l,top:c}=e.getBoundingClientRect();(Math.abs(s-l)>1||Math.abs(a-c)>1)&&((r=e.scrollIntoView)==null||r.call(e,{block:"nearest"}))}}}var Dc={border:"0",clip:"rect(0 0 0 0)","clip-path":"inset(50%)",height:"1px",margin:"0 -1px -1px 0",overflow:"hidden",padding:"0",position:"absolute",width:"1px","white-space":"nowrap"},Rr="data-kb-top-layer",_c,Qi=!1,Ot=[];function Pr(e){return Ot.findIndex(t=>t.node===e)}function op(e){return Ot[Pr(e)]}function ip(e){return Ot[Ot.length-1].node===e}function Lc(){return Ot.filter(e=>e.isPointerBlocking)}function sp(){return[...Lc()].slice(-1)[0]}function $s(){return Lc().length>0}function kc(e){var n;const t=Pr((n=sp())==null?void 0:n.node);return Pr(e)<t}function ap(e){Ot.push(e)}function lp(e){const t=Pr(e);t<0||Ot.splice(t,1)}function up(){for(const{node:e}of Ot)e.style.pointerEvents=kc(e)?"none":"auto"}function cp(e){if($s()&&!Qi){const t=ze(e);_c=document.body.style.pointerEvents,t.body.style.pointerEvents="none",Qi=!0}}function dp(e){if($s())return;const t=ze(e);t.body.style.pointerEvents=_c,t.body.style.length===0&&t.body.removeAttribute("style"),Qi=!1}var He={layers:Ot,isTopMostLayer:ip,hasPointerBlockingLayer:$s,isBelowPointerBlockingLayer:kc,addLayer:ap,removeLayer:lp,indexOf:Pr,find:op,assignPointerEventToLayers:up,disableBodyPointerEvents:cp,restoreBodyPointerEvents:dp};function Co(e,t){const[n,r]=j(cl(t==null?void 0:t()));return H(()=>{var o;r(((o=e())==null?void 0:o.tagName.toLowerCase())||cl(t==null?void 0:t()))}),n}function cl(e){return Rn(e)?e:void 0}function le(e){const[t,n]=V(e,["as"]);if(!t.as)throw new Error("[kobalte]: Polymorphic is missing the required `as` prop.");return b(ec,F(n,{get component(){return t.as}}))}var fp=Object.defineProperty,At=(e,t)=>{for(var n in t)fp(e,n,{get:t[n],enumerable:!0})},hp={};At(hp,{Button:()=>mp,Root:()=>bt});var gp=["button","color","file","image","reset","submit"];function pp(e){const t=e.tagName.toLowerCase();return t==="button"?!0:t==="input"&&e.type?gp.indexOf(e.type)!==-1:!1}function bt(e){let t;const n=Q({type:"button"},e),[r,o]=V(n,["ref","type","disabled"]),i=Co(()=>t,()=>"button"),s=k(()=>{const c=i();return c==null?!1:pp({tagName:c,type:r.type})}),a=k(()=>i()==="input"),l=k(()=>i()==="a"&&(t==null?void 0:t.getAttribute("href"))!=null);return b(le,F({as:"button",ref(c){var u=ve(d=>t=d,r.ref);typeof u=="function"&&u(c)},get type(){return s()||a()?r.type:void 0},get role(){return!s()&&!l()?"button":void 0},get tabIndex(){return!s()&&!l()&&!r.disabled?0:void 0},get disabled(){return s()||a()?r.disabled:void 0},get"aria-disabled"(){return!s()&&!a()&&r.disabled?!0:void 0},get"data-disabled"(){return r.disabled?"":void 0}},o))}var mp=bt;function Ke(e){return t=>(e(t),()=>e(void 0))}var De=e=>typeof e=="function"?e():e,vp=e=>{const t=k(()=>{const s=De(e.element);if(s)return getComputedStyle(s)}),n=()=>{var s;return((s=t())==null?void 0:s.animationName)??"none"},[r,o]=j(De(e.show)?"present":"hidden");let i="none";return H(s=>{const a=De(e.show);return Me(()=>{var u;if(s===a)return a;const l=i,c=n();a?o("present"):c==="none"||((u=t())==null?void 0:u.display)==="none"?o("hidden"):o(s===!0&&l!==c?"hiding":"hidden")}),a}),H(()=>{const s=De(e.element);if(!s)return;const a=c=>{c.target===s&&(i=n())},l=c=>{const d=n().includes(c.animationName);c.target===s&&d&&r()==="hiding"&&o("hidden")};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",l),s.addEventListener("animationend",l),W(()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",l),s.removeEventListener("animationend",l)})}),{present:()=>r()==="present"||r()==="hiding",state:r,setState:o}},yp=vp,Un=yp,wp={};At(wp,{CloseButton:()=>Ms,Description:()=>Fs,List:()=>As,ProgressFill:()=>Kc,ProgressTrack:()=>jc,Region:()=>Ds,Root:()=>_s,Title:()=>Ls,Toast:()=>Lp,toaster:()=>ks});var Vc=we();function Eo(){const e=ye(Vc);if(e===void 0)throw new Error("[kobalte]: `useToastContext` must be used within a `Toast.Root` component");return e}function Ms(e){const t=Eo(),[n,r]=V(e,["aria-label","onClick"]);return b(bt,F({get"aria-label"(){return n["aria-label"]||t.translations().close},onClick:i=>{ne(i,n.onClick),t.close()}},r))}function Fs(e){const t=Eo(),n=Q({id:t.generateId("description")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerDescriptionId(r.id))),b(le,F({as:"div",get id(){return r.id}},o))}var Nc=we();function Os(){const e=ye(Nc);if(e===void 0)throw new Error("[kobalte]: `useToastRegionContext` must be used within a `Toast.Region` component");return e}function As(e){let t;const n=Os(),[r,o]=V(e,["ref","onFocusIn","onFocusOut","onPointerMove","onPointerLeave"]),i=c=>{ne(c,r.onFocusIn),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},s=c=>{ne(c,r.onFocusOut),Pe(t,c.relatedTarget)||n.resumeAllTimer()},a=c=>{ne(c,r.onPointerMove),n.pauseOnInteraction()&&!n.isPaused()&&n.pauseAllTimer()},l=c=>{ne(c,r.onPointerLeave),Pe(t,ze(t).activeElement)||n.resumeAllTimer()};return H(Ce([()=>t,()=>n.hotkey()],([c,u])=>{if(!c)return;const d=ze(c),f=h=>{u.every(g=>h[g]||h.code===g)&&$e(c)};d.addEventListener("keydown",f),W(()=>d.removeEventListener("keydown",f))})),H(()=>{if(!n.pauseOnPageIdle())return;const c=Cs(t);c.addEventListener("blur",n.pauseAllTimer),c.addEventListener("focus",n.resumeAllTimer),W(()=>{c.removeEventListener("blur",n.pauseAllTimer),c.removeEventListener("focus",n.resumeAllTimer)})}),b(le,F({as:"ol",ref(c){var u=ve(d=>t=d,r.ref);typeof u=="function"&&u(c)},tabIndex:-1,onFocusIn:i,onFocusOut:s,onPointerMove:a,onPointerLeave:l},o,{get children(){return b(rt,{get each(){return n.toasts()},children:c=>c.toastComponent({get toastId(){return c.id}})})}}))}function Kc(e){const t=Os(),n=Eo(),[r,o]=V(e,["style"]),[i,s]=j(100);let a=0;return H(()=>{if(t.isPaused()||n.isPersistent())return;const l=setInterval(()=>{const c=new Date().getTime()-n.closeTimerStartTime()+a,u=Math.trunc(100-c/n.duration()*100);s(u<0?0:u)});W(()=>{a+=new Date().getTime()-n.closeTimerStartTime(),clearInterval(l)})}),b(le,F({as:"div",get style(){return ct({"--kb-toast-progress-fill-width":`${i()}%`},r.style)}},o))}function jc(e){return b(le,F({as:"div","aria-hidden":"true",role:"presentation"},e))}var[Ts,_r]=bo({toasts:[]});function bp(e){_r("toasts",t=>[...t,e])}function Sp(e){return Ts.toasts.find(t=>t.id===e)}function xp(e,t){const n=Ts.toasts.findIndex(r=>r.id===e);n!==-1&&_r("toasts",r=>[...r.slice(0,n),t,...r.slice(n+1)])}function Cp(e){_r("toasts",t=>t.id===e,"dismiss",!0)}function Ep(e){_r("toasts",t=>t.filter(n=>n.id!==e))}function Rp(){_r("toasts",[])}var gn={toasts:()=>Ts.toasts,add:bp,get:Sp,update:xp,dismiss:Cp,remove:Ep,clear:Rp},dl="{hotkey}",Pp={close:"Close"},Ip={notifications:e=>`Notifications (${e})`};function Ds(e){const t=Q({id:`toast-region-${Ee()}`,hotkey:["altKey","KeyT"],duration:5e3,limit:3,swipeDirection:"right",swipeThreshold:50,pauseOnInteraction:!0,pauseOnPageIdle:!0,topLayer:!0,translations:Ip},e),[n,r]=V(t,["translations","style","hotkey","duration","limit","swipeDirection","swipeThreshold","pauseOnInteraction","pauseOnPageIdle","topLayer","aria-label","regionId"]),o=k(()=>gn.toasts().filter(f=>f.region===n.regionId&&f.dismiss===!1).slice(0,n.limit)),[i,s]=j(!1),a=()=>o().length>0,l=()=>n.hotkey.join("+").replace(/Key/g,"").replace(/Digit/g,""),c=()=>(n["aria-label"]||n.translations.notifications(dl)).replace(dl,l()),u=()=>({[Rr]:n.topLayer?"":void 0}),d={isPaused:i,toasts:o,hotkey:()=>n.hotkey,duration:()=>n.duration,swipeDirection:()=>n.swipeDirection,swipeThreshold:()=>n.swipeThreshold,pauseOnInteraction:()=>n.pauseOnInteraction,pauseOnPageIdle:()=>n.pauseOnPageIdle,pauseAllTimer:()=>s(!0),resumeAllTimer:()=>s(!1),generateId:dt(()=>r.id)};return b(Nc.Provider,{value:d,get children(){return b(le,F({as:"div",role:"region",tabIndex:-1,get"aria-label"(){return c()},get style(){return ct({"pointer-events":a()?n.topLayer?"auto":void 0:"none"},n.style)}},u,r))}})}var $p="toast.swipeStart",Mp="toast.swipeMove",Fp="toast.swipeCancel",Op="toast.swipeEnd";function _s(e){const t=Os(),n=Q({id:`toast-${Ee()}`,priority:"high",translations:Pp},e),[r,o]=V(n,["ref","translations","toastId","style","priority","duration","persistent","onPause","onResume","onSwipeStart","onSwipeMove","onSwipeCancel","onSwipeEnd","onEscapeKeyDown","onKeyDown","onPointerDown","onPointerMove","onPointerUp"]),[i,s]=j(!0),[a,l]=j(),[c,u]=j(),[d,f]=j(!0),[h,p]=j(),{present:g}=Un({show:i,element:()=>h()??null}),v=k(()=>r.duration||t.duration());let m,y=0,w=v(),S=null,C=null;const $=()=>{s(!1),f(!0)},A=()=>{gn.remove(r.toastId)},_=x=>{!x||r.persistent||(window.clearTimeout(m),y=new Date().getTime(),m=window.setTimeout($,x))},T=()=>{var x;_(w),(x=r.onResume)==null||x.call(r)},K=()=>{var I;const x=new Date().getTime()-y;w=w-x,window.clearTimeout(m),(I=r.onPause)==null||I.call(r)},N=x=>{var I;ne(x,r.onKeyDown),x.key==="Escape"&&((I=r.onEscapeKeyDown)==null||I.call(r,x),x.defaultPrevented||$())},z=x=>{ne(x,r.onPointerDown),x.button===0&&(S={x:x.clientX,y:x.clientY})},re=x=>{if(ne(x,r.onPointerMove),!S)return;const I=x.clientX-S.x,M=x.clientY-S.y,O=!!C,L=["left","right"].includes(t.swipeDirection()),B=["left","up"].includes(t.swipeDirection())?Math.min:Math.max,U=L?B(0,I):0,Y=L?0:B(0,M),ce=x.pointerType==="touch"?10:2,se={x:U,y:Y},Oe={originalEvent:x,delta:se};if(O){C=se,qr(Mp,r.onSwipeMove,Oe);const{x:et,y:oe}=se;x.currentTarget.setAttribute("data-swipe","move"),x.currentTarget.style.setProperty("--kb-toast-swipe-move-x",`${et}px`),x.currentTarget.style.setProperty("--kb-toast-swipe-move-y",`${oe}px`)}else fl(se,t.swipeDirection(),ce)?(C=se,qr($p,r.onSwipeStart,Oe),x.currentTarget.setAttribute("data-swipe","start"),x.target.setPointerCapture(x.pointerId)):(Math.abs(I)>ce||Math.abs(M)>ce)&&(S=null)},P=x=>{ne(x,r.onPointerUp);const I=C,M=x.target;if(M.hasPointerCapture(x.pointerId)&&M.releasePointerCapture(x.pointerId),C=null,S=null,I){const O=x.currentTarget,L={originalEvent:x,delta:I};if(fl(I,t.swipeDirection(),t.swipeThreshold())){qr(Op,r.onSwipeEnd,L);const{x:B,y:U}=I;x.currentTarget.setAttribute("data-swipe","end"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),x.currentTarget.style.setProperty("--kb-toast-swipe-end-x",`${B}px`),x.currentTarget.style.setProperty("--kb-toast-swipe-end-y",`${U}px`),$()}else qr(Fp,r.onSwipeCancel,L),x.currentTarget.setAttribute("data-swipe","cancel"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-move-y"),x.currentTarget.style.removeProperty("--kb-toast-swipe-end-x"),x.currentTarget.style.removeProperty("--kb-toast-swipe-end-y");O.addEventListener("click",B=>B.preventDefault(),{once:!0})}};Wn(()=>{t.toasts().find(x=>x.id===r.toastId&&x.update)&&f(!1)}),H(Ce(()=>t.isPaused(),x=>{x?K():T()},{defer:!0})),H(Ce([i,v],([x,I])=>{x&&!t.isPaused()&&_(I)})),H(Ce(()=>{var x;return(x=gn.get(r.toastId))==null?void 0:x.dismiss},x=>x&&$())),H(Ce(()=>g(),x=>!x&&A()));const E={translations:()=>r.translations,close:$,duration:v,isPersistent:()=>r.persistent??!1,closeTimerStartTime:()=>y,generateId:dt(()=>o.id),registerTitleId:Ke(l),registerDescriptionId:Ke(u)};return b(pe,{get when(){return g()},get children(){return b(Vc.Provider,{value:E,get children(){return b(le,F({as:"li",ref(x){var I=ve(p,r.ref);typeof I=="function"&&I(x)},role:"status",tabIndex:0,get style(){return ct({animation:d()?void 0:"none","user-select":"none","touch-action":"none"},r.style)},get"aria-live"(){return r.priority==="high"?"assertive":"polite"},"aria-atomic":"true",get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-opened"(){return i()?"":void 0},get"data-closed"(){return i()?void 0:""},get"data-swipe-direction"(){return t.swipeDirection()},onKeyDown:N,onPointerDown:z,onPointerMove:re,onPointerUp:P},o))}})}})}function fl(e,t,n=0){const r=Math.abs(e.x),o=Math.abs(e.y),i=r>o;return t==="left"||t==="right"?i&&r>n:!i&&o>n}function qr(e,t,n){const r=n.originalEvent.currentTarget,o=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(o)}function Ls(e){const t=Eo(),n=Q({id:t.generateId("title")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerTitleId(r.id))),b(le,F({as:"div",get id(){return r.id}},o))}var Ap=0;function zc(e,t){const n=Ap++;return gn.add({id:n,toastComponent:e,dismiss:!1,update:!1,region:t==null?void 0:t.region}),n}function Yi(e,t){gn.update(e,{id:e,toastComponent:t,dismiss:!1,update:!0})}function Tp(e,t,n){const r=zc(o=>t({get toastId(){return o.toastId},state:"pending"}),n);return(xs(e)?e():e).then(o=>Yi(r,i=>t({get toastId(){return i.toastId},state:"fulfilled",data:o}))).catch(o=>Yi(r,i=>t({get toastId(){return i.toastId},state:"rejected",error:o}))),r}function Dp(e){return gn.dismiss(e),e}function _p(){gn.clear()}var ks={show:zc,update:Yi,promise:Tp,dismiss:Dp,clear:_p},Lp=Object.assign(_s,{CloseButton:Ms,Description:Fs,List:As,ProgressFill:Kc,ProgressTrack:jc,Region:Ds,Title:Ls,toaster:ks});function Bc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Bc(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function kp(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Bc(e))&&(r&&(r+=" "),r+=t);return r}const hl=e=>typeof e=="boolean"?"".concat(e):e===0?"0":e,gl=kp,Lr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return gl(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:i}=t,s=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],d=i==null?void 0:i[c];if(u===null)return null;const f=hl(u)||hl(d);return o[c][f]}),a=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(p=>{let[g,v]=p;return Array.isArray(v)?v.includes({...i,...a}[g]):{...i,...a}[g]===v})?[...c,d,f]:c},[]);return gl(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)};function Hc(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Vp(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hc(e))&&(r&&(r+=" "),r+=t);return r}const Vs="-",Np=e=>{const t=jp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const a=s.split(Vs);return a[0]===""&&a.length!==1&&a.shift(),Gc(a,t)||Kp(s)},getConflictingClassGroupIds:(s,a)=>{const l=n[s]||[];return a&&r[s]?[...l,...r[s]]:l}}},Gc=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Gc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const i=e.join(Vs);return(s=t.validators.find(({validator:a})=>a(i)))==null?void 0:s.classGroupId},pl=/^\[(.+)\]$/,Kp=e=>{if(pl.test(e)){const t=pl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jp=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Bp(Object.entries(e.classGroups),n).forEach(([i,s])=>{Zi(s,r,i,t)}),r},Zi=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const i=o===""?t:ml(t,o);i.classGroupId=n;return}if(typeof o=="function"){if(zp(o)){Zi(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([i,s])=>{Zi(s,ml(t,i),n,r)})})},ml=(e,t)=>{let n=e;return t.split(Vs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},zp=e=>e.isThemeGetter,Bp=(e,t)=>t?e.map(([n,r])=>{const o=r.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,a])=>[t+s,a])):i);return[n,o]}):e,Hp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(i,s)=>{n.set(i,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(i){let s=n.get(i);if(s!==void 0)return s;if((s=r.get(i))!==void 0)return o(i,s),s},set(i,s){n.has(i)?n.set(i,s):o(i,s)}}},Uc="!",Gp=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],i=t.length,s=a=>{const l=[];let c=0,u=0,d;for(let v=0;v<a.length;v++){let m=a[v];if(c===0){if(m===o&&(r||a.slice(v,v+i)===t)){l.push(a.slice(u,v)),u=v+i;continue}if(m==="/"){d=v;continue}}m==="["?c++:m==="]"&&c--}const f=l.length===0?a:a.substring(u),h=f.startsWith(Uc),p=h?f.substring(1):f,g=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:s}):s},Up=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},qp=e=>({cache:Hp(e.cacheSize),parseClassName:Gp(e),...Np(e)}),Wp=/\s+/,Xp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(Wp);let a="";for(let l=s.length-1;l>=0;l-=1){const c=s[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let p=!!h,g=r(p?f.substring(0,h):f);if(!g){if(!p){a=c+(a.length>0?" "+a:a);continue}if(g=r(f),!g){a=c+(a.length>0?" "+a:a);continue}p=!1}const v=Up(u).join(":"),m=d?v+Uc:v,y=m+g;if(i.includes(y))continue;i.push(y);const w=o(g,p);for(let S=0;S<w.length;++S){const C=w[S];i.push(m+C)}a=c+(a.length>0?" "+a:a)}return a};function Qp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=qc(t))&&(r&&(r+=" "),r+=n);return r}const qc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=qc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Yp(e,...t){let n,r,o,i=s;function s(l){const c=t.reduce((u,d)=>d(u),e());return n=qp(c),r=n.cache.get,o=n.cache.set,i=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=Xp(l,n);return o(l,u),u}return function(){return i(Qp.apply(null,arguments))}}const be=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Wc=/^\[(?:([a-z-]+):)?(.+)\]$/i,Zp=/^\d+\/\d+$/,Jp=new Set(["px","full","screen"]),em=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,tm=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,nm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,rm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,om=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ct=e=>Mn(e)||Jp.has(e)||Zp.test(e),_t=e=>Qn(e,"length",fm),Mn=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>Qn(e,"number",Mn),ir=e=>!!e&&Number.isInteger(Number(e)),im=e=>e.endsWith("%")&&Mn(e.slice(0,-1)),ae=e=>Wc.test(e),Lt=e=>em.test(e),sm=new Set(["length","size","percentage"]),am=e=>Qn(e,sm,Xc),lm=e=>Qn(e,"position",Xc),um=new Set(["image","url"]),cm=e=>Qn(e,um,gm),dm=e=>Qn(e,"",hm),sr=()=>!0,Qn=(e,t,n)=>{const r=Wc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},fm=e=>tm.test(e)&&!nm.test(e),Xc=()=>!1,hm=e=>rm.test(e),gm=e=>om.test(e),pm=()=>{const e=be("colors"),t=be("spacing"),n=be("blur"),r=be("brightness"),o=be("borderColor"),i=be("borderRadius"),s=be("borderSpacing"),a=be("borderWidth"),l=be("contrast"),c=be("grayscale"),u=be("hueRotate"),d=be("invert"),f=be("gap"),h=be("gradientColorStops"),p=be("gradientColorStopPositions"),g=be("inset"),v=be("margin"),m=be("opacity"),y=be("padding"),w=be("saturate"),S=be("scale"),C=be("sepia"),$=be("skew"),A=be("space"),_=be("translate"),T=()=>["auto","contain","none"],K=()=>["auto","hidden","clip","visible","scroll"],N=()=>["auto",ae,t],z=()=>[ae,t],re=()=>["",Ct,_t],P=()=>["auto",Mn,ae],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],x=()=>["solid","dashed","dotted","double","none"],I=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],M=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ae],L=()=>["auto","avoid","all","avoid-page","page","left","right","column"],B=()=>[Mn,ae];return{cacheSize:500,separator:":",theme:{colors:[sr],spacing:[Ct,_t],blur:["none","",Lt,ae],brightness:B(),borderColor:[e],borderRadius:["none","","full",Lt,ae],borderSpacing:z(),borderWidth:re(),contrast:B(),grayscale:O(),hueRotate:B(),invert:O(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[im,_t],inset:N(),margin:N(),opacity:B(),padding:z(),saturate:B(),scale:B(),sepia:O(),skew:B(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[Lt]}],"break-after":[{"break-after":L()}],"break-before":[{"break-before":L()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...E(),ae]}],overflow:[{overflow:K()}],"overflow-x":[{"overflow-x":K()}],"overflow-y":[{"overflow-y":K()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ir,ae]}],basis:[{basis:N()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",ir,ae]}],"grid-cols":[{"grid-cols":[sr]}],"col-start-end":[{col:["auto",{span:["full",ir,ae]},ae]}],"col-start":[{"col-start":P()}],"col-end":[{"col-end":P()}],"grid-rows":[{"grid-rows":[sr]}],"row-start-end":[{row:["auto",{span:[ir,ae]},ae]}],"row-start":[{"row-start":P()}],"row-end":[{"row-end":P()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...M()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...M(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...M(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[Lt]},Lt]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Lt,_t]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ho]}],"font-family":[{font:[sr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",Mn,Ho]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ct,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...x(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ct,_t]}],"underline-offset":[{"underline-offset":["auto",Ct,ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),lm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",am]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},cm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[p]}],"gradient-via-pos":[{via:[p]}],"gradient-to-pos":[{to:[p]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...x(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:x()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...x()]}],"outline-offset":[{"outline-offset":[Ct,ae]}],"outline-w":[{outline:[Ct,_t]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Ct,_t]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Lt,dm]}],"shadow-color":[{shadow:[sr]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...I(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":I()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Lt,ae]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[w]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:B()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:B()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[ir,ae]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[$]}],"skew-y":[{"skew-y":[$]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ct,_t,Ho]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},mm=Yp(pm);function de(...e){return mm(Vp(e))}var vm=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M18 6l-12 12"></path><path d="M6 6l12 12">'),ym=ie('<div class="grid gap-1">');const wm=Lr("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--kb-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--kb-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[opened]:animate-in data-[closed]:animate-out data-[swipe=end]:animate-out data-[closed]:fade-out-80 data-[closed]:slide-out-to-right-full data-[opened]:slide-in-from-top-full data-[opened]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground",success:"success border-success-foreground bg-success text-success-foreground",warning:"warning border-warning-foreground bg-warning text-warning-foreground",error:"error border-error-foreground bg-error text-error-foreground"}},defaultVariants:{variant:"default"}}),bm=e=>{const[t,n]=V(e,["class"]);return b(wo,{get children(){return b(Ds,{get children(){return b(As,F({get class(){return de("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse gap-2 p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t.class)}},n))}})}})},Sm=e=>{const[t,n]=V(e,["class","variant"]);return b(_s,F({get class(){return de(wm({variant:t.variant}),t.class)}},n))},xm=e=>{const[t,n]=V(e,["class"]);return b(Ms,F({get class(){return de("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-destructive-foreground group-[.error]:text-error-foreground group-[.success]:text-success-foreground group-[.warning]:text-warning-foreground",t.class)}},n,{get children(){return vm()}}))},Cm=e=>{const[t,n]=V(e,["class"]);return b(Ls,F({get class(){return de("text-sm font-semibold",t.class)}},n))},Em=e=>{const[t,n]=V(e,["class"]);return b(Fs,F({get class(){return de("text-sm opacity-90",t.class)}},n))};function vl(e){ks.show(t=>b(Sm,{get toastId(){return t.toastId},get variant(){return e.variant},get duration(){return e.duration},get children(){return[(()=>{var n=ym();return X(n,(()=>{var r=k(()=>!!e.title);return()=>r()&&b(Cm,{get children(){return e.title}})})(),null),X(n,(()=>{var r=k(()=>!!e.description);return()=>r()&&b(Em,{get children(){return e.description}})})(),null),n})(),b(xm,{})]}}))}var Go="focusScope.autoFocusOnMount",Uo="focusScope.autoFocusOnUnmount",yl={bubbles:!1,cancelable:!0},wl={stack:[],active(){return this.stack[0]},add(e){var t;e!==this.active()&&((t=this.active())==null||t.pause()),this.stack=Wi(this.stack,e),this.stack.unshift(e)},remove(e){var t;this.stack=Wi(this.stack,e),(t=this.active())==null||t.resume()}};function Qc(e,t){const[n,r]=j(!1),o={pause(){r(!0)},resume(){r(!1)}};let i=null;const s=p=>{var g;return(g=e.onMountAutoFocus)==null?void 0:g.call(e,p)},a=p=>{var g;return(g=e.onUnmountAutoFocus)==null?void 0:g.call(e,p)},l=()=>ze(t()),c=()=>{const p=l().createElement("span");return p.setAttribute("data-focus-trap",""),p.tabIndex=0,Object.assign(p.style,Dc),p},u=()=>{const p=t();return p?Oc(p,!0).filter(g=>!g.hasAttribute("data-focus-trap")):[]},d=()=>{const p=u();return p.length>0?p[0]:null},f=()=>{const p=u();return p.length>0?p[p.length-1]:null},h=()=>{const p=t();if(!p)return!1;const g=pr(p);return!g||Pe(p,g)?!1:Ac(g)};H(()=>{const p=t();if(!p)return;wl.add(o);const g=pr(p);if(!Pe(p,g)){const m=new CustomEvent(Go,yl);p.addEventListener(Go,s),p.dispatchEvent(m),m.defaultPrevented||setTimeout(()=>{$e(d()),pr(p)===g&&$e(p)},0)}W(()=>{p.removeEventListener(Go,s),setTimeout(()=>{const m=new CustomEvent(Uo,yl);h()&&m.preventDefault(),p.addEventListener(Uo,a),p.dispatchEvent(m),m.defaultPrevented||$e(g??l().body),p.removeEventListener(Uo,a),wl.remove(o)},0)})}),H(()=>{const p=t();if(!p||!D(e.trapFocus)||n())return;const g=m=>{const y=m.target;y!=null&&y.closest(`[${Rr}]`)||(Pe(p,y)?i=y:$e(i))},v=m=>{const w=m.relatedTarget??pr(p);w!=null&&w.closest(`[${Rr}]`)||Pe(p,w)||$e(i)};l().addEventListener("focusin",g),l().addEventListener("focusout",v),W(()=>{l().removeEventListener("focusin",g),l().removeEventListener("focusout",v)})}),H(()=>{const p=t();if(!p||!D(e.trapFocus)||n())return;const g=c();p.insertAdjacentElement("afterbegin",g);const v=c();p.insertAdjacentElement("beforeend",v);function m(w){const S=d(),C=f();w.relatedTarget===S?$e(C):$e(S)}g.addEventListener("focusin",m),v.addEventListener("focusin",m);const y=new MutationObserver(w=>{for(const S of w)S.previousSibling===v&&(v.remove(),p.insertAdjacentElement("beforeend",v)),S.nextSibling===g&&(g.remove(),p.insertAdjacentElement("afterbegin",g))});y.observe(p,{childList:!0,subtree:!1}),W(()=>{g.removeEventListener("focusin",m),v.removeEventListener("focusin",m),g.remove(),v.remove(),y.disconnect()})})}var Rm="data-live-announcer";function Yc(e){H(()=>{D(e.isDisabled)||W(Pm(D(e.targets),D(e.root)))})}var ar=new WeakMap,Xe=[];function Pm(e,t=document.body){const n=new Set(e),r=new Set,o=l=>{for(const f of l.querySelectorAll(`[${Rm}], [${Rr}]`))n.add(f);const c=f=>{if(n.has(f)||f.parentElement&&r.has(f.parentElement)&&f.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(const h of n)if(f.contains(h))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},u=document.createTreeWalker(l,NodeFilter.SHOW_ELEMENT,{acceptNode:c}),d=c(l);if(d===NodeFilter.FILTER_ACCEPT&&i(l),d!==NodeFilter.FILTER_REJECT){let f=u.nextNode();for(;f!=null;)i(f),f=u.nextNode()}},i=l=>{const c=ar.get(l)??0;l.getAttribute("aria-hidden")==="true"&&c===0||(c===0&&l.setAttribute("aria-hidden","true"),r.add(l),ar.set(l,c+1))};Xe.length&&Xe[Xe.length-1].disconnect(),o(t);const s=new MutationObserver(l=>{for(const c of l)if(!(c.type!=="childList"||c.addedNodes.length===0)&&![...n,...r].some(u=>u.contains(c.target))){for(const u of c.removedNodes)u instanceof Element&&(n.delete(u),r.delete(u));for(const u of c.addedNodes)(u instanceof HTMLElement||u instanceof SVGElement)&&(u.dataset.liveAnnouncer==="true"||u.dataset.reactAriaTopLayer==="true")?n.add(u):u instanceof Element&&o(u)}});s.observe(t,{childList:!0,subtree:!0});const a={observe(){s.observe(t,{childList:!0,subtree:!0})},disconnect(){s.disconnect()}};return Xe.push(a),()=>{s.disconnect();for(const l of r){const c=ar.get(l);if(c==null)return;c===1?(l.removeAttribute("aria-hidden"),ar.delete(l)):ar.set(l,c-1)}a===Xe[Xe.length-1]?(Xe.pop(),Xe.length&&Xe[Xe.length-1].observe()):Xe.splice(Xe.indexOf(a),1)}}function Im(e){const t=n=>{var r;n.key===Es.Escape&&((r=e.onEscapeKeyDown)==null||r.call(e,n))};H(()=>{var r;if(D(e.isDisabled))return;const n=((r=e.ownerDocument)==null?void 0:r.call(e))??ze();n.addEventListener("keydown",t),W(()=>{n.removeEventListener("keydown",t)})})}var bl="interactOutside.pointerDownOutside",Sl="interactOutside.focusOutside";function Zc(e,t){let n,r=tp;const o=()=>ze(t()),i=d=>{var f;return(f=e.onPointerDownOutside)==null?void 0:f.call(e,d)},s=d=>{var f;return(f=e.onFocusOutside)==null?void 0:f.call(e,d)},a=d=>{var f;return(f=e.onInteractOutside)==null?void 0:f.call(e,d)},l=d=>{var h;const f=d.target;return!(f instanceof HTMLElement)||f.closest(`[${Rr}]`)||!Pe(o(),f)||Pe(t(),f)?!1:!((h=e.shouldExcludeElement)!=null&&h.call(e,f))},c=d=>{function f(){const h=t(),p=d.target;if(!h||!p||!l(d))return;const g=Se([i,a]);p.addEventListener(bl,g,{once:!0});const v=new CustomEvent(bl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:d.button===2||Hg(d)&&d.button===0}});p.dispatchEvent(v)}d.pointerType==="touch"?(o().removeEventListener("click",f),r=f,o().addEventListener("click",f,{once:!0})):f()},u=d=>{const f=t(),h=d.target;if(!f||!h||!l(d))return;const p=Se([s,a]);h.addEventListener(Sl,p,{once:!0});const g=new CustomEvent(Sl,{bubbles:!1,cancelable:!0,detail:{originalEvent:d,isContextMenu:!1}});h.dispatchEvent(g)};H(()=>{D(e.isDisabled)||(n=window.setTimeout(()=>{o().addEventListener("pointerdown",c,!0)},0),o().addEventListener("focusin",u,!0),W(()=>{window.clearTimeout(n),o().removeEventListener("click",r),o().removeEventListener("pointerdown",c,!0),o().removeEventListener("focusin",u,!0)}))})}var Jc=we();function $m(){return ye(Jc)}function Ro(e){let t;const n=$m(),[r,o]=V(e,["ref","disableOutsidePointerEvents","excludedElements","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss","bypassTopMostLayerCheck"]),i=new Set([]),s=d=>{i.add(d);const f=n==null?void 0:n.registerNestedLayer(d);return()=>{i.delete(d),f==null||f()}};Zc({shouldExcludeElement:d=>{var f;return t?((f=r.excludedElements)==null?void 0:f.some(h=>Pe(h(),d)))||[...i].some(h=>Pe(h,d)):!1},onPointerDownOutside:d=>{var f,h,p;!t||He.isBelowPointerBlockingLayer(t)||!r.bypassTopMostLayerCheck&&!He.isTopMostLayer(t)||((f=r.onPointerDownOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(p=r.onDismiss)==null||p.call(r))},onFocusOutside:d=>{var f,h,p;(f=r.onFocusOutside)==null||f.call(r,d),(h=r.onInteractOutside)==null||h.call(r,d),d.defaultPrevented||(p=r.onDismiss)==null||p.call(r)}},()=>t),Im({ownerDocument:()=>ze(t),onEscapeKeyDown:d=>{var f;!t||!He.isTopMostLayer(t)||((f=r.onEscapeKeyDown)==null||f.call(r,d),!d.defaultPrevented&&r.onDismiss&&(d.preventDefault(),r.onDismiss()))}}),Wn(()=>{if(!t)return;He.addLayer({node:t,isPointerBlocking:r.disableOutsidePointerEvents,dismiss:r.onDismiss});const d=n==null?void 0:n.registerNestedLayer(t);He.assignPointerEventToLayers(),He.disableBodyPointerEvents(t),W(()=>{t&&(He.removeLayer(t),d==null||d(),He.assignPointerEventToLayers(),He.restoreBodyPointerEvents(t))})}),H(Ce([()=>t,()=>r.disableOutsidePointerEvents],([d,f])=>{if(!d)return;const h=He.find(d);h&&h.isPointerBlocking!==f&&(h.isPointerBlocking=f,He.assignPointerEventToLayers()),f&&He.disableBodyPointerEvents(d),W(()=>{He.restoreBodyPointerEvents(d)})},{defer:!0}));const u={registerNestedLayer:s};return b(Jc.Provider,{value:u,get children(){return b(le,F({as:"div",ref(d){var f=ve(h=>t=h,r.ref);typeof f=="function"&&f(d)}},o))}})}function yt(e){var s;const[t,n]=j((s=e.defaultValue)==null?void 0:s.call(e)),r=k(()=>{var a;return((a=e.value)==null?void 0:a.call(e))!==void 0}),o=k(()=>{var a;return r()?(a=e.value)==null?void 0:a.call(e):t()});return[o,a=>{Me(()=>{var c;const l=Tg(a,o());return Object.is(l,o())||(r()||n(l),(c=e.onChange)==null||c.call(e,l)),l})}]}function ed(e){const[t,n]=yt(e);return[()=>t()??!1,n]}function Mm(e){const[t,n]=yt(e);return[()=>t()??[],n]}function Po(e={}){const[t,n]=ed({value:()=>D(e.open),defaultValue:()=>!!D(e.defaultOpen),onChange:s=>{var a;return(a=e.onOpenChange)==null?void 0:a.call(e,s)}}),r=()=>{n(!0)},o=()=>{n(!1)};return{isOpen:t,setIsOpen:n,open:r,close:o,toggle:()=>{t()?o():r()}}}var Ji=(e,t)=>{if(e.contains(t))return!0;let n=t;for(;n;){if(n===e)return!0;n=n._$host??n.parentElement}return!1},Wr=new Map,Fm=e=>{H(()=>{const t=De(e.style)??{},n=De(e.properties)??[],r={};for(const i in t)r[i]=e.element.style[i];const o=Wr.get(e.key);o?o.activeCount++:Wr.set(e.key,{activeCount:1,originalStyles:r,properties:n.map(i=>i.key)}),Object.assign(e.element.style,e.style);for(const i of n)e.element.style.setProperty(i.key,i.value);W(()=>{var s;const i=Wr.get(e.key);if(i){if(i.activeCount!==1){i.activeCount--;return}Wr.delete(e.key);for(const[a,l]of Object.entries(i.originalStyles))e.element.style[a]=l;for(const a of i.properties)e.element.style.removeProperty(a);e.element.style.length===0&&e.element.removeAttribute("style"),(s=e.cleanup)==null||s.call(e)}})})},xl=Fm,Om=(e,t)=>{switch(t){case"x":return[e.clientWidth,e.scrollLeft,e.scrollWidth];case"y":return[e.clientHeight,e.scrollTop,e.scrollHeight]}},Am=(e,t)=>{const n=getComputedStyle(e),r=t==="x"?n.overflowX:n.overflowY;return r==="auto"||r==="scroll"||e.tagName==="HTML"&&r==="visible"},Tm=(e,t,n)=>{const r=t==="x"&&window.getComputedStyle(e).direction==="rtl"?-1:1;let o=e,i=0,s=0,a=!1;do{const[l,c,u]=Om(o,t),d=u-l-r*c;(c!==0||d!==0)&&Am(o,t)&&(i+=d,s+=c),o===(n??document.documentElement)?a=!0:o=o._$host??o.parentElement}while(o&&!a);return[i,s]},[Cl,El]=j([]),Dm=e=>Cl().indexOf(e)===Cl().length-1,_m=e=>{const t=F({element:null,enabled:!0,hideScrollbar:!0,preventScrollbarShift:!0,preventScrollbarShiftMode:"padding",restoreScrollPosition:!0,allowPinchZoom:!1},e),n=Ee();let r=[0,0],o=null,i=null;H(()=>{De(t.enabled)&&(El(c=>[...c,n]),W(()=>{El(c=>c.filter(u=>u!==n))}))}),H(()=>{if(!De(t.enabled)||!De(t.hideScrollbar))return;const{body:c}=document,u=window.innerWidth-c.offsetWidth;if(De(t.preventScrollbarShift)){const d={overflow:"hidden"},f=[];u>0&&(De(t.preventScrollbarShiftMode)==="padding"?d.paddingRight=`calc(${window.getComputedStyle(c).paddingRight} + ${u}px)`:d.marginRight=`calc(${window.getComputedStyle(c).marginRight} + ${u}px)`,f.push({key:"--scrollbar-width",value:`${u}px`}));const h=window.scrollY,p=window.scrollX;xl({key:"prevent-scroll",element:c,style:d,properties:f,cleanup:()=>{De(t.restoreScrollPosition)&&u>0&&window.scrollTo(p,h)}})}else xl({key:"prevent-scroll",element:c,style:{overflow:"hidden"}})}),H(()=>{!Dm(n)||!De(t.enabled)||(document.addEventListener("wheel",a,{passive:!1}),document.addEventListener("touchstart",s,{passive:!1}),document.addEventListener("touchmove",l,{passive:!1}),W(()=>{document.removeEventListener("wheel",a),document.removeEventListener("touchstart",s),document.removeEventListener("touchmove",l)}))});const s=c=>{r=Rl(c),o=null,i=null},a=c=>{const u=c.target,d=De(t.element),f=Lm(c),h=Math.abs(f[0])>Math.abs(f[1])?"x":"y",p=h==="x"?f[0]:f[1],g=Pl(u,h,p,d);let v;d&&Ji(d,u)?v=!g:v=!0,v&&c.cancelable&&c.preventDefault()},l=c=>{const u=De(t.element),d=c.target;let f;if(c.touches.length===2)f=!De(t.allowPinchZoom);else{if(o==null||i===null){const h=Rl(c).map((g,v)=>r[v]-g),p=Math.abs(h[0])>Math.abs(h[1])?"x":"y";o=p,i=p==="x"?h[0]:h[1]}if(d.type==="range")f=!1;else{const h=Pl(d,o,i,u);u&&Ji(u,d)?f=!h:f=!0}}f&&c.cancelable&&c.preventDefault()}},Lm=e=>[e.deltaX,e.deltaY],Rl=e=>e.changedTouches[0]?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0],Pl=(e,t,n,r)=>{const o=r!==null&&Ji(r,e),[i,s]=Tm(e,t,o?r:void 0);return!(n>0&&Math.abs(i)<=1||n<0&&Math.abs(s)<1)},km=_m,td=km,Vm={};At(Vm,{CloseButton:()=>Ns,Content:()=>Ks,Description:()=>js,Dialog:()=>Nm,Overlay:()=>zs,Portal:()=>Bs,Root:()=>Hs,Title:()=>Gs,Trigger:()=>rd});var nd=we();function yn(){const e=ye(nd);if(e===void 0)throw new Error("[kobalte]: `useDialogContext` must be used within a `Dialog` component");return e}function Ns(e){const t=yn(),[n,r]=V(e,["aria-label","onClick"]);return b(bt,F({get"aria-label"(){return n["aria-label"]||t.translations().dismiss},onClick:i=>{ne(i,n.onClick),t.close()}},r))}function Ks(e){let t;const n=yn(),r=Q({id:n.generateId("content")},e),[o,i]=V(r,["ref","onOpenAutoFocus","onCloseAutoFocus","onPointerDownOutside","onFocusOutside","onInteractOutside"]);let s=!1,a=!1;const l=f=>{var h;(h=o.onPointerDownOutside)==null||h.call(o,f),n.modal()&&f.detail.isContextMenu&&f.preventDefault()},c=f=>{var h;(h=o.onFocusOutside)==null||h.call(o,f),n.modal()&&f.preventDefault()},u=f=>{var h;(h=o.onInteractOutside)==null||h.call(o,f),!n.modal()&&(f.defaultPrevented||(s=!0,f.detail.originalEvent.type==="pointerdown"&&(a=!0)),Pe(n.triggerRef(),f.target)&&f.preventDefault(),f.detail.originalEvent.type==="focusin"&&a&&f.preventDefault())},d=f=>{var h;(h=o.onCloseAutoFocus)==null||h.call(o,f),n.modal()?(f.preventDefault(),$e(n.triggerRef())):(f.defaultPrevented||(s||$e(n.triggerRef()),f.preventDefault()),s=!1,a=!1)};return Yc({isDisabled:()=>!(n.isOpen()&&n.modal()),targets:()=>t?[t]:[]}),td({element:()=>t??null,enabled:()=>n.contentPresent()&&n.preventScroll()}),Qc({trapFocus:()=>n.isOpen()&&n.modal(),onMountAutoFocus:o.onOpenAutoFocus,onUnmountAutoFocus:d},()=>t),H(()=>W(n.registerContentId(i.id))),b(pe,{get when(){return n.contentPresent()},get children(){return b(Ro,F({ref(f){var h=ve(p=>{n.setContentRef(p),t=p},o.ref);typeof h=="function"&&h(f)},role:"dialog",tabIndex:-1,get disableOutsidePointerEvents(){return k(()=>!!n.modal())()&&n.isOpen()},get excludedElements(){return[n.triggerRef]},get"aria-labelledby"(){return n.titleId()},get"aria-describedby"(){return n.descriptionId()},get"data-expanded"(){return n.isOpen()?"":void 0},get"data-closed"(){return n.isOpen()?void 0:""},onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,get onDismiss(){return n.close}},i))}})}function js(e){const t=yn(),n=Q({id:t.generateId("description")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerDescriptionId(r.id))),b(le,F({as:"p",get id(){return r.id}},o))}function zs(e){const t=yn(),[n,r]=V(e,["ref","style","onPointerDown"]),o=i=>{ne(i,n.onPointerDown),i.target===i.currentTarget&&i.preventDefault()};return b(pe,{get when(){return t.overlayPresent()},get children(){return b(le,F({as:"div",ref(i){var s=ve(t.setOverlayRef,n.ref);typeof s=="function"&&s(i)},get style(){return ct({"pointer-events":"auto"},n.style)},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onPointerDown:o},r))}})}function Bs(e){const t=yn();return b(pe,{get when(){return t.contentPresent()||t.overlayPresent()},get children(){return b(wo,e)}})}var Il={dismiss:"Dismiss"};function Hs(e){const t=`dialog-${Ee()}`,n=Q({id:t,modal:!0,translations:Il},e),[r,o]=j(),[i,s]=j(),[a,l]=j(),[c,u]=j(),[d,f]=j(),[h,p]=j(),g=Po({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:S=>{var C;return(C=n.onOpenChange)==null?void 0:C.call(n,S)}}),v=()=>n.forceMount||g.isOpen(),{present:m}=Un({show:v,element:()=>c()??null}),{present:y}=Un({show:v,element:()=>d()??null}),w={translations:()=>n.translations??Il,isOpen:g.isOpen,modal:()=>n.modal??!0,preventScroll:()=>n.preventScroll??w.modal(),contentId:r,titleId:i,descriptionId:a,triggerRef:h,overlayRef:c,setOverlayRef:u,contentRef:d,setContentRef:f,overlayPresent:m,contentPresent:y,close:g.close,toggle:g.toggle,setTriggerRef:p,generateId:dt(()=>n.id),registerContentId:Ke(o),registerTitleId:Ke(s),registerDescriptionId:Ke(l)};return b(nd.Provider,{value:w,get children(){return n.children}})}function Gs(e){const t=yn(),n=Q({id:t.generateId("title")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerTitleId(r.id))),b(le,F({as:"h2",get id(){return r.id}},o))}function rd(e){const t=yn(),[n,r]=V(e,["ref","onClick"]);return b(bt,F({ref(i){var s=ve(t.setTriggerRef,n.ref);typeof s=="function"&&s(i)},"aria-haspopup":"dialog",get"aria-expanded"(){return t.isOpen()},get"aria-controls"(){return k(()=>!!t.isOpen())()?t.contentId():void 0},get"data-expanded"(){return t.isOpen()?"":void 0},get"data-closed"(){return t.isOpen()?void 0:""},onClick:i=>{ne(i,n.onClick),t.toggle()}},r))}var Nm=Object.assign(Hs,{CloseButton:Ns,Content:Ks,Description:js,Overlay:zs,Portal:Bs,Title:Gs,Trigger:rd}),od=ie("<div>"),Km=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M18 6l-12 12"></path><path d="M6 6l12 12">'),jm=ie("<span class=sr-only>Close");const zm=Hs,Bm=Lr("fixed inset-0 z-50 flex",{variants:{position:{top:"items-start",bottom:"items-end",left:"justify-start",right:"justify-end"}},defaultVariants:{position:"right"}}),Hm=e=>{const[t,n]=V(e,["position","children"]);return b(Bs,F(n,{get children(){var r=od();return X(r,()=>t.children),je(()=>Yu(r,Bm({position:t.position}))),r}}))},Gm=e=>{const[t,n]=V(e,["class"]);return b(zs,F({get class(){return de("fixed inset-0 z-50 bg-black/80 data-[expanded=]:animate-in data-[closed=]:animate-out data-[closed=]:fade-out-0 data-[expanded=]:fade-in-0",t.class)}},n))},Um=Lr("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[closed=]:duration-300 data-[expanded=]:duration-500 data-[expanded=]:animate-in data-[closed=]:animate-out",{variants:{position:{top:"inset-x-0 top-0 border-b data-[closed=]:slide-out-to-top data-[expanded=]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[closed=]:slide-out-to-bottom data-[expanded=]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[closed=]:slide-out-to-left data-[expanded]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[closed=]:slide-out-to-right data-[expanded=]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{position:"right"}}),qm=e=>{const[t,n]=V(e,["position","class","children"]);return b(Hm,{get position(){return t.position},get children(){return[b(Gm,{}),b(Ks,F({get class(){return de(Um({position:t.position}),t.class,"max-h-screen overflow-y-auto")}},n,{get children(){return[k(()=>t.children),b(Ns,{class:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",get children(){return[Km(),jm()]}})]}}))]}})},Wm=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=od();return Je(r,F({get class(){return de("flex flex-col space-y-2 text-center sm:text-left",t.class)}},n),!1,!1),r})()},Xm=e=>{const[t,n]=V(e,["class"]);return b(Gs,F({get class(){return de("text-lg font-semibold text-foreground",t.class)}},n))},Qm=e=>{const[t,n]=V(e,["class"]);return b(js,F({get class(){return de("text-sm text-muted-foreground",t.class)}},n))},id=()=>{const[e,t]=Th(),n=k(()=>(e==null?void 0:e.bundleId)??null),r=k(()=>(e==null?void 0:e.channel)??null),o=k(()=>(e==null?void 0:e.platform)??null);return{bundleIdFilter:n,channelFilter:r,platformFilter:o,setBundleIdFilter:i=>{t({bundleId:i??void 0})},setChannelFilter:i=>{t({channel:i??void 0})},setPlatformFilter:i=>{t({platform:i??void 0})}}};var Ym=ie("<svg stroke-width=0>");function sd(e,t){const n=F(e.a,t),[r,o]=V(n,["src"]),[i,s]=j(""),a=k(()=>t.title?`${e.c}<title>${t.title}</title>`:e.c);return H(()=>s(a())),W(()=>{s("")}),(()=>{var l=Ym();return Je(l,F({get stroke(){var c;return(c=e.a)==null?void 0:c.stroke},get color(){return t.color||"currentColor"},get fill(){return t.color||"currentColor"},get style(){return{...t.style,overflow:"visible"}}},o,{get height(){return t.size||"1em"},get width(){return t.size||"1em"},xmlns:"http://www.w3.org/2000/svg",get innerHTML(){return i()}}),!0,!0),X(l,()=>Zu),l})()}function ad(e){return sd({a:{viewBox:"0 0 1024 1024"},c:'<path d="M270.1 741.7c0 23.4 19.1 42.5 42.6 42.5h48.7v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h85v120.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V784.1h48.7c23.5 0 42.6-19.1 42.6-42.5V346.4h-486v395.3zm357.1-600.1 44.9-65c2.6-3.8 2-8.9-1.5-11.4-3.5-2.4-8.5-1.2-11.1 2.6l-46.6 67.6c-30.7-12.1-64.9-18.8-100.8-18.8-35.9 0-70.1 6.7-100.8 18.8l-46.6-67.5c-2.6-3.8-7.6-5.1-11.1-2.6-3.5 2.4-4.1 7.4-1.5 11.4l44.9 65c-71.4 33.2-121.4 96.1-127.8 169.6h486c-6.6-73.6-56.7-136.5-128-169.7zM409.5 244.1a26.9 26.9 0 1 1 26.9-26.9 26.97 26.97 0 0 1-26.9 26.9zm208.4 0a26.9 26.9 0 1 1 26.9-26.9 26.97 26.97 0 0 1-26.9 26.9zm223.4 100.7c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c.1-30.6-24.3-55.3-54.6-55.3zm-658.6 0c-30.2 0-54.6 24.8-54.6 55.4v216.4c0 30.5 24.5 55.4 54.6 55.4 30.2 0 54.6-24.8 54.6-55.4V400.1c0-30.6-24.5-55.3-54.6-55.3z"/>'},e)}function ld(e){return sd({a:{viewBox:"0 0 1024 1024"},c:'<path d="M747.4 535.7c-.4-68.2 30.5-119.6 92.9-157.5-34.9-50-87.7-77.5-157.3-82.8-65.9-5.2-138 38.4-164.4 38.4-27.9 0-91.7-36.6-141.9-36.6C273.1 298.8 163 379.8 163 544.6c0 48.7 8.9 99 26.7 150.8 23.8 68.2 109.6 235.3 199.1 232.6 46.8-1.1 79.9-33.2 140.8-33.2 59.1 0 89.7 33.2 141.9 33.2 90.3-1.3 167.9-153.2 190.5-221.6-121.1-57.1-114.6-167.2-114.6-170.7zm-105.1-305c50.7-60.2 46.1-115 44.6-134.7-44.8 2.6-96.6 30.5-126.1 64.8-32.5 36.8-51.6 82.3-47.5 133.6 48.4 3.7 92.6-21.2 129-63.7z"/>'},e)}var Zm=new Set(["Avst","Arab","Armi","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Jm=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ev(e){if(Intl.Locale){const n=new Intl.Locale(e).maximize().script??"";return Zm.has(n)}const t=e.split("-")[0];return Jm.has(t)}function tv(e){return ev(e)?"rtl":"ltr"}function ud(){let e=typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:tv(e)}}var es=ud(),mr=new Set;function $l(){es=ud();for(const e of mr)e(es)}function nv(){const[e,t]=j(es),n=k(()=>e());return Wn(()=>{mr.size===0&&window.addEventListener("languagechange",$l),mr.add(t),W(()=>{mr.delete(t),mr.size===0&&window.removeEventListener("languagechange",$l)})}),{locale:()=>n().locale,direction:()=>n().direction}}var rv=we();function Zt(){const e=nv();return ye(rv)||e}var qo=new Map;function ov(e){const{locale:t}=Zt(),n=k(()=>t()+(e?Object.entries(e).sort((r,o)=>r[0]<o[0]?-1:1).join():""));return k(()=>{const r=n();let o;return qo.has(r)&&(o=qo.get(r)),o||(o=new Intl.Collator(t(),e),qo.set(r,o)),o})}const iv=["top","right","bottom","left"],Wt=Math.min,Ge=Math.max,fo=Math.round,Xr=Math.floor,vt=e=>({x:e,y:e}),sv={left:"right",right:"left",bottom:"top",top:"bottom"},av={start:"end",end:"start"};function ts(e,t,n){return Ge(e,Wt(t,n))}function wn(e,t){return typeof e=="function"?e(t):e}function Xt(e){return e.split("-")[0]}function Yn(e){return e.split("-")[1]}function cd(e){return e==="x"?"y":"x"}function Us(e){return e==="y"?"height":"width"}function pn(e){return["top","bottom"].includes(Xt(e))?"y":"x"}function qs(e){return cd(pn(e))}function lv(e,t,n){n===void 0&&(n=!1);const r=Yn(e),o=qs(e),i=Us(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=ho(s)),[s,ho(s)]}function uv(e){const t=ho(e);return[ns(e),t,ns(t)]}function ns(e){return e.replace(/start|end/g,t=>av[t])}function cv(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}function dv(e,t,n,r){const o=Yn(e);let i=cv(Xt(e),n==="start",r);return o&&(i=i.map(s=>s+"-"+o),t&&(i=i.concat(i.map(ns)))),i}function ho(e){return e.replace(/left|right|bottom|top/g,t=>sv[t])}function fv(e){return{top:0,right:0,bottom:0,left:0,...e}}function dd(e){return typeof e!="number"?fv(e):{top:e,right:e,bottom:e,left:e}}function go(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ml(e,t,n){let{reference:r,floating:o}=e;const i=pn(t),s=qs(t),a=Us(s),l=Xt(t),c=i==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let h;switch(l){case"top":h={x:u,y:r.y-o.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-o.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Yn(t)){case"start":h[s]-=f*(n&&c?-1:1);break;case"end":h[s]+=f*(n&&c?-1:1);break}return h}const hv=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ml(c,r,l),f=r,h={},p=0;for(let g=0;g<a.length;g++){const{name:v,fn:m}=a[g],{x:y,y:w,data:S,reset:C}=await m({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:s,elements:{reference:e,floating:t}});u=y??u,d=w??d,h={...h,[v]:{...h[v],...S}},C&&p<=50&&(p++,typeof C=="object"&&(C.placement&&(f=C.placement),C.rects&&(c=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=Ml(c,f,l)),g=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function Ir(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=wn(t,e),p=dd(h),v=a[f?d==="floating"?"reference":"floating":d],m=go(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y=d==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),S=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},C=go(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:l}):y);return{top:(m.top-C.top+p.top)/S.y,bottom:(C.bottom-m.bottom+p.bottom)/S.y,left:(m.left-C.left+p.left)/S.x,right:(C.right-m.right+p.right)/S.x}}const gv=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=wn(e,t)||{};if(c==null)return{};const d=dd(u),f={x:n,y:r},h=qs(o),p=Us(h),g=await s.getDimensions(c),v=h==="y",m=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=i.reference[p]+i.reference[h]-f[h]-i.floating[p],C=f[h]-i.reference[h],$=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c));let A=$?$[w]:0;(!A||!await(s.isElement==null?void 0:s.isElement($)))&&(A=a.floating[w]||i.floating[p]);const _=S/2-C/2,T=A/2-g[p]/2-1,K=Wt(d[m],T),N=Wt(d[y],T),z=K,re=A-g[p]-N,P=A/2-g[p]/2+_,E=ts(z,P,re),x=!l.arrow&&Yn(o)!=null&&P!==E&&i.reference[p]/2-(P<z?K:N)-g[p]/2<0,I=x?P<z?P-z:P-re:0;return{[h]:f[h]+I,data:{[h]:E,centerOffset:P-E-I,...x&&{alignmentOffset:I}},reset:x}}}),pv=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...v}=wn(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const m=Xt(o),y=pn(a),w=Xt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=f||(w||!g?[ho(a)]:uv(a)),$=p!=="none";!f&&$&&C.push(...dv(a,g,p,S));const A=[a,...C],_=await Ir(t,v),T=[];let K=((r=i.flip)==null?void 0:r.overflows)||[];if(u&&T.push(_[m]),d){const P=lv(o,s,S);T.push(_[P[0]],_[P[1]])}if(K=[...K,{placement:o,overflows:T}],!T.every(P=>P<=0)){var N,z;const P=(((N=i.flip)==null?void 0:N.index)||0)+1,E=A[P];if(E)return{data:{index:P,overflows:K},reset:{placement:E}};let x=(z=K.filter(I=>I.overflows[0]<=0).sort((I,M)=>I.overflows[1]-M.overflows[1])[0])==null?void 0:z.placement;if(!x)switch(h){case"bestFit":{var re;const I=(re=K.filter(M=>{if($){const O=pn(M.placement);return O===y||O==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(O=>O>0).reduce((O,L)=>O+L,0)]).sort((M,O)=>M[1]-O[1])[0])==null?void 0:re[0];I&&(x=I);break}case"initialPlacement":x=a;break}if(o!==x)return{reset:{placement:x}}}return{}}}};function Fl(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ol(e){return iv.some(t=>e[t]>=0)}const mv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=wn(e,t);switch(r){case"referenceHidden":{const i=await Ir(t,{...o,elementContext:"reference"}),s=Fl(i,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ol(s)}}}case"escaped":{const i=await Ir(t,{...o,altBoundary:!0}),s=Fl(i,n.floating);return{data:{escapedOffsets:s,escaped:Ol(s)}}}default:return{}}}}};async function vv(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Xt(n),a=Yn(n),l=pn(n)==="y",c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=wn(t,e);let{mainAxis:f,crossAxis:h,alignmentAxis:p}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof p=="number"&&(h=a==="end"?p*-1:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const yv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await vv(t,e);return s===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},wv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:v=>{let{x:m,y}=v;return{x:m,y}}},...l}=wn(e,t),c={x:n,y:r},u=await Ir(t,l),d=pn(Xt(o)),f=cd(d);let h=c[f],p=c[d];if(i){const v=f==="y"?"top":"left",m=f==="y"?"bottom":"right",y=h+u[v],w=h-u[m];h=ts(y,h,w)}if(s){const v=d==="y"?"top":"left",m=d==="y"?"bottom":"right",y=p+u[v],w=p-u[m];p=ts(y,p,w)}const g=a.fn({...t,[f]:h,[d]:p});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[f]:i,[d]:s}}}}}},bv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:s,elements:a}=t,{apply:l=()=>{},...c}=wn(e,t),u=await Ir(t,c),d=Xt(o),f=Yn(o),h=pn(o)==="y",{width:p,height:g}=i.floating;let v,m;d==="top"||d==="bottom"?(v=d,m=f===(await(s.isRTL==null?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,v=f==="end"?"top":"bottom");const y=g-u.top-u.bottom,w=p-u.left-u.right,S=Wt(g-u[v],y),C=Wt(p-u[m],w),$=!t.middlewareData.shift;let A=S,_=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=y),$&&!f){const K=Ge(u.left,0),N=Ge(u.right,0),z=Ge(u.top,0),re=Ge(u.bottom,0);h?_=p-2*(K!==0||N!==0?K+N:Ge(u.left,u.right)):A=g-2*(z!==0||re!==0?z+re:Ge(u.top,u.bottom))}await l({...t,availableWidth:_,availableHeight:A});const T=await s.getDimensions(a.floating);return p!==T.width||g!==T.height?{reset:{rects:!0}}:{}}}};function Io(){return typeof window<"u"}function Zn(e){return fd(e)?(e.nodeName||"").toLowerCase():"#document"}function qe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function St(e){var t;return(t=(fd(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fd(e){return Io()?e instanceof Node||e instanceof qe(e).Node:!1}function lt(e){return Io()?e instanceof Element||e instanceof qe(e).Element:!1}function wt(e){return Io()?e instanceof HTMLElement||e instanceof qe(e).HTMLElement:!1}function Al(e){return!Io()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof qe(e).ShadowRoot}function kr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function Sv(e){return["table","td","th"].includes(Zn(e))}function $o(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ws(e){const t=Xs(),n=lt(e)?ut(e):e;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function xv(e){let t=Qt(e);for(;wt(t)&&!qn(t);){if(Ws(t))return t;if($o(t))return null;t=Qt(t)}return null}function Xs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function qn(e){return["html","body","#document"].includes(Zn(e))}function ut(e){return qe(e).getComputedStyle(e)}function Mo(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qt(e){if(Zn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Al(e)&&e.host||St(e);return Al(t)?t.host:t}function hd(e){const t=Qt(e);return qn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&kr(t)?t:hd(t)}function $r(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hd(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),s=qe(o);if(i){const a=rs(s);return t.concat(s,s.visualViewport||[],kr(o)?o:[],a&&n?$r(a):[])}return t.concat(o,$r(o,[],n))}function rs(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gd(e){const t=ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=fo(n)!==i||fo(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Qs(e){return lt(e)?e:e.contextElement}function Fn(e){const t=Qs(e);if(!wt(t))return vt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=gd(t);let s=(i?fo(n.width):n.width)/r,a=(i?fo(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!a||!Number.isFinite(a))&&(a=1),{x:s,y:a}}const Cv=vt(0);function pd(e){const t=qe(e);return!Xs()||!t.visualViewport?Cv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ev(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qe(e)?!1:t}function mn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Qs(e);let s=vt(1);t&&(r?lt(r)&&(s=Fn(r)):s=Fn(e));const a=Ev(i,n,r)?pd(i):vt(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const f=qe(i),h=r&<(r)?qe(r):r;let p=f,g=rs(p);for(;g&&r&&h!==p;){const v=Fn(g),m=g.getBoundingClientRect(),y=ut(g),w=m.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,S=m.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,d*=v.y,l+=w,c+=S,p=qe(g),g=rs(p)}}return go({width:u,height:d,x:l,y:c})}function Ys(e,t){const n=Mo(e).scrollLeft;return t?t.left+n:mn(St(e)).left+n}function md(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ys(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function Rv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",s=St(r),a=t?$o(t.floating):!1;if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=vt(1);const u=vt(0),d=wt(r);if((d||!d&&!i)&&((Zn(r)!=="body"||kr(s))&&(l=Mo(r)),wt(r))){const h=mn(r);c=Fn(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const f=s&&!d&&!i?md(s,l,!0):vt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}}function Pv(e){return Array.from(e.getClientRects())}function Iv(e){const t=St(e),n=Mo(e),r=e.ownerDocument.body,o=Ge(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ge(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Ys(e);const a=-n.scrollTop;return ut(r).direction==="rtl"&&(s+=Ge(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}function $v(e,t){const n=qe(e),r=St(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const c=Xs();(!c||c&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}function Mv(e,t){const n=mn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=wt(e)?Fn(e):vt(1),s=e.clientWidth*i.x,a=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:s,height:a,x:l,y:c}}function Tl(e,t,n){let r;if(t==="viewport")r=$v(e,n);else if(t==="document")r=Iv(St(e));else if(lt(t))r=Mv(t,n);else{const o=pd(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return go(r)}function vd(e,t){const n=Qt(e);return n===t||!lt(n)||qn(n)?!1:ut(n).position==="fixed"||vd(n,t)}function Fv(e,t){const n=t.get(e);if(n)return n;let r=$r(e,[],!1).filter(a=>lt(a)&&Zn(a)!=="body"),o=null;const i=ut(e).position==="fixed";let s=i?Qt(e):e;for(;lt(s)&&!qn(s);){const a=ut(s),l=Ws(s);!l&&a.position==="fixed"&&(o=null),(i?!l&&!o:!l&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||kr(s)&&!l&&vd(e,s))?r=r.filter(u=>u!==s):o=a,s=Qt(s)}return t.set(e,r),r}function Ov(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?$o(t)?[]:Fv(t,this._c):[].concat(n),r],a=s[0],l=s.reduce((c,u)=>{const d=Tl(t,u,o);return c.top=Ge(d.top,c.top),c.right=Wt(d.right,c.right),c.bottom=Wt(d.bottom,c.bottom),c.left=Ge(d.left,c.left),c},Tl(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Av(e){const{width:t,height:n}=gd(e);return{width:t,height:n}}function Tv(e,t,n){const r=wt(t),o=St(t),i=n==="fixed",s=mn(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=vt(0);if(r||!r&&!i)if((Zn(t)!=="body"||kr(o))&&(a=Mo(t)),r){const f=mn(t,!0,i,t);l.x=f.x+t.clientLeft,l.y=f.y+t.clientTop}else o&&(l.x=Ys(o));const c=o&&!r&&!i?md(o,a):vt(0),u=s.left+a.scrollLeft-l.x-c.x,d=s.top+a.scrollTop-l.y-c.y;return{x:u,y:d,width:s.width,height:s.height}}function Wo(e){return ut(e).position==="static"}function Dl(e,t){if(!wt(e)||ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return St(e)===n&&(n=n.ownerDocument.body),n}function yd(e,t){const n=qe(e);if($o(e))return n;if(!wt(e)){let o=Qt(e);for(;o&&!qn(o);){if(lt(o)&&!Wo(o))return o;o=Qt(o)}return n}let r=Dl(e,t);for(;r&&Sv(r)&&Wo(r);)r=Dl(r,t);return r&&qn(r)&&Wo(r)&&!Ws(r)?n:r||xv(e)||n}const Dv=async function(e){const t=this.getOffsetParent||yd,n=this.getDimensions,r=await n(e.floating);return{reference:Tv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _v(e){return ut(e).direction==="rtl"}const wd={convertOffsetParentRelativeRectToViewportRelativeRect:Rv,getDocumentElement:St,getClippingRect:Ov,getOffsetParent:yd,getElementRects:Dv,getClientRects:Pv,getDimensions:Av,getScale:Fn,isElement:lt,isRTL:_v};function Lv(e,t){let n=null,r;const o=St(e);function i(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function s(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:u,width:d,height:f}=e.getBoundingClientRect();if(a||t(),!d||!f)return;const h=Xr(u),p=Xr(o.clientWidth-(c+d)),g=Xr(o.clientHeight-(u+f)),v=Xr(c),y={rootMargin:-h+"px "+-p+"px "+-g+"px "+-v+"px",threshold:Ge(0,Wt(1,l))||1};let w=!0;function S(C){const $=C[0].intersectionRatio;if($!==l){if(!w)return s();$?s(!1,$):r=setTimeout(()=>{s(!1,1e-7)},1e3)}w=!1}try{n=new IntersectionObserver(S,{...y,root:o.ownerDocument})}catch{n=new IntersectionObserver(S,y)}n.observe(e)}return s(!0),i}function kv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Qs(e),u=o||i?[...c?$r(c):[],...$r(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const d=c&&a?Lv(c,n):null;let f=-1,h=null;s&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,g=l?mn(e):null;l&&v();function v(){const m=mn(e);g&&(m.x!==g.x||m.y!==g.y||m.width!==g.width||m.height!==g.height)&&n(),g=m,p=requestAnimationFrame(v)}return n(),()=>{var m;u.forEach(y=>{o&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d==null||d(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Vv=yv,Nv=wv,Kv=pv,jv=bv,zv=mv,Bv=gv,Hv=(e,t,n)=>{const r=new Map,o={platform:wd,...n},i={...o.platform,_c:r};return hv(e,t,{...o,platform:i})};var Gv=ie('<svg display=block viewBox="0 0 30 30"style=transform:scale(1.02)><g><path fill=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z></path><path stroke=none d=M23,27.8c1.1,1.2,3.4,2.2,5,2.2h2H0h2c1.7,0,3.9-1,5-2.2l6.6-7.2c0.7-0.8,2-0.8,2.7,0L23,27.8L23,27.8z>'),Zs=we();function Js(){const e=ye(Zs);if(e===void 0)throw new Error("[kobalte]: `usePopperContext` must be used within a `Popper` component");return e}var os=30,_l=os/2,Uv={top:180,right:-90,bottom:0,left:90};function Fo(e){const t=Js(),n=Q({size:os},e),[r,o]=V(n,["ref","style","size"]),i=()=>t.currentPlacement().split("-")[0],s=qv(t.contentRef),a=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue("background-color"))||"none"},l=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue(`border-${i()}-color`))||"none"},c=()=>{var f;return((f=s())==null?void 0:f.getPropertyValue(`border-${i()}-width`))||"0px"},u=()=>Number.parseInt(c())*2*(os/r.size),d=()=>`rotate(${Uv[i()]} ${_l} ${_l}) translate(0 2)`;return b(le,F({as:"div",ref(f){var h=ve(t.setArrowRef,r.ref);typeof h=="function"&&h(f)},"aria-hidden":"true",get style(){return ct({position:"absolute","font-size":`${r.size}px`,width:"1em",height:"1em","pointer-events":"none",fill:a(),stroke:l(),"stroke-width":u()},r.style)}},o,{get children(){var f=Gv(),h=f.firstChild,p=h.firstChild;return p.nextSibling,je(()=>Hn(h,"transform",d())),f}}))}function qv(e){const[t,n]=j();return H(()=>{const r=e();r&&n(Cs(r).getComputedStyle(r))}),t}function Wv(e){const t=Js(),[n,r]=V(e,["ref","style"]);return b(le,F({as:"div",ref(o){var i=ve(t.setPositionerRef,n.ref);typeof i=="function"&&i(o)},"data-popper-positioner":"",get style(){return ct({position:"absolute",top:0,left:0,"min-width":"max-content"},n.style)}},r))}function Ll(e){const{x:t=0,y:n=0,width:r=0,height:o=0}=e??{};if(typeof DOMRect=="function")return new DOMRect(t,n,r,o);const i={x:t,y:n,width:r,height:o,top:n,right:t+r,bottom:n+o,left:t};return{...i,toJSON:()=>i}}function Xv(e,t){return{contextElement:e,getBoundingClientRect:()=>{const r=t(e);return r?Ll(r):e?e.getBoundingClientRect():Ll()}}}function Qv(e){return/^(?:top|bottom|left|right)(?:-(?:start|end))?$/.test(e)}var Yv={top:"bottom",right:"left",bottom:"top",left:"right"};function Zv(e,t){const[n,r]=e.split("-"),o=Yv[n];return r?n==="left"||n==="right"?`${o} ${r==="start"?"top":"bottom"}`:r==="start"?`${o} ${t==="rtl"?"right":"left"}`:`${o} ${t==="rtl"?"left":"right"}`:`${o} center`}function Jv(e){const t=Q({getAnchorRect:f=>f==null?void 0:f.getBoundingClientRect(),placement:"bottom",gutter:0,shift:0,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,hideWhenDetached:!1,detachedPadding:0,arrowPadding:4,overflowPadding:8},e),[n,r]=j(),[o,i]=j(),[s,a]=j(t.placement),l=()=>{var f;return Xv((f=t.anchorRef)==null?void 0:f.call(t),t.getAnchorRect)},{direction:c}=Zt();async function u(){var $,A;const f=l(),h=n(),p=o();if(!f||!h)return;const g=((p==null?void 0:p.clientHeight)||0)/2,v=typeof t.gutter=="number"?t.gutter+g:t.gutter??g;h.style.setProperty("--kb-popper-content-overflow-padding",`${t.overflowPadding}px`),f.getBoundingClientRect();const m=[Vv(({placement:_})=>{const T=!!_.split("-")[1];return{mainAxis:v,crossAxis:T?void 0:t.shift,alignmentAxis:t.shift}})];if(t.flip!==!1){const _=typeof t.flip=="string"?t.flip.split(" "):void 0;if(_!==void 0&&!_.every(Qv))throw new Error("`flip` expects a spaced-delimited list of placements");m.push(Kv({padding:t.overflowPadding,fallbackPlacements:_}))}(t.slide||t.overlap)&&m.push(Nv({mainAxis:t.slide,crossAxis:t.overlap,padding:t.overflowPadding})),m.push(jv({padding:t.overflowPadding,apply({availableWidth:_,availableHeight:T,rects:K}){const N=Math.round(K.reference.width);_=Math.floor(_),T=Math.floor(T),h.style.setProperty("--kb-popper-anchor-width",`${N}px`),h.style.setProperty("--kb-popper-content-available-width",`${_}px`),h.style.setProperty("--kb-popper-content-available-height",`${T}px`),t.sameWidth&&(h.style.width=`${N}px`),t.fitViewport&&(h.style.maxWidth=`${_}px`,h.style.maxHeight=`${T}px`)}})),t.hideWhenDetached&&m.push(zv({padding:t.detachedPadding})),p&&m.push(Bv({element:p,padding:t.arrowPadding}));const y=await Hv(f,h,{placement:t.placement,strategy:"absolute",middleware:m,platform:{...wd,isRTL:()=>c()==="rtl"}});if(a(y.placement),($=t.onCurrentPlacementChange)==null||$.call(t,y.placement),!h)return;h.style.setProperty("--kb-popper-content-transform-origin",Zv(y.placement,c()));const w=Math.round(y.x),S=Math.round(y.y);let C;if(t.hideWhenDetached&&(C=(A=y.middlewareData.hide)!=null&&A.referenceHidden?"hidden":"visible"),Object.assign(h.style,{top:"0",left:"0",transform:`translate3d(${w}px, ${S}px, 0)`,visibility:C}),p&&y.middlewareData.arrow){const{x:_,y:T}=y.middlewareData.arrow,K=y.placement.split("-")[0];Object.assign(p.style,{left:_!=null?`${_}px`:"",top:T!=null?`${T}px`:"",[K]:"100%"})}}H(()=>{const f=l(),h=n();if(!f||!h)return;const p=kv(f,h,u,{elementResize:typeof ResizeObserver=="function"});W(p)}),H(()=>{var p;const f=n(),h=(p=t.contentRef)==null?void 0:p.call(t);!f||!h||queueMicrotask(()=>{f.style.zIndex=getComputedStyle(h).zIndex})});const d={currentPlacement:s,contentRef:()=>{var f;return(f=t.contentRef)==null?void 0:f.call(t)},setPositionerRef:r,setArrowRef:i};return b(Zs.Provider,{value:d,get children(){return t.children}})}var Jn=Object.assign(Jv,{Arrow:Fo,Context:Zs,usePopperContext:Js,Positioner:Wv}),ey={};At(ey,{Arrow:()=>Fo,Content:()=>ta,Portal:()=>na,Root:()=>ra,Tooltip:()=>ry,Trigger:()=>oa});var bd=we();function ea(){const e=ye(bd);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function ta(e){const t=ea(),n=Q({id:t.generateId("content")},e),[r,o]=V(n,["ref","style"]);return H(()=>W(t.registerContentId(o.id))),b(pe,{get when(){return t.contentPresent()},get children(){return b(Jn.Positioner,{get children(){return b(Ro,F({ref(i){var s=ve(a=>{t.setContentRef(a)},r.ref);typeof s=="function"&&s(i)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ct({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:i=>i.preventDefault(),onDismiss:()=>t.hideTooltip(!0)},()=>t.dataset(),o))}})}})}function na(e){const t=ea();return b(pe,{get when(){return t.contentPresent()},get children(){return b(wo,e)}})}function ty(e,t,n){const r=e.split("-")[0],o=t.getBoundingClientRect(),i=n.getBoundingClientRect(),s=[],a=o.left+o.width/2,l=o.top+o.height/2;switch(r){case"top":s.push([o.left,l]),s.push([i.left,i.bottom]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([o.right,l]);break;case"right":s.push([a,o.top]),s.push([i.left,i.top]),s.push([i.right,i.top]),s.push([i.right,i.bottom]),s.push([i.left,i.bottom]),s.push([a,o.bottom]);break;case"bottom":s.push([o.left,l]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([i.right,i.top]),s.push([o.right,l]);break;case"left":s.push([a,o.top]),s.push([i.right,i.top]),s.push([i.left,i.top]),s.push([i.left,i.bottom]),s.push([i.right,i.bottom]),s.push([a,o.bottom]);break}return s}var en={},ny=0,Sn=!1,Et,lr,xn;function ra(e){const t=`tooltip-${Ee()}`,n=`${++ny}`,r=Q({id:t,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[o,i]=V(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[a,l]=j(),[c,u]=j(),[d,f]=j(),[h,p]=j(i.placement),g=Po({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:P=>{var E;return(E=o.onOpenChange)==null?void 0:E.call(o,P)}}),{present:v}=Un({show:()=>o.forceMount||g.isOpen(),element:()=>d()??null}),m=()=>{en[n]=w},y=()=>{for(const P in en)P!==n&&(en[P](!0),delete en[P])},w=(P=!1)=>{P||o.closeDelay&&o.closeDelay<=0?(window.clearTimeout(s),s=void 0,g.close()):s||(s=window.setTimeout(()=>{s=void 0,g.close()},o.closeDelay)),window.clearTimeout(Et),Et=void 0,o.skipDelayDuration&&o.skipDelayDuration>=0&&(xn=window.setTimeout(()=>{window.clearTimeout(xn),xn=void 0},o.skipDelayDuration)),Sn&&(window.clearTimeout(lr),lr=window.setTimeout(()=>{delete en[n],lr=void 0,Sn=!1},o.closeDelay))},S=()=>{clearTimeout(s),s=void 0,y(),m(),Sn=!0,g.open(),window.clearTimeout(Et),Et=void 0,window.clearTimeout(lr),lr=void 0,window.clearTimeout(xn),xn=void 0},C=()=>{y(),m(),!g.isOpen()&&!Et&&!Sn?Et=window.setTimeout(()=>{Et=void 0,Sn=!0,S()},o.openDelay):g.isOpen()||S()},$=(P=!1)=>{!P&&o.openDelay&&o.openDelay>0&&!s&&!xn?C():S()},A=()=>{window.clearTimeout(Et),Et=void 0,Sn=!1},_=()=>{window.clearTimeout(s),s=void 0},T=P=>Pe(c(),P)||Pe(d(),P),K=P=>{const E=c(),x=d();if(!(!E||!x))return ty(P,E,x)},N=P=>{const E=P.target;if(T(E)){_();return}if(!o.ignoreSafeArea){const x=K(h());if(x&&Tc(np(P),x)){_();return}}s||w()};H(()=>{if(!g.isOpen())return;const P=ze();P.addEventListener("pointermove",N,!0),W(()=>{P.removeEventListener("pointermove",N,!0)})}),H(()=>{const P=c();if(!P||!g.isOpen())return;const E=I=>{const M=I.target;Pe(M,P)&&w(!0)},x=Cs();x.addEventListener("scroll",E,{capture:!0}),W(()=>{x.removeEventListener("scroll",E,{capture:!0})})}),W(()=>{clearTimeout(s),en[n]&&delete en[n]});const re={dataset:k(()=>({"data-expanded":g.isOpen()?"":void 0,"data-closed":g.isOpen()?void 0:""})),isOpen:g.isOpen,isDisabled:()=>o.disabled??!1,triggerOnFocusOnly:()=>o.triggerOnFocusOnly??!1,contentId:a,contentPresent:v,openTooltip:$,hideTooltip:w,cancelOpening:A,generateId:dt(()=>r.id),registerContentId:Ke(l),isTargetOnTooltip:T,setTriggerRef:u,setContentRef:f};return b(bd.Provider,{value:re,get children(){return b(Jn,F({anchorRef:c,contentRef:d,onCurrentPlacementChange:p},i))}})}function oa(e){let t;const n=ea(),[r,o]=V(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let i=!1,s=!1,a=!1;const l=()=>{i=!1},c=()=>{!n.isOpen()&&(s||a)&&n.openTooltip(a)},u=m=>{n.isOpen()&&!s&&!a&&n.hideTooltip(m)},d=m=>{ne(m,r.onPointerEnter),!(m.pointerType==="touch"||n.triggerOnFocusOnly()||n.isDisabled()||m.defaultPrevented)&&(s=!0,c())},f=m=>{ne(m,r.onPointerLeave),m.pointerType!=="touch"&&(s=!1,a=!1,n.isOpen()?u():n.cancelOpening())},h=m=>{ne(m,r.onPointerDown),i=!0,ze(t).addEventListener("pointerup",l,{once:!0})},p=m=>{ne(m,r.onClick),s=!1,a=!1,u(!0)},g=m=>{ne(m,r.onFocus),!(n.isDisabled()||m.defaultPrevented||i)&&(a=!0,c())},v=m=>{ne(m,r.onBlur);const y=m.relatedTarget;n.isTargetOnTooltip(y)||(s=!1,a=!1,u(!0))};return W(()=>{ze(t).removeEventListener("pointerup",l)}),b(le,F({as:"button",ref(m){var y=ve(w=>{n.setTriggerRef(w),t=w},r.ref);typeof y=="function"&&y(m)},get"aria-describedby"(){return k(()=>!!n.isOpen())()?n.contentId():void 0},onPointerEnter:d,onPointerLeave:f,onPointerDown:h,onClick:p,onFocus:g,onBlur:v},()=>n.dataset(),o))}var ry=Object.assign(ra,{Arrow:Fo,Content:ta,Portal:na,Trigger:oa});const kl=oa,Vl=e=>b(ra,F({gutter:4},e)),Nl=e=>{const[t,n]=V(e,["class"]);return b(na,{get children(){return b(ta,F({get class(){return de("z-50 origin-[var(--kb-popover-content-transform-origin)] overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95",t.class)}},n))}})},oy=e=>{const t=e.split("-").join("").slice(0,12);return Number.parseInt(t,16)};function Sd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var io={exports:{}},iy=io.exports,Kl;function sy(){return Kl||(Kl=1,function(e,t){(function(n,r){e.exports=r()})(iy,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",s="second",a="minute",l="hour",c="day",u="week",d="month",f="quarter",h="year",p="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,y={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(P){var E=["th","st","nd","rd"],x=P%100;return"["+P+(E[(x-20)%10]||E[x]||E[0])+"]"}},w=function(P,E,x){var I=String(P);return!I||I.length>=E?P:""+Array(E+1-I.length).join(x)+P},S={s:w,z:function(P){var E=-P.utcOffset(),x=Math.abs(E),I=Math.floor(x/60),M=x%60;return(E<=0?"+":"-")+w(I,2,"0")+":"+w(M,2,"0")},m:function P(E,x){if(E.date()<x.date())return-P(x,E);var I=12*(x.year()-E.year())+(x.month()-E.month()),M=E.clone().add(I,d),O=x-M<0,L=E.clone().add(I+(O?-1:1),d);return+(-(I+(x-M)/(O?M-L:L-M))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:d,y:h,w:u,d:c,D:p,h:l,m:a,s,ms:i,Q:f}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},C="en",$={};$[C]=y;var A="$isDayjsObject",_=function(P){return P instanceof z||!(!P||!P[A])},T=function P(E,x,I){var M;if(!E)return C;if(typeof E=="string"){var O=E.toLowerCase();$[O]&&(M=O),x&&($[O]=x,M=O);var L=E.split("-");if(!M&&L.length>1)return P(L[0])}else{var B=E.name;$[B]=E,M=B}return!I&&M&&(C=M),M||!I&&C},K=function(P,E){if(_(P))return P.clone();var x=typeof E=="object"?E:{};return x.date=P,x.args=arguments,new z(x)},N=S;N.l=T,N.i=_,N.w=function(P,E){return K(P,{locale:E.$L,utc:E.$u,x:E.$x,$offset:E.$offset})};var z=function(){function P(x){this.$L=T(x.locale,null,!0),this.parse(x),this.$x=this.$x||x.x||{},this[A]=!0}var E=P.prototype;return E.parse=function(x){this.$d=function(I){var M=I.date,O=I.utc;if(M===null)return new Date(NaN);if(N.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var L=M.match(v);if(L){var B=L[2]-1||0,U=(L[7]||"0").substring(0,3);return O?new Date(Date.UTC(L[1],B,L[3]||1,L[4]||0,L[5]||0,L[6]||0,U)):new Date(L[1],B,L[3]||1,L[4]||0,L[5]||0,L[6]||0,U)}}return new Date(M)}(x),this.init()},E.init=function(){var x=this.$d;this.$y=x.getFullYear(),this.$M=x.getMonth(),this.$D=x.getDate(),this.$W=x.getDay(),this.$H=x.getHours(),this.$m=x.getMinutes(),this.$s=x.getSeconds(),this.$ms=x.getMilliseconds()},E.$utils=function(){return N},E.isValid=function(){return this.$d.toString()!==g},E.isSame=function(x,I){var M=K(x);return this.startOf(I)<=M&&M<=this.endOf(I)},E.isAfter=function(x,I){return K(x)<this.startOf(I)},E.isBefore=function(x,I){return this.endOf(I)<K(x)},E.$g=function(x,I,M){return N.u(x)?this[I]:this.set(M,x)},E.unix=function(){return Math.floor(this.valueOf()/1e3)},E.valueOf=function(){return this.$d.getTime()},E.startOf=function(x,I){var M=this,O=!!N.u(I)||I,L=N.p(x),B=function(Fe,Ie){var Dt=N.w(M.$u?Date.UTC(M.$y,Ie,Fe):new Date(M.$y,Ie,Fe),M);return O?Dt:Dt.endOf(c)},U=function(Fe,Ie){return N.w(M.toDate()[Fe].apply(M.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(Ie)),M)},Y=this.$W,ce=this.$M,se=this.$D,Oe="set"+(this.$u?"UTC":"");switch(L){case h:return O?B(1,0):B(31,11);case d:return O?B(1,ce):B(0,ce+1);case u:var et=this.$locale().weekStart||0,oe=(Y<et?Y+7:Y)-et;return B(O?se-oe:se+(6-oe),ce);case c:case p:return U(Oe+"Hours",0);case l:return U(Oe+"Minutes",1);case a:return U(Oe+"Seconds",2);case s:return U(Oe+"Milliseconds",3);default:return this.clone()}},E.endOf=function(x){return this.startOf(x,!1)},E.$set=function(x,I){var M,O=N.p(x),L="set"+(this.$u?"UTC":""),B=(M={},M[c]=L+"Date",M[p]=L+"Date",M[d]=L+"Month",M[h]=L+"FullYear",M[l]=L+"Hours",M[a]=L+"Minutes",M[s]=L+"Seconds",M[i]=L+"Milliseconds",M)[O],U=O===c?this.$D+(I-this.$W):I;if(O===d||O===h){var Y=this.clone().set(p,1);Y.$d[B](U),Y.init(),this.$d=Y.set(p,Math.min(this.$D,Y.daysInMonth())).$d}else B&&this.$d[B](U);return this.init(),this},E.set=function(x,I){return this.clone().$set(x,I)},E.get=function(x){return this[N.p(x)]()},E.add=function(x,I){var M,O=this;x=Number(x);var L=N.p(I),B=function(ce){var se=K(O);return N.w(se.date(se.date()+Math.round(ce*x)),O)};if(L===d)return this.set(d,this.$M+x);if(L===h)return this.set(h,this.$y+x);if(L===c)return B(1);if(L===u)return B(7);var U=(M={},M[a]=r,M[l]=o,M[s]=n,M)[L]||1,Y=this.$d.getTime()+x*U;return N.w(Y,this)},E.subtract=function(x,I){return this.add(-1*x,I)},E.format=function(x){var I=this,M=this.$locale();if(!this.isValid())return M.invalidDate||g;var O=x||"YYYY-MM-DDTHH:mm:ssZ",L=N.z(this),B=this.$H,U=this.$m,Y=this.$M,ce=M.weekdays,se=M.months,Oe=M.meridiem,et=function(Ie,Dt,rr,zr){return Ie&&(Ie[Dt]||Ie(I,O))||rr[Dt].slice(0,zr)},oe=function(Ie){return N.s(B%12||12,Ie,"0")},Fe=Oe||function(Ie,Dt,rr){var zr=Ie<12?"AM":"PM";return rr?zr.toLowerCase():zr};return O.replace(m,function(Ie,Dt){return Dt||function(rr){switch(rr){case"YY":return String(I.$y).slice(-2);case"YYYY":return N.s(I.$y,4,"0");case"M":return Y+1;case"MM":return N.s(Y+1,2,"0");case"MMM":return et(M.monthsShort,Y,se,3);case"MMMM":return et(se,Y);case"D":return I.$D;case"DD":return N.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return et(M.weekdaysMin,I.$W,ce,2);case"ddd":return et(M.weekdaysShort,I.$W,ce,3);case"dddd":return ce[I.$W];case"H":return String(B);case"HH":return N.s(B,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return Fe(B,U,!0);case"A":return Fe(B,U,!1);case"m":return String(U);case"mm":return N.s(U,2,"0");case"s":return String(I.$s);case"ss":return N.s(I.$s,2,"0");case"SSS":return N.s(I.$ms,3,"0");case"Z":return L}return null}(Ie)||L.replace(":","")})},E.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},E.diff=function(x,I,M){var O,L=this,B=N.p(I),U=K(x),Y=(U.utcOffset()-this.utcOffset())*r,ce=this-U,se=function(){return N.m(L,U)};switch(B){case h:O=se()/12;break;case d:O=se();break;case f:O=se()/3;break;case u:O=(ce-Y)/6048e5;break;case c:O=(ce-Y)/864e5;break;case l:O=ce/o;break;case a:O=ce/r;break;case s:O=ce/n;break;default:O=ce}return M?O:N.a(O)},E.daysInMonth=function(){return this.endOf(d).$D},E.$locale=function(){return $[this.$L]},E.locale=function(x,I){if(!x)return this.$L;var M=this.clone(),O=T(x,I,!0);return O&&(M.$L=O),M},E.clone=function(){return N.w(this.$d,this)},E.toDate=function(){return new Date(this.valueOf())},E.toJSON=function(){return this.isValid()?this.toISOString():null},E.toISOString=function(){return this.$d.toISOString()},E.toString=function(){return this.$d.toUTCString()},P}(),re=z.prototype;return K.prototype=re,[["$ms",i],["$s",s],["$m",a],["$H",l],["$W",c],["$M",d],["$y",h],["$D",p]].forEach(function(P){re[P[1]]=function(E){return this.$g(E,P[0],P[1])}}),K.extend=function(P,E){return P.$i||(P(E,z,K),P.$i=!0),K},K.locale=T,K.isDayjs=_,K.unix=function(P){return K(1e3*P)},K.en=$[C],K.Ls=$,K.p={},K})}(io)),io.exports}var ay=sy();const ly=Sd(ay);/**
|
|
2
|
-
* @license lucide-solid v0.454.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var uy={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"},Cn=uy,cy=ie("<svg>"),dy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),fy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),hy=e=>{const[t,n]=V(e,["color","size","strokeWidth","children","class","name","iconNode","absoluteStrokeWidth"]);return(()=>{var r=cy();return Je(r,F(Cn,{get width(){return t.size??Cn.width},get height(){return t.size??Cn.height},get stroke(){return t.color??Cn.stroke},get"stroke-width"(){return k(()=>!!t.absoluteStrokeWidth)()?Number(t.strokeWidth??Cn["stroke-width"])*24/Number(t.size):Number(t.strokeWidth??Cn["stroke-width"])},get class(){return fy("lucide","lucide-icon",t.name!=null?`lucide-${dy(t==null?void 0:t.name)}`:void 0,t.class!=null?t.class:"")}},n),!0,!0),X(r,b(rt,{get each(){return t.iconNode},children:([o,i])=>b(ec,F({component:o},i))})),r})()},Vr=hy,gy=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],py=e=>b(Vr,F(e,{name:"Check",iconNode:gy})),jl=py,my=[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]],vy=e=>b(Vr,F(e,{name:"Fingerprint",iconNode:my})),yy=vy,wy=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],by=e=>b(Vr,F(e,{name:"LoaderCircle",iconNode:wy})),Sy=by,xy=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],Cy=e=>b(Vr,F(e,{name:"Package",iconNode:xy})),Ey=Cy,Ry=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Py=e=>b(Vr,F(e,{name:"X",iconNode:Ry})),zl=Py,Bl=ie("<p>"),Iy=ie('<div class="flex flex-row items-center">iOS'),$y=ie('<div class="flex flex-row items-center">Android'),ur=ie('<div class="flex flex-row items-center">'),My=ie('<span class="ml-2 text-muted-foreground">(<!>)');const Fy=[{accessorKey:"id",header:"ID",cell:e=>b(Vl,{openDelay:0,closeDelay:0,get children(){return[b(kl,{get children(){return e.row.original.id.slice(-12)}}),b(Nl,{get children(){var t=Bl();return X(t,()=>e.row.original.id),t}})]}})},{accessorKey:"channel",header:"Channel",cell:e=>e.getValue()},{accessorKey:"platform",header:"Platform",cell:e=>{switch(e.getValue()){case"ios":return(()=>{var t=Iy(),n=t.firstChild;return X(t,b(ld,{class:"mr-2",size:16}),n),t})();case"android":return(()=>{var t=$y(),n=t.firstChild;return X(t,b(ad,{class:"mr-2",size:16,color:"#3DDC84"}),n),t})()}}},{header:"Target",cell:e=>e.row.original.targetAppVersion?(()=>{var t=ur();return X(t,b(Ey,{class:"mr-2",size:16}),null),X(t,()=>e.row.original.targetAppVersion,null),t})():e.row.original.fingerprintHash?b(Vl,{openDelay:0,closeDelay:0,get children(){return[b(kl,{class:"flex flex-row items-center",get children(){return[b(yy,{class:"mr-2",size:16}),k(()=>e.row.original.fingerprintHash.slice(0,8)),b(pe,{get when(){var t;return(t=e.row.original.metadata)==null?void 0:t.app_version},get children(){var t=My(),n=t.firstChild,r=n.nextSibling;return r.nextSibling,X(t,()=>{var o;return(o=e.row.original.metadata)==null?void 0:o.app_version},r),t}})]}}),b(Nl,{get children(){var t=Bl();return X(t,()=>e.row.original.fingerprintHash),t}})]}}):"N/A"},{accessorKey:"enabled",header:"Enabled",cell:e=>e.getValue()?(()=>{var t=ur();return X(t,b(jl,{class:"text-green-500"})),t})():(()=>{var t=ur();return X(t,b(zl,{class:"text-red-500"})),t})()},{accessorKey:"shouldForceUpdate",header:"Force Update",cell:e=>e.getValue()?(()=>{var t=ur();return X(t,b(jl,{class:"text-green-500"})),t})():(()=>{var t=ur();return X(t,b(zl,{class:"text-red-500"})),t})()},{accessorKey:"message",header:"Message",cell:e=>e.getValue()},{accessorKey:"id",header:"Created At",cell:e=>ly(oy(String(e.getValue()))).format("YYYY-MM-DD HH:mm:ss")}];function Oy(e){const[t,n]=j(0),[r,o]=j(0);H(()=>{const a=e();if(!a)return;s(a);const l=new ResizeObserver(i);l.observe(a),W(()=>{l.disconnect()})});const i=a=>{for(const l of a)l.target===e()&&s(l.target)},s=a=>{o(a.offsetWidth),n(a.offsetHeight)};return{width:r,height:t}}var xd=we();function Cd(){return ye(xd)}function Ay(){const e=Cd();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Ed(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ty(e,t){var o;const n=t.ref();if(!n)return-1;let r=e.length;if(!r)return-1;for(;r--;){const i=(o=e[r])==null?void 0:o.ref();if(i&&Ed(i,n))return r+1}return 0}function Dy(e){const t=e.map((r,o)=>[o,r]);let n=!1;return t.sort(([r,o],[i,s])=>{const a=o.ref(),l=s.ref();return a===l||!a||!l?0:Ed(a,l)?(r>i&&(n=!0),-1):(r<i&&(n=!0),1)}),n?t.map(([r,o])=>o):e}function Rd(e,t){const n=Dy(e);e!==n&&t(n)}function _y(e){var o,i;const t=e[0],n=(o=e[e.length-1])==null?void 0:o.ref();let r=(i=t==null?void 0:t.ref())==null?void 0:i.parentElement;for(;r;){if(n&&r.contains(n))return r;r=r.parentElement}return ze(r).body}function Ly(e,t){H(()=>{const n=setTimeout(()=>{Rd(e(),t)});W(()=>clearTimeout(n))})}function ky(e,t){if(typeof IntersectionObserver!="function"){Ly(e,t);return}let n=[];H(()=>{const r=()=>{const s=!!n.length;n=e(),s&&Rd(e(),t)},o=_y(e()),i=new IntersectionObserver(r,{root:o});for(const s of e()){const a=s.ref();a&&i.observe(a)}W(()=>i.disconnect())})}function Vy(e={}){const[t,n]=Mm({value:()=>D(e.items),onChange:i=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,i)}});ky(t,n);const r=i=>(n(s=>{const a=Ty(s,i);return Vg(s,i,a)}),()=>{n(s=>{const a=s.filter(l=>l.ref()!==i.ref());return s.length===a.length?s:a})});return{DomCollectionProvider:i=>b(xd.Provider,{value:{registerItem:r},get children(){return i.children}})}}function Ny(e){const t=Ay(),n=Q({shouldRegisterItem:!0},e);H(()=>{if(!n.shouldRegisterItem)return;const r=t.registerItem(n.getItem());W(r)})}function Pd(e){let t=e.startIndex??0;const n=e.startLevel??0,r=[],o=l=>{if(l==null)return"";const c=e.getKey??"key",u=Rn(c)?l[c]:c(l);return u!=null?String(u):""},i=l=>{if(l==null)return"";const c=e.getTextValue??"textValue",u=Rn(c)?l[c]:c(l);return u!=null?String(u):""},s=l=>{if(l==null)return!1;const c=e.getDisabled??"disabled";return(Rn(c)?l[c]:c(l))??!1},a=l=>{var c;if(l!=null)return Rn(e.getSectionChildren)?l[e.getSectionChildren]:(c=e.getSectionChildren)==null?void 0:c.call(e,l)};for(const l of e.dataSource){if(Rn(l)||Ng(l)){r.push({type:"item",rawValue:l,key:String(l),textValue:String(l),disabled:s(l),level:n,index:t}),t++;continue}if(a(l)!=null){r.push({type:"section",rawValue:l,key:"",textValue:"",disabled:!1,level:n,index:t}),t++;const c=a(l)??[];if(c.length>0){const u=Pd({dataSource:c,getKey:e.getKey,getTextValue:e.getTextValue,getDisabled:e.getDisabled,getSectionChildren:e.getSectionChildren,startIndex:t,startLevel:n+1});r.push(...u),t+=u.length}}else r.push({type:"item",rawValue:l,key:o(l),textValue:i(l),disabled:s(l),level:n,index:t}),t++}return r}function Ky(e,t=[]){return k(()=>{const n=Pd({dataSource:D(e.dataSource),getKey:D(e.getKey),getTextValue:D(e.getTextValue),getDisabled:D(e.getDisabled),getSectionChildren:D(e.getSectionChildren)});for(let r=0;r<t.length;r++)t[r]();return e.factory(n)})}var $t=class Id extends Set{constructor(n,r,o){super(n);Re(this,"anchorKey");Re(this,"currentKey");n instanceof Id?(this.anchorKey=r||n.anchorKey,this.currentKey=o||n.currentKey):(this.anchorKey=r,this.currentKey=o)}};function jy(e){const[t,n]=yt(e);return[()=>t()??new $t,n]}function $d(e){return Bg()?e.altKey:e.ctrlKey}function Pn(e){return xo()?e.metaKey:e.ctrlKey}function Hl(e){return new $t(e)}function zy(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function By(e){const t=Q({selectionMode:"none",selectionBehavior:"toggle"},e),[n,r]=j(!1),[o,i]=j(),s=k(()=>{const g=D(t.selectedKeys);return g!=null?Hl(g):g}),a=k(()=>{const g=D(t.defaultSelectedKeys);return g!=null?Hl(g):new $t}),[l,c]=jy({value:s,defaultValue:a,onChange:g=>{var v;return(v=t.onSelectionChange)==null?void 0:v.call(t,g)}}),[u,d]=j(D(t.selectionBehavior)),f=()=>D(t.selectionMode),h=()=>D(t.disallowEmptySelection)??!1,p=g=>{(D(t.allowDuplicateSelectionEvents)||!zy(g,l()))&&c(g)};return H(()=>{const g=l();D(t.selectionBehavior)==="replace"&&u()==="toggle"&&typeof g=="object"&&g.size===0&&d("replace")}),H(()=>{d(D(t.selectionBehavior)??"toggle")}),{selectionMode:f,disallowEmptySelection:h,selectionBehavior:u,setSelectionBehavior:d,isFocused:n,setFocused:r,focusedKey:o,setFocusedKey:i,selectedKeys:l,setSelectedKeys:p}}function Hy(e){const[t,n]=j(""),[r,o]=j(-1);return{typeSelectHandlers:{onKeyDown:s=>{var f;if(D(e.isDisabled))return;const a=D(e.keyboardDelegate),l=D(e.selectionManager);if(!a.getKeyForSearch)return;const c=Gy(s.key);if(!c||s.ctrlKey||s.metaKey)return;c===" "&&t().trim().length>0&&(s.preventDefault(),s.stopPropagation());let u=n(h=>h+c),d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u);d==null&&Uy(u)&&(u=u[0],d=a.getKeyForSearch(u,l.focusedKey())??a.getKeyForSearch(u)),d!=null&&(l.setFocusedKey(d),(f=e.onTypeSelect)==null||f.call(e,d)),clearTimeout(r()),o(window.setTimeout(()=>n(""),500))}}}}function Gy(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}function Uy(e){return e.split("").every(t=>t===e[0])}function qy(e,t,n){const o=F({selectOnFocus:()=>D(e.selectionManager).selectionBehavior()==="replace"},e),i=()=>t(),{direction:s}=Zt();let a={top:0,left:0};Lg(()=>D(o.isVirtualized)?void 0:i(),"scroll",()=>{const v=i();v&&(a={top:v.scrollTop,left:v.scrollLeft})});const{typeSelectHandlers:l}=Hy({isDisabled:()=>D(o.disallowTypeAhead),keyboardDelegate:()=>D(o.keyboardDelegate),selectionManager:()=>D(o.selectionManager)}),c=()=>D(o.orientation)??"vertical",u=v=>{var _,T,K,N,z,re,P,E;ne(v,l.onKeyDown),v.altKey&&v.key==="Tab"&&v.preventDefault();const m=t();if(!(m!=null&&m.contains(v.target)))return;const y=D(o.selectionManager),w=D(o.selectOnFocus),S=x=>{x!=null&&(y.setFocusedKey(x),v.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(x):w&&!$d(v)&&y.replaceSelection(x))},C=D(o.keyboardDelegate),$=D(o.shouldFocusWrap),A=y.focusedKey();switch(v.key){case(c()==="vertical"?"ArrowDown":"ArrowRight"):{if(C.getKeyBelow){v.preventDefault();let x;A!=null?x=C.getKeyBelow(A):x=(_=C.getFirstKey)==null?void 0:_.call(C),x==null&&$&&(x=(T=C.getFirstKey)==null?void 0:T.call(C,A)),S(x)}break}case(c()==="vertical"?"ArrowUp":"ArrowLeft"):{if(C.getKeyAbove){v.preventDefault();let x;A!=null?x=C.getKeyAbove(A):x=(K=C.getLastKey)==null?void 0:K.call(C),x==null&&$&&(x=(N=C.getLastKey)==null?void 0:N.call(C,A)),S(x)}break}case(c()==="vertical"?"ArrowLeft":"ArrowUp"):{if(C.getKeyLeftOf){v.preventDefault();const x=s()==="rtl";let I;A!=null?I=C.getKeyLeftOf(A):I=x?(z=C.getFirstKey)==null?void 0:z.call(C):(re=C.getLastKey)==null?void 0:re.call(C),S(I)}break}case(c()==="vertical"?"ArrowRight":"ArrowDown"):{if(C.getKeyRightOf){v.preventDefault();const x=s()==="rtl";let I;A!=null?I=C.getKeyRightOf(A):I=x?(P=C.getLastKey)==null?void 0:P.call(C):(E=C.getFirstKey)==null?void 0:E.call(C),S(I)}break}case"Home":if(C.getFirstKey){v.preventDefault();const x=C.getFirstKey(A,Pn(v));x!=null&&(y.setFocusedKey(x),Pn(v)&&v.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(x):w&&y.replaceSelection(x))}break;case"End":if(C.getLastKey){v.preventDefault();const x=C.getLastKey(A,Pn(v));x!=null&&(y.setFocusedKey(x),Pn(v)&&v.shiftKey&&y.selectionMode()==="multiple"?y.extendSelection(x):w&&y.replaceSelection(x))}break;case"PageDown":if(C.getKeyPageBelow&&A!=null){v.preventDefault();const x=C.getKeyPageBelow(A);S(x)}break;case"PageUp":if(C.getKeyPageAbove&&A!=null){v.preventDefault();const x=C.getKeyPageAbove(A);S(x)}break;case"a":Pn(v)&&y.selectionMode()==="multiple"&&D(o.disallowSelectAll)!==!0&&(v.preventDefault(),y.selectAll());break;case"Escape":v.defaultPrevented||(v.preventDefault(),D(o.disallowEmptySelection)||y.clearSelection());break;case"Tab":if(!D(o.allowsTabNavigation)){if(v.shiftKey)m.focus();else{const x=Jg(m,{tabbable:!0});let I,M;do M=x.lastChild(),M&&(I=M);while(M);I&&!I.contains(document.activeElement)&&$e(I)}break}}},d=v=>{var S,C;const m=D(o.selectionManager),y=D(o.keyboardDelegate),w=D(o.selectOnFocus);if(m.isFocused()){v.currentTarget.contains(v.target)||m.setFocused(!1);return}if(v.currentTarget.contains(v.target)){if(m.setFocused(!0),m.focusedKey()==null){const $=_=>{_!=null&&(m.setFocusedKey(_),w&&m.replaceSelection(_))},A=v.relatedTarget;A&&v.currentTarget.compareDocumentPosition(A)&Node.DOCUMENT_POSITION_FOLLOWING?$(m.lastSelectedKey()??((S=y.getLastKey)==null?void 0:S.call(y))):$(m.firstSelectedKey()??((C=y.getFirstKey)==null?void 0:C.call(y)))}else if(!D(o.isVirtualized)){const $=i();if($){$.scrollTop=a.top,$.scrollLeft=a.left;const A=$.querySelector(`[data-key="${m.focusedKey()}"]`);A&&($e(A),Xi($,A))}}}},f=v=>{const m=D(o.selectionManager);v.currentTarget.contains(v.relatedTarget)||m.setFocused(!1)},h=v=>{i()===v.target&&v.preventDefault()},p=()=>{var $,A;const v=D(o.autoFocus);if(!v)return;const m=D(o.selectionManager),y=D(o.keyboardDelegate);let w;v==="first"&&(w=($=y.getFirstKey)==null?void 0:$.call(y)),v==="last"&&(w=(A=y.getLastKey)==null?void 0:A.call(y));const S=m.selectedKeys();S.size&&(w=S.values().next().value),m.setFocused(!0),m.setFocusedKey(w);const C=t();C&&w==null&&!D(o.shouldUseVirtualFocus)&&$e(C)};return Wn(()=>{o.deferAutoFocus?setTimeout(p,0):p()}),H(Ce([i,()=>D(o.isVirtualized),()=>D(o.selectionManager).focusedKey()],v=>{var S;const[m,y,w]=v;if(y)w&&((S=o.scrollToKey)==null||S.call(o,w));else if(w&&m){const C=m.querySelector(`[data-key="${w}"]`);C&&Xi(m,C)}})),{tabIndex:k(()=>{if(!D(o.shouldUseVirtualFocus))return D(o.selectionManager).focusedKey()==null?0:-1}),onKeyDown:u,onMouseDown:h,onFocusIn:d,onFocusOut:f}}function Md(e,t){const n=()=>D(e.selectionManager),r=()=>D(e.key),o=()=>D(e.shouldUseVirtualFocus),i=y=>{n().selectionMode()!=="none"&&(n().selectionMode()==="single"?n().isSelected(r())&&!n().disallowEmptySelection()?n().toggleSelection(r()):n().replaceSelection(r()):y!=null&&y.shiftKey?n().extendSelection(r()):n().selectionBehavior()==="toggle"||Pn(y)||"pointerType"in y&&y.pointerType==="touch"?n().toggleSelection(r()):n().replaceSelection(r()))},s=()=>n().isSelected(r()),a=()=>D(e.disabled)||n().isDisabled(r()),l=()=>!a()&&n().canSelectItem(r());let c=null;const u=y=>{l()&&(c=y.pointerType,y.pointerType==="mouse"&&y.button===0&&!D(e.shouldSelectOnPressUp)&&i(y))},d=y=>{l()&&y.pointerType==="mouse"&&y.button===0&&D(e.shouldSelectOnPressUp)&&D(e.allowsDifferentPressOrigin)&&i(y)},f=y=>{l()&&(D(e.shouldSelectOnPressUp)&&!D(e.allowsDifferentPressOrigin)||c!=="mouse")&&i(y)},h=y=>{!l()||!["Enter"," "].includes(y.key)||($d(y)?n().toggleSelection(r()):i(y))},p=y=>{a()&&y.preventDefault()},g=y=>{const w=t();o()||a()||!w||y.target===w&&n().setFocusedKey(r())},v=k(()=>{if(!(o()||a()))return r()===n().focusedKey()?0:-1}),m=k(()=>D(e.virtualized)?void 0:r());return H(Ce([t,r,o,()=>n().focusedKey(),()=>n().isFocused()],([y,w,S,C,$])=>{y&&w===C&&$&&!S&&document.activeElement!==y&&(e.focus?e.focus():$e(y))})),{isSelected:s,isDisabled:a,allowsSelection:l,tabIndex:v,dataKey:m,onPointerDown:u,onPointerUp:d,onClick:f,onKeyDown:h,onMouseDown:p,onFocus:g}}var Wy=class{constructor(e,t){Re(this,"collection");Re(this,"state");this.collection=e,this.state=t}selectionMode(){return this.state.selectionMode()}disallowEmptySelection(){return this.state.disallowEmptySelection()}selectionBehavior(){return this.state.selectionBehavior()}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}isFocused(){return this.state.isFocused()}setFocused(e){this.state.setFocused(e)}focusedKey(){return this.state.focusedKey()}setFocusedKey(e){(e==null||this.collection().getItem(e))&&this.state.setFocusedKey(e)}selectedKeys(){return this.state.selectedKeys()}isSelected(e){if(this.state.selectionMode()==="none")return!1;const t=this.getKey(e);return t==null?!1:this.state.selectedKeys().has(t)}isEmpty(){return this.state.selectedKeys().size===0}isSelectAll(){if(this.isEmpty())return!1;const e=this.state.selectedKeys();return this.getAllSelectableKeys().every(t=>e.has(t))}firstSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index<e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}lastSelectedKey(){let e;for(const t of this.state.selectedKeys()){const n=this.collection().getItem(t),r=(n==null?void 0:n.index)!=null&&(e==null?void 0:e.index)!=null&&n.index>e.index;(!e||r)&&(e=n)}return e==null?void 0:e.key}extendSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=this.state.selectedKeys(),r=n.anchorKey||t,o=new $t(n,r,t);for(const i of this.getKeyRange(r,n.currentKey||t))o.delete(i);for(const i of this.getKeyRange(t,r))this.canSelectItem(i)&&o.add(i);this.state.setSelectedKeys(o)}getKeyRange(e,t){const n=this.collection().getItem(e),r=this.collection().getItem(t);return n&&r?n.index!=null&&r.index!=null&&n.index<=r.index?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){const n=[];let r=e;for(;r!=null;){const o=this.collection().getItem(r);if(o&&o.type==="item"&&n.push(r),r===t)return n;r=this.collection().getKeyAfter(r)}return[]}getKey(e){const t=this.collection().getItem(e);return t?!t||t.type!=="item"?null:t.key:e}toggleSelection(e){if(this.selectionMode()==="none")return;if(this.selectionMode()==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}const t=this.getKey(e);if(t==null)return;const n=new $t(this.state.selectedKeys());n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection()&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode()==="none")return;const t=this.getKey(e);if(t==null)return;const n=this.canSelectItem(t)?new $t([t],t,t):new $t;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode()==="none")return;const t=new $t;for(const n of e){const r=this.getKey(n);if(r!=null&&(t.add(r),this.selectionMode()==="single"))break}this.state.setSelectedKeys(t)}selectAll(){this.selectionMode()==="multiple"&&this.state.setSelectedKeys(new Set(this.getAllSelectableKeys()))}clearSelection(){const e=this.state.selectedKeys();!this.disallowEmptySelection()&&e.size>0&&this.state.setSelectedKeys(new $t)}toggleSelectAll(){this.isSelectAll()?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode()!=="none"&&(this.selectionMode()==="single"?this.isSelected(e)&&!this.disallowEmptySelection()?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior()==="toggle"||t&&t.pointerType==="touch"?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys())return!0;const t=this.selectedKeys();if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;for(const n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode()==="none")return!1;const t=this.collection().getItem(e);return t!=null&&!t.disabled}isDisabled(e){const t=this.collection().getItem(e);return!t||t.disabled}getAllSelectableKeys(){const e=[];return(n=>{for(;n!=null;){if(this.canSelectItem(n)){const r=this.collection().getItem(n);if(!r)continue;r.type==="item"&&e.push(n)}n=this.collection().getKeyAfter(n)}})(this.collection().getFirstKey()),e}},Gl=class{constructor(e){Re(this,"keyMap",new Map);Re(this,"iterable");Re(this,"firstKey");Re(this,"lastKey");this.iterable=e;for(const r of e)this.keyMap.set(r.key,r);if(this.keyMap.size===0)return;let t,n=0;for(const[r,o]of this.keyMap)t?(t.nextKey=r,o.prevKey=t.key):(this.firstKey=r,o.prevKey=void 0),o.type==="item"&&(o.index=n++),t=o,t.nextKey=void 0;this.lastKey=t.key}*[Symbol.iterator](){yield*this.iterable}getSize(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.prevKey}getKeyAfter(e){var t;return(t=this.keyMap.get(e))==null?void 0:t.nextKey}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const t=[...this.getKeys()];return this.getItem(t[e])}};function Xy(e){const t=By(e),r=Ky({dataSource:()=>D(e.dataSource),getKey:()=>D(e.getKey),getTextValue:()=>D(e.getTextValue),getDisabled:()=>D(e.getDisabled),getSectionChildren:()=>D(e.getSectionChildren),factory:i=>e.filter?new Gl(e.filter(i)):new Gl(i)},[()=>e.filter]),o=new Wy(r,t);return Ft(()=>{const i=t.focusedKey();i!=null&&!r().getItem(i)&&t.setFocusedKey(void 0)}),{collection:r,selectionManager:()=>o}}var Qy=class{constructor(e,t,n){Re(this,"collection");Re(this,"ref");Re(this,"collator");this.collection=e,this.ref=t,this.collator=n}getKeyBelow(e){let t=this.collection().getKeyAfter(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyAfter(t)}}getKeyAbove(e){let t=this.collection().getKeyBefore(e);for(;t!=null;){const n=this.collection().getItem(t);if(n&&n.type==="item"&&!n.disabled)return t;t=this.collection().getKeyBefore(t)}}getFirstKey(){let e=this.collection().getFirstKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyAfter(e)}}getLastKey(){let e=this.collection().getLastKey();for(;e!=null;){const t=this.collection().getItem(e);if(t&&t.type==="item"&&!t.disabled)return e;e=this.collection().getKeyBefore(e)}}getItem(e){var t,n;return((n=(t=this.ref)==null?void 0:t.call(this))==null?void 0:n.querySelector(`[data-key="${e}"]`))??null}getKeyPageAbove(e){var i;const t=(i=this.ref)==null?void 0:i.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.max(0,n.offsetTop+n.offsetHeight-t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop>r;)o=this.getKeyAbove(o),n=o!=null?this.getItem(o):null;return o}getKeyPageBelow(e){var i;const t=(i=this.ref)==null?void 0:i.call(this);let n=this.getItem(e);if(!t||!n)return;const r=Math.min(t.scrollHeight,n.offsetTop-n.offsetHeight+t.offsetHeight);let o=e;for(;o&&n&&n.offsetTop<r;)o=this.getKeyBelow(o),n=o!=null?this.getItem(o):null;return o}getKeyForSearch(e,t){var o;const n=(o=this.collator)==null?void 0:o.call(this);if(!n)return;let r=t!=null?this.getKeyBelow(t):this.getFirstKey();for(;r!=null;){const i=this.collection().getItem(r);if(i){const s=i.textValue.slice(0,e.length);if(i.textValue&&n.compare(s,e)===0)return r}r=this.getKeyBelow(r)}}};function Yy(e,t,n){const r=ov({usage:"search",sensitivity:"base"}),o=k(()=>{const i=D(e.keyboardDelegate);return i||new Qy(e.collection,t,r)});return qy({selectionManager:()=>D(e.selectionManager),keyboardDelegate:o,autoFocus:()=>D(e.autoFocus),deferAutoFocus:()=>D(e.deferAutoFocus),shouldFocusWrap:()=>D(e.shouldFocusWrap),disallowEmptySelection:()=>D(e.disallowEmptySelection),selectOnFocus:()=>D(e.selectOnFocus),disallowTypeAhead:()=>D(e.disallowTypeAhead),shouldUseVirtualFocus:()=>D(e.shouldUseVirtualFocus),allowsTabNavigation:()=>D(e.allowsTabNavigation),isVirtualized:()=>D(e.isVirtualized),scrollToKey:i=>{var s;return(s=D(e.scrollToKey))==null?void 0:s(i)},orientation:()=>D(e.orientation)},t)}function Fd(e={}){const[t,n]=ed({value:()=>D(e.isSelected),defaultValue:()=>!!D(e.defaultIsSelected),onChange:i=>{var s;return(s=e.onSelectedChange)==null?void 0:s.call(e,i)}});return{isSelected:t,setIsSelected:i=>{!D(e.isReadOnly)&&!D(e.isDisabled)&&n(i)},toggle:()=>{!D(e.isReadOnly)&&!D(e.isDisabled)&&n(!t())}}}var Od=we();function Oo(){return ye(Od)}function Tt(){const e=Oo();if(e===void 0)throw new Error("[kobalte]: `useMenuContext` must be used within a `Menu` component");return e}var Ad=we();function ia(){const e=ye(Ad);if(e===void 0)throw new Error("[kobalte]: `useMenuItemContext` must be used within a `Menu.Item` component");return e}var Td=we();function xt(){const e=ye(Td);if(e===void 0)throw new Error("[kobalte]: `useMenuRootContext` must be used within a `MenuRoot` component");return e}function sa(e){let t;const n=xt(),r=Tt(),o=Q({id:n.generateId(`item-${Ee()}`)},e),[i,s]=V(o,["ref","textValue","disabled","closeOnSelect","checked","indeterminate","onSelect","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]),[a,l]=j(),[c,u]=j(),[d,f]=j(),h=()=>r.listState().selectionManager(),p=()=>s.id,g=()=>h().focusedKey()===p(),v=()=>{var T;(T=i.onSelect)==null||T.call(i),i.closeOnSelect&&setTimeout(()=>{r.close(!0)})};Ny({getItem:()=>{var T;return{ref:()=>t,type:"item",key:p(),textValue:i.textValue??((T=d())==null?void 0:T.textContent)??(t==null?void 0:t.textContent)??"",disabled:i.disabled??!1}}});const m=Md({key:p,selectionManager:h,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),y=T=>{ne(T,i.onPointerMove),T.pointerType==="mouse"&&(i.disabled?r.onItemLeave(T):(r.onItemEnter(T),T.defaultPrevented||($e(T.currentTarget),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(p()))))},w=T=>{ne(T,i.onPointerLeave),T.pointerType==="mouse"&&r.onItemLeave(T)},S=T=>{ne(T,i.onPointerUp),!i.disabled&&T.button===0&&v()},C=T=>{if(ne(T,i.onKeyDown),!T.repeat&&!i.disabled)switch(T.key){case"Enter":case" ":v();break}},$=k(()=>{if(i.indeterminate)return"mixed";if(i.checked!=null)return i.checked}),A=k(()=>({"data-indeterminate":i.indeterminate?"":void 0,"data-checked":i.checked&&!i.indeterminate?"":void 0,"data-disabled":i.disabled?"":void 0,"data-highlighted":g()?"":void 0})),_={isChecked:()=>i.checked,dataset:A,setLabelRef:f,generateId:dt(()=>s.id),registerLabel:Ke(l),registerDescription:Ke(u)};return b(Ad.Provider,{value:_,get children(){return b(le,F({as:"div",ref(T){var K=ve(N=>t=N,i.ref);typeof K=="function"&&K(T)},get tabIndex(){return m.tabIndex()},get"aria-checked"(){return $()},get"aria-disabled"(){return i.disabled},get"aria-labelledby"(){return a()},get"aria-describedby"(){return c()},get"data-key"(){return m.dataKey()},get onPointerDown(){return Se([i.onPointerDown,m.onPointerDown])},get onPointerUp(){return Se([S,m.onPointerUp])},get onClick(){return Se([i.onClick,m.onClick])},get onKeyDown(){return Se([C,m.onKeyDown])},get onMouseDown(){return Se([i.onMouseDown,m.onMouseDown])},get onFocus(){return Se([i.onFocus,m.onFocus])},onPointerMove:y,onPointerLeave:w},A,s))}})}function Zy(e){const t=Q({closeOnSelect:!1},e),[n,r]=V(t,["checked","defaultChecked","onChange","onSelect"]),o=Fd({isSelected:()=>n.checked,defaultIsSelected:()=>n.defaultChecked,onSelectedChange:s=>{var a;return(a=n.onChange)==null?void 0:a.call(n,s)},isDisabled:()=>r.disabled});return b(sa,F({role:"menuitemcheckbox",get checked(){return o.isSelected()},onSelect:()=>{var s;(s=n.onSelect)==null||s.call(n),o.toggle()}},r))}var Dd=we();function Nr(){return ye(Dd)}function er(){const e=Nr();if(e===void 0)throw new Error("[kobalte]: `useMenubarContext` must be used within a `Menubar` component");return e}var Mr={next:(e,t)=>e==="ltr"?t==="horizontal"?"ArrowRight":"ArrowDown":t==="horizontal"?"ArrowLeft":"ArrowUp",previous:(e,t)=>Mr.next(e==="ltr"?"rtl":"ltr",t)},Ul={first:e=>e==="horizontal"?"ArrowDown":"ArrowRight",last:e=>e==="horizontal"?"ArrowUp":"ArrowLeft"};function ql(e){const t=xt(),n=Tt(),r=Nr(),{direction:o}=Zt(),i=Q({id:t.generateId("trigger")},e),[s,a]=V(i,["ref","id","disabled","onPointerDown","onClick","onKeyDown","onMouseOver","onFocus"]);let l=()=>t.value();r!==void 0&&(l=()=>t.value()??s.id,r.lastValue()===void 0&&r.setLastValue(l));const c=Co(()=>n.triggerRef(),()=>"button"),u=k(()=>{var m;return c()==="a"&&((m=n.triggerRef())==null?void 0:m.getAttribute("href"))!=null});H(Ce(()=>r==null?void 0:r.value(),m=>{var y;u()&&m===l()&&((y=n.triggerRef())==null||y.focus())}));const d=()=>{r!==void 0?n.isOpen()?r.value()===l()&&r.closeMenu():(r.autoFocusMenu()||r.setAutoFocusMenu(!0),n.open(!1)):n.toggle(!0)},f=m=>{ne(m,s.onPointerDown),m.currentTarget.dataset.pointerType=m.pointerType,!s.disabled&&m.pointerType!=="touch"&&m.button===0&&d()},h=m=>{ne(m,s.onClick),s.disabled||m.currentTarget.dataset.pointerType==="touch"&&d()},p=m=>{if(ne(m,s.onKeyDown),!s.disabled){if(u())switch(m.key){case"Enter":case" ":return}switch(m.key){case"Enter":case" ":case Ul.first(t.orientation()):m.stopPropagation(),m.preventDefault(),rp(m.currentTarget),n.open("first"),r==null||r.setAutoFocusMenu(!0),r==null||r.setValue(l);break;case Ul.last(t.orientation()):m.stopPropagation(),m.preventDefault(),n.open("last");break;case Mr.next(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.nextMenu();break;case Mr.previous(o(),t.orientation()):if(r===void 0)break;m.stopPropagation(),m.preventDefault(),r.previousMenu();break}}},g=m=>{var y;ne(m,s.onMouseOver),((y=n.triggerRef())==null?void 0:y.dataset.pointerType)!=="touch"&&!s.disabled&&r!==void 0&&r.value()!==void 0&&r.setValue(l)},v=m=>{ne(m,s.onFocus),r!==void 0&&m.currentTarget.dataset.pointerType!=="touch"&&r.setValue(l)};return H(()=>W(n.registerTriggerId(s.id))),b(bt,F({ref(m){var y=ve(n.setTriggerRef,s.ref);typeof y=="function"&&y(m)},get"data-kb-menu-value-trigger"(){return t.value()},get id(){return s.id},get disabled(){return s.disabled},"aria-haspopup":"true",get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return k(()=>!!n.isOpen())()?n.contentId():void 0},get"data-highlighted"(){return l()!==void 0&&(r==null?void 0:r.value())===l()?!0:void 0},get tabIndex(){return r!==void 0?r.value()===l()||r.lastValue()===l()?0:-1:void 0},onPointerDown:f,onMouseOver:g,onClick:h,onKeyDown:p,onFocus:v,role:r!==void 0?"menuitem":void 0},()=>n.dataset(),a))}var _d=we();function aa(){return ye(_d)}function Kr(){const e=aa();if(e===void 0)throw new Error("[kobalte]: `useNavigationMenuContext` must be used within a `NavigationMenu` component");return e}function Ld(e){let t;const n=xt(),r=Tt(),o=Nr(),i=aa(),{direction:s}=Zt(),a=Q({id:n.generateId(`content-${Ee()}`)},e),[l,c]=V(a,["ref","id","style","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeyDown","onFocusOutside","onPointerEnter","onPointerMove","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]);let u=0;const d=()=>r.parentMenuContext()==null&&o===void 0&&n.isModal(),f=Yy({selectionManager:r.listState().selectionManager,collection:r.listState().collection,autoFocus:r.autoFocus,deferAutoFocus:!0,shouldFocusWrap:!0,disallowTypeAhead:()=>!r.listState().selectionManager().isFocused(),orientation:()=>n.orientation()==="horizontal"?"vertical":"horizontal"},()=>t);Qc({trapFocus:()=>d()&&r.isOpen(),onMountAutoFocus:w=>{var S;o===void 0&&((S=l.onOpenAutoFocus)==null||S.call(l,w))},onUnmountAutoFocus:l.onCloseAutoFocus},()=>t);const h=w=>{if(Pe(w.currentTarget,w.target)&&(w.key==="Tab"&&r.isOpen()&&w.preventDefault(),o!==void 0&&w.currentTarget.getAttribute("aria-haspopup")!=="true"))switch(w.key){case Mr.next(s(),n.orientation()):w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.nextMenu();break;case Mr.previous(s(),n.orientation()):if(w.currentTarget.hasAttribute("data-closed"))break;w.stopPropagation(),w.preventDefault(),r.close(!0),o.setAutoFocusMenu(!0),o.previousMenu();break}},p=w=>{var S;(S=l.onEscapeKeyDown)==null||S.call(l,w),o==null||o.setAutoFocusMenu(!1),r.close(!0)},g=w=>{var S;(S=l.onFocusOutside)==null||S.call(l,w),n.isModal()&&w.preventDefault()},v=w=>{var S,C;ne(w,l.onPointerEnter),r.isOpen()&&((S=r.parentMenuContext())==null||S.listState().selectionManager().setFocused(!1),(C=r.parentMenuContext())==null||C.listState().selectionManager().setFocusedKey(void 0))},m=w=>{if(ne(w,l.onPointerMove),w.pointerType!=="mouse")return;const S=w.target,C=u!==w.clientX;Pe(w.currentTarget,S)&&C&&(r.setPointerDir(w.clientX>u?"right":"left"),u=w.clientX)};H(()=>W(r.registerContentId(l.id))),W(()=>r.setContentRef(void 0));const y={ref:ve(w=>{r.setContentRef(w),t=w},l.ref),role:"menu",get id(){return l.id},get tabIndex(){return f.tabIndex()},get"aria-labelledby"(){return r.triggerId()},onKeyDown:Se([l.onKeyDown,f.onKeyDown,h]),onMouseDown:Se([l.onMouseDown,f.onMouseDown]),onFocusIn:Se([l.onFocusIn,f.onFocusIn]),onFocusOut:Se([l.onFocusOut,f.onFocusOut]),onPointerEnter:v,onPointerMove:m,get"data-orientation"(){return n.orientation()}};return b(pe,{get when(){return r.contentPresent()},get children(){return b(pe,{get when(){return i===void 0||r.parentMenuContext()!=null},get fallback(){return b(le,F({as:"div"},()=>r.dataset(),y,c))},get children(){return b(Jn.Positioner,{get children(){return b(Ro,F({get disableOutsidePointerEvents(){return k(()=>!!d())()&&r.isOpen()},get excludedElements(){return[r.triggerRef]},bypassTopMostLayerCheck:!0,get style(){return ct({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onEscapeKeyDown:p,onFocusOutside:g,get onDismiss(){return r.close}},()=>r.dataset(),y,c))}})}})}})}function Jy(e){let t;const n=xt(),r=Tt(),[o,i]=V(e,["ref"]);return td({element:()=>t??null,enabled:()=>r.contentPresent()&&n.preventScroll()}),b(Ld,F({ref(s){var a=ve(l=>{t=l},o.ref);typeof a=="function"&&a(s)}},i))}var kd=we();function ew(){const e=ye(kd);if(e===void 0)throw new Error("[kobalte]: `useMenuGroupContext` must be used within a `Menu.Group` component");return e}function Vd(e){const t=xt(),n=Q({id:t.generateId(`group-${Ee()}`)},e),[r,o]=j(),i={generateId:dt(()=>n.id),registerLabelId:Ke(o)};return b(kd.Provider,{value:i,get children(){return b(le,F({as:"div",role:"group",get"aria-labelledby"(){return r()}},n))}})}function tw(e){const t=ew(),n=Q({id:t.generateId("label")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerLabelId(r.id))),b(le,F({as:"span",get id(){return r.id},"aria-hidden":"true"},o))}function Nd(e){const t=Tt(),n=Q({children:"▼"},e);return b(le,F({as:"span","aria-hidden":"true"},()=>t.dataset(),n))}function nw(e){return b(sa,F({role:"menuitem",closeOnSelect:!0},e))}function rw(e){const t=ia(),n=Q({id:t.generateId("description")},e),[r,o]=V(n,["id"]);return H(()=>W(t.registerDescription(r.id))),b(le,F({as:"div",get id(){return r.id}},()=>t.dataset(),o))}function ow(e){const t=ia(),n=Q({id:t.generateId("indicator")},e),[r,o]=V(n,["forceMount"]);return b(pe,{get when(){return r.forceMount||t.isChecked()},get children(){return b(le,F({as:"div"},()=>t.dataset(),o))}})}function iw(e){const t=ia(),n=Q({id:t.generateId("label")},e),[r,o]=V(n,["ref","id"]);return H(()=>W(t.registerLabel(r.id))),b(le,F({as:"div",ref(i){var s=ve(t.setLabelRef,r.ref);typeof s=="function"&&s(i)},get id(){return r.id}},()=>t.dataset(),o))}function sw(e){const t=Tt();return b(pe,{get when(){return t.contentPresent()},get children(){return b(wo,e)}})}var Kd=we();function aw(){const e=ye(Kd);if(e===void 0)throw new Error("[kobalte]: `useMenuRadioGroupContext` must be used within a `Menu.RadioGroup` component");return e}function lw(e){const n=xt().generateId(`radiogroup-${Ee()}`),r=Q({id:n},e),[o,i]=V(r,["value","defaultValue","onChange","disabled"]),[s,a]=yt({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:c=>{var u;return(u=o.onChange)==null?void 0:u.call(o,c)}}),l={isDisabled:()=>o.disabled,isSelectedValue:c=>c===s(),setSelectedValue:a};return b(Kd.Provider,{value:l,get children(){return b(Vd,i)}})}function uw(e){const t=aw(),n=Q({closeOnSelect:!1},e),[r,o]=V(n,["value","onSelect"]);return b(sa,F({role:"menuitemradio",get checked(){return t.isSelectedValue(r.value)},onSelect:()=>{var s;(s=r.onSelect)==null||s.call(r),t.setSelectedValue(r.value)}},o))}function cw(e,t,n){const r=e.split("-")[0],o=n.getBoundingClientRect(),i=[],s=t.clientX,a=t.clientY;switch(r){case"top":i.push([s,a+5]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]);break;case"right":i.push([s-5,a]),i.push([o.left,o.top]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]);break;case"bottom":i.push([s,a-5]),i.push([o.right,o.top]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]);break;case"left":i.push([s+5,a]),i.push([o.right,o.bottom]),i.push([o.left,o.bottom]),i.push([o.left,o.top]),i.push([o.right,o.top]);break}return i}function dw(e,t){return t?Tc([e.clientX,e.clientY],t):!1}function jd(e){const t=xt(),n=Cd(),r=Oo(),o=Nr(),i=aa(),s=Q({placement:t.orientation()==="horizontal"?"bottom-start":"right-start"},e),[a,l]=V(s,["open","defaultOpen","onOpenChange"]);let c=0,u=null,d="right";const[f,h]=j(),[p,g]=j(),[v,m]=j(),[y,w]=j(),[S,C]=j(!0),[$,A]=j(l.placement),[_,T]=j([]),[K,N]=j([]),{DomCollectionProvider:z}=Vy({items:K,onItemsChange:N}),re=Po({open:()=>a.open,defaultOpen:()=>a.defaultOpen,onOpenChange:oe=>{var Fe;return(Fe=a.onOpenChange)==null?void 0:Fe.call(a,oe)}}),{present:P}=Un({show:()=>t.forceMount()||re.isOpen(),element:()=>y()??null}),E=Xy({selectionMode:"none",dataSource:K}),x=oe=>{C(oe),re.open()},I=(oe=!1)=>{re.close(),oe&&r&&r.close(!0)},M=oe=>{C(oe),re.toggle()},O=()=>{const oe=y();oe&&($e(oe),E.selectionManager().setFocused(!0),E.selectionManager().setFocusedKey(void 0))},L=()=>{i!=null?setTimeout(()=>O()):O()},B=oe=>{T(Ie=>[...Ie,oe]);const Fe=r==null?void 0:r.registerNestedMenu(oe);return()=>{T(Ie=>Wi(Ie,oe)),Fe==null||Fe()}},U=oe=>d===(u==null?void 0:u.side)&&dw(oe,u==null?void 0:u.area),Y=oe=>{U(oe)&&oe.preventDefault()},ce=oe=>{U(oe)||L()},se=oe=>{U(oe)&&oe.preventDefault()};Yc({isDisabled:()=>!(r==null&&re.isOpen()&&t.isModal()),targets:()=>[y(),..._()].filter(Boolean)}),H(()=>{const oe=y();if(!oe||!r)return;const Fe=r.registerNestedMenu(oe);W(()=>{Fe()})}),H(()=>{r===void 0&&(o==null||o.registerMenu(t.value(),[y(),..._()]))}),H(()=>{var oe;r!==void 0||o===void 0||(o.value()===t.value()?((oe=v())==null||oe.focus(),o.autoFocusMenu()&&x(!0)):I())}),H(()=>{r!==void 0||o===void 0||re.isOpen()&&o.setValue(t.value())}),W(()=>{r===void 0&&(o==null||o.unregisterMenu(t.value()))});const et={dataset:k(()=>({"data-expanded":re.isOpen()?"":void 0,"data-closed":re.isOpen()?void 0:""})),isOpen:re.isOpen,contentPresent:P,nestedMenus:_,currentPlacement:$,pointerGraceTimeoutId:()=>c,autoFocus:S,listState:()=>E,parentMenuContext:()=>r,triggerRef:v,contentRef:y,triggerId:f,contentId:p,setTriggerRef:m,setContentRef:w,open:x,close:I,toggle:M,focusContent:L,onItemEnter:Y,onItemLeave:ce,onTriggerLeave:se,setPointerDir:oe=>d=oe,setPointerGraceTimeoutId:oe=>c=oe,setPointerGraceIntent:oe=>u=oe,registerNestedMenu:B,registerItemToParentDomCollection:n==null?void 0:n.registerItem,registerTriggerId:Ke(h),registerContentId:Ke(g)};return b(z,{get children(){return b(Od.Provider,{value:et,get children(){return b(pe,{when:i===void 0,get fallback(){return l.children},get children(){return b(Jn,F({anchorRef:v,contentRef:y,onCurrentPlacementChange:A},l))}})}})}})}function fw(e){const{direction:t}=Zt();return b(jd,F({get placement(){return t()==="rtl"?"left-start":"right-start"},flip:!0},e))}var hw={close:(e,t)=>e==="ltr"?[t==="horizontal"?"ArrowLeft":"ArrowUp"]:[t==="horizontal"?"ArrowRight":"ArrowDown"]};function gw(e){const t=Tt(),n=xt(),[r,o]=V(e,["onFocusOutside","onKeyDown"]),{direction:i}=Zt();return b(Ld,F({onOpenAutoFocus:u=>{u.preventDefault()},onCloseAutoFocus:u=>{u.preventDefault()},onFocusOutside:u=>{var f;(f=r.onFocusOutside)==null||f.call(r,u);const d=u.target;Pe(t.triggerRef(),d)||t.close()},onKeyDown:u=>{ne(u,r.onKeyDown);const d=Pe(u.currentTarget,u.target),f=hw.close(i(),n.orientation()).includes(u.key),h=t.parentMenuContext()!=null;d&&f&&h&&(t.close(),$e(t.triggerRef()))}},o))}var Wl=["Enter"," "],pw={open:(e,t)=>e==="ltr"?[...Wl,t==="horizontal"?"ArrowRight":"ArrowDown"]:[...Wl,t==="horizontal"?"ArrowLeft":"ArrowUp"]};function mw(e){let t;const n=xt(),r=Tt(),o=Q({id:n.generateId(`sub-trigger-${Ee()}`)},e),[i,s]=V(o,["ref","id","textValue","disabled","onPointerMove","onPointerLeave","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);let a=null;const l=()=>{a&&window.clearTimeout(a),a=null},{direction:c}=Zt(),u=()=>i.id,d=()=>{const w=r.parentMenuContext();if(w==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");return w.listState().selectionManager()},f=()=>r.listState().collection(),h=()=>d().focusedKey()===u(),p=Md({key:u,selectionManager:d,shouldSelectOnPressUp:!0,allowsDifferentPressOrigin:!0,disabled:()=>i.disabled},()=>t),g=w=>{ne(w,i.onClick),!r.isOpen()&&!i.disabled&&r.open(!0)},v=w=>{var C;if(ne(w,i.onPointerMove),w.pointerType!=="mouse")return;const S=r.parentMenuContext();if(S==null||S.onItemEnter(w),!w.defaultPrevented){if(i.disabled){S==null||S.onItemLeave(w);return}!r.isOpen()&&!a&&((C=r.parentMenuContext())==null||C.setPointerGraceIntent(null),a=window.setTimeout(()=>{r.open(!1),l()},100)),S==null||S.onItemEnter(w),w.defaultPrevented||(r.listState().selectionManager().isFocused()&&(r.listState().selectionManager().setFocused(!1),r.listState().selectionManager().setFocusedKey(void 0)),$e(w.currentTarget),S==null||S.listState().selectionManager().setFocused(!0),S==null||S.listState().selectionManager().setFocusedKey(u()))}},m=w=>{if(ne(w,i.onPointerLeave),w.pointerType!=="mouse")return;l();const S=r.parentMenuContext(),C=r.contentRef();if(C){S==null||S.setPointerGraceIntent({area:cw(r.currentPlacement(),w,C),side:r.currentPlacement().split("-")[0]}),window.clearTimeout(S==null?void 0:S.pointerGraceTimeoutId());const $=window.setTimeout(()=>{S==null||S.setPointerGraceIntent(null)},300);S==null||S.setPointerGraceTimeoutId($)}else{if(S==null||S.onTriggerLeave(w),w.defaultPrevented)return;S==null||S.setPointerGraceIntent(null)}S==null||S.onItemLeave(w)},y=w=>{ne(w,i.onKeyDown),!w.repeat&&(i.disabled||pw.open(c(),n.orientation()).includes(w.key)&&(w.stopPropagation(),w.preventDefault(),d().setFocused(!1),d().setFocusedKey(void 0),r.isOpen()||r.open("first"),r.focusContent(),r.listState().selectionManager().setFocused(!0),r.listState().selectionManager().setFocusedKey(f().getFirstKey())))};return H(()=>{if(r.registerItemToParentDomCollection==null)throw new Error("[kobalte]: `Menu.SubTrigger` must be used within a `Menu.Sub` component");const w=r.registerItemToParentDomCollection({ref:()=>t,type:"item",key:u(),textValue:i.textValue??(t==null?void 0:t.textContent)??"",disabled:i.disabled??!1});W(w)}),H(Ce(()=>{var w;return(w=r.parentMenuContext())==null?void 0:w.pointerGraceTimeoutId()},w=>{W(()=>{var S;window.clearTimeout(w),(S=r.parentMenuContext())==null||S.setPointerGraceIntent(null)})})),H(()=>W(r.registerTriggerId(i.id))),W(()=>{l()}),b(le,F({as:"div",ref(w){var S=ve(C=>{r.setTriggerRef(C),t=C},i.ref);typeof S=="function"&&S(w)},get id(){return i.id},role:"menuitem",get tabIndex(){return p.tabIndex()},"aria-haspopup":"true",get"aria-expanded"(){return r.isOpen()},get"aria-controls"(){return k(()=>!!r.isOpen())()?r.contentId():void 0},get"aria-disabled"(){return i.disabled},get"data-key"(){return p.dataKey()},get"data-highlighted"(){return h()?"":void 0},get"data-disabled"(){return i.disabled?"":void 0},get onPointerDown(){return Se([i.onPointerDown,p.onPointerDown])},get onPointerUp(){return Se([i.onPointerUp,p.onPointerUp])},get onClick(){return Se([g,p.onClick])},get onKeyDown(){return Se([y,p.onKeyDown])},get onMouseDown(){return Se([i.onMouseDown,p.onMouseDown])},get onFocus(){return Se([i.onFocus,p.onFocus])},onPointerMove:v,onPointerLeave:m},()=>r.dataset(),s))}function vw(e){const t=Nr(),n=`menu-${Ee()}`,r=Q({id:n,modal:!0},e),[o,i]=V(r,["id","modal","preventScroll","forceMount","open","defaultOpen","onOpenChange","value","orientation"]),s=Po({open:()=>o.open,defaultOpen:()=>o.defaultOpen,onOpenChange:l=>{var c;return(c=o.onOpenChange)==null?void 0:c.call(o,l)}}),a={isModal:()=>o.modal??!0,preventScroll:()=>o.preventScroll??a.isModal(),forceMount:()=>o.forceMount??!1,generateId:dt(()=>o.id),value:()=>o.value,orientation:()=>o.orientation??(t==null?void 0:t.orientation())??"horizontal"};return b(Td.Provider,{value:a,get children(){return b(jd,F({get open(){return s.isOpen()},get onOpenChange(){return s.setIsOpen}},i))}})}function zd(e){const t=er(),n=Q({modal:!1},e),[r,o]=V(n,["value"]),i=Ee(),s=t.generateId(`menubar-menu-${i}`),a=Q({id:s},o);return b(vw,F({get value(){return r.value??i}},a))}function yw(e){let t;const n=`menubar-${Ee()}`,r=Q({id:n,loop:!0,orientation:"horizontal"},e),[o,i]=V(r,["ref","value","defaultValue","onValueChange","loop","focusOnAlt","autoFocusMenu","onAutoFocusMenuChange","orientation"]),[s,a]=yt({value:()=>o.value,defaultValue:()=>o.defaultValue,onChange:y=>{var w;return(w=o.onValueChange)==null?void 0:w.call(o,y)}}),[l,c]=j(),[u,d]=j(new Map),[f,h]=yt({value:()=>o.autoFocusMenu,defaultValue:()=>!1,onChange:o.onAutoFocusMenuChange}),p=()=>{var y;return s()&&f()&&!((y=s())!=null&&y.includes("link-trigger-"))},v={dataset:k(()=>({"data-expanded":p()?"":void 0,"data-closed":p()?void 0:""})),value:s,setValue:a,lastValue:l,setLastValue:c,menus:()=>new Set([...u().keys()]),menuRefs:()=>[...u().values()].flat(),menuRefMap:()=>u(),registerMenu:(y,w)=>{d(S=>{const C=new Map;return S.forEach(($,A)=>C.set(A,$)),C.set(y,w),C})},unregisterMenu:y=>{d(w=>{w.delete(y);const S=new Map;return w.forEach((C,$)=>S.set($,C)),S})},nextMenu:()=>{const y=[...u().keys()];if(s()==null){a(y[0]);return}const w=y.indexOf(s());if(w===y.length-1){o.loop&&a(y[0]);return}a(y[w+1])},previousMenu:()=>{const y=[...u().keys()];if(s()==null){a(y[0]);return}const w=y.indexOf(s());if(w===0){o.loop&&a(y[y.length-1]);return}a(y[w-1])},closeMenu:()=>{h(!1),a(void 0)},autoFocusMenu:()=>f(),setAutoFocusMenu:h,generateId:dt(()=>i.id),orientation:()=>o.orientation};H(()=>{s()==null&&h(!1)}),Zc({onInteractOutside:()=>{v.closeMenu(),setTimeout(()=>v.closeMenu())},shouldExcludeElement:y=>[t,...u().values()].flat().some(w=>Pe(w,y))},()=>t);const m=y=>{y.key==="Alt"&&(y.preventDefault(),y.stopPropagation(),v.value()===void 0?v.nextMenu():v.closeMenu())};return H(()=>{o.focusOnAlt?window.addEventListener("keydown",m):window.removeEventListener("keydown",m),W(()=>{window.removeEventListener("keydown",m)})}),H(()=>{s()!=null&&c(s())}),b(Dd.Provider,{value:v,get children(){return b(le,F({as:"div",ref(y){var w=ve(S=>t=S,o.ref);typeof w=="function"&&w(y)},role:"menubar",get"data-orientation"(){return o.orientation},get"aria-orientation"(){return o.orientation}},i))}})}function ww(e){const t=er();if(Oo()===void 0&&Object.hasOwn(e,"href")){const r=t.generateId("link-trigger-")+Ee();return b(zd,{value:r,get children(){return b(ql,e)}})}return ql(e)}var bw={};At(bw,{Root:()=>la,Separator:()=>Sw});function la(e){let t;const n=Q({orientation:"horizontal"},e),[r,o]=V(n,["ref","orientation"]),i=Co(()=>t,()=>"hr");return b(le,F({as:"hr",ref(s){var a=ve(l=>t=l,r.ref);typeof a=="function"&&a(s)},get role(){return i()!=="hr"?"separator":void 0},get"aria-orientation"(){return r.orientation==="vertical"?"vertical":void 0},get"data-orientation"(){return r.orientation}},o))}var Sw=la,Bd=ie("<li role=presentation>"),xw=ie("<nav>");function Cw(e){let t;const n=er(),r=Q({size:15},e),[o,i]=V(r,["ref"]),[s,a]=j(0),l=()=>n.orientation()==="horizontal";return H(Ce(n.value,c=>{setTimeout(()=>{if(!c||c.includes("link-trigger-"))return;const u=document.querySelector(`[data-kb-menu-value-trigger="${c}"]`);if(!u||!t)return;const d=u.getBoundingClientRect()[l()?"x":"y"]+u.getBoundingClientRect()[l()?"width":"height"]/2,f=window.getComputedStyle(t),h=t.getBoundingClientRect()[l()?"x":"y"]+t.getBoundingClientRect()[l()?"width":"height"]/2-Number.parseFloat(f.transform.split(",")[l()?4:5]);a(d-h)})})),b(Fo,F({ref(c){var u=ve(d=>t=d,o.ref);typeof u=="function"&&u(c)},get style(){return{transform:`translate${l()?"X":"Y"}(${s()}px)`,color:"red"}}},i))}function Hd(e){const t=Kr(),n=er(),r=xt(),[o,i]=j(),[s,a]=V(e,["onPointerEnter","onPointerLeave"]),l=u=>{ne(u,s.onPointerEnter),t.cancelLeaveTimer()},c=u=>{ne(u,s.onPointerLeave),t.startLeaveTimer()};return H(Ce(n.value,u=>{mo(()=>{if(!u||u.includes("link-trigger-")){t.setPreviousMenu(void 0);return}if(u===r.value()){if(t.previousMenu()!=null){const p=[...n.menus()],g=p.indexOf(t.previousMenu()),v=p.indexOf(u);g<v?i("from-end"):i("from-start")}else i(void 0);t.setPreviousMenu(u);return}const d=[...n.menus()],f=d.indexOf(t.previousMenu()),h=d.indexOf(u);f>h?i("to-end"):i("to-start")})})),b(Jy,F({as:"ul",onPointerEnter:l,onPointerLeave:c,onInteractOutside:()=>{t.setAutoFocusMenu(!1)},get"data-motion"(){return o()}},a))}function Gd(e){return(()=>{var t=Bd();return X(t,b(nw,F({as:"a"},e))),t})()}function Ud(e){const t=er(),n=Kr(),[r,o]=V(e,["value"]),i=Ee(),s=t.generateId(`navigation-menu-menu-${i}`),a=Q({id:s},o),l=()=>r.value??i,[c,u]=j(!1),d=()=>{var f,h;t.value()!==l()&&u(!1),(f=n.viewportRef())==null||f.removeEventListener("animationend",d),(h=n.viewportRef())==null||h.removeEventListener("animationcancel",d)};return H(Ce(t.value,f=>{if(f===l())u(!0);else{const h=n.viewportRef();if(!h||["","none"].includes(window.getComputedStyle(h).animationName)){u(!1);return}h.addEventListener("animationend",d)}})),b(zd,F({get forceMount(){return c()},get value(){return l()}},a))}function qd(e){const t=Kr(),n=Tt(),[r,o]=V(e,["ref"]);return b(pe,{get when(){return t.viewportPresent()},get children(){return b(sw,F({ref(i){var s=ve(a=>{a&&a.setAttribute("role","presentation")},r.ref);typeof s=="function"&&s(i)},get mount(){return k(()=>n.parentMenuContext()==null)()?t.viewportRef():void 0}},o))}})}function Wd(e){const t=Q({delayDuration:200,skipDelayDuration:300},e),[n,r,o]=V(t,["ref","delayDuration","skipDelayDuration","autoFocusMenu","onAutoFocusMenuChange","defaultValue","value","onValueChange","forceMount"],["getAnchorRect","placement","gutter","shift","flip","slide","overlap","sameWidth","fitViewport","hideWhenDetached","detachedPadding","arrowPadding","overflowPadding"]),[i,s]=yt({value:()=>n.value,defaultValue:()=>n.defaultValue,onChange:T=>{var K;return(K=n.onValueChange)==null?void 0:K.call(n,T)}}),[a,l]=yt({value:()=>n.autoFocusMenu,defaultValue:()=>!1,onChange:n.onAutoFocusMenuChange}),[c,u]=j(),[d,f]=j(),[h,p]=j(r.placement??o.orientation==="vertical"?"right":"bottom");H(()=>{p(o.orientation==="vertical"?"right":"bottom")});let g;const[v,m]=j(),[y,w]=j(!1),[S,C]=j(!1);H(()=>{i()&&!i().includes("link-trigger-")&&a()?mo(()=>{C(!0),w(!0)}):(C(!1),w(!1))});const $=k(()=>({"data-expanded":S()?"":void 0,"data-closed":S()?void 0:""})),{present:A}=Un({show:()=>n.forceMount||y()||S(),element:()=>c()??null});H(()=>{A()||_.setPreviousMenu(void 0)});const _={dataset:$,delayDuration:()=>n.delayDuration,skipDelayDuration:()=>n.skipDelayDuration,autoFocusMenu:a,setAutoFocusMenu:l,startLeaveTimer:()=>{g=window.setTimeout(()=>{_.setAutoFocusMenu(!1),s(void 0)},_.skipDelayDuration())},cancelLeaveTimer:()=>{g&&clearTimeout(g)},rootRef:d,setRootRef:f,viewportRef:c,setViewportRef:u,viewportPresent:A,currentPlacement:h,previousMenu:v,setPreviousMenu:m};return b(_d.Provider,{value:_,get children(){return b(Jn,F({anchorRef:d,contentRef:c,get placement(){return h()},onCurrentPlacementChange:p},r,{get children(){var T=xw();return X(T,b(yw,F({as:"ul",ref(K){var N=ve(_.setRootRef,n.ref);typeof N=="function"&&N(K)},get value(){return i()??null},onValueChange:s,get autoFocusMenu(){return a()},onAutoFocusMenuChange:l},o))),T}}))}})}function Xd(e){const t=Kr(),n=Oo(),[r,o]=V(e,["onPointerEnter","onPointerLeave","onClick"]);let i;const s=c=>{ne(c,r.onClick),i&&clearTimeout(i)},a=c=>{ne(c,r.onPointerEnter),c.pointerType!=="touch"&&(t.cancelLeaveTimer(),t.dataset()["data-expanded"]!==""&&(i=window.setTimeout(()=>{var u;(u=n==null?void 0:n.triggerRef())==null||u.focus(),setTimeout(()=>{t.setAutoFocusMenu(!0)})},t.delayDuration())))},l=c=>{ne(c,r.onPointerLeave),c.pointerType!=="touch"&&(t.startLeaveTimer(),i&&clearTimeout(i))};return(()=>{var c=Bd();return X(c,b(ww,F({onClick:s,onPointerEnter:a,onPointerLeave:l},o))),c})()}function Qd(e){const t=Kr(),n=er(),[r,o]=j(),[i,s]=V(e,["ref","style","onEscapeKeyDown"]),a=()=>{n.setAutoFocusMenu(!1),n.closeMenu()},l=f=>{a()},c=Oy(r);H(Ce(()=>n.value()?n.menuRefMap().get(n.value()):void 0,f=>{f===void 0||f[0]===void 0||o(f[0])}));const u=k(f=>{if(!(r()===void 0||!t.viewportPresent()))return c.height()===0?f:c.height()}),d=k(f=>{if(!(r()===void 0||!t.viewportPresent()))return c.width()===0?f:c.width()});return b(pe,{get when(){return t.viewportPresent()},get children(){return b(Jn.Positioner,{role:"presentation",get children(){return b(Ro,F({as:"li",ref(f){var h=ve(t.setViewportRef,i.ref);typeof h=="function"&&h(f)},get excludedElements(){return[t.rootRef]},bypassTopMostLayerCheck:!0,get style(){return ct({"--kb-menu-content-transform-origin":"var(--kb-popper-content-transform-origin)","--kb-navigation-menu-viewport-height":u()?`${u()}px`:void 0,"--kb-navigation-menu-viewport-width":d()?`${d()}px`:void 0,position:"relative"},i.style)},get onEscapeKeyDown(){return Se([i.onEscapeKeyDown,l])},onDismiss:a,get"data-orientation"(){return n.orientation()}},()=>t.dataset(),s))}})}})}Object.assign(Wd,{Arrow:Cw,CheckboxItem:Zy,Content:Hd,Group:Vd,GroupLabel:tw,Icon:Nd,Item:Gd,ItemDescription:rw,ItemIndicator:ow,ItemLabel:iw,Portal:qd,RadioGroup:lw,RadioItem:uw,Menu:Ud,Separator:la,Sub:fw,SubContent:gw,SubTrigger:mw,Trigger:Xd,Viewport:Qd});var Ew=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class="relative top-px ml-1 size-3 transition duration-200 group-data-[expanded]/trigger:rotate-180 group-data-[orientation=vertical]/menu:-rotate-90 group-data-[orientation=vertical]/menu:group-data-[expanded]/trigger:rotate-90"><path d="M6 9l6 6l6 -6">');const Xl=Ud,Ql=e=>{const[t,n]=V(e,["class","children"]);return b(Wd,F({gutter:6,get class(){return de("group/menu flex w-max flex-1 list-none items-center justify-center data-[orientation=vertical]:flex-col [&>li]:w-full",t.class)}},n,{get children(){return[k(()=>t.children),b(Rw,{})]}}))},Yl=e=>{const[t,n]=V(e,["class"]);return b(Xd,F({get class(){return de("group/trigger inline-flex h-10 w-full items-center justify-center whitespace-nowrap rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[expanded]:bg-accent/50",t.class)}},n))},Zl=()=>b(Nd,{"aria-hidden":"true",get children(){return Ew()}}),Rw=e=>{const[t,n]=V(e,["class"]);return b(Qd,F({get class(){return de("pointer-events-none z-[1000] flex h-[var(--kb-navigation-menu-viewport-height)] w-[var(--kb-navigation-menu-viewport-width)] origin-[var(--kb-menu-content-transform-origin)] items-center justify-center overflow-x-clip overflow-y-visible rounded-md border bg-popover opacity-0 shadow-lg data-[expanded]:pointer-events-auto data-[orientation=vertical]:overflow-y-clip data-[orientation=vertical]:overflow-x-visible data-[expanded]:rounded-md","animate-content-hide transition-[width,height] duration-200 ease-in data-[expanded]:animate-content-show data-[expanded]:opacity-100 data-[expanded]:ease-out",t.class)}},n))},Jl=e=>{const[t,n]=V(e,["class"]);return b(qd,{get children(){return b(Hd,F({get class(){return de("pointer-events-none absolute left-0 top-0 box-border p-1 focus:outline-none data-[expanded]:pointer-events-auto","data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out","data-[orientation=horizontal]:data-[motion=from-start]:slide-in-from-left-52 data-[orientation=horizontal]:data-[motion=to-end]:slide-out-to-right-52","data-[orientation=horizontal]:data-[motion=from-end]:slide-in-from-right-52 data-[orientation=horizontal]:data-[motion=to-start]:slide-out-to-left-52","data-[orientation=vertical]:data-[motion=from-start]:slide-in-from-top-52 data-[orientation=vertical]:data-[motion=to-end]:slide-out-to-bottom-52","data-[orientation=vertical]:data-[motion=from-end]:slide-in-from-bottom-52 data-[orientation=vertical]:data-[motion=to-start]:slide-out-to-bottom-52",t.class)}},n))}})},eu=e=>{const[t,n]=V(e,["class"]);return b(Gd,F({get class(){return de("text-sm block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",t.class)}},n))};/**
|
|
7
|
-
* table-core
|
|
8
|
-
*
|
|
9
|
-
* Copyright (c) TanStack
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
13
|
-
*
|
|
14
|
-
* @license MIT
|
|
15
|
-
*/function Gt(e,t){return typeof e=="function"?e(t):e}function We(e,t){return n=>{t.setState(r=>({...r,[e]:Gt(n,r[e])}))}}function Ao(e){return e instanceof Function}function Pw(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function Iw(e,t){const n=[],r=o=>{o.forEach(i=>{n.push(i);const s=t(i);s!=null&&s.length&&r(s)})};return r(e),n}function J(e,t,n){let r=[],o;return i=>{let s;n.key&&n.debug&&(s=Date.now());const a=e(i);if(!(a.length!==r.length||a.some((u,d)=>r[d]!==u)))return o;r=a;let c;if(n.key&&n.debug&&(c=Date.now()),o=t(...a),n==null||n.onChange==null||n.onChange(o),n.key&&n.debug&&n!=null&&n.debug()){const u=Math.round((Date.now()-s)*100)/100,d=Math.round((Date.now()-c)*100)/100,f=d/16,h=(p,g)=>{for(p=String(p);p.length<g;)p=" "+p;return p};console.info(`%c⏱ ${h(d,5)} /${h(u,5)} ms`,`
|
|
16
|
-
font-size: .6rem;
|
|
17
|
-
font-weight: bold;
|
|
18
|
-
color: hsl(${Math.max(0,Math.min(120-120*f,120))}deg 100% 31%);`,n==null?void 0:n.key)}return o}}function ee(e,t,n,r){return{debug:()=>{var o;return(o=e==null?void 0:e.debugAll)!=null?o:e[t]},key:!1,onChange:r}}function $w(e,t,n,r){const o=()=>{var s;return(s=i.getValue())!=null?s:e.options.renderFallbackValue},i={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:o,getContext:J(()=>[e,n,t,i],(s,a,l,c)=>({table:s,column:a,row:l,cell:c,getValue:c.getValue,renderValue:c.renderValue}),ee(e.options,"debugCells"))};return e._features.forEach(s=>{s.createCell==null||s.createCell(i,n,t,e)},{}),i}function Mw(e,t,n,r){var o,i;const a={...e._getDefaultColumnDef(),...t},l=a.accessorKey;let c=(o=(i=a.id)!=null?i:l?typeof String.prototype.replaceAll=="function"?l.replaceAll(".","_"):l.replace(/\./g,"_"):void 0)!=null?o:typeof a.header=="string"?a.header:void 0,u;if(a.accessorFn?u=a.accessorFn:l&&(l.includes(".")?u=f=>{let h=f;for(const g of l.split(".")){var p;h=(p=h)==null?void 0:p[g]}return h}:u=f=>f[a.accessorKey]),!c)throw new Error;let d={id:`${String(c)}`,accessorFn:u,parent:r,depth:n,columnDef:a,columns:[],getFlatColumns:J(()=>[!0],()=>{var f;return[d,...(f=d.columns)==null?void 0:f.flatMap(h=>h.getFlatColumns())]},ee(e.options,"debugColumns")),getLeafColumns:J(()=>[e._getOrderColumnsFn()],f=>{var h;if((h=d.columns)!=null&&h.length){let p=d.columns.flatMap(g=>g.getLeafColumns());return f(p)}return[d]},ee(e.options,"debugColumns"))};for(const f of e._features)f.createColumn==null||f.createColumn(d,e);return d}const Ae="debugHeaders";function tu(e,t,n){var r;let i={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 s=[],a=l=>{l.subHeaders&&l.subHeaders.length&&l.subHeaders.map(a),s.push(l)};return a(i),s},getContext:()=>({table:e,header:i,column:t})};return e._features.forEach(s=>{s.createHeader==null||s.createHeader(i,e)}),i}const Fw={createTable:e=>{e.getHeaderGroups=J(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>{var i,s;const a=(i=r==null?void 0:r.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?i:[],l=(s=o==null?void 0:o.map(d=>n.find(f=>f.id===d)).filter(Boolean))!=null?s:[],c=n.filter(d=>!(r!=null&&r.includes(d.id))&&!(o!=null&&o.includes(d.id)));return Qr(t,[...a,...c,...l],e)},ee(e.options,Ae)),e.getCenterHeaderGroups=J(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,o)=>(n=n.filter(i=>!(r!=null&&r.includes(i.id))&&!(o!=null&&o.includes(i.id))),Qr(t,n,e,"center")),ee(e.options,Ae)),e.getLeftHeaderGroups=J(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Qr(t,i,e,"left")},ee(e.options,Ae)),e.getRightHeaderGroups=J(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var o;const i=(o=r==null?void 0:r.map(s=>n.find(a=>a.id===s)).filter(Boolean))!=null?o:[];return Qr(t,i,e,"right")},ee(e.options,Ae)),e.getFooterGroups=J(()=>[e.getHeaderGroups()],t=>[...t].reverse(),ee(e.options,Ae)),e.getLeftFooterGroups=J(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),ee(e.options,Ae)),e.getCenterFooterGroups=J(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),ee(e.options,Ae)),e.getRightFooterGroups=J(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),ee(e.options,Ae)),e.getFlatHeaders=J(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),ee(e.options,Ae)),e.getLeftFlatHeaders=J(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),ee(e.options,Ae)),e.getCenterFlatHeaders=J(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),ee(e.options,Ae)),e.getRightFlatHeaders=J(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),ee(e.options,Ae)),e.getCenterLeafHeaders=J(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ee(e.options,Ae)),e.getLeftLeafHeaders=J(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ee(e.options,Ae)),e.getRightLeafHeaders=J(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),ee(e.options,Ae)),e.getLeafHeaders=J(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var o,i,s,a,l,c;return[...(o=(i=t[0])==null?void 0:i.headers)!=null?o:[],...(s=(a=n[0])==null?void 0:a.headers)!=null?s:[],...(l=(c=r[0])==null?void 0:c.headers)!=null?l:[]].map(u=>u.getLeafHeaders()).flat()},ee(e.options,Ae))}};function Qr(e,t,n,r){var o,i;let s=0;const a=function(f,h){h===void 0&&(h=1),s=Math.max(s,h),f.filter(p=>p.getIsVisible()).forEach(p=>{var g;(g=p.columns)!=null&&g.length&&a(p.columns,h+1)},0)};a(e);let l=[];const c=(f,h)=>{const p={depth:h,id:[r,`${h}`].filter(Boolean).join("_"),headers:[]},g=[];f.forEach(v=>{const m=[...g].reverse()[0],y=v.column.depth===p.depth;let w,S=!1;if(y&&v.column.parent?w=v.column.parent:(w=v.column,S=!0),m&&(m==null?void 0:m.column)===w)m.subHeaders.push(v);else{const C=tu(n,w,{id:[r,h,w.id,v==null?void 0:v.id].filter(Boolean).join("_"),isPlaceholder:S,placeholderId:S?`${g.filter($=>$.column===w).length}`:void 0,depth:h,index:g.length});C.subHeaders.push(v),g.push(C)}p.headers.push(v),v.headerGroup=p}),l.push(p),h>0&&c(g,h-1)},u=t.map((f,h)=>tu(n,f,{depth:s,index:h}));c(u,s-1),l.reverse();const d=f=>f.filter(p=>p.column.getIsVisible()).map(p=>{let g=0,v=0,m=[0];p.subHeaders&&p.subHeaders.length?(m=[],d(p.subHeaders).forEach(w=>{let{colSpan:S,rowSpan:C}=w;g+=S,m.push(C)})):g=1;const y=Math.min(...m);return v=v+y,p.colSpan=g,p.rowSpan=v,{colSpan:g,rowSpan:v}});return d((o=(i=l[0])==null?void 0:i.headers)!=null?o:[]),l}const ua=(e,t,n,r,o,i,s)=>{let a={id:t,index:r,original:n,depth:o,parentId:s,_valuesCache:{},_uniqueValuesCache:{},getValue:l=>{if(a._valuesCache.hasOwnProperty(l))return a._valuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return a._valuesCache[l]=c.accessorFn(a.original,r),a._valuesCache[l]},getUniqueValues:l=>{if(a._uniqueValuesCache.hasOwnProperty(l))return a._uniqueValuesCache[l];const c=e.getColumn(l);if(c!=null&&c.accessorFn)return c.columnDef.getUniqueValues?(a._uniqueValuesCache[l]=c.columnDef.getUniqueValues(a.original,r),a._uniqueValuesCache[l]):(a._uniqueValuesCache[l]=[a.getValue(l)],a._uniqueValuesCache[l])},renderValue:l=>{var c;return(c=a.getValue(l))!=null?c:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>Iw(a.subRows,l=>l.subRows),getParentRow:()=>a.parentId?e.getRow(a.parentId,!0):void 0,getParentRows:()=>{let l=[],c=a;for(;;){const u=c.getParentRow();if(!u)break;l.push(u),c=u}return l.reverse()},getAllCells:J(()=>[e.getAllLeafColumns()],l=>l.map(c=>$w(e,a,c,c.id)),ee(e.options,"debugRows")),_getAllCellsByColumnId:J(()=>[a.getAllCells()],l=>l.reduce((c,u)=>(c[u.column.id]=u,c),{}),ee(e.options,"debugRows"))};for(let l=0;l<e._features.length;l++){const c=e._features[l];c==null||c.createRow==null||c.createRow(a,e)}return a},Ow={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()}}},Yd=(e,t,n)=>{var r,o;const i=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((o=e.getValue(t))==null||(o=o.toString())==null||(o=o.toLowerCase())==null)&&o.includes(i))};Yd.autoRemove=e=>it(e);const Zd=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};Zd.autoRemove=e=>it(e);const Jd=(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())};Jd.autoRemove=e=>it(e);const ef=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};ef.autoRemove=e=>it(e)||!(e!=null&&e.length);const tf=(e,t,n)=>!n.some(r=>{var o;return!((o=e.getValue(t))!=null&&o.includes(r))});tf.autoRemove=e=>it(e)||!(e!=null&&e.length);const nf=(e,t,n)=>n.some(r=>{var o;return(o=e.getValue(t))==null?void 0:o.includes(r)});nf.autoRemove=e=>it(e)||!(e!=null&&e.length);const rf=(e,t,n)=>e.getValue(t)===n;rf.autoRemove=e=>it(e);const of=(e,t,n)=>e.getValue(t)==n;of.autoRemove=e=>it(e);const ca=(e,t,n)=>{let[r,o]=n;const i=e.getValue(t);return i>=r&&i<=o};ca.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,o=typeof n!="number"?parseFloat(n):n,i=t===null||Number.isNaN(r)?-1/0:r,s=n===null||Number.isNaN(o)?1/0:o;if(i>s){const a=i;i=s,s=a}return[i,s]};ca.autoRemove=e=>it(e)||it(e[0])&&it(e[1]);const Pt={includesString:Yd,includesStringSensitive:Zd,equalsString:Jd,arrIncludes:ef,arrIncludesAll:tf,arrIncludesSome:nf,equals:rf,weakEquals:of,inNumberRange:ca};function it(e){return e==null||e===""}const Aw={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:We("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"?Pt.includesString:typeof r=="number"?Pt.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?Pt.equals:Array.isArray(r)?Pt.arrIncludes:Pt.weakEquals},e.getFilterFn=()=>{var n,r;return Ao(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:Pt[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,o;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!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(o=>o.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const o=e.getFilterFn(),i=r==null?void 0:r.find(u=>u.id===e.id),s=Gt(n,i?i.value:void 0);if(nu(o,s,e)){var a;return(a=r==null?void 0:r.filter(u=>u.id!==e.id))!=null?a:[]}const l={id:e.id,value:s};if(i){var c;return(c=r==null?void 0:r.map(u=>u.id===e.id?l:u))!=null?c:[]}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=o=>{var i;return(i=Gt(t,o))==null?void 0:i.filter(s=>{const a=n.find(l=>l.id===s.id);if(a){const l=a.getFilterFn();if(nu(l,s.value,a))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 nu(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Tw=(e,t,n)=>n.reduce((r,o)=>{const i=o.getValue(e);return r+(typeof i=="number"?i:0)},0),Dw=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}),r},_w=(e,t,n)=>{let r;return n.forEach(o=>{const i=o.getValue(e);i!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}),r},Lw=(e,t,n)=>{let r,o;return n.forEach(i=>{const s=i.getValue(e);s!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}),[r,o]},kw=(e,t)=>{let n=0,r=0;if(t.forEach(o=>{let i=o.getValue(e);i!=null&&(i=+i)>=i&&(++n,r+=i)}),n)return r/n},Vw=(e,t)=>{if(!t.length)return;const n=t.map(i=>i.getValue(e));if(!Pw(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),o=n.sort((i,s)=>i-s);return n.length%2!==0?o[r]:(o[r-1]+o[r])/2},Nw=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Kw=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,jw=(e,t)=>t.length,Xo={sum:Tw,min:Dw,max:_w,extent:Lw,mean:kw,median:Vw,unique:Nw,uniqueCount:Kw,count:jw},zw={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:We("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 Xo.sum;if(Object.prototype.toString.call(r)==="[object Date]")return Xo.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return Ao(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:Xo[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 o;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((o=n.subRows)!=null&&o.length)}}};function Bw(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(i=>!t.includes(i.id));return n==="remove"?r:[...t.map(i=>e.find(s=>s.id===i)).filter(Boolean),...r]}const Hw={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:We("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=J(n=>[yr(t,n)],n=>n.findIndex(r=>r.id===e.id),ee(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=yr(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const o=yr(t,n);return((r=o[o.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=J(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>o=>{let i=[];if(!(t!=null&&t.length))i=o;else{const s=[...t],a=[...o];for(;a.length&&s.length;){const l=s.shift(),c=a.findIndex(u=>u.id===l);c>-1&&i.push(a.splice(c,1)[0])}i=[...i,...a]}return Bw(i,n,r)},ee(e.options,"debugTable"))}},Qo=()=>({left:[],right:[]}),Gw={getInitialState:e=>({columnPinning:Qo(),...e}),getDefaultOptions:e=>({onColumnPinningChange:We("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(o=>o.id).filter(Boolean);t.setColumnPinning(o=>{var i,s;if(n==="right"){var a,l;return{left:((a=o==null?void 0:o.left)!=null?a:[]).filter(d=>!(r!=null&&r.includes(d))),right:[...((l=o==null?void 0:o.right)!=null?l:[]).filter(d=>!(r!=null&&r.includes(d))),...r]}}if(n==="left"){var c,u;return{left:[...((c=o==null?void 0:o.left)!=null?c:[]).filter(d=>!(r!=null&&r.includes(d))),...r],right:((u=o==null?void 0:o.right)!=null?u:[]).filter(d=>!(r!=null&&r.includes(d)))}}return{left:((i=o==null?void 0:o.left)!=null?i:[]).filter(d=>!(r!=null&&r.includes(d))),right:((s=o==null?void 0:o.right)!=null?s:[]).filter(d=>!(r!=null&&r.includes(d)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var o,i,s;return((o=r.columnDef.enablePinning)!=null?o:!0)&&((i=(s=t.options.enableColumnPinning)!=null?s:t.options.enablePinning)!=null?i:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(a=>a.id),{left:r,right:o}=t.getState().columnPinning,i=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0:o.includes(a));return i?"left":s?"right":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();return o?(n=(r=t.getState().columnPinning)==null||(r=r[o])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=J(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,o)=>{const i=[...r??[],...o??[]];return n.filter(s=>!i.includes(s.column.id))},ee(t.options,"debugRows")),e.getLeftVisibleCells=J(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"left"})),ee(t.options,"debugRows")),e.getRightVisibleCells=J(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(i=>n.find(s=>s.column.id===i)).filter(Boolean).map(i=>({...i,position:"right"})),ee(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?Qo():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:Qo())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var o,i;return!!((o=r.left)!=null&&o.length||(i=r.right)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=J(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ee(e.options,"debugColumns")),e.getRightLeafColumns=J(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(o=>o.id===r)).filter(Boolean),ee(e.options,"debugColumns")),e.getCenterLeafColumns=J(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const o=[...n??[],...r??[]];return t.filter(i=>!o.includes(i.id))},ee(e.options,"debugColumns"))}},Yr={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},Yo=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Uw={getDefaultColumnDef:()=>Yr,getInitialState:e=>({columnSizing:{},columnSizingInfo:Yo(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:We("columnSizing",e),onColumnSizingInfoChange:We("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,o;const i=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Yr.minSize,(r=i??e.columnDef.size)!=null?r:Yr.size),(o=e.columnDef.maxSize)!=null?o:Yr.maxSize)},e.getStart=J(n=>[n,yr(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((o,i)=>o+i.getSize(),0),ee(t.options,"debugColumns")),e.getAfter=J(n=>[n,yr(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((o,i)=>o+i.getSize(),0),ee(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...o}=n;return o})},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=o=>{if(o.subHeaders.length)o.subHeaders.forEach(r);else{var i;n+=(i=o.column.getSize())!=null?i: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),o=r==null?void 0:r.getCanResize();return i=>{if(!r||!o||(i.persist==null||i.persist(),Zo(i)&&i.touches&&i.touches.length>1))return;const s=e.getSize(),a=e?e.getLeafHeaders().map(m=>[m.column.id,m.column.getSize()]):[[r.id,r.getSize()]],l=Zo(i)?Math.round(i.touches[0].clientX):i.clientX,c={},u=(m,y)=>{typeof y=="number"&&(t.setColumnSizingInfo(w=>{var S,C;const $=t.options.columnResizeDirection==="rtl"?-1:1,A=(y-((S=w==null?void 0:w.startOffset)!=null?S:0))*$,_=Math.max(A/((C=w==null?void 0:w.startSize)!=null?C:0),-.999999);return w.columnSizingStart.forEach(T=>{let[K,N]=T;c[K]=Math.round(Math.max(N+N*_,0)*100)/100}),{...w,deltaOffset:A,deltaPercentage:_}}),(t.options.columnResizeMode==="onChange"||m==="end")&&t.setColumnSizing(w=>({...w,...c})))},d=m=>u("move",m),f=m=>{u("end",m),t.setColumnSizingInfo(y=>({...y,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},h=n||typeof document<"u"?document:null,p={moveHandler:m=>d(m.clientX),upHandler:m=>{h==null||h.removeEventListener("mousemove",p.moveHandler),h==null||h.removeEventListener("mouseup",p.upHandler),f(m.clientX)}},g={moveHandler:m=>(m.cancelable&&(m.preventDefault(),m.stopPropagation()),d(m.touches[0].clientX),!1),upHandler:m=>{var y;h==null||h.removeEventListener("touchmove",g.moveHandler),h==null||h.removeEventListener("touchend",g.upHandler),m.cancelable&&(m.preventDefault(),m.stopPropagation()),f((y=m.touches[0])==null?void 0:y.clientX)}},v=qw()?{passive:!1}:!1;Zo(i)?(h==null||h.addEventListener("touchmove",g.moveHandler,v),h==null||h.addEventListener("touchend",g.upHandler,v)):(h==null||h.addEventListener("mousemove",p.moveHandler,v),h==null||h.addEventListener("mouseup",p.upHandler,v)),t.setColumnSizingInfo(m=>({...m,startOffset:l,startSize:s,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,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?Yo():(n=e.initialState.columnSizingInfo)!=null?n:Yo())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,o)=>r+o.getSize(),0))!=null?t:0}}};let Zr=null;function qw(){if(typeof Zr=="boolean")return Zr;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 Zr=e,Zr}function Zo(e){return e.type==="touchstart"}const Ww={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:We("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 o=e.columns;return(n=o.length?o.some(i=>i.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=J(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),ee(t.options,"debugRows")),e.getVisibleCells=J(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,o)=>[...n,...r,...o],ee(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>J(()=>[r(),r().filter(o=>o.getIsVisible()).map(o=>o.id).join("_")],o=>o.filter(i=>i.getIsVisible==null?void 0:i.getIsVisible()),ee(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((o,i)=>({...o,[i.id]:n||!(i.getCanHide!=null&&i.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 yr(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Xw={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()}}},Qw={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:We("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,o,i;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((o=t.options.enableFilters)!=null?o:!0)&&((i=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?i:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>Pt.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return Ao(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:Pt[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Yw={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:We("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o: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 o,i;e.setExpanded(r?{}:(o=(i=e.initialState)==null?void 0:i.expanded)!=null?o:{})},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(o=>!o.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(i=>{const s=i.split(".");r=Math.max(r,s.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 o;const i=r===!0?!0:!!(r!=null&&r[e.id]);let s={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(a=>{s[a]=!0}):s=r,n=(o=n)!=null?o:!i,!i&&n)return{...s,[e.id]:!0};if(i&&!n){const{[e.id]:a,...l}=s;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,o;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((o=e.subRows)!=null&&o.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()}}}},is=0,ss=10,Jo=()=>({pageIndex:is,pageSize:ss}),Zw={getInitialState:e=>({...e,pagination:{...Jo(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:We("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,o;if(!t){e._queue(()=>{t=!0});return}if((r=(o=e.options.autoResetAll)!=null?o:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const o=i=>Gt(r,i);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(o)},e.resetPagination=r=>{var o;e.setPagination(r?Jo():(o=e.initialState.pagination)!=null?o:Jo())},e.setPageIndex=r=>{e.setPagination(o=>{let i=Gt(r,o.pageIndex);const s=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return i=Math.max(0,Math.min(i,s)),{...o,pageIndex:i}})},e.resetPageIndex=r=>{var o,i;e.setPageIndex(r?is:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageIndex)!=null?o:is)},e.resetPageSize=r=>{var o,i;e.setPageSize(r?ss:(o=(i=e.initialState)==null||(i=i.pagination)==null?void 0:i.pageSize)!=null?o:ss)},e.setPageSize=r=>{e.setPagination(o=>{const i=Math.max(1,Gt(r,o.pageSize)),s=o.pageSize*o.pageIndex,a=Math.floor(s/i);return{...o,pageIndex:a,pageSize:i}})},e.setPageCount=r=>e.setPagination(o=>{var i;let s=Gt(r,(i=e.options.pageCount)!=null?i:-1);return typeof s=="number"&&(s=Math.max(-1,s)),{...o,pageCount:s}}),e.getPageOptions=J(()=>[e.getPageCount()],r=>{let o=[];return r&&r>0&&(o=[...new Array(r)].fill(null).map((i,s)=>s)),o},ee(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,o=e.getPageCount();return o===-1?!0:o===0?!1:r<o-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}}},ei=()=>({top:[],bottom:[]}),Jw={getInitialState:e=>({rowPinning:ei(),...e}),getDefaultOptions:e=>({onRowPinningChange:We("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,o)=>{const i=r?e.getLeafRows().map(l=>{let{id:c}=l;return c}):[],s=o?e.getParentRows().map(l=>{let{id:c}=l;return c}):[],a=new Set([...s,e.id,...i]);t.setRowPinning(l=>{var c,u;if(n==="bottom"){var d,f;return{top:((d=l==null?void 0:l.top)!=null?d:[]).filter(g=>!(a!=null&&a.has(g))),bottom:[...((f=l==null?void 0:l.bottom)!=null?f:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)]}}if(n==="top"){var h,p;return{top:[...((h=l==null?void 0:l.top)!=null?h:[]).filter(g=>!(a!=null&&a.has(g))),...Array.from(a)],bottom:((p=l==null?void 0:l.bottom)!=null?p:[]).filter(g=>!(a!=null&&a.has(g)))}}return{top:((c=l==null?void 0:l.top)!=null?c:[]).filter(g=>!(a!=null&&a.has(g))),bottom:((u=l==null?void 0:l.bottom)!=null?u:[]).filter(g=>!(a!=null&&a.has(g)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:o}=t.options;return typeof r=="function"?r(e):(n=r??o)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:o}=t.getState().rowPinning,i=n.some(a=>r==null?void 0:r.includes(a)),s=n.some(a=>o==null?void 0:o.includes(a));return i?"top":s?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const o=e.getIsPinned();if(!o)return-1;const i=(n=o==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(s=>{let{id:a}=s;return a});return(r=i==null?void 0:i.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?ei():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:ei())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var o,i;return!!((o=r.top)!=null&&o.length||(i=r.bottom)!=null&&i.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var o;return((o=e.options.keepPinnedRows)==null||o?(n??[]).map(s=>{const a=e.getRow(s,!0);return a.getIsAllParentsExpanded()?a:null}):(n??[]).map(s=>t.find(a=>a.id===s))).filter(Boolean).map(s=>({...s,position:r}))},e.getTopRows=J(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),ee(e.options,"debugRows")),e.getBottomRows=J(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),ee(e.options,"debugRows")),e.getCenterRows=J(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const o=new Set([...n??[],...r??[]]);return t.filter(i=>!o.has(i.id))},ee(e.options,"debugRows"))}},eb={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:We("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},o=e.getPreGroupedRowModel().flatRows;return t?o.forEach(i=>{i.getCanSelect()&&(r[i.id]=!0)}):o.forEach(i=>{delete r[i.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),o={...n};return e.getRowModel().rows.forEach(i=>{as(o,i.id,r,!0,e)}),o}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=J(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?ti(e,n):{rows:[],flatRows:[],rowsById:{}},ee(e.options,"debugTable")),e.getFilteredSelectedRowModel=J(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?ti(e,n):{rows:[],flatRows:[],rowsById:{}},ee(e.options,"debugTable")),e.getGroupedSelectedRowModel=J(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?ti(e,n):{rows:[],flatRows:[],rowsById:{}},ee(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(o=>o.getCanSelect()&&!n[o.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(o=>o.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(o=>!n[o.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 o=e.getIsSelected();t.setRowSelection(i=>{var s;if(n=typeof n<"u"?n:!o,e.getCanSelect()&&o===n)return i;const a={...i};return as(a,e.id,n,(s=r==null?void 0:r.selectChildren)!=null?s:!0,t),a})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return da(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return ls(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return ls(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 o;n&&e.toggleSelected((o=r.target)==null?void 0:o.checked)}}}},as=(e,t,n,r,o)=>{var i;const s=o.getRow(t,!0);n?(s.getCanMultiSelect()||Object.keys(e).forEach(a=>delete e[a]),s.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(i=s.subRows)!=null&&i.length&&s.getCanSelectSubRows()&&s.subRows.forEach(a=>as(e,a.id,n,r,o))};function ti(e,t){const n=e.getState().rowSelection,r=[],o={},i=function(s,a){return s.map(l=>{var c;const u=da(l,n);if(u&&(r.push(l),o[l.id]=l),(c=l.subRows)!=null&&c.length&&(l={...l,subRows:i(l.subRows)}),u)return l}).filter(Boolean)};return{rows:i(t.rows),flatRows:r,rowsById:o}}function da(e,t){var n;return(n=t[e.id])!=null?n:!1}function ls(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let o=!0,i=!1;return e.subRows.forEach(s=>{if(!(i&&!o)&&(s.getCanSelect()&&(da(s,t)?i=!0:o=!1),s.subRows&&s.subRows.length)){const a=ls(s,t);a==="all"?i=!0:(a==="some"&&(i=!0),o=!1)}}),o?"all":i?"some":!1}const us=/([0-9]+)/gm,tb=(e,t,n)=>sf(Yt(e.getValue(n)).toLowerCase(),Yt(t.getValue(n)).toLowerCase()),nb=(e,t,n)=>sf(Yt(e.getValue(n)),Yt(t.getValue(n))),rb=(e,t,n)=>fa(Yt(e.getValue(n)).toLowerCase(),Yt(t.getValue(n)).toLowerCase()),ob=(e,t,n)=>fa(Yt(e.getValue(n)),Yt(t.getValue(n))),ib=(e,t,n)=>{const r=e.getValue(n),o=t.getValue(n);return r>o?1:r<o?-1:0},sb=(e,t,n)=>fa(e.getValue(n),t.getValue(n));function fa(e,t){return e===t?0:e>t?1:-1}function Yt(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function sf(e,t){const n=e.split(us).filter(Boolean),r=t.split(us).filter(Boolean);for(;n.length&&r.length;){const o=n.shift(),i=r.shift(),s=parseInt(o,10),a=parseInt(i,10),l=[s,a].sort();if(isNaN(l[0])){if(o>i)return 1;if(i>o)return-1;continue}if(isNaN(l[1]))return isNaN(s)?-1:1;if(s>a)return 1;if(a>s)return-1}return n.length-r.length}const cr={alphanumeric:tb,alphanumericCaseSensitive:nb,text:rb,textCaseSensitive:ob,datetime:ib,basic:sb},ab={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:We("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const o of n){const i=o==null?void 0:o.getValue(e.id);if(Object.prototype.toString.call(i)==="[object Date]")return cr.datetime;if(typeof i=="string"&&(r=!0,i.split(us).length>1))return cr.alphanumeric}return r?cr.text:cr.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 Ao(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:cr[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const o=e.getNextSortingOrder(),i=typeof n<"u"&&n!==null;t.setSorting(s=>{const a=s==null?void 0:s.find(h=>h.id===e.id),l=s==null?void 0:s.findIndex(h=>h.id===e.id);let c=[],u,d=i?n:o==="desc";if(s!=null&&s.length&&e.getCanMultiSort()&&r?a?u="toggle":u="add":s!=null&&s.length&&l!==s.length-1?u="replace":a?u="toggle":u="replace",u==="toggle"&&(i||o||(u="remove")),u==="add"){var f;c=[...s,{id:e.id,desc:d}],c.splice(0,c.length-((f=t.options.maxMultiSortColCount)!=null?f:Number.MAX_SAFE_INTEGER))}else u==="toggle"?c=s.map(h=>h.id===e.id?{...h,desc:d}:h):u==="remove"?c=s.filter(h=>h.id!==e.id):c=[{id:e.id,desc:d}];return c})},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,o;const i=e.getFirstSortDir(),s=e.getIsSorted();return s?s!==i&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(o=t.options.enableMultiRemove)!=null)||o)?!1:s==="desc"?"asc":"desc":i},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(o=>o.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(o=>o.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())}},lb=[Fw,Ww,Hw,Gw,Ow,Aw,Xw,Qw,ab,zw,Yw,Zw,Jw,eb,Uw];function ub(e){var t,n;const r=[...lb,...(t=e._features)!=null?t:[]];let o={_features:r};const i=o._features.reduce((f,h)=>Object.assign(f,h.getDefaultOptions==null?void 0:h.getDefaultOptions(o)),{}),s=f=>o.options.mergeOptions?o.options.mergeOptions(i,f):{...i,...f};let l={...{},...(n=e.initialState)!=null?n:{}};o._features.forEach(f=>{var h;l=(h=f.getInitialState==null?void 0:f.getInitialState(l))!=null?h:l});const c=[];let u=!1;const d={_features:r,options:{...i,...e},initialState:l,_queue:f=>{c.push(f),u||(u=!0,Promise.resolve().then(()=>{for(;c.length;)c.shift()();u=!1}).catch(h=>setTimeout(()=>{throw h})))},reset:()=>{o.setState(o.initialState)},setOptions:f=>{const h=Gt(f,o.options);o.options=s(h)},getState:()=>o.options.state,setState:f=>{o.options.onStateChange==null||o.options.onStateChange(f)},_getRowId:(f,h,p)=>{var g;return(g=o.options.getRowId==null?void 0:o.options.getRowId(f,h,p))!=null?g:`${p?[p.id,h].join("."):h}`},getCoreRowModel:()=>(o._getCoreRowModel||(o._getCoreRowModel=o.options.getCoreRowModel(o)),o._getCoreRowModel()),getRowModel:()=>o.getPaginationRowModel(),getRow:(f,h)=>{let p=(h?o.getPrePaginationRowModel():o.getRowModel()).rowsById[f];if(!p&&(p=o.getCoreRowModel().rowsById[f],!p))throw new Error;return p},_getDefaultColumnDef:J(()=>[o.options.defaultColumn],f=>{var h;return f=(h=f)!=null?h:{},{header:p=>{const g=p.header.column.columnDef;return g.accessorKey?g.accessorKey:g.accessorFn?g.id:null},cell:p=>{var g,v;return(g=(v=p.renderValue())==null||v.toString==null?void 0:v.toString())!=null?g:null},...o._features.reduce((p,g)=>Object.assign(p,g.getDefaultColumnDef==null?void 0:g.getDefaultColumnDef()),{}),...f}},ee(e,"debugColumns")),_getColumnDefs:()=>o.options.columns,getAllColumns:J(()=>[o._getColumnDefs()],f=>{const h=function(p,g,v){return v===void 0&&(v=0),p.map(m=>{const y=Mw(o,m,v,g),w=m;return y.columns=w.columns?h(w.columns,y,v+1):[],y})};return h(f)},ee(e,"debugColumns")),getAllFlatColumns:J(()=>[o.getAllColumns()],f=>f.flatMap(h=>h.getFlatColumns()),ee(e,"debugColumns")),_getAllFlatColumnsById:J(()=>[o.getAllFlatColumns()],f=>f.reduce((h,p)=>(h[p.id]=p,h),{}),ee(e,"debugColumns")),getAllLeafColumns:J(()=>[o.getAllColumns(),o._getOrderColumnsFn()],(f,h)=>{let p=f.flatMap(g=>g.getLeafColumns());return h(p)},ee(e,"debugColumns")),getColumn:f=>o._getAllFlatColumnsById()[f]};Object.assign(o,d);for(let f=0;f<o._features.length;f++){const h=o._features[f];h==null||h.createTable==null||h.createTable(o)}return o}function cb(){return e=>J(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(o,i,s){i===void 0&&(i=0);const a=[];for(let c=0;c<o.length;c++){const u=ua(e,e._getRowId(o[c],c,s),o[c],c,i,void 0,s==null?void 0:s.id);if(n.flatRows.push(u),n.rowsById[u.id]=u,a.push(u),e.options.getSubRows){var l;u.originalSubRows=e.options.getSubRows(o[c],c),(l=u.originalSubRows)!=null&&l.length&&(u.subRows=r(u.originalSubRows,i+1,u))}}return a};return n.rows=r(t),n},ee(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function db(e,t,n){return n.options.filterFromLeafRows?fb(e,t,n):hb(e,t,n)}function fb(e,t,n){var r;const o=[],i={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){var d;let h=l[f];const p=ua(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);if(p.columnFilters=h.columnFilters,(d=h.subRows)!=null&&d.length&&c<s){if(p.subRows=a(h.subRows,c+1),h=p,t(h)&&!p.subRows.length){u.push(h),i[h.id]=h,o.push(h);continue}if(t(h)||p.subRows.length){u.push(h),i[h.id]=h,o.push(h);continue}}else h=p,t(h)&&(u.push(h),i[h.id]=h,o.push(h))}return u};return{rows:a(e),flatRows:o,rowsById:i}}function hb(e,t,n){var r;const o=[],i={},s=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,a=function(l,c){c===void 0&&(c=0);const u=[];for(let f=0;f<l.length;f++){let h=l[f];if(t(h)){var d;if((d=h.subRows)!=null&&d.length&&c<s){const g=ua(n,h.id,h.original,h.index,h.depth,void 0,h.parentId);g.subRows=a(h.subRows,c+1),h=g}u.push(h),o.push(h),i[h.id]=h}}return u};return{rows:a(e),flatRows:o,rowsById:i}}function gb(){return e=>J(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let f=0;f<t.flatRows.length;f++)t.flatRows[f].columnFilters={},t.flatRows[f].columnFiltersMeta={};return t}const o=[],i=[];(n??[]).forEach(f=>{var h;const p=e.getColumn(f.id);if(!p)return;const g=p.getFilterFn();g&&o.push({id:f.id,filterFn:g,resolvedValue:(h=g.resolveFilterValue==null?void 0:g.resolveFilterValue(f.value))!=null?h:f.value})});const s=(n??[]).map(f=>f.id),a=e.getGlobalFilterFn(),l=e.getAllLeafColumns().filter(f=>f.getCanGlobalFilter());r&&a&&l.length&&(s.push("__global__"),l.forEach(f=>{var h;i.push({id:f.id,filterFn:a,resolvedValue:(h=a.resolveFilterValue==null?void 0:a.resolveFilterValue(r))!=null?h:r})}));let c,u;for(let f=0;f<t.flatRows.length;f++){const h=t.flatRows[f];if(h.columnFilters={},o.length)for(let p=0;p<o.length;p++){c=o[p];const g=c.id;h.columnFilters[g]=c.filterFn(h,g,c.resolvedValue,v=>{h.columnFiltersMeta[g]=v})}if(i.length){for(let p=0;p<i.length;p++){u=i[p];const g=u.id;if(u.filterFn(h,g,u.resolvedValue,v=>{h.columnFiltersMeta[g]=v})){h.columnFilters.__global__=!0;break}}h.columnFilters.__global__!==!0&&(h.columnFilters.__global__=!1)}}const d=f=>{for(let h=0;h<s.length;h++)if(f.columnFilters[s[h]]===!1)return!1;return!0};return db(t.rows,d,e)},ee(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}/**
|
|
19
|
-
* solid-table
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) TanStack
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
25
|
-
*
|
|
26
|
-
* @license MIT
|
|
27
|
-
*/function ru(e,t){return e?typeof e=="function"?b(e,t):e:null}function pb(e){const t=F({state:{},onStateChange:()=>{},renderFallbackValue:null,mergeOptions:(i,s)=>F(i,s)},e),n=ub(t),[r,o]=bo(n.initialState);return Ft(()=>{n.setOptions(i=>F(i,e,{state:F(r,e.state||{}),onStateChange:s=>{o(s),e.onStateChange==null||e.onStateChange(s)}}))}),n}var To=ie("<li>"),mb=ie("<ul>"),vb={};At(vb,{Ellipsis:()=>ha,Item:()=>ga,Items:()=>pa,Next:()=>ma,Pagination:()=>yb,Previous:()=>va,Root:()=>ya});function ha(e){return(()=>{var t=To();return X(t,b(le,F({as:"div"},e))),t})()}var af=we();function Do(){const e=ye(af);if(e===void 0)throw new Error("[kobalte]: `usePaginationContext` must be used within a `Pagination` component");return e}function ga(e){const t=Do(),[n,r]=V(e,["page","onClick"]),o=()=>t.page()===n.page,i=()=>{t.setPage(n.page)};return(()=>{var s=To();return X(s,b(bt,F({get"aria-current"(){return o()?"page":void 0},get"data-current"(){return o()?"":void 0},get onClick(){return Se([n.onClick,i])}},r))),s})()}function pa(e){const t=Do(),n=k(()=>{const{count:r,siblingCount:o,page:i,fixedItems:s,showFirst:a,showLast:l}=t,c=r()<2*o()+(s()?6:4);if(c)return{renderItemsDirectly:c};const u=a()&&i()-1>o(),d=l()&&r()-i()>o();let f=i()-(a()?2:1)>o(),h=r()-i()-(l()?1:0)>o(),p=Math.min(i()-1,o()),g=Math.min(r()-i(),o());if(s()!==!1){const v=p,m=g;p+=Math.max(o()-m,0),g+=Math.max(o()-v,0),u||g++,d||p++,s()===!0&&(f||g++,h||p++),i()-p-(a()?2:1)===1&&(f=!1,p++),r()-i()-g-(l()?1:0)===1&&(h=!1,g++)}return{showFirst:u,showLast:d,showFirstEllipsis:f,showLastEllipsis:h,previousSiblingCount:p,nextSiblingCount:g,renderItemsDirectly:c}});return b(pe,{get when(){return n().renderItemsDirectly},get fallback(){return[b(pe,{get when(){return n().showFirst},get children(){return t.renderItem(1)}}),b(pe,{get when(){return n().showFirstEllipsis},get children(){return t.renderEllipsis()}}),b(rt,{get each(){return[...Array(n().previousSiblingCount).keys()].reverse()},children:r=>k(()=>t.renderItem(t.page()-(r+1)))}),k(()=>t.renderItem(t.page())),b(rt,{get each(){return[...Array(n().nextSiblingCount).keys()]},children:r=>k(()=>t.renderItem(t.page()+(r+1)))}),b(pe,{get when(){return n().showLastEllipsis},get children(){return t.renderEllipsis()}}),b(pe,{get when(){return n().showLast},get children(){return t.renderItem(t.count())}})]},get children(){return b(rt,{get each(){return[...Array(t.count()).keys()]},children:r=>k(()=>t.renderItem(r+1))})}})}function ma(e){const t=Do(),[n,r]=V(e,["onClick"]),o=()=>{t.setPage(t.page()+1)},i=()=>t.page()===t.count();return(()=>{var s=To();return X(s,b(bt,F({get tabIndex(){return i()||t.page()===t.count()?-1:void 0},get disabled(){return i()},get"aria-disabled"(){return i()||void 0},get"data-disabled"(){return i()?"":void 0},get onClick(){return Se([n.onClick,o])}},r))),s})()}function va(e){const t=Do(),[n,r]=V(e,["onClick"]),o=()=>{t.setPage(t.page()-1)},i=()=>t.page()===1;return(()=>{var s=To();return X(s,b(bt,F({get tabIndex(){return i()||t.page()===1?-1:void 0},get disabled(){return i()},get"aria-disabled"(){return i()||void 0},get"data-disabled"(){return i()?"":void 0},get onClick(){return Se([n.onClick,o])}},r))),s})()}function ya(e){const t=`pagination-${Ee()}`,n=Q({id:t},e),[r,o]=V(n,["page","defaultPage","onPageChange","count","siblingCount","showFirst","showLast","fixedItems","itemComponent","ellipsisComponent","disabled","children"]),i=yt({defaultValue:()=>r.defaultPage??1,onChange:r.onPageChange,value:()=>r.page}),s={count:()=>r.count,siblingCount:()=>r.siblingCount??1,showFirst:()=>r.showFirst??!0,showLast:()=>r.showLast??!0,fixedItems:()=>r.fixedItems??!1,isDisabled:()=>r.disabled??!1,renderItem:a=>r.itemComponent({page:a}),renderEllipsis:r.ellipsisComponent,page:()=>Math.min(i[0]()??1,r.count),setPage:i[1]};return b(af.Provider,{value:s,get children(){return b(le,F({as:"nav",get"data-disabled"(){return r.disabled?"":void 0}},o,{get children(){var a=mb();return X(a,()=>r.children),a}}))}})}var yb=Object.assign(ya,{Ellipsis:ha,Item:ga,Items:pa,Next:ma,Previous:va});const _o=Lr("inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"size-10"}},defaultVariants:{variant:"default",size:"default"}}),ou=e=>{const[t,n]=V(e,["variant","size","class"]);return b(bt,F({get class(){return de(_o({variant:t.variant,size:t.size}),t.class)}},n))};var wb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><circle cx=12 cy=12 r=1></circle><circle cx=19 cy=12 r=1></circle><circle cx=5 cy=12 r=1>'),bb=ie("<span class=sr-only>More pages"),Sb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M15 6l-6 6l6 6">'),xb=ie("<span>Previous"),Cb=ie("<span>Next"),Eb=ie('<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round class=size-4><path d="M9 6l6 6l-6 6">');const Rb=pa,Pb=e=>{const[t,n]=V(e,["class"]);return b(ya,F({get class(){return de("[&>*]:flex [&>*]:flex-row [&>*]:items-center [&>*]:gap-1",t.class)}},n))},Ib=e=>{const[t,n]=V(e,["class"]);return b(ga,F({get class(){return de(_o({variant:"ghost"}),"size-10 data-[current]:border",t.class)}},n))},$b=e=>{const[t,n]=V(e,["class"]);return b(ha,F({get class(){return de("flex size-10 items-center justify-center",t.class)}},n,{get children(){return[wb(),bb()]}}))},Mb=e=>{const[t,n]=V(e,["class","children"]);return b(va,F({get class(){return de(_o({variant:"ghost"}),"gap-1 pl-2.5",t.class)}},n,{get children(){return t.children??[Sb(),xb()]}}))},Fb=e=>{const[t,n]=V(e,["class","children"]);return b(ma,F({get class(){return de(_o({variant:"ghost"}),"gap-1 pl-2.5",t.class)}},n,{get children(){return t.children??[Cb(),Eb()]}}))};var Ob=ie('<div class="relative w-full overflow-auto"><table>'),Ab=ie("<thead>"),Tb=ie("<tbody>"),Db=ie("<tr>"),_b=ie("<th>"),Lb=ie("<td>");const kb=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=Ob(),o=r.firstChild;return Je(o,F({get class(){return de("w-full caption-bottom text-sm",t.class)}},n),!1,!1),r})()},Vb=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=Ab();return Je(r,F({get class(){return de("[&_tr]:border-b",t.class)}},n),!1,!1),r})()},Nb=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=Tb();return Je(r,F({get class(){return de(t.class)}},n),!1,!1),r})()},ni=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=Db();return Je(r,F({get class(){return de("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",t.class)}},n),!1,!1),r})()},Kb=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=_b();return Je(r,F({get class(){return de("h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",t.class)}},n),!1,!1),r})()},iu=e=>{const[t,n]=V(e,["class"]);return(()=>{var r=Lb();return Je(r,F({get class(){return de("p-4 align-middle [&:has([role=checkbox])]:pr-0",t.class)}},n),!1,!1),r})()};var jb=(e,t,n={})=>{let r=`${e}=${t}`;if(e.startsWith("__Secure-")&&!n.secure)throw new Error("__Secure- Cookie must have Secure attributes");if(e.startsWith("__Host-")){if(!n.secure)throw new Error("__Host- Cookie must have Secure attributes");if(n.path!=="/")throw new Error('__Host- Cookie must have Path attributes with "/"');if(n.domain)throw new Error("__Host- Cookie must not have Domain attributes")}if(n&&typeof n.maxAge=="number"&&n.maxAge>=0){if(n.maxAge>3456e4)throw new Error("Cookies Max-Age SHOULD NOT be greater than 400 days (34560000 seconds) in duration.");r+=`; Max-Age=${Math.floor(n.maxAge)}`}if(n.domain&&n.prefix!=="host"&&(r+=`; Domain=${n.domain}`),n.path&&(r+=`; Path=${n.path}`),n.expires){if(n.expires.getTime()-Date.now()>3456e7)throw new Error("Cookies Expires SHOULD NOT be greater than 400 days (34560000 seconds) in the future.");r+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(r+="; HttpOnly"),n.secure&&(r+="; Secure"),n.sameSite&&(r+=`; SameSite=${n.sameSite.charAt(0).toUpperCase()+n.sameSite.slice(1)}`),n.partitioned){if(!n.secure)throw new Error("Partitioned Cookie must have Secure attributes");r+="; Partitioned"}return r},zb=(e,t,n)=>(t=encodeURIComponent(t),jb(e,t,n)),Bb=(e,t)=>(e=e.replace(/\/+$/,""),e=e+"/",t=t.replace(/^\/+/,""),e+t),cs=(e,t)=>{for(const[n,r]of Object.entries(t)){const o=new RegExp("/:"+n+"(?:{[^/]+})?\\??");e=e.replace(o,r?`/${r}`:"")}return e},Hb=(e,t)=>{switch(t){case"ws":return e.replace(/^http/,"ws");case"http":return e.replace(/^ws/,"http")}},Gb=e=>/^https?:\/\/[^\/]+?\/index$/.test(e)?e.replace(/\/index$/,"/"):e.replace(/\/index$/,"");function Jr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function lf(e,t){if(!Jr(e)&&!Jr(t))return t;const n={...e};for(const r in t){const o=t[r];Jr(n[r])&&Jr(o)?n[r]=lf(n[r],o):n[r]=o}return n}var uf=(e,t)=>new Proxy(()=>{},{get(r,o){if(!(typeof o!="string"||o==="then"))return uf(e,[...t,o])},apply(r,o,i){return e({path:t,args:i})}}),Ub=class{constructor(e,t){Re(this,"url");Re(this,"method");Re(this,"queryParams");Re(this,"pathParams",{});Re(this,"rBody");Re(this,"cType");Re(this,"fetch",async(e,t)=>{if(e){if(e.query){for(const[a,l]of Object.entries(e.query))if(l!==void 0)if(this.queryParams||(this.queryParams=new URLSearchParams),Array.isArray(l))for(const c of l)this.queryParams.append(a,c);else this.queryParams.set(a,l)}if(e.form){const a=new FormData;for(const[l,c]of Object.entries(e.form))if(Array.isArray(c))for(const u of c)a.append(l,u);else a.append(l,c);this.rBody=a}e.json&&(this.rBody=JSON.stringify(e.json),this.cType="application/json"),e.param&&(this.pathParams=e.param)}let n=this.method.toUpperCase();const r={...(e==null?void 0:e.header)??{},...typeof(t==null?void 0:t.headers)=="function"?await t.headers():t!=null&&t.headers?t.headers:{}};if(e!=null&&e.cookie){const a=[];for(const[l,c]of Object.entries(e.cookie))a.push(zb(l,c,{path:"/"}));r.Cookie=a.join(",")}this.cType&&(r["Content-Type"]=this.cType);const o=new Headers(r??void 0);let i=this.url;i=Gb(i),i=cs(i,this.pathParams),this.queryParams&&(i=i+"?"+this.queryParams.toString()),n=this.method.toUpperCase();const s=!(n==="GET"||n==="HEAD");return((t==null?void 0:t.fetch)||fetch)(i,{body:s?this.rBody:void 0,method:n,headers:o,...t==null?void 0:t.init})});this.url=e,this.method=t}},qb=(e,t)=>uf(function n(r){var c;const o=[...r.path];if(o[o.length-1]==="toString")return o[o.length-2]==="name"?o[o.length-3]||"":n.toString();if(o[o.length-1]==="valueOf")return o[o.length-2]==="name"?o[o.length-3]||"":n;let i="";if(/^\$/.test(o[o.length-1])){const u=o.pop();u&&(i=u.replace(/^\$/,""))}const s=o.join("/"),a=Bb(e,s);if(i==="url")return r.args[0]&&r.args[0].param?new URL(cs(a,r.args[0].param)):new URL(a);if(i==="ws"){const u=Hb(r.args[0]&&r.args[0].param?cs(a,r.args[0].param):a,"ws"),d=new URL(u),f=(c=r.args[0])==null?void 0:c.query;return f&&Object.entries(f).forEach(([p,g])=>{Array.isArray(g)?g.forEach(v=>d.searchParams.append(p,v)):d.searchParams.set(p,g)}),((...p)=>(t==null?void 0:t.webSocket)!==void 0&&typeof t.webSocket=="function"?t.webSocket(...p):new WebSocket(...p))(d.toString())}const l=new Ub(a,i);if(i){t??(t={});const u=lf(t,{...r.args[1]??{}});return l.fetch(r.args[0],u)}return l},[]);const jr=qb("/rpc"),ri="production",Wb=e=>So(()=>({queryKey:["bundles",e()],queryFn:async()=>(await jr.bundles.$get({query:e()})).json(),placeholderData:t=>t,staleTime:Number.POSITIVE_INFINITY})),Xb=e=>So(()=>({queryKey:["bundle",e],queryFn:()=>jr.bundles[":bundleId"].$get({param:{bundleId:e}}).then(t=>t.json()),placeholderData:t=>t,staleTime:Number.POSITIVE_INFINITY})),Qb=()=>So(()=>({queryKey:["config"],queryFn:()=>jr.config.$get().then(e=>e.json()),staleTime:Number.POSITIVE_INFINITY,retryOnMount:!1})),Yb=()=>So(()=>({queryKey:["channels"],queryFn:()=>jr.channels.$get().then(e=>e.json()),staleTime:Number.POSITIVE_INFINITY,retryOnMount:!1,select:e=>!e||e.length===0?null:e.includes(ri)?[ri,...e.filter(t=>t!==ri)]:e}));var Zb=ie('<div class="transition-opacity duration-300"><div class="flex flex-row justify-end p-3"><div class="flex items-center gap-4"><div class="text-sm text-muted-foreground">Platform:</div><div class="text-sm text-muted-foreground">Channel:</div></div></div><div class="border rounded-md">'),Jb=ie('<div class="mt-2 text-sm text-muted-foreground text-center">Showing <!> to <!> of <!> results');const e0=20,[ft,eo]=j({pageIndex:0,pageSize:e0});function t0(e){var g;const[t]=V(e,["columns","onRowClick"]),{channelFilter:n,platformFilter:r,setPlatformFilter:o,setChannelFilter:i}=id(),s=k(()=>({channel:n()??void 0,platform:r()??void 0,limit:ft().pageSize.toString(),offset:(ft().pageIndex*ft().pageSize).toString()})),a=Wb(s),l=k(()=>a.data??{data:[],pagination:null}),c=k(()=>l().data??[]),u=k(()=>l().pagination),d=pb({get data(){return c()},columns:t.columns,getCoreRowModel:cb(),getFilteredRowModel:gb(),state:{get pagination(){return ft()},get globalFilter(){return r()}},onPaginationChange:eo,globalFilterFn:(v,m,y)=>y?v.original.platform.toLowerCase()===y:!0,manualPagination:!0,pageCount:((g=u())==null?void 0:g.totalPages)??0}),f=v=>()=>{t.onRowClick(v.original)},h=Yb();H(()=>{h.isFetched&&h.data&&n()===null&&i(h.data[0])});const p=v=>{eo(m=>({...m,pageIndex:v}))};return(()=>{var v=Zb(),m=v.firstChild,y=m.firstChild,w=y.firstChild,S=w.nextSibling,C=m.nextSibling;return X(y,b(Ql,{get children(){return b(Xl,{get children(){return[b(Yl,{class:"w-[100px]",get children(){return[k(()=>k(()=>!!r())()?r():"All"),b(Zl,{})]}}),b(Jl,{get children(){return b(rt,{each:[{label:"All",value:null},{label:"iOS",value:"ios"},{label:"Android",value:"android"}],children:$=>b(eu,{get classList(){return{"bg-primary text-primary-foreground":$.value===r()}},onClick:()=>{o($.value),eo(A=>({...A,pageIndex:0}))},get children(){return $.label}})})}})]}})}}),S),X(y,b(Ql,{get children(){return b(Xl,{get children(){return[b(Yl,{class:"w-[100px]",get children(){return[k(()=>n()),b(Zl,{})]}}),b(Jl,{get children(){return b(rt,{get each(){return h.data},children:$=>b(eu,{get classList(){return{"bg-primary text-primary-foreground":$===n()}},onClick:()=>{i($),eo(A=>({...A,pageIndex:0}))},children:$})})}})]}})}}),null),X(C,b(kb,{get children(){return[b(Vb,{get children(){return b(rt,{get each(){return d.getHeaderGroups()},children:$=>b(ni,{get children(){return b(rt,{get each(){return $.headers},children:A=>b(Kb,{get children(){return k(()=>!!A.isPlaceholder)()?null:ru(A.column.columnDef.header,A.getContext())}})})}})})}}),b(Nb,{get children(){return k(()=>!!(a.isFetched&&c().length===0))()?b(ni,{get children(){return b(iu,{get colSpan(){return t.columns.length},class:"h-full text-center",children:"No results."})}}):b(rt,{get each(){return d.getRowModel().rows},children:$=>b(ni,{get"data-state"(){return $.getIsSelected()&&"selected"},class:"cursor-pointer",get onClick(){return f($)},get children(){return b(rt,{get each(){return $.getVisibleCells()},children:A=>b(iu,{get children(){return ru(A.column.columnDef.cell,A.getContext())}})})}})})}})]}})),X(v,b(Pb,{class:"mt-2.5 w-full [&>ul]:justify-center",itemComponent:$=>b(Ib,{get page(){return $.page},onClick:()=>p($.page-1),get children(){return $.page}}),ellipsisComponent:()=>b($b,{}),get count(){var $;return(($=u())==null?void 0:$.totalPages)??1},get children(){return[b(Mb,{onClick:()=>p(ft().pageIndex-1),get disabled(){var $;return!(($=u())!=null&&$.hasPreviousPage)}}),b(Rb,{}),b(Fb,{onClick:()=>p(ft().pageIndex+1),get disabled(){var $;return!(($=u())!=null&&$.hasNextPage)}})]}}),null),X(v,(()=>{var $=k(()=>!!u());return()=>$()&&(()=>{var A=Jb(),_=A.firstChild,T=_.nextSibling,K=T.nextSibling,N=K.nextSibling,z=N.nextSibling,re=z.nextSibling;return re.nextSibling,X(A,()=>ft().pageIndex*ft().pageSize+1,T),X(A,()=>Math.min((ft().pageIndex+1)*ft().pageSize,u().total),N),X(A,()=>u().total,re),A})()})(),null),je($=>{var A=!!a.isFetching,_=!!a.isFetching;return A!==$.e&&v.classList.toggle("opacity-50",$.e=A),_!==$.t&&C.classList.toggle("min-h-[400px]",$.t=_),$},{e:void 0,t:void 0}),v})()}var n0={};At(n0,{Root:()=>wa,Skeleton:()=>r0});function wa(e){const t=`skeleton-${Ee()}`,n=Q({visible:!0,animate:!0,id:t},e),[r,o]=V(n,["style","radius","animate","height","width","visible","circle"]);return b(le,F({as:"div",role:"group",get"data-animate"(){return r.animate||void 0},get"data-visible"(){return r.visible||void 0},get style(){return ct({"border-radius":r.circle?"9999px":r.radius?`${r.radius}px`:void 0,width:r.circle?`${r.height}px`:r.width?`${r.width}px`:"100%",height:r.height?`${r.height}px`:"auto"},r.style)}},o))}var r0=wa;const o0=e=>{const[t,n]=V(e,["class"]);return b(wa,F({get class(){return de("bg-primary/10 data-[animate='true']:animate-pulse",t.class)}},n))};var cf=["id","name","validationState","required","disabled","readOnly"];function df(e){const t=`form-control-${Ee()}`,n=Q({id:t},e),[r,o]=j(),[i,s]=j(),[a,l]=j(),[c,u]=j(),d=(g,v,m)=>{const y=m!=null||r()!=null;return[m,r(),y&&v!=null?g:void 0].filter(Boolean).join(" ")||void 0},f=g=>[a(),c(),g].filter(Boolean).join(" ")||void 0,h=k(()=>({"data-valid":D(n.validationState)==="valid"?"":void 0,"data-invalid":D(n.validationState)==="invalid"?"":void 0,"data-required":D(n.required)?"":void 0,"data-disabled":D(n.disabled)?"":void 0,"data-readonly":D(n.readOnly)?"":void 0}));return{formControlContext:{name:()=>D(n.name)??D(n.id),dataset:h,validationState:()=>D(n.validationState),isRequired:()=>D(n.required),isDisabled:()=>D(n.disabled),isReadOnly:()=>D(n.readOnly),labelId:r,fieldId:i,descriptionId:a,errorMessageId:c,getAriaLabelledBy:d,getAriaDescribedBy:f,generateId:dt(()=>D(n.id)),registerLabel:Ke(o),registerField:Ke(s),registerDescription:Ke(l),registerErrorMessage:Ke(u)}}}var ba=we();function Jt(){const e=ye(ba);if(e===void 0)throw new Error("[kobalte]: `useFormControlContext` must be used within a `FormControlContext.Provider` component");return e}function Sa(e){const t=Jt(),n=Q({id:t.generateId("description")},e);return H(()=>W(t.registerDescription(n.id))),b(le,F({as:"div"},()=>t.dataset(),n))}function xa(e){const t=Jt(),n=Q({id:t.generateId("error-message")},e),[r,o]=V(n,["forceMount"]),i=()=>t.validationState()==="invalid";return H(()=>{i()&&W(t.registerErrorMessage(o.id))}),b(pe,{get when(){return r.forceMount||i()},get children(){return b(le,F({as:"div"},()=>t.dataset(),o))}})}function Lo(e){let t;const n=Jt(),r=Q({id:n.generateId("label")},e),[o,i]=V(r,["ref"]),s=Co(()=>t,()=>"label");return H(()=>W(n.registerLabel(i.id))),b(le,F({as:"label",ref(a){var l=ve(c=>t=c,o.ref);typeof l=="function"&&l(a)},get for(){return k(()=>s()==="label")()?n.fieldId():void 0}},()=>n.dataset(),i))}var ff=["id","aria-label","aria-labelledby","aria-describedby"];function hf(e){const t=Jt(),n=Q({id:t.generateId("field")},e);return H(()=>W(t.registerField(D(n.id)))),{fieldProps:{id:()=>D(n.id),ariaLabel:()=>D(n["aria-label"]),ariaLabelledBy:()=>t.getAriaLabelledBy(D(n.id),D(n["aria-label"]),D(n["aria-labelledby"])),ariaDescribedBy:()=>t.getAriaDescribedBy(D(n["aria-describedby"]))}}}function gf(e,t){H(Ce(e,n=>{if(n==null)return;const r=i0(n);r!=null&&(r.addEventListener("reset",t,{passive:!0}),W(()=>{r.removeEventListener("reset",t)}))}))}function i0(e){return s0(e)?e.form:e.closest("form")}function s0(e){return e.matches("textarea, input, select, button")}var a0={};At(a0,{Control:()=>Ca,Description:()=>mf,ErrorMessage:()=>vf,Input:()=>Ea,Label:()=>Ra,Root:()=>Pa,Switch:()=>u0,Thumb:()=>Ia});var pf=we();function tr(){const e=ye(pf);if(e===void 0)throw new Error("[kobalte]: `useSwitchContext` must be used within a `Switch` component");return e}function Ca(e){const t=Jt(),n=tr(),r=Q({id:n.generateId("control")},e),[o,i]=V(r,["onClick","onKeyDown"]);return b(le,F({as:"div",onClick:l=>{var c;ne(l,o.onClick),n.toggle(),(c=n.inputRef())==null||c.focus()},onKeyDown:l=>{var c;ne(l,o.onKeyDown),l.key===Es.Space&&(n.toggle(),(c=n.inputRef())==null||c.focus())}},()=>t.dataset(),()=>n.dataset(),i))}function mf(e){const t=tr();return b(Sa,F(()=>t.dataset(),e))}function vf(e){const t=tr();return b(xa,F(()=>t.dataset(),e))}function Ea(e){const t=Jt(),n=tr(),r=Q({id:n.generateId("input")},e),[o,i,s]=V(r,["ref","style","onChange","onFocus","onBlur"],ff),{fieldProps:a}=hf(i);return b(le,F({as:"input",ref(d){var f=ve(n.setInputRef,o.ref);typeof f=="function"&&f(d)},type:"checkbox",role:"switch",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get checked(){return n.checked()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get style(){return ct({...Dc},o.style)},get"aria-checked"(){return n.checked()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},onChange:d=>{ne(d,o.onChange),d.stopPropagation();const f=d.target;n.setIsChecked(f.checked),f.checked=n.checked()},onFocus:d=>{ne(d,o.onFocus),n.setIsFocused(!0)},onBlur:d=>{ne(d,o.onBlur),n.setIsFocused(!1)}},()=>t.dataset(),()=>n.dataset(),s))}function Ra(e){const t=tr();return b(Lo,F(()=>t.dataset(),e))}function Pa(e){let t;const n=`switch-${Ee()}`,r=Q({value:"on",id:n},e),[o,i,s]=V(r,["ref","children","value","checked","defaultChecked","onChange","onPointerDown"],cf),[a,l]=j(),[c,u]=j(!1),{formControlContext:d}=df(i),f=Fd({isSelected:()=>o.checked,defaultIsSelected:()=>o.defaultChecked,onSelectedChange:v=>{var m;return(m=o.onChange)==null?void 0:m.call(o,v)},isDisabled:()=>d.isDisabled(),isReadOnly:()=>d.isReadOnly()});gf(()=>t,()=>f.setIsSelected(o.defaultChecked??!1));const h=v=>{ne(v,o.onPointerDown),c()&&v.preventDefault()},p=k(()=>({"data-checked":f.isSelected()?"":void 0})),g={value:()=>o.value,dataset:p,checked:()=>f.isSelected(),inputRef:a,generateId:dt(()=>D(i.id)),toggle:()=>f.toggle(),setIsChecked:v=>f.setIsSelected(v),setIsFocused:u,setInputRef:l};return b(ba.Provider,{value:d,get children(){return b(pf.Provider,{value:g,get children(){return b(le,F({as:"div",ref(v){var m=ve(y=>t=y,o.ref);typeof m=="function"&&m(v)},role:"group",get id(){return D(i.id)},onPointerDown:h},()=>d.dataset(),p,s,{get children(){return b(l0,{state:g,get children(){return o.children}})}}))}})}})}function l0(e){const t=vo(()=>{const n=e.children;return xs(n)?n(e.state):n});return k(t)}function Ia(e){const t=Jt(),n=tr(),r=Q({id:n.generateId("thumb")},e);return b(le,F({as:"div"},()=>t.dataset(),()=>n.dataset(),r))}var u0=Object.assign(Pa,{Control:Ca,Description:mf,ErrorMessage:vf,Input:Ea,Label:Ra,Thumb:Ia});const su=Pa,au=e=>{const[t,n]=V(e,["class","children"]);return[b(Ea,{get class(){return de("[&:focus-visible+div]:outline-none [&:focus-visible+div]:ring-2 [&:focus-visible+div]:ring-ring [&:focus-visible+div]:ring-offset-2 [&:focus-visible+div]:ring-offset-background",t.class)}}),b(Ca,F({get class(){return de("inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent bg-input transition-[color,background-color,box-shadow] data-[disabled]:cursor-not-allowed data-[checked]:bg-primary data-[disabled]:opacity-50",t.class)}},n,{get children(){return t.children}}))]},lu=e=>{const[t,n]=V(e,["class"]);return b(Ia,F({get class(){return de("pointer-events-none block size-5 translate-x-0 rounded-full bg-background shadow-lg ring-0 transition-transform data-[checked]:translate-x-5",t.class)}},n))},uu=e=>{const[t,n]=V(e,["class"]);return b(Ra,F({get class(){return de("text-sm font-medium leading-none data-[disabled]:cursor-not-allowed data-[disabled]:opacity-70",t.class)}},n))};var c0={};At(c0,{Description:()=>Sa,ErrorMessage:()=>xa,Input:()=>$a,Label:()=>Lo,Root:()=>Ma,TextArea:()=>Sf,TextField:()=>f0});var yf=we();function wf(){const e=ye(yf);if(e===void 0)throw new Error("[kobalte]: `useTextFieldContext` must be used within a `TextField` component");return e}function $a(e){return b(bf,F({type:"text"},e))}function bf(e){const t=Jt(),n=wf(),r=Q({id:n.generateId("input")},e),[o,i,s]=V(r,["onInput"],ff),{fieldProps:a}=hf(i);return b(le,F({as:"input",get id(){return a.id()},get name(){return t.name()},get value(){return n.value()},get required(){return t.isRequired()},get disabled(){return t.isDisabled()},get readonly(){return t.isReadOnly()},get"aria-label"(){return a.ariaLabel()},get"aria-labelledby"(){return a.ariaLabelledBy()},get"aria-describedby"(){return a.ariaDescribedBy()},get"aria-invalid"(){return t.validationState()==="invalid"||void 0},get"aria-required"(){return t.isRequired()||void 0},get"aria-disabled"(){return t.isDisabled()||void 0},get"aria-readonly"(){return t.isReadOnly()||void 0},get onInput(){return Se([o.onInput,n.onInput])}},()=>t.dataset(),s))}function Ma(e){let t;const n=`textfield-${Ee()}`,r=Q({id:n},e),[o,i,s]=V(r,["ref","value","defaultValue","onChange"],cf),a=o.value,[l,c]=yt({value:()=>a===void 0?void 0:o.value??"",defaultValue:()=>o.defaultValue,onChange:h=>{var p;return(p=o.onChange)==null?void 0:p.call(o,h)}}),{formControlContext:u}=df(i);gf(()=>t,()=>c(o.defaultValue??""));const d=h=>{if(u.isReadOnly()||u.isDisabled())return;const p=h.target;c(p.value),p.value=l()??""},f={value:l,generateId:dt(()=>D(i.id)),onInput:d};return b(ba.Provider,{value:u,get children(){return b(yf.Provider,{value:f,get children(){return b(le,F({as:"div",ref(h){var p=ve(g=>t=g,o.ref);typeof p=="function"&&p(h)},role:"group",get id(){return D(i.id)}},()=>u.dataset(),s))}})}})}function Sf(e){let t;const n=wf(),r=Q({id:n.generateId("textarea")},e),[o,i]=V(r,["ref","autoResize","submitOnEnter","onKeyPress"]);H(Ce([()=>t,()=>o.autoResize,()=>n.value()],([a,l])=>{!a||!l||d0(a)}));const s=a=>{t&&o.submitOnEnter&&a.key==="Enter"&&!a.shiftKey&&t.form&&(t.form.requestSubmit(),a.preventDefault())};return b(bf,F({as:"textarea",get"aria-multiline"(){return o.submitOnEnter?"false":void 0},get onKeyPress(){return Se([o.onKeyPress,s])},ref(a){var l=ve(c=>t=c,o.ref);typeof l=="function"&&l(a)}},i))}function d0(e){const t=e.style.alignSelf,n=e.style.overflow;"MozAppearance"in e.style||(e.style.overflow="hidden"),e.style.alignSelf="start",e.style.height="auto",e.style.height=`${e.scrollHeight+(e.offsetHeight-e.clientHeight)}px`,e.style.overflow=n,e.style.alignSelf=t}var f0=Object.assign(Ma,{Description:Sa,ErrorMessage:xa,Input:$a,Label:Lo,TextArea:Sf});const oi=Ma,ii=e=>{const[t,n]=V(e,["type","class"]);return b($a,F({get type(){return t.type},get class(){return de("flex h-10 w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:opacity-50",t.class)}},n))},h0=Lr("text-sm font-medium leading-none peer-disabled:opacity-70",{variants:{variant:{label:"data-[invalid]:text-destructive",description:"text-destructive",error:"font-normal text-red-500"}},defaultVariants:{variant:"label"}}),si=e=>{const[t,n]=V(e,["class"]);return b(Lo,F({get class(){return de(h0(),t.class)}},n))};class xf{constructor(t,n){this.listeners=new Set,this._batching=!1,this._flushing=0,this.subscribe=r=>{var o,i;this.listeners.add(r);const s=(i=(o=this.options)==null?void 0:o.onSubscribe)==null?void 0:i.call(o,r,this);return()=>{this.listeners.delete(r),s==null||s()}},this.setState=r=>{var o,i,s;const a=this.state;this.state=(o=this.options)!=null&&o.updateFn?this.options.updateFn(a)(r):r(a),(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),this._flush()},this._flush=()=>{if(this._batching)return;const r=++this._flushing;this.listeners.forEach(o=>{this._flushing===r&&o()})},this.batch=r=>{if(this._batching)return r();this._batching=!0,r(),this._batching=!1,this._flush()},this.state=t,this.options=n}}function Fa(e,t){return typeof e=="function"?e(t):e}function Cf(e,t){return Oa(t).reduce((r,o)=>{if(r===null)return null;if(typeof r<"u")return r[o]},e)}function ai(e,t,n){const r=Oa(t);function o(i){if(!r.length)return Fa(n,i);const s=r.shift();if(typeof s=="string")return typeof i=="object"?(i===null&&(i={}),{...i,[s]:o(i[s])}):{[s]:o()};if(Array.isArray(i)&&s!==void 0){const a=i.slice(0,s);return[...a.length?a:new Array(s),o(i[s]),...i.slice(s+1)]}return[...new Array(s),o()]}return o(e)}function g0(e,t){const n=Oa(t);function r(o){if(!o)return;if(n.length===1){const s=n[0];if(Array.isArray(o)&&typeof s=="number")return o.filter((c,u)=>u!==s);const{[s]:a,...l}=o;return l}const i=n.shift();if(typeof i=="string"&&typeof o=="object")return{...o,[i]:r(o[i])};if(typeof i=="number"&&Array.isArray(o)){if(i>=o.length)return o;const s=o.slice(0,i);return[...s.length?s:new Array(i),r(o[i]),...o.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return r(e)}const p0=/^(\d*)$/gm,m0=/\.(\d*)\./gm,v0=/^(\d*)\./gm,y0=/\.(\d*$)/gm,w0=/\.{2,}/gm,ds="__int__",to=`${ds}$1`;function Oa(e){if(Array.isArray(e))return[...e];if(typeof e!="string")throw new Error("Path must be a string.");return e.replaceAll("[",".").replaceAll("]","").replace(p0,to).replace(m0,`.${to}.`).replace(v0,`${to}.`).replace(y0,`.${to}`).replace(w0,".").split(".").map(t=>t.indexOf(ds)===0?parseInt(t.substring(ds.length),10):t)}function b0(e){return!(Array.isArray(e)&&e.length===0)}function fs(e,t){const{asyncDebounceMs:n}=t,{onChangeAsync:r,onBlurAsync:o,onSubmitAsync:i,onBlurAsyncDebounceMs:s,onChangeAsyncDebounceMs:a}=t.validators||{},l=n??0,c={cause:"change",validate:r,debounceMs:a??l},u={cause:"blur",validate:o,debounceMs:s??l},d={cause:"submit",validate:i,debounceMs:0},f=h=>({...h,debounceMs:0});switch(e){case"submit":return[f(c),f(u),d];case"blur":return[u];case"change":return[c];case"server":default:return[]}}function hs(e,t){const{onChange:n,onBlur:r,onSubmit:o}=t.validators||{},i={cause:"change",validate:n},s={cause:"blur",validate:r},a={cause:"submit",validate:o},l={cause:"server",validate:()=>{}};switch(e){case"submit":return[i,s,a,l];case"server":return[l];case"blur":return[s,l];case"change":default:return[i,l]}}function li(e){return{values:e.values??{},errors:e.errors??[],errorMap:e.errorMap??{},fieldMeta:e.fieldMeta??{},canSubmit:e.canSubmit??!0,isFieldsValid:e.isFieldsValid??!1,isFieldsValidating:e.isFieldsValidating??!1,isFormValid:e.isFormValid??!1,isFormValidating:e.isFormValidating??!1,isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isTouched:e.isTouched??!1,isBlurred:e.isBlurred??!1,isPristine:e.isPristine??!0,isDirty:e.isDirty??!1,isValid:e.isValid??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}}}const S0=e=>typeof e=="object";class x0{constructor(t){var n;this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const{onMount:r}=this.options.validators||{};if(!r)return;const o=this.runValidator({validate:r,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"});o&&this.store.setState(i=>({...i,errorMap:{...i.errorMap,onMount:o}}))},this.update=r=>{if(!r)return;const o=this.options;this.options=r,this.store.batch(()=>{const i=r.defaultValues&&r.defaultValues!==o.defaultValues&&!this.state.isTouched,s=r.defaultState!==o.defaultState&&!this.state.isTouched;this.store.setState(()=>li(Object.assign({},this.state,s?r.defaultState:{},i?{values:r.defaultValues}:{})))})},this.reset=()=>{const{fieldMeta:r}=this.state,o=this.resetFieldMeta(r);this.store.setState(()=>{var i;return li({...this.options.defaultState,values:this.options.defaultValues??((i=this.options.defaultState)==null?void 0:i.values),fieldMeta:o})})},this.validateAllFields=async r=>{const o=[];return this.store.batch(()=>{Object.values(this.fieldInfo).forEach(s=>{if(!s.instance)return;const a=s.instance;o.push(Promise.resolve().then(()=>a.validate(r))),s.instance.state.meta.isTouched||s.instance.setMeta(l=>({...l,isTouched:!0})),s.instance.state.meta.isBlurred||s.instance.setMeta(l=>({...l,isBlurred:!0}))})}),(await Promise.all(o)).flat()},this.validateArrayFieldsStartingFrom=async(r,o,i)=>{const s=this.getFieldValue(r),a=Array.isArray(s)?Math.max(s.length-1,0):null,l=[`${r}[${o}]`];for(let f=o+1;f<=(a??0);f++)l.push(`${r}[${f}]`);const c=Object.keys(this.fieldInfo).filter(f=>l.some(h=>f.startsWith(h))),u=[];return this.store.batch(()=>{c.forEach(f=>{u.push(Promise.resolve().then(()=>this.validateField(f,i)))})}),(await Promise.all(u)).flat()},this.validateField=(r,o)=>{var i;const s=(i=this.fieldInfo[r])==null?void 0:i.instance;return s?(s.state.meta.isTouched||s.setMeta(a=>({...a,isTouched:!0})),s.state.meta.isBlurred||s.setMeta(a=>({...a,isBlurred:!0})),s.validate(o)):[]},this.validateSync=r=>{const o=hs(r,this.options);let i=!1;const s={};this.store.batch(()=>{for(const l of o){if(!l.validate)continue;const c=this.runValidator({validate:l.validate,value:{value:this.state.values,formApi:this,validationSource:"form"},type:"validate"}),{formError:u,fieldErrors:d}=gs(c),f=no(l.cause);if(d)for(const[h,p]of Object.entries(d)){const v={...s[h]||{},[f]:p};s[h]=v;const m=this.getFieldMeta(h);m&&m.errorMap[f]!==p&&this.setFieldMeta(h,y=>({...y,errorMap:{...y.errorMap,[f]:p}}))}this.state.errorMap[f]!==u&&this.store.setState(h=>({...h,errorMap:{...h.errorMap,[f]:u}})),(u||d)&&(i=!0)}});const a=no("submit");return this.state.errorMap[a]&&r!=="submit"&&!i&&this.store.setState(l=>({...l,errorMap:{...l.errorMap,[a]:void 0}})),{hasErrored:i,fieldsErrorMap:s}},this.validateAsync=async r=>{const o=fs(r,this.options);this.state.isFormValidating||this.store.setState(c=>({...c,isFormValidating:!0}));const i=[];let s;for(const c of o){if(!c.validate)continue;const u=no(c.cause),d=this.state.validationMetaMap[u];d==null||d.lastAbortController.abort();const f=new AbortController;this.state.validationMetaMap[u]={lastAbortController:f},i.push(new Promise(async h=>{let p;try{p=await new Promise((y,w)=>{setTimeout(async()=>{if(f.signal.aborted)return y(void 0);try{y(await this.runValidator({validate:c.validate,value:{value:this.state.values,formApi:this,validationSource:"form",signal:f.signal},type:"validateAsync"}))}catch(S){w(S)}},c.debounceMs)})}catch(y){p=y}const{formError:g,fieldErrors:v}=gs(p);v&&(s=s?{...s,...v}:v);const m=no(c.cause);if(s)for(const[y,w]of Object.entries(s)){const S=this.getFieldMeta(y);S&&S.errorMap[m]!==w&&this.setFieldMeta(y,C=>({...C,errorMap:{...C.errorMap,[m]:w}}))}this.store.setState(y=>({...y,errorMap:{...y.errorMap,[m]:g}})),h(s?{fieldErrors:s,errorMapKey:m}:void 0)}))}let a=[];const l={};if(i.length){a=await Promise.all(i);for(const c of a)if(c!=null&&c.fieldErrors){const{errorMapKey:u}=c;for(const[d,f]of Object.entries(c.fieldErrors)){const p={...l[d]||{},[u]:f};l[d]=p}}}return this.store.setState(c=>({...c,isFormValidating:!1})),l},this.validate=r=>{const{hasErrored:o,fieldsErrorMap:i}=this.validateSync(r);return o&&!this.options.asyncAlways?i:this.validateAsync(r)},this.handleSubmit=async()=>{var r,o,i,s,a,l;if(this.store.setState(u=>({...u,isSubmitted:!1,submissionAttempts:u.submissionAttempts+1})),!this.state.canSubmit)return;this.store.setState(u=>({...u,isSubmitting:!0}));const c=()=>{this.store.setState(u=>({...u,isSubmitting:!1}))};if(await this.validateAllFields("submit"),!this.state.isFieldsValid){c(),(o=(r=this.options).onSubmitInvalid)==null||o.call(r,{value:this.state.values,formApi:this});return}if(await this.validate("submit"),!this.state.isValid){c(),(s=(i=this.options).onSubmitInvalid)==null||s.call(i,{value:this.state.values,formApi:this});return}try{await((l=(a=this.options).onSubmit)==null?void 0:l.call(a,{value:this.state.values,formApi:this})),this.store.batch(()=>{this.store.setState(u=>({...u,isSubmitted:!0})),c()})}catch(u){throw c(),u}},this.getFieldValue=r=>Cf(this.state.values,r),this.getFieldMeta=r=>this.state.fieldMeta[r],this.getFieldInfo=r=>{var o;return(o=this.fieldInfo)[r]||(o[r]={instance:null,validationMetaMap:{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}})},this.setFieldMeta=(r,o)=>{this.store.setState(i=>({...i,fieldMeta:{...i.fieldMeta,[r]:Fa(o,i.fieldMeta[r])}}))},this.resetFieldMeta=r=>Object.keys(r).reduce((o,i)=>{const s=i;return o[s]={isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{}},o},{}),this.setFieldValue=(r,o,i)=>{const s=(i==null?void 0:i.dontUpdateMeta)??!1;this.store.batch(()=>{s||this.setFieldMeta(r,a=>({...a,isTouched:!0,isBlurred:!0,isDirty:!0})),this.store.setState(a=>({...a,values:ai(a.values,r,o)}))})},this.deleteField=r=>{this.store.setState(o=>{const i={...o};return i.values=g0(i.values,r),delete i.fieldMeta[r],i}),delete this.fieldInfo[r]},this.pushFieldValue=(r,o,i)=>{this.setFieldValue(r,s=>[...Array.isArray(s)?s:[],o],i),this.validateField(r,"change")},this.insertFieldValue=async(r,o,i,s)=>{this.setFieldValue(r,a=>[...a.slice(0,o),i,...a.slice(o)],s),await this.validateField(r,"change")},this.replaceFieldValue=async(r,o,i,s)=>{this.setFieldValue(r,a=>a.map((l,c)=>c===o?i:l),s),await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change")},this.removeFieldValue=async(r,o,i)=>{const s=this.getFieldValue(r),a=Array.isArray(s)?Math.max(s.length-1,0):null;if(this.setFieldValue(r,l=>l.filter((c,u)=>u!==o),i),a!==null){const l=`${r}[${a}]`;Object.keys(this.fieldInfo).filter(u=>u.startsWith(l)).forEach(u=>this.deleteField(u))}await this.validateField(r,"change"),await this.validateArrayFieldsStartingFrom(r,o,"change")},this.swapFieldValues=(r,o,i,s)=>{this.setFieldValue(r,a=>{const l=a[o],c=a[i];return ai(ai(a,`${o}`,c),`${i}`,l)},s),this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${i}]`,"change")},this.moveFieldValues=(r,o,i,s)=>{this.setFieldValue(r,a=>(a.splice(i,0,a.splice(o,1)[0]),a),s),this.validateField(r,"change"),this.validateField(`${r}[${o}]`,"change"),this.validateField(`${r}[${i}]`,"change")},this.store=new xf(li({...t==null?void 0:t.defaultState,values:(t==null?void 0:t.defaultValues)??((n=t==null?void 0:t.defaultState)==null?void 0:n.values),isFormValid:!0}),{onUpdate:()=>{var r,o;let{state:i}=this.store;const s=Object.values(i.fieldMeta),a=s.some(w=>w==null?void 0:w.isValidating),l=!s.some(w=>(w==null?void 0:w.errorMap)&&b0(Object.values(w.errorMap).filter(Boolean))),c=s.some(w=>w==null?void 0:w.isTouched),u=s.some(w=>w==null?void 0:w.isBlurred),d=s.some(w=>w==null?void 0:w.isDirty),f=!d,h=a||i.isFormValidating;i.errors=Object.values(i.errorMap).reduce((w,S)=>S===void 0?w:typeof S=="string"?(w.push(S),w):(S&&S0(S)&&w.push(S.form),w),[]);const p=i.errors.length===0,g=l&&p,v=i.submissionAttempts===0&&!c||!h&&!i.isSubmitting&&g;i={...i,isFieldsValidating:a,isFieldsValid:l,isFormValid:p,isValid:g,canSubmit:v,isTouched:c,isBlurred:u,isPristine:f,isDirty:d},this.state=i,this.store.state=this.state;const m=((r=this.options.transform)==null?void 0:r.deps)??[];(m.length!==this.prevTransformArray.length||m.some((w,S)=>w!==this.prevTransformArray[S]))&&((o=this.options.transform)==null||o.fn(this),this.store.state=this.state,this.prevTransformArray=m)}}),this.state=this.store.state,this.update(t||{})}runValidator(t){const n=this.options.validatorAdapter;return n&&typeof t.validate!="function"?n()[t.type](t.value,t.validate):t.validate(t.value)}setErrorMap(t){this.store.setState(n=>({...n,errorMap:{...n.errorMap,...t}}))}}function gs(e){if(e){if(typeof e=="object"){const t=gs(e.form).formError,n=e.fields;return{formError:t,fieldErrors:n}}return typeof e!="string"?{formError:"Invalid Form Values"}:{formError:e}}return{formError:void 0}}function no(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"change":default:return"onChange"}}class C0{constructor(t){this.options={},this.mount=()=>{const n=this.getInfo();n.instance=this;const r=this.form.store.subscribe(()=>{this.store.batch(()=>{const i=this.getValue(),s=this.getMeta();i!==this.state.value&&this.store.setState(a=>({...a,value:i})),s!==this.state.meta&&this.store.setState(a=>({...a,meta:s}))})});this.update(this.options);const{onMount:o}=this.options.validators||{};if(o){const i=this.runValidator({validate:o,value:{value:this.state.value,fieldApi:this,validationSource:"field"},type:"validate"});i&&this.setMeta(s=>({...s,errorMap:{...s==null?void 0:s.errorMap,onMount:i}}))}return()=>{r()}},this.update=n=>{if(this.state.value===void 0){const r=Cf(n.form.options.defaultValues,n.name);n.defaultValue!==void 0?this.setValue(n.defaultValue,{dontUpdateMeta:!0}):r!==void 0&&this.setValue(r,{dontUpdateMeta:!0})}this._getMeta()===void 0&&this.setMeta(this.state.meta),this.options=n},this.getValue=()=>this.form.getFieldValue(this.name),this.setValue=(n,r)=>{this.form.setFieldValue(this.name,n,r),this.validate("change")},this._getMeta=()=>this.form.getFieldMeta(this.name),this.getMeta=()=>this._getMeta()??{isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{},...this.options.defaultMeta},this.setMeta=n=>this.form.setFieldMeta(this.name,n),this.getInfo=()=>this.form.getFieldInfo(this.name),this.pushValue=(n,r)=>this.form.pushFieldValue(this.name,n,r),this.insertValue=(n,r,o)=>this.form.insertFieldValue(this.name,n,r,o),this.replaceValue=(n,r,o)=>this.form.replaceFieldValue(this.name,n,r,o),this.removeValue=(n,r)=>this.form.removeFieldValue(this.name,n,r),this.swapValues=(n,r,o)=>this.form.swapFieldValues(this.name,n,r,o),this.moveValue=(n,r,o)=>this.form.moveFieldValues(this.name,n,r,o),this.getLinkedFields=n=>{const r=Object.values(this.form.fieldInfo),o=[];for(const i of r){if(!i.instance)continue;const{onChangeListenTo:s,onBlurListenTo:a}=i.instance.options.validators||{};n==="change"&&(s!=null&&s.includes(this.name))&&o.push(i.instance),n==="blur"&&(a!=null&&a.includes(this.name))&&o.push(i.instance)}return o},this.validateSync=(n,r)=>{const o=hs(n,this.options),s=this.getLinkedFields(n).reduce((c,u)=>{const d=hs(n,u.options);return d.forEach(f=>{f.field=u}),c.concat(d)},[]);let a=!1;this.form.store.batch(()=>{const c=(u,d)=>{const f=dr(d.cause),h=d.validate?cu(u.runValidator({validate:d.validate,value:{value:u.getValue(),validationSource:"field",fieldApi:u},type:"validate"})):r[f];u.state.meta.errorMap[f]!==h&&u.setMeta(p=>({...p,errorMap:{...p.errorMap,[dr(d.cause)]:h||r[f]}})),(h||r[f])&&(a=!0)};for(const u of o)c(this,u);for(const u of s)u.validate&&c(u.field,u)});const l=dr("submit");return this.state.meta.errorMap[l]&&n!=="submit"&&!a&&this.setMeta(c=>({...c,errorMap:{...c.errorMap,[l]:void 0}})),{hasErrored:a}},this.validateAsync=async(n,r)=>{const o=fs(n,this.options),i=await r,s=this.getLinkedFields(n),a=s.reduce((f,h)=>{const p=fs(n,h.options);return p.forEach(g=>{g.field=h}),f.concat(p)},[]);this.state.meta.isValidating||this.setMeta(f=>({...f,isValidating:!0}));for(const f of s)f.setMeta(h=>({...h,isValidating:!0}));const l=[],c=[],u=(f,h,p)=>{const g=dr(h.cause),v=f.getInfo().validationMetaMap[g];v==null||v.lastAbortController.abort();const m=new AbortController;this.getInfo().validationMetaMap[g]={lastAbortController:m},p.push(new Promise(async y=>{var w;let S;try{S=await new Promise((_,T)=>{this.timeoutIds[h.cause]&&clearTimeout(this.timeoutIds[h.cause]),this.timeoutIds[h.cause]=setTimeout(async()=>{if(m.signal.aborted)return _(void 0);try{_(await this.runValidator({validate:h.validate,value:{value:f.getValue(),fieldApi:f,signal:m.signal,validationSource:"field"},type:"validateAsync"}))}catch(K){T(K)}},h.debounceMs)})}catch(_){S=_}if(m.signal.aborted)return y(void 0);const C=cu(S),$=(w=i[this.name])==null?void 0:w[g],A=C||$;f.setMeta(_=>({..._,errorMap:{..._==null?void 0:_.errorMap,[g]:A}})),y(A)}))};for(const f of o)f.validate&&u(this,f,l);for(const f of a)f.validate&&u(f.field,f,c);let d=[];(l.length||c.length)&&(d=await Promise.all(l),await Promise.all(c)),this.setMeta(f=>({...f,isValidating:!1}));for(const f of s)f.setMeta(h=>({...h,isValidating:!1}));return d.filter(Boolean)},this.validate=n=>{var r;if(!this.state.meta.isTouched)return[];let o={},i=Promise.resolve({});try{const a=this.form.validate(n);if(a instanceof Promise)i=a;else{const l=a[this.name];l&&(o=l)}}catch{}const{hasErrored:s}=this.validateSync(n,o);return s&&!this.options.asyncAlways?((r=this.getInfo().validationMetaMap[dr(n)])==null||r.lastAbortController.abort(),this.state.meta.errors):this.validateAsync(n,i)},this.handleChange=n=>{this.setValue(n)},this.handleBlur=()=>{this.state.meta.isTouched||(this.setMeta(r=>({...r,isTouched:!0})),this.validate("change")),this.state.meta.isBlurred||this.setMeta(r=>({...r,isBlurred:!0})),this.validate("blur")},this.form=t.form,this.name=t.name,this.timeoutIds={},t.defaultValue!==void 0&&this.form.setFieldValue(this.name,t.defaultValue,{dontUpdateMeta:!0}),this.store=new xf({value:this.getValue(),meta:this._getMeta()??{isValidating:!1,isTouched:!1,isBlurred:!1,isDirty:!1,isPristine:!0,errors:[],errorMap:{},...t.defaultMeta}},{onUpdate:()=>{const n=this.store.state;n.meta.errors=Object.values(n.meta.errorMap).filter(r=>r!==void 0),n.meta.isPristine=!n.meta.isDirty,this.prevState=n,this.state=n}}),this.state=this.store.state,this.prevState=this.state,this.options=t}runValidator(t){const n=[this.form.options.validatorAdapter,this.options.validatorAdapter];for(const r of n)if(r&&typeof t.validate!="function")return r()[t.type](t.value,t.validate);return t.validate(t.value)}setErrorMap(t){this.setMeta(n=>({...n,errorMap:{...n.errorMap,...t}}))}}function cu(e){if(e)return typeof e!="string"?"Invalid Form Values":e}function dr(e){switch(e){case"submit":return"onSubmit";case"blur":return"onBlur";case"mount":return"onMount";case"server":return"onServer";case"change":default:return"onChange"}}function du(e,t=n=>n){const[n,r]=bo({value:t(e.state)}),o=e.subscribe(()=>{const i=t(e.state);r("value",mc(i))});return W(()=>{o()}),()=>n.value}function E0(e){const[t,n]=j(!1),r=k(()=>[t(),e]),o=e.store.subscribe(()=>n(i=>!i));return W(o),()=>r()[1]}function Ef(e){const t=e(),n=new C0(t),r=n;return r.Field=Rf,Ft(()=>n.update(e())),Wn(()=>W(n.mount())),E0(r)}function Rf(e){const t=Ef(()=>{const{children:n,...r}=e;return r});return k(()=>b(()=>e.children(t),{}))}function R0(e){const t=e==null?void 0:e(),n=new x0(t),r=n;return r.Field=o=>b(Rf,F(o,{form:n})),r.createField=o=>Ef(()=>({...o(),form:n})),r.useStore=o=>du(n.store,o),r.Subscribe=o=>Fa(o.children,du(n.store,o.selector)),Wn(n.mount),Ft(()=>n.update(e==null?void 0:e())),r}var ui,fu;function P0(){if(fu)return ui;fu=1;class e{constructor(){this.max=1e3,this.map=new Map}get(n){const r=this.map.get(n);if(r!==void 0)return this.map.delete(n),this.map.set(n,r),r}delete(n){return this.map.delete(n)}set(n,r){if(!this.delete(n)&&r!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(n,r)}return this}}return ui=e,ui}var ci,hu;function Aa(){if(hu)return ci;hu=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return ci=r=>r?typeof r!="object"?e:r:t,ci}var ro={exports:{}},di,gu;function Ta(){if(gu)return di;gu=1;const e="2.0.0",t=256,n=Number.MAX_SAFE_INTEGER||9007199254740991,r=16,o=t-6;return di={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:n,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},di}var fi,pu;function ko(){if(pu)return fi;pu=1;var e={};return fi=typeof process=="object"&&e&&e.NODE_DEBUG&&/\bsemver\b/i.test(e.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},fi}var mu;function Da(){return mu||(mu=1,function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:r,MAX_LENGTH:o}=Ta(),i=ko();t=e.exports={};const s=t.re=[],a=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",o],[f,r]],p=v=>{for(const[m,y]of h)v=v.split(`${m}*`).join(`${m}{0,${y}}`).split(`${m}+`).join(`${m}{1,${y}}`);return v},g=(v,m,y)=>{const w=p(m),S=d++;i(v,S,m),u[v]=S,l[S]=m,c[S]=w,s[S]=new RegExp(m,y?"g":void 0),a[S]=new RegExp(w,y?"g":void 0)};g("NUMERICIDENTIFIER","0|[1-9]\\d*"),g("NUMERICIDENTIFIERLOOSE","\\d+"),g("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),g("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),g("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),g("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),g("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),g("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),g("BUILDIDENTIFIER",`${f}+`),g("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),g("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),g("FULL",`^${l[u.FULLPLAIN]}$`),g("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),g("LOOSE",`^${l[u.LOOSEPLAIN]}$`),g("GTLT","((?:<|>)?=?)"),g("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),g("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),g("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),g("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),g("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),g("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),g("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),g("COERCERTL",l[u.COERCE],!0),g("COERCERTLFULL",l[u.COERCEFULL],!0),g("LONETILDE","(?:~>?)"),g("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",g("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),g("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),g("LONECARET","(?:\\^)"),g("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",g("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),g("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),g("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),g("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),g("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",g("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),g("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),g("STAR","(<|>)?=?\\s*\\*"),g("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),g("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")}(ro,ro.exports)),ro.exports}var hi,vu;function I0(){if(vu)return hi;vu=1;const e=/^[0-9]+$/,t=(r,o)=>{const i=e.test(r),s=e.test(o);return i&&s&&(r=+r,o=+o),r===o?0:i&&!s?-1:s&&!i?1:r<o?-1:1};return hi={compareIdentifiers:t,rcompareIdentifiers:(r,o)=>t(o,r)},hi}var gi,yu;function _a(){if(yu)return gi;yu=1;const e=ko(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:n}=Ta(),{safeRe:r,t:o}=Da(),i=Aa(),{compareIdentifiers:s}=I0();class a{constructor(c,u){if(u=i(u),c instanceof a){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?r[o.LOOSE]:r[o.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>n||this.major<0)throw new TypeError("Invalid major version");if(this.minor>n||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>n||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h<n)return h}return f}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof a)){if(typeof c=="string"&&c===this.version)return 0;c=new a(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof a||(c=new a(c,this.options)),s(this.major,c.major)||s(this.minor,c.minor)||s(this.patch,c.patch)}comparePre(c){if(c instanceof a||(c=new a(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],f=c.prerelease[u];if(e("prerelease compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return s(d,f)}while(++u)}compareBuild(c){c instanceof a||(c=new a(c,this.options));let u=0;do{const d=this.build[u],f=c.build[u];if(e("build compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return s(d,f)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const f=`-${u}`.match(this.options.loose?r[o.PRERELEASELOOSE]:r[o.PRERELEASE]);if(!f||f[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];d===!1&&(h=[u]),s(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return gi=a,gi}var pi,wu;function nr(){if(wu)return pi;wu=1;const e=_a();return pi=(n,r,o)=>new e(n,o).compare(new e(r,o)),pi}var mi,bu;function $0(){if(bu)return mi;bu=1;const e=nr();return mi=(n,r,o)=>e(n,r,o)===0,mi}var vi,Su;function M0(){if(Su)return vi;Su=1;const e=nr();return vi=(n,r,o)=>e(n,r,o)!==0,vi}var yi,xu;function F0(){if(xu)return yi;xu=1;const e=nr();return yi=(n,r,o)=>e(n,r,o)>0,yi}var wi,Cu;function O0(){if(Cu)return wi;Cu=1;const e=nr();return wi=(n,r,o)=>e(n,r,o)>=0,wi}var bi,Eu;function A0(){if(Eu)return bi;Eu=1;const e=nr();return bi=(n,r,o)=>e(n,r,o)<0,bi}var Si,Ru;function T0(){if(Ru)return Si;Ru=1;const e=nr();return Si=(n,r,o)=>e(n,r,o)<=0,Si}var xi,Pu;function D0(){if(Pu)return xi;Pu=1;const e=$0(),t=M0(),n=F0(),r=O0(),o=A0(),i=T0();return xi=(a,l,c,u)=>{switch(l){case"===":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a===c;case"!==":return typeof a=="object"&&(a=a.version),typeof c=="object"&&(c=c.version),a!==c;case"":case"=":case"==":return e(a,c,u);case"!=":return t(a,c,u);case">":return n(a,c,u);case">=":return r(a,c,u);case"<":return o(a,c,u);case"<=":return i(a,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},xi}var Ci,Iu;function _0(){if(Iu)return Ci;Iu=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=n(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),s("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,s("comp",this)}parse(u){const d=this.options.loose?r[o.COMPARATORLOOSE]:r[o.COMPARATOR],f=u.match(d);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new a(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(s("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new a(u,this.options)}catch{return!1}return i(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=n(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||i(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||i(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}Ci=t;const n=Aa(),{safeRe:r,t:o}=Da(),i=D0(),s=ko(),a=_a(),l=Pf();return Ci}var Ei,$u;function Pf(){if($u)return Ei;$u=1;const e=/\s+/g;class t{constructor(E,x){if(x=o(x),E instanceof t)return E.loose===!!x.loose&&E.includePrerelease===!!x.includePrerelease?E:new t(E.raw,x);if(E instanceof i)return this.raw=E.value,this.set=[[E]],this.formatted=void 0,this;if(this.options=x,this.loose=!!x.loose,this.includePrerelease=!!x.includePrerelease,this.raw=E.trim().replace(e," "),this.set=this.raw.split("||").map(I=>this.parseRange(I.trim())).filter(I=>I.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const I=this.set[0];if(this.set=this.set.filter(M=>!g(M[0])),this.set.length===0)this.set=[I];else if(this.set.length>1){for(const M of this.set)if(M.length===1&&v(M[0])){this.set=[M];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let E=0;E<this.set.length;E++){E>0&&(this.formatted+="||");const x=this.set[E];for(let I=0;I<x.length;I++)I>0&&(this.formatted+=" "),this.formatted+=x[I].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(E){const I=((this.options.includePrerelease&&h)|(this.options.loose&&p))+":"+E,M=r.get(I);if(M)return M;const O=this.options.loose,L=O?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];E=E.replace(L,z(this.options.includePrerelease)),s("hyphen replace",E),E=E.replace(l[c.COMPARATORTRIM],u),s("comparator trim",E),E=E.replace(l[c.TILDETRIM],d),s("tilde trim",E),E=E.replace(l[c.CARETTRIM],f),s("caret trim",E);let B=E.split(" ").map(se=>y(se,this.options)).join(" ").split(/\s+/).map(se=>N(se,this.options));O&&(B=B.filter(se=>(s("loose invalid filter",se,this.options),!!se.match(l[c.COMPARATORLOOSE])))),s("range list",B);const U=new Map,Y=B.map(se=>new i(se,this.options));for(const se of Y){if(g(se))return[se];U.set(se.value,se)}U.size>1&&U.has("")&&U.delete("");const ce=[...U.values()];return r.set(I,ce),ce}intersects(E,x){if(!(E instanceof t))throw new TypeError("a Range is required");return this.set.some(I=>m(I,x)&&E.set.some(M=>m(M,x)&&I.every(O=>M.every(L=>O.intersects(L,x)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new a(E,this.options)}catch{return!1}for(let x=0;x<this.set.length;x++)if(re(this.set[x],E,this.options))return!0;return!1}}Ei=t;const n=P0(),r=new n,o=Aa(),i=_0(),s=ko(),a=_a(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=Da(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:p}=Ta(),g=P=>P.value==="<0.0.0-0",v=P=>P.value==="",m=(P,E)=>{let x=!0;const I=P.slice();let M=I.pop();for(;x&&I.length;)x=I.every(O=>M.intersects(O,E)),M=I.pop();return x},y=(P,E)=>(s("comp",P,E),P=$(P,E),s("caret",P),P=S(P,E),s("tildes",P),P=_(P,E),s("xrange",P),P=K(P,E),s("stars",P),P),w=P=>!P||P.toLowerCase()==="x"||P==="*",S=(P,E)=>P.trim().split(/\s+/).map(x=>C(x,E)).join(" "),C=(P,E)=>{const x=E.loose?l[c.TILDELOOSE]:l[c.TILDE];return P.replace(x,(I,M,O,L,B)=>{s("tilde",P,I,M,O,L,B);let U;return w(M)?U="":w(O)?U=`>=${M}.0.0 <${+M+1}.0.0-0`:w(L)?U=`>=${M}.${O}.0 <${M}.${+O+1}.0-0`:B?(s("replaceTilde pr",B),U=`>=${M}.${O}.${L}-${B} <${M}.${+O+1}.0-0`):U=`>=${M}.${O}.${L} <${M}.${+O+1}.0-0`,s("tilde return",U),U})},$=(P,E)=>P.trim().split(/\s+/).map(x=>A(x,E)).join(" "),A=(P,E)=>{s("caret",P,E);const x=E.loose?l[c.CARETLOOSE]:l[c.CARET],I=E.includePrerelease?"-0":"";return P.replace(x,(M,O,L,B,U)=>{s("caret",P,M,O,L,B,U);let Y;return w(O)?Y="":w(L)?Y=`>=${O}.0.0${I} <${+O+1}.0.0-0`:w(B)?O==="0"?Y=`>=${O}.${L}.0${I} <${O}.${+L+1}.0-0`:Y=`>=${O}.${L}.0${I} <${+O+1}.0.0-0`:U?(s("replaceCaret pr",U),O==="0"?L==="0"?Y=`>=${O}.${L}.${B}-${U} <${O}.${L}.${+B+1}-0`:Y=`>=${O}.${L}.${B}-${U} <${O}.${+L+1}.0-0`:Y=`>=${O}.${L}.${B}-${U} <${+O+1}.0.0-0`):(s("no pr"),O==="0"?L==="0"?Y=`>=${O}.${L}.${B}${I} <${O}.${L}.${+B+1}-0`:Y=`>=${O}.${L}.${B}${I} <${O}.${+L+1}.0-0`:Y=`>=${O}.${L}.${B} <${+O+1}.0.0-0`),s("caret return",Y),Y})},_=(P,E)=>(s("replaceXRanges",P,E),P.split(/\s+/).map(x=>T(x,E)).join(" ")),T=(P,E)=>{P=P.trim();const x=E.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return P.replace(x,(I,M,O,L,B,U)=>{s("xRange",P,I,M,O,L,B,U);const Y=w(O),ce=Y||w(L),se=ce||w(B),Oe=se;return M==="="&&Oe&&(M=""),U=E.includePrerelease?"-0":"",Y?M===">"||M==="<"?I="<0.0.0-0":I="*":M&&Oe?(ce&&(L=0),B=0,M===">"?(M=">=",ce?(O=+O+1,L=0,B=0):(L=+L+1,B=0)):M==="<="&&(M="<",ce?O=+O+1:L=+L+1),M==="<"&&(U="-0"),I=`${M+O}.${L}.${B}${U}`):ce?I=`>=${O}.0.0${U} <${+O+1}.0.0-0`:se&&(I=`>=${O}.${L}.0${U} <${O}.${+L+1}.0-0`),s("xRange return",I),I})},K=(P,E)=>(s("replaceStars",P,E),P.trim().replace(l[c.STAR],"")),N=(P,E)=>(s("replaceGTE0",P,E),P.trim().replace(l[E.includePrerelease?c.GTE0PRE:c.GTE0],"")),z=P=>(E,x,I,M,O,L,B,U,Y,ce,se,Oe)=>(w(I)?x="":w(M)?x=`>=${I}.0.0${P?"-0":""}`:w(O)?x=`>=${I}.${M}.0${P?"-0":""}`:L?x=`>=${x}`:x=`>=${x}${P?"-0":""}`,w(Y)?U="":w(ce)?U=`<${+Y+1}.0.0-0`:w(se)?U=`<${Y}.${+ce+1}.0-0`:Oe?U=`<=${Y}.${ce}.${se}-${Oe}`:P?U=`<${Y}.${ce}.${+se+1}-0`:U=`<=${U}`,`${x} ${U}`.trim()),re=(P,E,x)=>{for(let I=0;I<P.length;I++)if(!P[I].test(E))return!1;if(E.prerelease.length&&!x.includePrerelease){for(let I=0;I<P.length;I++)if(s(P[I].semver),P[I].semver!==i.ANY&&P[I].semver.prerelease.length>0){const M=P[I].semver;if(M.major===E.major&&M.minor===E.minor&&M.patch===E.patch)return!0}return!1}return!0};return Ei}var Ri,Mu;function L0(){if(Mu)return Ri;Mu=1;const e=Pf();return Ri=(n,r)=>{try{return new e(n,r).range||"*"}catch{return null}},Ri}var k0=L0();const Fu=Sd(k0);var Ou=ie("<div>"),V0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Platform: <p class="ml-2 flex flex-row items-center"> iOS'),N0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Platform: <p class="ml-2 flex flex-row items-center"> Android'),K0=ie('<form class="flex flex-col gap-3"><div></div><div><div class="flex items-center space-x-2"></div><p class="text-xs text-muted-foreground mt-[2px]">When disabled, this update will not be available to your users.</p></div><div><div class="flex items-center space-x-2"></div><p class="text-xs text-muted-foreground mt-[2px]">When enabled, this update will require users to update before continuing to use the application.</p></div><div class="mt-2 space-y-1"><h3 class="text-md text-bold font-medium">Metadata'),j0=ie('<em class="text-xs text-red-500">'),z0=ie('<em class="text-xs text-muted-foreground">'),B0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">App Version: <p class=ml-2>'),H0=ie('<div class="text-sm text-muted-foreground flex flex-row items-center">Commit Hash: '),G0=ie("<a target=_blank rel=noreferrer class=ml-2>"),U0=ie("<p class=ml-2>");const q0=({bundleId:e,onClose:t})=>{const n=Xb(e);return b(qm,{class:"flex flex-col h-full",get children(){return[b(Wm,{class:"mb-4",get children(){return b(Xm,{get children(){return["Edit ",e]}})}}),b(pe,{get when(){return n.data},get fallback(){return k(()=>!!n.isFetched)()?b(Qm,{get children(){return["No update bundle found for bundle id ",e]}}):b(o0,{height:374,radius:10})},children:r=>b(W0,{get bundle(){return r()},onEditSuccess:t})})]}})},W0=({bundle:e,onEditSuccess:t})=>{const n=Ic(),r=Qb(),[o,i]=j(!1),s=k(()=>{var u,d;return((d=(u=r.data)==null?void 0:u.console)==null?void 0:d.gitUrl)??null}),a=k(()=>e.gitCommitHash),l=R0(()=>({defaultValues:{message:e.message,targetAppVersion:e.targetAppVersion,enabled:e.enabled,shouldForceUpdate:e.shouldForceUpdate},onSubmit:async({value:u})=>{i(!0);try{const d=await jr.bundles[":bundleId"].$patch({param:{bundleId:e.id},json:u});if(d.status!==200){const f=await d.json();vl({title:"Error",description:f.error,variant:"error"})}}catch(d){d instanceof Error&&vl({title:"Error",description:d.message,variant:"error"})}finally{i(!1),n.invalidateQueries({queryKey:["bundle",e.id]}),n.invalidateQueries({queryKey:["bundles"]}),t()}}})),c=l.useStore(u=>u.isValid);return(()=>{var u=K0(),d=u.firstChild,f=d.nextSibling,h=f.firstChild,p=f.nextSibling,g=p.firstChild,v=p.nextSibling;return v.firstChild,u.addEventListener("submit",m=>{m.preventDefault(),m.stopPropagation(),l.handleSubmit()}),X(d,b(oi,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(si,{for:"message",children:"Message"}),b(l.Field,{name:"message",children:m=>b(ii,{type:"text",id:"message",placeholder:"Message",get name(){return m().name},get value(){return m().state.value??""},get onBlur(){return m().handleBlur},onInput:y=>m().handleChange(y.currentTarget.value)})})]}})),X(u,b(pe,{get when(){return e.targetAppVersion},get children(){var m=Ou();return X(m,b(oi,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(si,{for:"targetAppVersion",children:"Target App Version"}),b(l.Field,{name:"targetAppVersion",validators:{onChange:({value:y})=>{if((y==null?void 0:y.length)===0||!Fu(y))return"Invalid target app version"}},children:y=>[b(ii,{type:"text",id:"targetAppVersion",get class(){return de(y().state.meta.errors.length>0&&"border-red-500 focus-visible:ring-red-500")},placeholder:"Target App Version",get name(){return y().name},get value(){return y().state.value??""},get onBlur(){return y().handleBlur},onInput:w=>y().handleChange(w.currentTarget.value)}),k(()=>k(()=>y().state.meta.errors.length>0)()?(()=>{var w=j0();return X(w,()=>y().state.meta.errors.join(", ")),w})():(()=>{var w=z0();return X(w,()=>Fu(y().state.value)),w})())]})]}})),m}}),f),X(u,b(pe,{get when(){return e.fingerprintHash},get children(){var m=Ou();return X(m,b(oi,{class:"grid w-full max-w-sm items-center gap-1.5",get children(){return[b(si,{for:"fingerprintHash",children:"Fingerprint Hash"}),b(ii,{type:"text",id:"fingerprintHash",get value(){return e.fingerprintHash??""},disabled:!0})]}})),m}}),f),X(h,b(l.Field,{name:"enabled",children:m=>b(su,{class:"flex items-center space-x-2",get checked(){return m().state.value},get name(){return m().name},onChange:y=>m().handleChange(y),get children(){return[b(au,{get children(){return b(lu,{})}}),b(uu,{children:"Enabled"})]}})})),X(g,b(l.Field,{name:"shouldForceUpdate",children:m=>b(su,{class:"flex items-center space-x-2",get checked(){return m().state.value},get name(){return m().name},onChange:y=>m().handleChange(y),get children(){return[b(au,{get children(){return b(lu,{})}}),b(uu,{children:"Force Update"})]}})})),X(u,b(pe,{get when(){return!o()},get fallback(){return b(ou,{type:"submit",class:"mt-4",disabled:!0,get children(){return b(Sy,{class:"animate-spin"})}})},get children(){return b(ou,{type:"submit",class:"mt-4",get disabled(){return!c()},children:"Save"})}}),v),X(v,b(pe,{get when(){return e.platform==="ios"},get children(){var m=V0(),y=m.firstChild,w=y.nextSibling,S=w.firstChild;return X(w,b(ld,{class:"inline-block"}),S),m}}),null),X(v,b(pe,{get when(){return e.platform==="android"},get children(){var m=N0(),y=m.firstChild,w=y.nextSibling,S=w.firstChild;return X(w,b(ad,{class:"inline-block"}),S),m}}),null),X(v,b(pe,{get when(){var m;return(m=e.metadata)==null?void 0:m.app_version},children:m=>(()=>{var y=B0(),w=y.firstChild,S=w.nextSibling;return X(S,m),y})()}),null),X(v,b(pe,{get when(){return a()},children:m=>(()=>{var y=H0();return y.firstChild,X(y,(()=>{var w=k(()=>!!s());return()=>w()?(()=>{var S=G0();return X(S,()=>m().slice(0,8)),je(()=>Hn(S,"href",`${s()}/commit/${m}`)),S})():(()=>{var S=U0();return X(S,()=>m().slice(0,8)),S})()})(),null),y})()}),null),u})()};function X0(){const{bundleIdFilter:e,setBundleIdFilter:t}=id(),n=k(()=>e()!==null),r=()=>{t(null)};return b(zm,{get open(){return n()},onOpenChange:o=>{o||t(null)},get children(){return[b(t0,{columns:Fy,onRowClick:o=>{t(o.id)}}),b(pe,{get when(){return e()},get children(){return b(Gf,{get children(){return b(q0,{get bundleId(){return e()},onClose:r})}})}})]}})}const Q0=new Rg;function Y0(){return b(Pg,{client:Q0,get children(){return[b(Qh,{root:e=>b(vh,{get children(){return[b(bh,{children:"HotUpdater Console"}),b(rg,{get children(){return e.children}})]}}),get children(){return b(Bh,{path:"/",component:X0})}}),b(bm,{})]}})}const Au=document.getElementById("root");Au&&nh(()=>b(Y0,{}),Au);
|