ocean-brain 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -0
- package/package.json +2 -1
- package/server/client/dist/assets/{Calendar-CSXEuWmQ.js → Calendar-D4KkvcU8.js} +1 -1
- package/server/client/dist/assets/{Callout-Ap1OcxWN.js → Callout-CaSzc-1y.js} +1 -1
- package/server/client/dist/assets/{Graph-C0Ax9qjI.js → Graph-C8pBdJzV.js} +1 -1
- package/server/client/dist/assets/{Image-CSbcG-5a.js → Image-DlJ4MDo3.js} +1 -1
- package/server/client/dist/assets/{Image.es-Fbe7aDDo.js → Image.es-C8g5NwNt.js} +1 -1
- package/server/client/dist/assets/Note-ODOESft3.js +21 -0
- package/server/client/dist/assets/Plus.es-Bkl1ZXE0.js +1 -0
- package/server/client/dist/assets/Reminders-FrTR9ny8.js +1 -0
- package/server/client/dist/assets/Search-BPf2LO1Y.js +1 -0
- package/server/client/dist/assets/{SurfaceCard-Br6TjX5W.js → SurfaceCard-WSk7zWeM.js} +1 -1
- package/server/client/dist/assets/Tag-uArdLjo1.js +1 -0
- package/server/client/dist/assets/TagNotes-DDvXHB9I.js +1 -0
- package/server/client/dist/assets/{Trash.es-BfCEiL3-.js → Trash.es-DumPfiUz.js} +1 -1
- package/server/client/dist/assets/ViewNotes-BVu9lEs-.js +1 -0
- package/server/client/dist/assets/Views-D4LGh30P.js +1 -0
- package/server/client/dist/assets/{image.api-DGXlQ_Ca.js → image.api-D3Ei3fbf.js} +1 -1
- package/server/client/dist/assets/index-46ZUXbW5.js +232 -0
- package/server/client/dist/assets/{index-B28TO4FC.js → index-C7YGbIuA.js} +1 -1
- package/server/client/dist/assets/{index-Bm9l_L20.css → index-D2gRB1ig.css} +1 -1
- package/server/client/dist/assets/manage-image-DiuREdeE.js +1 -0
- package/server/client/dist/assets/{manage-image-detail-hk6jWyiB.js → manage-image-detail-D8Eorq3u.js} +1 -1
- package/server/client/dist/assets/{mcp-CSjmBjFR.js → mcp-CvCGaYSz.js} +1 -1
- package/server/client/dist/assets/{note-vendor-5N5mRkIT.js → note-vendor-B0t5F04o.js} +3 -3
- package/server/client/dist/assets/{placeholder-Bmiowo28.js → placeholder-znZDfNAE.js} +4 -4
- package/server/client/dist/assets/trash-R0sww0ur.js +1 -0
- package/server/client/dist/assets/{useReminderMutate-DsIvVpCQ.js → useReminderMutate-Bkj-oIm4.js} +2 -2
- package/server/client/dist/assets/{view-dashboard-CP8nhfxQ.js → view-dashboard-ClpF_qLM.js} +1 -1
- package/server/client/dist/index.html +3 -3
- package/server/dist/app.js +1 -1
- package/server/dist/app.js.map +1 -1
- package/server/dist/features/auth/http/api.js +2 -5
- package/server/dist/features/auth/http/api.js.map +1 -1
- package/server/dist/features/auth/http/login-page.js +1 -1
- package/server/dist/features/auth/http/pages.js +1 -1
- package/server/dist/features/auth/http/pages.js.map +1 -1
- package/server/dist/features/auth/service.js +11 -42
- package/server/dist/features/auth/service.js.map +1 -1
- package/server/dist/features/note/graphql/note.query.resolver.js +4 -1
- package/server/dist/features/note/graphql/note.query.resolver.js.map +1 -1
- package/server/dist/features/note/graphql/note.type-defs.js +3 -0
- package/server/dist/features/note/graphql/note.type-defs.js.map +1 -1
- package/server/dist/features/note/services/trash.js +37 -12
- package/server/dist/features/note/services/trash.js.map +1 -1
- package/server/dist/modules/auth-guard.js +13 -19
- package/server/dist/modules/auth-guard.js.map +1 -1
- package/server/dist/modules/auth-mode.js +16 -39
- package/server/dist/modules/auth-mode.js.map +1 -1
- package/server/dist/routes/client.js +2 -2
- package/server/dist/routes/client.js.map +1 -1
- package/server/client/dist/assets/ModalActionRow-DjI5b4bl.js +0 -1
- package/server/client/dist/assets/Note-BY6WgYLq.js +0 -1
- package/server/client/dist/assets/Reminders-vRksvSQE.js +0 -1
- package/server/client/dist/assets/Search-Cq4tuiJO.js +0 -1
- package/server/client/dist/assets/Tag-ARDLA-Pb.js +0 -1
- package/server/client/dist/assets/TagNotes-CDGVrCJU.js +0 -1
- package/server/client/dist/assets/ViewNotes-ZBOQ1adH.js +0 -1
- package/server/client/dist/assets/Views-DQHPfdwM.js +0 -1
- package/server/client/dist/assets/index-Bsx4P7EA.js +0 -210
- package/server/client/dist/assets/manage-image-Dg297A_h.js +0 -1
- package/server/client/dist/assets/trash-CM7SbVtW.js +0 -1
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Calendar-D4KkvcU8.js","assets/note-vendor-B0t5F04o.js","assets/graph-vendor-CUxe67Lr.js","assets/note-core-GgFcksAF.js","assets/Callout-CaSzc-1y.js","assets/Views-D4LGh30P.js","assets/view-dashboard-ClpF_qLM.js","assets/SurfaceCard-WSk7zWeM.js","assets/Plus.es-Bkl1ZXE0.js","assets/Reminders-FrTR9ny8.js","assets/useReminderMutate-Bkj-oIm4.js","assets/Graph-C8pBdJzV.js","assets/Search-BPf2LO1Y.js","assets/Tag-uArdLjo1.js","assets/Note-ODOESft3.js","assets/image.api-D3Ei3fbf.js","assets/Note-W4f6H9K0.css","assets/TagNotes-DDvXHB9I.js","assets/ViewNotes-BVu9lEs-.js","assets/index-C7YGbIuA.js","assets/Trash.es-DumPfiUz.js","assets/Image.es-C8g5NwNt.js","assets/mcp-CvCGaYSz.js","assets/trash-R0sww0ur.js","assets/manage-image-DiuREdeE.js","assets/Image-DlJ4MDo3.js","assets/manage-image-detail-D8Eorq3u.js","assets/placeholder-znZDfNAE.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{j as h,w as Fp,r as Ht,R as ql,a as Ba,c as kp,u as $p,o as Hp,s as Bp,f as Vp,b as Zp,d as Up,h as zp,e as qp,l as Kp,_ as Ke,g as Wp}from"./note-vendor-B0t5F04o.js";import{a as c,R as Uo,N as P,g as qn,r as Gp,P as be}from"./graph-vendor-CUxe67Lr.js";import"./note-core-GgFcksAF.js";(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 s of o)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=n(o);fetch(o.href,s)}})();const Va={DARK:"(prefers-color-scheme: dark)",LIGHT:"(prefers-color-scheme: light)",RETINA:"(min-resolution: 2dppx)",RESPONSIVE:e=>`screen and (max-width: ${e})`},Kl=e=>typeof window<"u"&&window.matchMedia?window.matchMedia(e):null,Za=(e,t,n=!0)=>{const r=Kl(e);n&&t(r?.matches||!1);const o=s=>{t?.(s.matches)};return r?.addEventListener("change",o),()=>{r?.removeEventListener("change",o)}},Qp=(e,t=!0)=>Za(Va.DARK,e,t),Yp=(e,t,n=!0)=>Za(Va.RESPONSIVE(e),t,n),Xp={MEDIA_QUERY:Va,listenThemeChange:Qp,listenResponsiveChange:Yp,createMediaQuery:Kl,listenMediaQueryChange:Za};var we=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(we||{});function Wl({update:e,notify:t,unwatched:n}){return{link:r,unlink:o,propagate:s,checkDirty:a,shallowPropagate:i};function r(u,f,d){const p=f.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:f.deps;if(m!==void 0&&m.dep===u){m.version=d,f.depsTail=m;return}const g=u.subsTail;if(g!==void 0&&g.version===d&&g.sub===f)return;const v=f.depsTail=u.subsTail={version:d,dep:u,sub:f,prevDep:p,nextDep:m,prevSub:g,nextSub:void 0};m!==void 0&&(m.prevDep=v),p!==void 0?p.nextDep=v:f.deps=v,g!==void 0?g.nextSub=v:u.subs=v}function o(u,f=u.sub){const d=u.dep,p=u.prevDep,m=u.nextDep,g=u.nextSub,v=u.prevSub;return m!==void 0?m.prevDep=p:f.depsTail=p,p!==void 0?p.nextDep=m:f.deps=m,g!==void 0?g.prevSub=v:d.subsTail=v,v!==void 0?v.nextSub=g:(d.subs=g)===void 0&&n(d),m}function s(u){let f=u.nextSub,d;e:do{const p=u.sub;let m=p.flags;if(m&60?m&12?m&4?!(m&48)&&l(u,p)?(p.flags=m|40,m&=1):m=0:p.flags=m&-9|32:m=0:p.flags=m|32,m&2&&t(p),m&1){const g=p.subs;if(g!==void 0){const v=(u=g).nextSub;v!==void 0&&(d={value:f,prev:d},f=v);continue}}if((u=f)!==void 0){f=u.nextSub;continue}for(;d!==void 0;)if(u=d.value,d=d.prev,u!==void 0){f=u.nextSub;continue e}break}while(!0)}function a(u,f){let d,p=0,m=!1;e:do{const g=u.dep,v=g.flags;if(f.flags&16)m=!0;else if((v&17)===17){if(e(g)){const y=g.subs;y.nextSub!==void 0&&i(y),m=!0}}else if((v&33)===33){(u.nextSub!==void 0||u.prevSub!==void 0)&&(d={value:u,prev:d}),u=g.deps,f=g,++p;continue}if(!m){const y=u.nextDep;if(y!==void 0){u=y;continue}}for(;p--;){const y=f.subs,b=y.nextSub!==void 0;if(b?(u=d.value,d=d.prev):u=y,m){if(e(f)){b&&i(y),f=u.sub;continue}m=!1}else f.flags&=-33;f=u.sub;const x=u.nextDep;if(x!==void 0){u=x;continue e}}return m}while(!0)}function i(u){do{const f=u.sub,d=f.flags;(d&48)===32&&(f.flags=d|16,(d&6)===2&&t(f))}while((u=u.nextSub)!==void 0)}function l(u,f){let d=f.depsTail;for(;d!==void 0;){if(d===u)return!0;d=d.prevDep}return!1}}let Ua=0,on=0,pr=0;const kt=[],{link:gC,unlink:Gl,propagate:vC,checkDirty:Jp,shallowPropagate:yC}=Wl({update(e){return e.depsTail!==void 0?r1(e):o1(e)},notify(e){let t=pr,n=t;do if(kt[t++]=e,e.flags&=-3,e=e.subs?.sub,e===void 0||!(e.flags&2))break;while(!0);for(pr=t;n<--t;){const r=kt[n];kt[n++]=kt[t],kt[t]=r}},unwatched(e){e.flags&1?e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=17,zo(e)):i1.call(e)}});function e1(){return Ua}function t1(){++Ua}function n1(){--Ua||a1()}function r1(e){e.depsTail=void 0,e.flags=5;try{const t=e.value;return t!==(e.value=e.getter(t))}finally{e.flags&=-5,zo(e)}}function o1(e){return e.flags=1,e.currentValue!==(e.currentValue=e.pendingValue)}function s1(e){const t=e.flags;if(t&16||t&32&&Jp(e.deps,e)){e.depsTail=void 0,e.flags=6;try{e.fn()}finally{e.flags&=-5,zo(e)}}else e.flags=2}function a1(){try{for(;on<pr;){const e=kt[on];kt[on++]=void 0,s1(e)}}finally{for(;on<pr;){const e=kt[on];kt[on++]=void 0,e.flags|=10}on=0,pr=0}}function i1(){this.depsTail=void 0,this.flags=0,zo(this);const e=this.subs;e!==void 0&&Gl(e)}function zo(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=Gl(n,e)}function za(e,t,n){const r=typeof e=="object",o=r?e:void 0;return{next:(r?e.next:e)?.bind(o),error:(r?e.error:t)?.bind(o),complete:(r?e.complete:n)?.bind(o)}}const ra=[];let lo=0;const{link:Gi,unlink:c1,propagate:l1,checkDirty:Ql,shallowPropagate:Qi}=Wl({update(e){return e._update()},notify(e){ra[oa++]=e,e.flags&=~we.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=we.Mutable|we.Dirty,bo(e))}});let Qr=0,oa=0,At;function bo(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=c1(n,e)}function Yl(){if(!(e1()>0)){for(;Qr<oa;){const e=ra[Qr];ra[Qr++]=void 0,e.notify()}Qr=0,oa=0}}function Xl(e,t){const n=typeof e=="function",r=e,o={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?we.None:we.Mutable,get(){return At!==void 0&&Gi(o,At,lo),o._snapshot},subscribe(s){const a=za(s),i={current:!1},l=u1(()=>{o.get(),i.current?a.next?.(o._snapshot):i.current=!0});return{unsubscribe:()=>{l.stop()}}},_update(s){const a=At,i=Object.is;if(n)At=o,++lo,o.depsTail=void 0;else if(s===void 0)return!1;n&&(o.flags=we.Mutable|we.RecursedCheck);try{const l=o._snapshot,u=typeof s=="function"?s(l):s===void 0&&n?r(l):s;return l===void 0||!i(l,u)?(o._snapshot=u,!0):!1}finally{At=a,n&&(o.flags&=~we.RecursedCheck),bo(o)}}};return n?(o.flags=we.Mutable|we.Dirty,o.get=function(){const s=o.flags;if(s&we.Dirty||s&we.Pending&&Ql(o.deps,o)){if(o._update()){const a=o.subs;a!==void 0&&Qi(a)}}else s&we.Pending&&(o.flags=s&~we.Pending);return At!==void 0&&Gi(o,At,lo),o._snapshot}):o.set=function(s){if(o._update(s)){const a=o.subs;a!==void 0&&(l1(a),Qi(a),Yl())}},o}function u1(e){const t=()=>{const r=At;At=n,++lo,n.depsTail=void 0,n.flags=we.Watching|we.RecursedCheck;try{return e()}finally{At=r,n.flags&=~we.RecursedCheck,bo(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:we.Watching|we.RecursedCheck,notify(){const r=this.flags;r&we.Dirty||r&we.Pending&&Ql(this.deps,this)?t():this.flags=we.Watching},stop(){this.flags=we.None,this.depsTail=void 0,bo(this)}};return t(),n}class d1{constructor(t){this.atom=Xl(t)}setState(t){this.atom.set(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(za(t))}}class f1{constructor(t){this.atom=Xl(t)}get state(){return this.atom.get()}get(){return this.state}subscribe(t){return this.atom.subscribe(za(t))}}function h1(e){return typeof e=="function"?new f1(e):new d1(e)}function p1(e){try{t1(),e()}finally{n1(),Yl()}}const Yt="__TSR_index",Yi="popstate",Xi="beforeunload";function m1(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(i=>i({location:t,action:a}))},o=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},s=async({task:a,navigateOpts:i,...l})=>{if(i?.ignoreBlocker??!1){a();return}const f=e.getBlockers?.()??[],d=l.type==="PUSH"||l.type==="REPLACE";if(typeof document<"u"&&f.length&&d)for(const p of f){const m=xo(l.path,l.state);if(await p.blockerFn({currentLocation:t,nextLocation:m,action:l.type})){e.onBlocked?.();return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,i,l)=>{const u=t.state[Yt];i=Ji(u+1,i),s({task:()=>{e.pushState(a,i),r({type:"PUSH"})},navigateOpts:l,type:"PUSH",path:a,state:i})},replace:(a,i,l)=>{const u=t.state[Yt];i=Ji(u,i),s({task:()=>{e.replaceState(a,i),r({type:"REPLACE"})},navigateOpts:l,type:"REPLACE",path:a,state:i})},go:(a,i)=>{s({task:()=>{e.go(a),o({type:"GO",index:a})},navigateOpts:i,type:"GO"})},back:a=>{s({task:()=>{e.back(a?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{s({task:()=>{e.forward(a?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[Yt]!==0,createHref:a=>e.createHref(a),block:a=>{if(!e.setBlockers)return()=>{};const i=e.getBlockers?.()??[];return e.setBlockers([...i,a]),()=>{const l=e.getBlockers?.()??[];e.setBlockers?.(l.filter(u=>u!==a))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function Ji(e,t){t||(t={});const n=qa();return{...t,key:n,__TSR_key:n,[Yt]:e}}function g1(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let o=[];const s=()=>o,a=S=>o=S,i=(S=>S),l=(()=>xo(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const S=qa();t.history.replaceState({[Yt]:0,key:S,__TSR_key:S},"")}let u=l(),f,d=!1,p=!1,m=!1,g=!1;const v=()=>u;let y,b;const x=()=>{y&&(R._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),R._ignoreSubscribers=!1,y=void 0,b=void 0,f=void 0)},w=(S,_,D)=>{const M=i(_);b||(f=u),u=xo(_,D),y={href:M,state:D,isPush:y?.isPush||S==="push"},b||(b=Promise.resolve().then(()=>x()))},E=S=>{u=l(),R.notify({type:S})},A=async()=>{if(p){p=!1;return}const S=l(),_=S.state[Yt]-u.state[Yt],D=_===1,M=_===-1,k=!D&&!M||d;d=!1;const Z=k?"GO":M?"BACK":"FORWARD",j=k?{type:"GO",index:_}:{type:M?"BACK":"FORWARD"};if(m)m=!1;else{const F=s();if(typeof document<"u"&&F.length){for(const C of F)if(await C.blockerFn({currentLocation:u,nextLocation:S,action:Z})){p=!0,t.history.go(1),R.notify(j);return}}}u=l(),R.notify(j)},N=S=>{if(g){g=!1;return}let _=!1;const D=s();if(typeof document<"u"&&D.length)for(const M of D){const k=M.enableBeforeUnload??!0;if(k===!0){_=!0;break}if(typeof k=="function"&&k()===!0){_=!0;break}}if(_)return S.preventDefault(),S.returnValue=""},R=m1({getLocation:v,getLength:()=>t.history.length,pushState:(S,_)=>w("push",S,_),replaceState:(S,_)=>w("replace",S,_),back:S=>(S&&(m=!0),g=!0,t.history.back()),forward:S=>{S&&(m=!0),g=!0,t.history.forward()},go:S=>{d=!0,t.history.go(S)},createHref:S=>i(S),flush:x,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Xi,N,{capture:!0}),t.removeEventListener(Yi,A)},onBlocked:()=>{f&&u!==f&&(u=f)},getBlockers:s,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(Xi,N,{capture:!0}),t.addEventListener(Yi,A),t.history.pushState=function(...S){const _=n.apply(t.history,S);return R._ignoreSubscribers||E("PUSH"),_},t.history.replaceState=function(...S){const _=r.apply(t.history,S);return R._ignoreSubscribers||E("REPLACE"),_},R}function v1(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function xo(e,t){const n=v1(e),r=n.indexOf("#"),o=n.indexOf("?"),s=qa();return{href:n,pathname:n.substring(0,r>0?o>0?Math.min(r,o):r:o>0?o:n.length),hash:r>-1?n.substring(r):"",search:o>-1?n.slice(o,r===-1?void 0:r):"",state:t||{[Yt]:0,key:s,__TSR_key:s}}}function qa(){return(Math.random()+1).toString(36).substring(7)}const y1=!1;function mr(e){let t;return p1(()=>{t=e()}),t}function xr(e){return e[e.length-1]}function b1(e){return typeof e=="function"}function Gt(e,t){return b1(e)?e(t):e}const x1=Object.prototype.hasOwnProperty,ec=Object.prototype.propertyIsEnumerable;function st(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=t,o=rc(e)&&rc(r);if(!o&&!(wo(e)&&wo(r)))return r;const s=o?e:tc(e);if(!s)return r;const a=o?r:tc(r);if(!a)return r;const i=s.length,l=a.length,u=o?new Array(l):{};let f=0;for(let d=0;d<l;d++){const p=o?d:a[d],m=e[p],g=r[p];if(m===g){u[p]=m,(o?d<i:x1.call(e,p))&&f++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){u[p]=g;continue}const v=st(m,g,n+1);u[p]=v,v===m&&f++}return i===l&&f===i?e:u}function tc(e){const t=Object.getOwnPropertyNames(e);for(const o of t)if(!ec.call(e,o))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const o of n){if(!ec.call(e,o))return!1;r.push(o)}return r}function wo(e){if(!nc(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!nc(n)||!n.hasOwnProperty("isPrototypeOf"))}function nc(e){return Object.prototype.toString.call(e)==="[object Object]"}function rc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function dn(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,o=e.length;r<o;r++)if(!dn(e[r],t[r],n))return!1;return!0}if(wo(e)&&wo(t)){const r=n?.ignoreUndefined??!0;if(n?.partial){for(const a in t)if((!r||t[a]!==void 0)&&!dn(e[a],t[a],n))return!1;return!0}let o=0;if(!r)o=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&o++;let s=0;for(const a in t)if((!r||t[a]!==void 0)&&(s++,s>o||!dn(e[a],t[a],n)))return!1;return o===s}return!1}function Bn(e){let t,n;const r=new Promise((o,s)=>{t=o,n=s});return r.status="pending",r.resolve=o=>{r.status="resolved",r.value=o,t(o),e?.(o)},r.reject=o=>{r.status="rejected",n(o)},r}function w1(e){return typeof e?.message!="string"?!1:e.message.startsWith("Failed to fetch dynamically imported module")||e.message.startsWith("error loading dynamically imported module")||e.message.startsWith("Importing a module script failed")}function wr(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function E1(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function oc(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return E1(t)}const S1=["http:","https:","mailto:","tel:"];function Eo(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function sr(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",o;for(;(o=t.exec(e))!==null;)r+=oc(e.slice(n,o.index))+o[0],n=t.lastIndex;r=r+oc(n?e.slice(n):e);let s=!1;return r.startsWith("//")&&(s=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:s}}function R1(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}var C1="Invariant failed";function en(e,t){if(!e)throw new Error(C1)}function So(e){const t=new Map;let n,r;const o=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,r&&(r.next=s,s.prev=r)):(s.next.prev=void 0,n=s.next,s.next=void 0,r&&(s.prev=r,r.next=s)),r=s)};return{get(s){const a=t.get(s);if(a)return o(a),a.value},set(s,a){if(t.size>=e&&n){const l=n;t.delete(l.key),l.next&&(n=l.next,l.next.prev=void 0),l===r&&(r=void 0)}const i=t.get(s);if(i)i.value=a,o(i);else{const l={key:s,value:a,prev:r};r&&(r.next=l),r=l,n||(n=l),t.set(s,l)}},clear(){t.clear(),n=void 0,r=void 0}}}const Vn=0,mn=1,gn=2,Er=3,an=4,Jl=5;function A1(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function Ka(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),o=r===-1?e.length:r,s=e.substring(t,o);if(!s||!s.includes("$"))return n[0]=Vn,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n;if(s==="$"){const i=e.length;return n[0]=gn,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}if(s.charCodeAt(0)===36)return n[0]=mn,n[1]=t,n[2]=t+1,n[3]=o,n[4]=o,n[5]=o,n;const a=A1(s);if(a){const[i,l]=a,u=s.charCodeAt(i+1);if(u===45){if(i+2<s.length&&s.charCodeAt(i+2)===36){const f=i+3,d=l;if(f<d)return n[0]=Er,n[1]=t+i,n[2]=t+f,n[3]=t+d,n[4]=t+l+1,n[5]=o,n}}else if(u===36){const f=i+1,d=i+2;return d===l?(n[0]=gn,n[1]=t+i,n[2]=t+f,n[3]=t+d,n[4]=t+l+1,n[5]=e.length,n):(n[0]=mn,n[1]=t+i,n[2]=t+d,n[3]=t+l,n[4]=t+l+1,n[5]=o,n)}}return n[0]=Vn,n[1]=t,n[2]=t,n[3]=o,n[4]=o,n[5]=o,n}function qo(e,t,n,r,o,s,a){a?.(n);let i=r;{const l=n.fullPath??n.from,u=l.length,f=n.options?.caseSensitive??e,d=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;i<u;){const m=Ka(l,i,t);let g;const v=i,y=m[5];switch(i=y+1,s++,m[0]){case Vn:{const x=l.substring(m[2],m[3]);if(f){const w=o.static?.get(x);if(w)g=w;else{o.static??=new Map;const E=cn(n.fullPath??n.from);E.parent=o,E.depth=s,g=E,o.static.set(x,E)}}else{const w=x.toLowerCase(),E=o.staticInsensitive?.get(w);if(E)g=E;else{o.staticInsensitive??=new Map;const A=cn(n.fullPath??n.from);A.parent=o,A.depth=s,g=A,o.staticInsensitive.set(w,A)}}break}case mn:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),A=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=!d&&o.dynamic?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===A&&S.suffix===N);if(R)g=R;else{const S=Ms(mn,n.fullPath??n.from,E,A,N);g=S,S.depth=s,S.parent=o,o.dynamic??=[],o.dynamic.push(S)}break}case Er:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),A=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=!d&&o.optional?.find(S=>!S.skipOnParamError&&S.caseSensitive===E&&S.prefix===A&&S.suffix===N);if(R)g=R;else{const S=Ms(Er,n.fullPath??n.from,E,A,N);g=S,S.parent=o,S.depth=s,o.optional??=[],o.optional.push(S)}break}case gn:{const x=l.substring(v,m[1]),w=l.substring(m[4],y),E=f&&!!(x||w),A=x?E?x:x.toLowerCase():void 0,N=w?E?w:w.toLowerCase():void 0,R=Ms(gn,n.fullPath??n.from,E,A,N);g=R,R.parent=o,R.depth=s,o.wildcard??=[],o.wildcard.push(R)}}o=g}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const m=cn(n.fullPath??n.from);m.kind=Jl,m.parent=o,s++,m.depth=s,o.pathless??=[],o.pathless.push(m),o=m}const p=(n.path||!n.children)&&!n.isRoot;if(p&&l.endsWith("/")){const m=cn(n.fullPath??n.from);m.kind=an,m.parent=o,s++,m.depth=s,o.index=m,o=m}o.parse=n.options?.params?.parse??null,o.skipOnParamError=d,o.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,p&&!o.route&&(o.route=n,o.fullPath=n.fullPath??n.from)}if(n.children)for(const l of n.children)qo(e,t,l,i,o,s,a)}function Ps(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Kt(e){if(e.pathless)for(const t of e.pathless)Kt(t);if(e.static)for(const t of e.static.values())Kt(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())Kt(t);if(e.dynamic?.length){e.dynamic.sort(Ps);for(const t of e.dynamic)Kt(t)}if(e.optional?.length){e.optional.sort(Ps);for(const t of e.optional)Kt(t)}if(e.wildcard?.length){e.wildcard.sort(Ps);for(const t of e.wildcard)Kt(t)}}function cn(e){return{kind:Vn,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Ms(e,t,n,r,o){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:o}}function T1(e,t){const n=cn("/"),r=new Uint16Array(6);for(const o of e)qo(!1,r,o,1,n,0);Kt(n),t.masksTree=n,t.flatCache=So(1e3)}function P1(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const r=Wa(e,t.masksTree);return t.flatCache.set(e,r),r}function M1(e,t,n,r,o){e||="/",r||="/";const s=t?`case\0${e}`:e;let a=o.singleCache.get(s);if(!a){a=cn("/");const i=new Uint16Array(6);qo(t,i,{from:e},1,a,0),o.singleCache.set(s,a)}return Wa(r,a,n)}function _1(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,o=t.matchCache.get(r);if(o!==void 0)return o;e||="/";let s;try{s=Wa(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)s=null;else throw a}return s&&(s.branch=O1(s.route)),t.matchCache.set(r,s),s}function N1(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function I1(e,t=!1,n){const r=cn(e.fullPath),o=new Uint16Array(6),s={},a={};let i=0;return qo(t,o,e,1,r,0,u=>{if(n?.(u,i),en(!(u.id in s),`Duplicate routes found with id: ${String(u.id)}`),s[u.id]=u,i!==0&&u.path){const f=N1(u.fullPath);(!a[f]||u.fullPath.endsWith("/"))&&(a[f]=u)}i++}),Kt(r),{processedTree:{segmentTree:r,singleCache:So(1e3),matchCache:So(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:a}}function Wa(e,t,n=!1){const r=e.split("/"),o=D1(e,r,t,n);if(!o)return null;const[s]=eu(e,r,o);return{route:o.node.route,rawParams:s,parsedParams:o.parsedParams}}function eu(e,t,n){const r=L1(n.node);let o=null;const s={};let a=n.extract?.part??0,i=n.extract?.node??0,l=n.extract?.path??0,u=n.extract?.segment??0;for(;i<r.length;a++,i++,l++,u++){const f=r[i];if(f.kind===an)break;if(f.kind===Jl){u--,a--,l--;continue}const d=t[a],p=l;if(d&&(l+=d.length),f.kind===mn){o??=n.node.fullPath.split("/");const m=o[u],g=f.prefix?.length??0;if(m.charCodeAt(g)===123){const y=f.suffix?.length??0,b=m.substring(g+2,m.length-y-1),x=d.substring(g,d.length-y);s[b]=decodeURIComponent(x)}else{const y=m.substring(1);s[y]=decodeURIComponent(d)}}else if(f.kind===Er){if(n.skipped&1<<i){a--,l=p-1;continue}o??=n.node.fullPath.split("/");const m=o[u],g=f.prefix?.length??0,v=f.suffix?.length??0,y=m.substring(g+3,m.length-v-1),b=f.suffix||f.prefix?d.substring(g,d.length-v):d;b&&(s[y]=decodeURIComponent(b))}else if(f.kind===gn){const m=f,g=e.substring(p+(m.prefix?.length??0),e.length-(m.suffix?.length??0)),v=decodeURIComponent(g);s["*"]=v,s._splat=v;break}}return n.rawParams&&Object.assign(s,n.rawParams),[s,{part:a,node:i,path:l,segment:u}]}function O1(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function L1(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function D1(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const o=!xr(t),s=o&&e!=="/",a=t.length-(o?1:0),i=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let l=null,u=null,f=null;for(;i.length;){const d=i.pop(),{node:p,index:m,skipped:g,depth:v,statics:y,dynamics:b,optionals:x}=d;let{extract:w,rawParams:E,parsedParams:A}=d;if(p.skipOnParamError){if(!_s(e,t,d))continue;E=d.rawParams,w=d.extract,A=d.parsedParams}r&&p.route&&p.kind!==an&&ar(u,d)&&(u=d);const N=m===a;if(N&&(p.route&&!s&&ar(f,d)&&(f=d),!p.optional&&!p.wildcard&&!p.index&&!p.pathless))continue;const R=N?void 0:t[m];let S;if(N&&p.index){const _={node:p.index,index:m,skipped:g,depth:v+1,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A};let D=!0;if(p.index.skipOnParamError&&(_s(e,t,_)||(D=!1)),D){if(y===a&&!b&&!x&&!g)return _;ar(f,_)&&(f=_)}}if(p.wildcard&&ar(l,d))for(const _ of p.wildcard){const{prefix:D,suffix:M}=_;if(D&&(N||!(_.caseSensitive?R:S??=R.toLowerCase()).startsWith(D)))continue;if(M){if(N)continue;const Z=t.slice(m).join("/").slice(-M.length);if((_.caseSensitive?Z:Z.toLowerCase())!==M)continue}const k={node:_,index:a,skipped:g,depth:v,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A};if(!(_.skipOnParamError&&!_s(e,t,k))){l=k;break}}if(p.optional){const _=g|1<<v,D=v+1;for(let M=p.optional.length-1;M>=0;M--){const k=p.optional[M];i.push({node:k,index:m,skipped:_,depth:D,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A})}if(!N)for(let M=p.optional.length-1;M>=0;M--){const k=p.optional[M],{prefix:Z,suffix:j}=k;if(Z||j){const F=k.caseSensitive?R:S??=R.toLowerCase();if(Z&&!F.startsWith(Z)||j&&!F.endsWith(j))continue}i.push({node:k,index:m+1,skipped:g,depth:D,statics:y,dynamics:b,optionals:x+1,extract:w,rawParams:E,parsedParams:A})}}if(!N&&p.dynamic&&R)for(let _=p.dynamic.length-1;_>=0;_--){const D=p.dynamic[_],{prefix:M,suffix:k}=D;if(M||k){const Z=D.caseSensitive?R:S??=R.toLowerCase();if(M&&!Z.startsWith(M)||k&&!Z.endsWith(k))continue}i.push({node:D,index:m+1,skipped:g,depth:v+1,statics:y,dynamics:b+1,optionals:x,extract:w,rawParams:E,parsedParams:A})}if(!N&&p.staticInsensitive){const _=p.staticInsensitive.get(S??=R.toLowerCase());_&&i.push({node:_,index:m+1,skipped:g,depth:v+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A})}if(!N&&p.static){const _=p.static.get(R);_&&i.push({node:_,index:m+1,skipped:g,depth:v+1,statics:y+1,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A})}if(p.pathless){const _=v+1;for(let D=p.pathless.length-1;D>=0;D--){const M=p.pathless[D];i.push({node:M,index:m,skipped:g,depth:_,statics:y,dynamics:b,optionals:x,extract:w,rawParams:E,parsedParams:A})}}}if(f&&l)return ar(l,f)?f:l;if(f)return f;if(l)return l;if(r&&u){let d=u.index;for(let m=0;m<u.index;m++)d+=t[m].length;const p=d===e.length?"/":e.slice(d);return u.rawParams??={},u.rawParams["**"]=decodeURIComponent(p),u}return null}function _s(e,t,n){try{const[r,o]=eu(e,t,n);n.rawParams=r,n.extract=o;const s=n.node.parse(r);return n.parsedParams=Object.assign({},n.parsedParams,s),!0}catch{return null}}function ar(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===an)>(e.node.kind===an)||t.node.kind===an==(e.node.kind===an)&&t.depth>e.depth))):!0}function uo(e){return Ga(e.filter(t=>t!==void 0).join("/"))}function Ga(e){return e.replace(/\/{2,}/g,"/")}function tu(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function Xt(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function nu(e){return Xt(tu(e))}function Ro(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function j1(e,t,n){return Ro(e,n)===Ro(t,n)}function F1({base:e,to:t,trailingSlash:n="never",cache:r}){const o=t.startsWith("/"),s=!o&&t===".";let a;if(r){a=o?t:s?e:e+"\0"+t;const d=r.get(a);if(d)return d}let i;if(s)i=e.split("/");else if(o)i=t.split("/");else{for(i=e.split("/");i.length>1&&xr(i)==="";)i.pop();const d=t.split("/");for(let p=0,m=d.length;p<m;p++){const g=d[p];g===""?p?p===m-1&&i.push(g):i=[g]:g===".."?i.pop():g==="."||i.push(g)}}i.length>1&&(xr(i)===""?n==="never"&&i.pop():n==="always"&&i.push(""));let l,u="";for(let d=0;d<i.length;d++){d>0&&(u+="/");const p=i[d];if(!p)continue;l=Ka(p,0,l);const m=l[0];if(m===Vn){u+=p;continue}const g=l[5],v=p.substring(0,l[1]),y=p.substring(l[4],g),b=p.substring(l[2],l[3]);m===mn?u+=v||y?`${v}{$${b}}${y}`:`$${b}`:m===gn?u+=v||y?`${v}{$}${y}`:"$":u+=`${v}{-$${b}}${y}`}u=Ga(u);const f=u||"/";return a&&r&&r.set(a,f),f}function k1(e){const t=new Map(e.map(o=>[encodeURIComponent(o),o])),n=Array.from(t.keys()).map(o=>o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return o=>o.replace(r,s=>t.get(s)??s)}function Ns(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(o=>ac(o,n)).join("/"):ac(r,n)}function sc({path:e,params:t,decoder:n,...r}){let o=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:o};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:o};const a=e.length;let i=0,l,u="";for(;i<a;){const d=i;l=Ka(e,d,l);const p=l[5];if(i=p+1,d===p)continue;const m=l[0];if(m===Vn){u+="/"+e.substring(d,p);continue}if(m===gn){const g=t._splat;s._splat=g,s["*"]=g;const v=e.substring(d,l[1]),y=e.substring(l[4],p);if(!g){o=!0,(v||y)&&(u+="/"+v+y);continue}const b=Ns("_splat",t,n);u+="/"+v+b+y;continue}if(m===mn){const g=e.substring(l[2],l[3]);!o&&!(g in t)&&(o=!0),s[g]=t[g];const v=e.substring(d,l[1]),y=e.substring(l[4],p),b=Ns(g,t,n)??"undefined";u+="/"+v+b+y;continue}if(m===Er){const g=e.substring(l[2],l[3]),v=t[g];if(v==null)continue;s[g]=v;const y=e.substring(d,l[1]),b=e.substring(l[4],p),x=Ns(g,t,n)??"";u+="/"+y+x+b;continue}}return e.endsWith("/")&&(u+="/"),{usedParams:s,interpolatedPath:u||"/",isMissingParams:o}}function ac(e,t){const n=encodeURIComponent(e);return t?.(n)??n}function ru(e={}){if(e.isNotFound=!0,e.throw)throw e;return e}function Je(e){return!!e?.isNotFound}function $1(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const sa="tsr-scroll-restoration-v1_3",H1=(e,t)=>{let n;return(...r)=>{n||(n=setTimeout(()=>{e(...r),n=null},t))}};function B1(){const e=$1();if(!e)return null;const t=e.getItem(sa);let n=t?JSON.parse(t):{};return{state:n,set:r=>{n=Gt(r,n)||n;try{e.setItem(sa,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const Yr=B1(),V1=e=>e.state.__TSR_key||e.href;function Z1(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Co=!1;function U1({storageKey:e,key:t,behavior:n,shouldScrollRestoration:r,scrollToTopSelectors:o,location:s}){let a;try{a=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(u){console.error(u);return}const i=t||window.history.state?.__TSR_key,l=a[i];Co=!0;e:{if(r&&l&&Object.keys(l).length>0){for(const d in l){const p=l[d];if(d==="window")window.scrollTo({top:p.scrollY,left:p.scrollX,behavior:n});else if(d){const m=document.querySelector(d);m&&(m.scrollLeft=p.scrollX,m.scrollTop=p.scrollY)}}break e}const u=(s??window.location).hash.split("#",2)[1];if(u){const d=window.history.state?.__hashScrollIntoViewOptions??!0;if(d){const p=document.getElementById(u);p&&p.scrollIntoView(d)}break e}const f={top:0,left:0,behavior:n};if(window.scrollTo(f),o)for(const d of o){if(d==="window")continue;const p=typeof d=="function"?d():document.querySelector(d);p&&p.scrollTo(f)}}Co=!1}function z1(e,t){if(!Yr||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!Yr))return;e.isScrollRestorationSetup=!0,Co=!1;const r=e.options.getScrollRestorationKey||V1;window.history.scrollRestoration="manual";const o=s=>{if(Co||!e.isScrollRestoring)return;let a="";if(s.target===document||s.target===window)a="window";else{const l=s.target.getAttribute("data-scroll-restoration-id");l?a=`[data-scroll-restoration-id="${l}"]`:a=Z1(s.target)}const i=r(e.state.location);Yr.set(l=>{const u=l[i]||={},f=u[a]||={};if(a==="window")f.scrollX=window.scrollX||0,f.scrollY=window.scrollY||0;else if(a){const d=document.querySelector(a);d&&(f.scrollX=d.scrollLeft||0,f.scrollY=d.scrollTop||0)}return l})};typeof document<"u"&&document.addEventListener("scroll",H1(o,100),!0),e.subscribe("onRendered",s=>{const a=r(s.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(U1({storageKey:sa,key:a,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Yr.set(i=>(i[a]||={},i)))})}function q1(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function K1(e,t=String){const n=new URLSearchParams;for(const r in e){const o=e[r];o!==void 0&&n.set(r,t(o))}return n.toString()}function Is(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function W1(e){const t=new URLSearchParams(e),n={};for(const[r,o]of t.entries()){const s=n[r];s==null?n[r]=Is(o):Array.isArray(s)?s.push(Is(o)):n[r]=[s,Is(o)]}return n}const G1=Y1(JSON.parse),Q1=X1(JSON.stringify,JSON.parse);function Y1(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=W1(t);for(const r in n){const o=n[r];if(typeof o=="string")try{n[r]=e(o)}catch{}}return n}}function X1(e,t){const n=typeof t=="function";function r(o){if(typeof o=="object"&&o!==null)try{return e(o)}catch{}else if(n&&typeof o=="string")try{return t(o),e(o)}catch{}return o}return o=>{const s=K1(o,r);return s?`?${s}`:""}}const ft="__root__";function ou(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function at(e){return e instanceof Response&&!!e.options}const aa=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Ko=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Fn=(e,t,n=!0)=>{const r={...e.router.options.context??{}},o=n?t:t-1;for(let s=0;s<=o;s++){const a=e.matches[s];if(!a)continue;const i=e.router.getMatch(a.id);i&&Object.assign(r,i.__routeContext,i.__beforeLoadContext)}return r},ic=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),o=r>=0?r:0;let s=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;s<0&&(s=o);for(let a=s;a>=0;a--){const i=e.matches[a];if(e.router.looseRoutesById[i.routeId].options.notFoundComponent)return a}return n?s:o},Qt=(e,t,n)=>{if(!(!at(n)&&!Je(n)))throw at(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&(t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,r=>({...r,status:at(n)?"redirected":r.status==="pending"?"success":r.status,context:Fn(e,t.index),isFetching:!1,error:n})),Je(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()),at(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},su=(e,t)=>!!e.router.getMatch(t)._nonReactive.dehydrated,ir=(e,t,n,r)=>{const{id:o,routeId:s}=e.matches[t],a=e.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??=t,Qt(e,e.router.getMatch(o),n);try{a.options.onError?.(n)}catch(i){n=i,Qt(e,e.router.getMatch(o),n)}e.updateMatch(o,i=>(i._nonReactive.beforeLoadPromise?.resolve(),i._nonReactive.beforeLoadPromise=void 0,i._nonReactive.loadPromise?.resolve(),{...i,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController})),!e.preload&&!at(n)&&!Je(n)&&(e.serialError??=n)},au=(e,t,n,r)=>{if(r._nonReactive.pendingTimeout!==void 0)return;const o=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!Ko(e,t)&&(n.options.loader||n.options.beforeLoad||cu(n))&&typeof o=="number"&&o!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const a=setTimeout(()=>{aa(e)},o);r._nonReactive.pendingTimeout=a}},J1=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;au(e,t,n,r);const o=()=>{const s=e.router.getMatch(t);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Qt(e,s,s.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(o):o()},em=(e,t,n,r)=>{const o=e.router.getMatch(t),s=o._nonReactive.loadPromise;o._nonReactive.loadPromise=Bn(()=>{s?.resolve()});const{paramsError:a,searchError:i}=o;a&&ir(e,n,a,"PARSE_PARAMS"),i&&ir(e,n,i,"VALIDATE_SEARCH"),au(e,t,r,o);const l=new AbortController;let u=!1;const f=()=>{u||(u=!0,e.updateMatch(t,E=>({...E,isFetching:"beforeLoad",fetchCount:E.fetchCount+1,abortController:l})))},d=()=>{o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,E=>({...E,isFetching:!1}))};if(!r.options.beforeLoad){mr(()=>{f(),d()});return}o._nonReactive.beforeLoadPromise=Bn();const p={...Fn(e,n,!1),...o.__routeContext},{search:m,params:g,cause:v}=o,y=Ko(e,t),b={search:m,abortController:l,params:g,preload:y,context:p,location:e.location,navigate:E=>e.router.navigate({...E,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:y?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},x=E=>{if(E===void 0){mr(()=>{f(),d()});return}(at(E)||Je(E))&&(f(),ir(e,n,E,"BEFORE_LOAD")),mr(()=>{f(),e.updateMatch(t,A=>({...A,__beforeLoadContext:E})),d()})};let w;try{if(w=r.options.beforeLoad(b),wr(w))return f(),w.catch(E=>{ir(e,n,E,"BEFORE_LOAD")}).then(x)}catch(E){f(),ir(e,n,E,"BEFORE_LOAD")}x(w)},tm=(e,t)=>{const{id:n,routeId:r}=e.matches[t],o=e.router.looseRoutesById[r],s=()=>i(),a=()=>em(e,n,t,o),i=()=>{if(su(e,n))return;const l=J1(e,n,o);return wr(l)?l.then(a):a()};return s()},nm=(e,t,n)=>{const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const o={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([n.options.head?.(o),n.options.scripts?.(o),n.options.headers?.(o)]).then(([s,a,i])=>{const l=s?.meta,u=s?.links,f=s?.scripts,d=s?.styles;return{meta:l,links:u,headScripts:f,headers:i,scripts:a,styles:d}})},iu=(e,t,n,r,o)=>{const s=t[r-1],{params:a,loaderDeps:i,abortController:l,cause:u}=e.router.getMatch(n),f=Fn(e,r),d=Ko(e,n);return{params:a,deps:i,preload:!!d,parentMatchPromise:s,abortController:l,context:f,location:e.location,navigate:p=>e.router.navigate({...p,_fromLocation:e.location}),cause:d?"preload":u,route:o,...e.router.options.additionalContext}},cc=async(e,t,n,r,o)=>{try{const s=e.router.getMatch(n);try{(!(y1??e.router.isServer)||s.ssr===!0)&&Ao(o);const a=o.options.loader?.(iu(e,t,n,r,o)),i=o.options.loader&&wr(a);if((i||o._lazyPromise||o._componentsPromise||o.options.head||o.options.scripts||o.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(n,f=>({...f,isFetching:"loader"})),o.options.loader){const f=i?await a:a;Qt(e,e.router.getMatch(n),f),f!==void 0&&e.updateMatch(n,d=>({...d,loaderData:f}))}o._lazyPromise&&await o._lazyPromise;const u=s._nonReactive.minPendingPromise;u&&await u,o._componentsPromise&&await o._componentsPromise,e.updateMatch(n,f=>({...f,error:void 0,context:Fn(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(a){let i=a;if(i?.name==="AbortError"){if(s.abortController.signal.aborted){s._nonReactive.loaderPromise?.resolve(),s._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,u=>({...u,status:u.status==="pending"?"success":u.status,isFetching:!1,context:Fn(e,r)}));return}const l=s._nonReactive.minPendingPromise;l&&await l,Je(a)&&await o.options.notFoundComponent?.preload?.(),Qt(e,e.router.getMatch(n),a);try{o.options.onError?.(a)}catch(u){i=u,Qt(e,e.router.getMatch(n),u)}e.updateMatch(n,u=>({...u,error:i,context:Fn(e,r),status:"error",isFetching:!1}))}}catch(s){const a=e.router.getMatch(n);a&&(a._nonReactive.loaderPromise=void 0),Qt(e,a,s)}},rm=async(e,t,n)=>{async function r(d,p,m,g){const v=Date.now()-p.updatedAt,y=d?g.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:g.options.staleTime??e.router.options.defaultStaleTime??0,b=g.options.shouldReload,x=typeof b=="function"?b(iu(e,t,o,n,g)):b,{status:w,invalid:E}=m;a=w==="success"&&(E||(x??v>y)),d&&g.options.preload===!1||(a&&!e.sync?(i=!0,(async()=>{try{await cc(e,t,o,n,g);const A=e.router.getMatch(o);A._nonReactive.loaderPromise?.resolve(),A._nonReactive.loadPromise?.resolve(),A._nonReactive.loaderPromise=void 0}catch(A){at(A)&&await e.router.navigate(A.options)}})()):(w!=="success"||a&&e.sync)&&await cc(e,t,o,n,g))}const{id:o,routeId:s}=e.matches[n];let a=!1,i=!1;const l=e.router.looseRoutesById[s];if(!su(e,o)){const d=e.router.getMatch(o),p=Ko(e,o);if(d._nonReactive.loaderPromise){if(d.status==="success"&&!e.sync&&!d.preload)return d;await d._nonReactive.loaderPromise;const m=e.router.getMatch(o),g=m._nonReactive.error||m.error;g&&Qt(e,m,g),m.status==="pending"&&await r(p,d,m,l)}else{const m=p&&!e.router.state.matches.some(v=>v.id===o),g=e.router.getMatch(o);g._nonReactive.loaderPromise=Bn(),m!==g.preload&&e.updateMatch(o,v=>({...v,preload:m})),await r(p,d,g,l)}}const u=e.router.getMatch(o);i||(u._nonReactive.loaderPromise?.resolve(),u._nonReactive.loadPromise?.resolve()),clearTimeout(u._nonReactive.pendingTimeout),u._nonReactive.pendingTimeout=void 0,i||(u._nonReactive.loaderPromise=void 0),u._nonReactive.dehydrated=void 0;const f=i?u.isFetching:!1;return f!==u.isFetching||u.invalid!==!1?(e.updateMatch(o,d=>({...d,isFetching:f,invalid:!1})),e.router.getMatch(o)):u};async function lc(e){const t=e,n=[];t.router.state.matches.some(p=>p._forcePending)&&aa(t);let r;for(let p=0;p<t.matches.length;p++){try{const m=tm(t,p);wr(m)&&await m}catch(m){if(at(m))throw m;if(Je(m))r=m;else if(!t.preload)throw m;break}if(t.serialError)break}const o=t.firstBadMatchIndex??t.matches.length,s=r&&!t.preload?ic(t,r):void 0,a=r&&t.preload?0:s!==void 0?Math.min(s+1,o):o;let i,l;for(let p=0;p<a;p++)n.push(rm(t,n,p));try{await Promise.all(n)}catch{const p=await Promise.allSettled(n);for(const m of p){if(m.status!=="rejected")continue;const g=m.reason;if(at(g))throw g;Je(g)?i??=g:l??=g}if(l!==void 0)throw l}const u=i??(r&&!t.preload?r:void 0);let f=t.serialError?t.firstBadMatchIndex??0:t.matches.length-1;if(!u&&r&&t.preload)return t.matches;if(u){const p=ic(t,u);en(p!==void 0);const m=t.matches[p],g=t.router.looseRoutesById[m.routeId],v=t.router.options?.defaultNotFoundComponent;!g.options.notFoundComponent&&v&&(g.options.notFoundComponent=v),u.routeId=m.routeId;const y=m.routeId===t.router.routeTree.id;t.updateMatch(m.id,b=>({...b,...y?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:u},isFetching:!1})),f=p,await Ao(g)}else if(!t.preload){const p=t.matches[0];p.globalNotFound||t.router.getMatch(p.id)?.globalNotFound&&t.updateMatch(p.id,g=>({...g,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const p=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await Ao(p)}for(let p=0;p<=f;p++){const m=t.matches[p],{id:g,routeId:v}=m,y=t.router.looseRoutesById[v];try{const b=nm(t,g,y);if(b){const x=await b;t.updateMatch(g,w=>({...w,...x}))}}catch(b){console.error(`Error executing head for route ${v}:`,b)}}const d=aa(t);if(wr(d)&&await d,u)throw u;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}async function Ao(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...r}=t.options;Object.assign(e.options,r),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const r of lu){const o=e.options[r]?.preload;o&&n.push(o())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function cu(e){for(const t of lu)if(e.options[t]?.preload)return!0;return!1}const lu=["component","errorComponent","pendingComponent","notFoundComponent"];function om(e){return{input:({url:t})=>{for(const n of e)t=ia(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=uu(e[n],t);return t}}}function sm(e){const t=nu(e.basepath),n=`/${t}`,r=`${n}/`,o=e.caseSensitive?n:n.toLowerCase(),s=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const i=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return i===o?a.pathname="/":i.startsWith(s)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=uo(["/",t,a.pathname]),a)}}function ia(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function uu(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function fn(e){const t=e.resolvedLocation,n=e.location,r=t?.pathname!==n.pathname,o=t?.href!==n.href,s=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:r,hrefChanged:o,hashChanged:s}}function am(e){const t=e.filter(n=>n.status!=="redirected");return t.length===e.length?e:t}class im{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{const r=this.options,o=this.basepath??r?.basepath??"/",s=this.basepath===void 0,a=r?.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=k1(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=g1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=So(1e3),p=this.buildRouteTree(),this.setRoutes(p)}!this.__store&&this.latestLocation&&(this.__store=h1(lm(this.latestLocation)),z1(this));let i=!1;const l=this.options.basepath??"/",u=this.options.rewrite;if(s||o!==l||a!==u){this.basepath=l;const p=[],m=nu(l);m&&m!=="/"&&p.push(sm({basepath:l})),u&&p.push(u),this.rewrite=p.length===0?void 0:p.length===1?p[0]:om(p),this.history&&this.updateLatestLocation(),i=!0}i&&this.__store&&this.__store.setState(p=>({...p,location:this.latestLocation})),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=I1(this.routeTree,this.options.caseSensitive,(r,o)=>{r.init({originalIndex:o})});return this.options.routeMasks&&T1(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const o={eventType:n,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const o=({pathname:l,search:u,hash:f,href:d,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(l)){const x=this.options.parseSearch(u),w=this.options.stringifySearch(x);return{href:l+w+f,publicHref:d,pathname:sr(l).path,external:!1,searchStr:w,search:st(r?.search,x),hash:sr(f.slice(1)).path,state:st(r?.state,p)}}const m=new URL(d,this.origin),g=ia(this.rewrite,m),v=this.options.parseSearch(g.search),y=this.options.stringifySearch(v);return g.search=y,{href:g.href.replace(g.origin,""),publicHref:d,pathname:sr(g.pathname).path,external:!!this.rewrite&&g.origin!==this.origin,searchStr:y,search:st(r?.search,v),hash:sr(g.hash.slice(1)).path,state:st(r?.state,p)}},s=o(n),{__tempLocation:a,__tempKey:i}=s.state;if(a&&(!i||i===this.tempLocationKey)){const l=o(a);return l.state.key=s.state.key,l.state.__TSR_key=s.state.__TSR_key,delete l.state.__tempLocation,{...l,maskedLocation:s}}return s},this.resolvePathWithBase=(n,r)=>F1({base:n,to:Ga(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,o)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},o):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>um({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(s=>s.status==="pending"),r=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...r]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const r=(s={})=>{const a=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,i=this.matchRoutesLightweight(a);s.from;const l=s.unsafeRelative==="path"?a.pathname:s.from??i.fullPath,u=this.resolvePathWithBase(l,"."),f=i.search,d={...i.params},p=s.to?this.resolvePathWithBase(u,`${s.to}`):this.resolvePathWithBase(u,"."),m=s.params===!1||s.params===null?{}:(s.params??!0)===!0?d:Object.assign(d,Gt(s.params,d)),g=this.getMatchedRoutes(p);let v=g.matchedRoutes;if((!g.foundRoute||g.foundRoute.path!=="/"&&g.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(m).length>0)for(const M of v){const k=M.options.params?.stringify??M.options.stringifyParams;if(k)try{Object.assign(m,k(m))}catch{}}const b=n.leaveParams?p:sr(sc({path:p,params:m,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=f;if(n._includeValidateSearch&&this.options.search?.strict){const M={};v.forEach(k=>{if(k.options.validateSearch)try{Object.assign(M,fo(k.options.validateSearch,{...M,...x}))}catch{}}),x=M}x=dm({search:x,dest:s,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=st(f,x);const w=this.options.stringifySearch(x),E=s.hash===!0?a.hash:s.hash?Gt(s.hash,a.hash):void 0,A=E?`#${E}`:"";let N=s.state===!0?a.state:s.state?Gt(s.state,a.state):{};N=st(a.state,N);const R=`${b}${w}${A}`;let S,_,D=!1;if(this.rewrite){const M=new URL(R,this.origin),k=uu(this.rewrite,M);S=M.href.replace(M.origin,""),k.origin!==this.origin?(_=k.href,D=!0):_=k.pathname+k.search+k.hash}else S=R1(R),_=S;return{publicHref:_,href:S,pathname:b,search:x,searchStr:w,state:N,hash:E??"",external:D,unmaskOnReload:s.unmaskOnReload}},o=(s={},a)=>{const i=r(s);let l=a?r(a):void 0;if(!l){const u={};if(this.options.routeMasks){const f=P1(i.pathname,this.processedTree);if(f){Object.assign(u,f.rawParams);const{from:d,params:p,...m}=f.route,g=p===!1||p===null?{}:(p??!0)===!0?u:Object.assign(u,Gt(p,u));a={from:n.from,...m,params:g},l=r(a)}}}return l&&(i.maskedLocation=l),i};return n.mask?o(n,{from:n.from,...n.mask}):o(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...o})=>{const s=()=>{const l=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];l.forEach(f=>{o.state[f]=this.latestLocation.state[f]});const u=dn(o.state,this.latestLocation.state);return l.forEach(f=>{delete o.state[f]}),u},a=Xt(this.latestLocation.href)===Xt(o.href),i=this.commitLocationPromise;if(this.commitLocationPromise=Bn(()=>{i?.resolve()}),a&&s())this.load();else{let{maskedLocation:l,hashScrollIntoView:u,...f}=o;l&&(f={...l,state:{...l.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=u??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[o.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:r})}return this.resetNextScroll=o.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:o,viewTransition:s,ignoreBlocker:a,href:i,...l}={})=>{if(i){const d=this.history.location.state.__TSR_index,p=xo(i,{__TSR_index:n?d:d+1}),m=new URL(p.pathname,this.origin),g=ia(this.rewrite,m);l.to=g.pathname,l.search=this.options.parseSearch(p.search),l.hash=p.hash.slice(1)}const u=this.buildLocation({...l,_includeValidateSearch:!0});this.pendingBuiltLocation=u;const f=this.commitLocation({...u,viewTransition:s,replace:n,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===u&&(this.pendingBuiltLocation=void 0)}),f},this.navigate=async({to:n,reloadDocument:r,href:o,publicHref:s,...a})=>{let i=!1;if(o)try{new URL(`${o}`),i=!0}catch{}if(i&&!r&&(r=!0),r){if(n!==void 0||!o){const u=this.buildLocation({to:n,...a});o=o??u.publicHref,s=s??u.publicHref}const l=!i&&s?s:o;if(Eo(l,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const f=this.history.getBlockers?.()??[];for(const d of f)if(d?.blockerFn&&await d.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(l):window.location.href=l,Promise.resolve()}return this.buildAndCommitLocation({...a,href:o,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation);this.__store.setState(r=>({...r,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:r.cachedMatches.filter(o=>!n.some(s=>s.id===o.id))}))},this.load=async n=>{let r,o,s;for(s=new Promise(i=>{this.startTransition(async()=>{try{this.beforeLoad();const l=this.latestLocation,u=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...fn({resolvedLocation:u,location:l})}),this.emit({type:"onBeforeLoad",...fn({resolvedLocation:u,location:l})}),await lc({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:l,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let f=[],d=[],p=[],m=[];mr(()=>{this.__store.setState(g=>{const v=g.matches,y=g.pendingMatches||g.matches;return f=v.filter(b=>!y.some(x=>x.id===b.id)),d=v.filter(b=>!y.some(x=>x.routeId===b.routeId)),p=y.filter(b=>!v.some(x=>x.routeId===b.routeId)),m=y.filter(b=>v.some(x=>x.routeId===b.routeId)),{...g,isLoading:!1,loadedAt:Date.now(),matches:y,pendingMatches:void 0,cachedMatches:[...g.cachedMatches,...f.filter(b=>b.status!=="error"&&b.status!=="notFound"&&b.status!=="redirected")]}}),this.clearExpiredCache()}),[[d,"onLeave"],[p,"onEnter"],[m,"onStay"]].forEach(([g,v])=>{g.forEach(y=>{this.looseRoutesById[y.routeId].options[v]?.(y)})})})})}})}catch(l){at(l)?(r=l,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Je(l)&&(o=l),this.__store.setState(u=>({...u,statusCode:r?r.status:o?404:u.matches.some(f=>f.status==="error")?500:200,redirect:r}))}this.latestLoadPromise===s&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),i()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let a;this.hasNotFoundMatch()?a=404:this.__store.state.matches.some(i=>i.status==="error")&&(a=500),a!==void 0&&this.__store.setState(i=>({...i,statusCode:a}))},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,a=this.state.resolvedLocation,i=typeof r.types=="function"?r.types(fn({resolvedLocation:a,location:s})):r.types;if(i===!1){n();return}o={update:n,types:i}}else o=n;document.startViewTransition(o)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const o=this.state.pendingMatches?.some(s=>s.id===n)?"pendingMatches":this.state.matches.some(s=>s.id===n)?"matches":this.state.cachedMatches.some(s=>s.id===n)?"cachedMatches":"";o&&(o==="cachedMatches"?this.__store.setState(s=>({...s,cachedMatches:am(s.cachedMatches.map(a=>a.id===n?r(a):a))})):this.__store.setState(s=>({...s,[o]:s[o]?.map(a=>a.id===n?r(a):a)})))})},this.getMatch=n=>{const r=o=>o.id===n;return this.state.cachedMatches.find(r)??this.state.pendingMatches?.find(r)??this.state.matches.find(r)},this.invalidate=n=>{const r=o=>n?.filter?.(o)??!0?{...o,invalid:!0,...n?.forcePending||o.status==="error"||o.status==="notFound"?{status:"pending",error:void 0}:void 0}:o;return this.__store.setState(o=>({...o,matches:o.matches.map(r),cachedMatches:o.cachedMatches.map(r),pendingMatches:o.pendingMatches?.map(r)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const o=n.options._builtLocation??this.buildLocation(n.options),s=this.getParsedLocationHref(o);n.options.href=s,n.headers.set("Location",s)}else if(r)try{const o=new URL(r);if(this.origin&&o.origin===this.origin){const s=o.pathname+o.search+o.hash;n.options.href=s,n.headers.set("Location",s)}}catch{}if(n.options.href&&!n.options._builtLocation&&Eo(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n?.filter;r!==void 0?this.__store.setState(o=>({...o,cachedMatches:o.cachedMatches.filter(s=>!r(s))})):this.__store.setState(o=>({...o,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=r=>{const o=this.looseRoutesById[r.routeId];if(!o.options.loader)return!0;const s=(r.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return r.status==="error"?!0:Date.now()-r.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=Ao,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let o=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(i=>i.id)),a=new Set([...s,...this.state.cachedMatches.map(i=>i.id)]);mr(()=>{o.forEach(i=>{a.has(i.id)||this.__store.setState(l=>({...l,cachedMatches:[...l.cachedMatches,i]}))})});try{return o=await lc({router:this,matches:o,location:r,preload:!0,updateMatch:(i,l)=>{s.has(i)?o=o.map(u=>u.id===i?l(u):u):this.updateMatch(i,l)}}),o}catch(i){if(at(i))return i.options.reloadDocument?void 0:await this.preloadRoute({...i.options,_fromLocation:r});Je(i)||console.error(i);return}},this.matchRoute=(n,r)=>{const o={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(o);if(r?.pending&&this.state.status!=="pending")return!1;const i=(r?.pending===void 0?!this.state.isLoading:r.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,l=M1(s.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,i.pathname,this.processedTree);return!l||n.params&&!dn(l.rawParams,n.params,{partial:!0})?!1:r?.includeSearch??!0?dn(i.search,s.search,{partial:!0})?l.rawParams:!1:l.rawParams},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??Q1,parseSearch:t.parseSearch??G1,protocolAllowlist:t.protocolAllowlist??S1}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}setRoutes({routesById:t,routesByPath:n,processedTree:r}){this.routesById=t,this.routesByPath=n,this.processedTree=r;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)}get looseRoutesById(){return this.routesById}getParentContext(t){return t?.id?t.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(t,n){const r=this.getMatchedRoutes(t.pathname),{foundRoute:o,routeParams:s,parsedParams:a}=r;let{matchedRoutes:i}=r,l=!1;(o?o.path!=="/"&&s["**"]:Xt(t.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:l=!0);const u=l?hm(this.options.notFoundMode,i):void 0,f=new Array(i.length),d=new Map(this.state.matches.map(p=>[p.routeId,p]));for(let p=0;p<i.length;p++){const m=i[p],g=f[p-1];let v,y,b;{const j=g?.search??t.search,F=g?._strictSearch??void 0;try{const C=fo(m.options.validateSearch,{...j})??void 0;v={...j,...C},y={...F,...C},b=void 0}catch(C){let L=C;if(C instanceof To||(L=new To(C.message,{cause:C})),n?.throwOnError)throw L;v=j,y={},b=L}}const x=m.options.loaderDeps?.({search:v})??"",w=x?JSON.stringify(x):"",{interpolatedPath:E,usedParams:A}=sc({path:m.fullPath,params:s,decoder:this.pathParamsDecoder,server:this.isServer}),N=m.id+E+w,R=this.getMatch(N),S=d.get(m.id),_=R?._strictParams??A;let D;if(!R)try{uc(m,A,a,_)}catch(j){if(Je(j)||at(j)?D=j:D=new cm(j.message,{cause:j}),n?.throwOnError)throw D}Object.assign(s,_);const M=S?"stay":"enter";let k;if(R)k={...R,cause:M,params:S?.params??s,_strictParams:_,search:st(S?S.search:R.search,v),_strictSearch:y};else{const j=m.options.loader||m.options.beforeLoad||m.lazyFn||cu(m)?"pending":"success";k={id:N,ssr:m.options.ssr,index:p,routeId:m.id,params:S?.params??s,_strictParams:_,pathname:E,updatedAt:Date.now(),search:S?st(S.search,v):v,_strictSearch:y,searchError:void 0,status:j,isFetching:!1,error:void 0,paramsError:D,__routeContext:void 0,_nonReactive:{loadPromise:Bn()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:S?st(S.loaderDeps,x):x,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:m.options.staticData||{},fullPath:m.fullPath}}n?.preload||(k.globalNotFound=u===m.id),k.searchError=b;const Z=this.getParentContext(g);k.context={...Z,...k.__routeContext,...k.__beforeLoadContext},f[p]=k}for(let p=0;p<f.length;p++){const m=f[p],g=this.looseRoutesById[m.routeId],v=this.getMatch(m.id),y=d.get(m.routeId);if(m.params=y?st(y.params,s):s,!v){const b=f[p-1],x=this.getParentContext(b);if(g.options.context){const w={deps:m.loaderDeps,params:m.params,context:x??{},location:t,navigate:E=>this.navigate({...E,_fromLocation:t}),buildLocation:this.buildLocation,cause:m.cause,abortController:m.abortController,preload:!!m.preload,matches:f,routeId:g.id};m.__routeContext=g.options.context(w)??void 0}m.context={...x,...m.__routeContext,...m.__beforeLoadContext}}}return f}matchRoutesLightweight(t){const{matchedRoutes:n,routeParams:r,parsedParams:o}=this.getMatchedRoutes(t.pathname),s=xr(n),a={...t.search};for(const f of n)try{Object.assign(a,fo(f.options.validateSearch,a))}catch{}const i=xr(this.state.matches),l=i&&i.routeId===s.id&&t.pathname===this.state.location.pathname;let u;if(l)u=i.params;else{const f={...r};for(const d of n)try{uc(d,r,o??{},f)}catch{}u=f}return{matchedRoutes:n,fullPath:s.fullPath,search:a,params:u}}}class To extends Error{}class cm extends Error{}function lm(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function fo(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new To("Async validation not supported");if(n.issues)throw new To(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function um({pathname:e,routesById:t,processedTree:n}){const r={},o=Xt(e);let s,a;const i=_1(o,n,!0);return i&&(s=i.route,Object.assign(r,i.rawParams),a=Object.assign({},i.parsedParams)),{matchedRoutes:i?.branch||[t[ft]],routeParams:r,foundRoute:s,parsedParams:a}}function dm({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return fm(n)(e,t,r??!1)}function fm(e){const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)o.options.search?.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const s=({search:a,next:i})=>{let l=a;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(l=o.options.preSearchFilters.reduce((f,d)=>d(f),a));const u=i(l);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((f,d)=>d(f),u):u};t.middlewares.push(s)}if(o.options.validateSearch){const s=({search:a,next:i})=>{const l=i(a);if(!t._includeValidateSearch)return l;try{return{...l,...fo(o.options.validateSearch,l)??void 0}}catch{return l}};t.middlewares.push(s)}}const n=({search:o})=>{const s=t.dest;return s.search?s.search===!0?o:Gt(s.search,o):{}};t.middlewares.push(n);const r=(o,s,a)=>{if(o>=a.length)return s;const i=a[o];return i({search:s,next:u=>r(o+1,u,a)})};return function(s,a,i){return t.dest=a,t._includeValidateSearch=i,r(0,s,t.middlewares)}}function hm(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return ft}function uc(e,t,n,r){const o=e.options.params?.parse??e.options.parseParams;if(o)if(e.options.skipRouteOnParseError)for(const s in t)s in n&&(r[s]=n[s]);else{const s=o(r);Object.assign(r,s)}}const pm="Error preloading route! ☝️";class du{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const r=this.options,o=!r?.path&&!r?.id;this.parentRoute=this.options.getParentRoute?.(),o?this._path=ft:this.parentRoute||en(!1);let s=o?ft:r?.path;s&&s!=="/"&&(s=tu(s));const a=r?.id||s;let i=o?ft:uo([this.parentRoute.id===ft?"":this.parentRoute.id,a]);s===ft&&(s="/"),i!==ft&&(i=uo(["/",i]));const l=i===ft?"/":uo([this.parentRoute.fullPath,s]);this._path=s,this._id=i,this._fullPath=l,this._to=Xt(l)},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.redirect=n=>ou({from:this.fullPath,...n}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class mm{constructor({id:t}){this.notFound=n=>ru({routeId:this.id,...n}),this.redirect=n=>ou({from:this.id,...n}),this.id=t}}class gm extends du{constructor(t){super(t)}}const vm="use",dc=Uo[vm],Xr=typeof window<"u"?c.useLayoutEffect:c.useEffect;function Os(e){const t=c.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function ym(e,t,n={},r={}){c.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const o=new IntersectionObserver(([s])=>{t(s)},n);return o.observe(e.current),()=>{o.disconnect()}},[t,n,r.disabled,e])}function bm(e){const t=c.useRef(null);return c.useImperativeHandle(e,()=>t.current,[]),t}function Qa(e){const t=e.errorComponent??Ya;return h.jsx(xm,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?c.createElement(t,{error:n,reset:r}):e.children})}class xm extends c.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Ya({error:e}){const[t,n]=c.useState(!1);return h.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[h.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),h.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),h.jsx("div",{style:{height:".25rem"}}),t?h.jsx("div",{children:h.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?h.jsx("code",{children:e.message}):null})}):null]})}function wm({children:e,fallback:t=null}){return fu()?h.jsx(P.Fragment,{children:e}):h.jsx(P.Fragment,{children:t})}function fu(){return P.useSyncExternalStore(Em,()=>!0,()=>!1)}function Em(){return()=>{}}function Sm(e,t){return e===t}function Rm(e,t,n=Sm){const r=c.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:i}=e.subscribe(a);return i},[e]),o=c.useCallback(()=>e?.get(),[e]);return Fp.useSyncExternalStoreWithSelector(r,o,o,t,n)}const hu=c.createContext(null);function qe(e){const t=c.useContext(hu);return e?.warn,t}function it(e){const t=qe({warn:e?.router===void 0}),n=e?.router||t,r=c.useRef(void 0);return Rm(n.__store,o=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const s=st(r.current,e.select(o));return r.current=s,s}return e.select(o)}return o})}const Wo=c.createContext(void 0),Cm=c.createContext(void 0);function gt(e){const t=c.useContext(e.from?Cm:Wo);return it({select:r=>{const o=r.matches.find(s=>e.from?e.from===s.routeId:s.id===t);if(en(!((e.shouldThrow??!0)&&!o),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),o!==void 0)return e.select?e.select(o):o},structuralSharing:e.structuralSharing})}function Go(e){return gt({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Qo(e){const{select:t,...n}=e;return gt({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function Yo(e){return gt({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Xo(e){return gt({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Rn(e){const t=qe();return c.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Am(e,t){const n=qe(),r=bm(t),{activeProps:o,inactiveProps:s,activeOptions:a,to:i,preload:l,preloadDelay:u,hashScrollIntoView:f,replace:d,startTransition:p,resetScroll:m,viewTransition:g,children:v,target:y,disabled:b,style:x,className:w,onClick:E,onBlur:A,onFocus:N,onMouseEnter:R,onMouseLeave:S,onTouchStart:_,ignoreBlocker:D,params:M,search:k,hash:Z,state:j,mask:F,reloadDocument:C,unsafeRelative:L,from:O,_fromLocation:I,...V}=e,q=fu(),G=it({select:ie=>{const me=ie.matches[ie.matches.length-1];return{search:me?.search,hash:ie.location.hash,path:me?.pathname}},structuralSharing:!0}),H=e.from,z=c.useMemo(()=>({...e,from:H}),[n,G,H,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),K=c.useMemo(()=>n.buildLocation({...z}),[n,z]),Y=K.maskedLocation?K.maskedLocation.publicHref:K.publicHref,$=K.maskedLocation?K.maskedLocation.external:K.external,U=c.useMemo(()=>Im(Y,$,n.history,b),[b,$,Y,n.history]),te=c.useMemo(()=>{if(U?.external)return Eo(U.href,n.protocolAllowlist)?void 0:U.href;if(!Om(i)&&!(typeof i!="string"||i.indexOf(":")===-1))try{return new URL(i),Eo(i,n.protocolAllowlist)?void 0:i}catch{}},[i,U,n.protocolAllowlist]),B=it({select:ie=>{if(te)return!1;if(a?.exact){if(!j1(ie.location.pathname,K.pathname,n.basepath))return!1}else{const me=Ro(ie.location.pathname,n.basepath),Re=Ro(K.pathname,n.basepath);if(!(me.startsWith(Re)&&(me.length===Re.length||me[Re.length]==="/")))return!1}return(a?.includeSearch??!0)&&!dn(ie.location.search,K.search,{partial:!a?.exact,ignoreUndefined:!a?.explicitUndefined})?!1:a?.includeHash?q&&ie.location.hash===K.hash:!0}}),X=B?Gt(o,{})??Tm:Ls,J=B?Ls:Gt(s,{})??Ls,ue=[w,X.className,J.className].filter(Boolean).join(" "),ve=(x||X.style||J.style)&&{...x,...X.style,...J.style},[Qe,Fe]=c.useState(!1),Ze=c.useRef(!1),ct=e.reloadDocument||te?!1:l??n.options.defaultPreload,Oe=u??n.options.defaultPreloadDelay??0,Ne=c.useCallback(()=>{n.preloadRoute({...z,_builtLocation:K}).catch(ie=>{console.warn(ie),console.warn(pm)})},[n,z,K]),Ut=c.useCallback(ie=>{ie?.isIntersecting&&Ne()},[Ne]);ym(r,Ut,Nm,{disabled:!!b||ct!=="viewport"}),c.useEffect(()=>{Ze.current||!b&&ct==="render"&&(Ne(),Ze.current=!0)},[b,Ne,ct]);const Te=ie=>{const me=ie.currentTarget.getAttribute("target"),Re=y!==void 0?y:me;if(!b&&!Lm(ie)&&!ie.defaultPrevented&&(!Re||Re==="_self")&&ie.button===0){ie.preventDefault(),Ht.flushSync(()=>{Fe(!0)});const ut=n.subscribe("onResolved",()=>{ut(),Fe(!1)});n.navigate({...z,replace:d,resetScroll:m,hashScrollIntoView:f,startTransition:p,viewTransition:g,ignoreBlocker:D})}};if(te)return{...V,ref:r,href:te,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...w&&{className:w},...E&&{onClick:E},...A&&{onBlur:A},...N&&{onFocus:N},...R&&{onMouseEnter:R},...S&&{onMouseLeave:S},..._&&{onTouchStart:_}};const lt=ie=>{if(b||ct!=="intent")return;if(!Oe){Ne();return}const me=ie.currentTarget;if(cr.has(me))return;const Re=setTimeout(()=>{cr.delete(me),Ne()},Oe);cr.set(me,Re)},Tn=ie=>{b||ct!=="intent"||Ne()},Pn=ie=>{if(b||!ct||!Oe)return;const me=ie.currentTarget,Re=cr.get(me);Re&&(clearTimeout(Re),cr.delete(me))};return{...V,...X,...J,href:U?.href,ref:r,onClick:Nn([E,Te]),onBlur:Nn([A,Pn]),onFocus:Nn([N,lt]),onMouseEnter:Nn([R,lt]),onMouseLeave:Nn([S,Pn]),onTouchStart:Nn([_,Tn]),disabled:!!b,target:y,...ve&&{style:ve},...ue&&{className:ue},...b&&Pm,...B&&Mm,...q&&Qe&&_m}}const Ls={},Tm={className:"active"},Pm={role:"link","aria-disabled":!0},Mm={"data-status":"active","aria-current":"page"},_m={"data-transitioning":"transitioning"},cr=new WeakMap,Nm={rootMargin:"100px"},Nn=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function Im(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function Om(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}const Pt=c.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:o,...s}=Am(r,t),a=typeof r.children=="function"?r.children({isActive:s["data-status"]==="active"}):r.children;if(!n){const{disabled:i,...l}=s;return c.createElement("a",l,a)}return c.createElement(n,s,a)});function Lm(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dm(e){return new jm({id:e})}class jm extends mm{constructor({id:t}){super({id:t}),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Xo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Qo({...n,from:this.id,strict:!1}),this.useLoaderData=n=>Go({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=qe();return Rn({from:n.routesById[this.id].fullPath})},this.notFound=n=>ru({routeId:this.id,...n}),this.Link=P.forwardRef((n,r)=>{const s=qe().routesById[this.id].fullPath;return h.jsx(Pt,{ref:r,from:s,...n})})}}let Fm=class extends du{constructor(t){super(t),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Xo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Qo({...n,from:this.id}),this.useLoaderData=n=>Go({...n,from:this.id}),this.useNavigate=()=>Rn({from:this.fullPath}),this.Link=P.forwardRef((n,r)=>h.jsx(Pt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function Le(e){return new Fm(e)}class km extends gm{constructor(t){super(t),this.useMatch=n=>gt({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({...n,from:this.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Xo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Qo({...n,from:this.id}),this.useLoaderData=n=>Go({...n,from:this.id}),this.useNavigate=()=>Rn({from:this.fullPath}),this.Link=P.forwardRef((n,r)=>h.jsx(Pt,{ref:r,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function $m(e){return new km(e)}function fc(e){return typeof e=="object"?new hc(e,{silent:!0}).createRoute(e):new hc(e,{silent:!0}).createRoute}class hc{constructor(t,n){this.path=t,this.createRoute=r=>{const o=Le(r);return o.isRoot=!1,o},this.silent=n?.silent}}class pc{constructor(t){this.useMatch=n=>gt({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>gt({from:this.options.id,select:r=>n?.select?n.select(r.context):r.context}),this.useSearch=n=>Xo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>Yo({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Qo({...n,from:this.options.id}),this.useLoaderData=n=>Go({...n,from:this.options.id}),this.useNavigate=()=>{const n=qe();return Rn({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function mc(e){return typeof e=="object"?new pc(e):t=>new pc({id:e,...t})}function We(e,t){let n,r,o,s;const a=()=>(n||(n=e().then(l=>{n=void 0,r=l.default}).catch(l=>{if(o=l,w1(o)&&o instanceof Error&&typeof window<"u"&&typeof sessionStorage<"u"){const u=`tanstack_router_reload:${o.message}`;sessionStorage.getItem(u)||(sessionStorage.setItem(u,"1"),s=!0)}})),n),i=function(u){if(s)throw window.location.reload(),new Promise(()=>{});if(o)throw o;if(!r)if(dc)dc(a());else throw a();return c.createElement(r,u)};return i.preload=a,i}function Hm(){const e=qe(),t=c.useRef({router:e,mounted:!1}),[n,r]=c.useState(!1),{hasPendingMatches:o,isLoading:s}=it({select:d=>({isLoading:d.isLoading,hasPendingMatches:d.matches.some(p=>p.status==="pending")}),structuralSharing:!0}),a=Os(s),i=s||n||o,l=Os(i),u=s||o,f=Os(u);return e.startTransition=d=>{r(!0),c.startTransition(()=>{d(),r(!1)})},c.useEffect(()=>{const d=e.history.subscribe(e.load),p=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Xt(e.latestLocation.publicHref)!==Xt(p.publicHref)&&e.commitLocation({...p,replace:!0}),()=>{d()}},[e,e.history]),Xr(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(p){console.error(p)}})()},[e]),Xr(()=>{a&&!s&&e.emit({type:"onLoad",...fn(e.state)})},[a,e,s]),Xr(()=>{f&&!u&&e.emit({type:"onBeforeRouteMount",...fn(e.state)})},[u,f,e]),Xr(()=>{if(l&&!i){const d=fn(e.state);e.emit({type:"onResolved",...d}),e.__store.setState(p=>({...p,status:"idle",resolvedLocation:p.location})),d.hrefChanged&&q1(e)}},[i,l,e]),null}function Bm(e){const t=it({select:n=>`not-found-${n.location.pathname}-${n.status}`});return h.jsx(Qa,{getResetKey:()=>t,onCatch:(n,r)=>{if(Je(n))e.onCatch?.(n,r);else throw n},errorComponent:({error:n})=>{if(Je(n))return e.fallback?.(n);throw n},children:e.children})}function Vm(){return h.jsx("p",{children:"Not Found"})}function Dn(e){return h.jsx(h.Fragment,{children:e.children})}function pu(e,t,n){return t.options.notFoundComponent?h.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?h.jsx(e.options.defaultNotFoundComponent,{...n}):h.jsx(Vm,{})}function Zm(){return qe().isScrollRestoring,null}const mu=c.memo(function({matchId:t}){const n=qe(),r=it({select:v=>{const y=v.matches.findIndex(x=>x.id===t),b=v.matches[y];return en(b),{routeId:b.routeId,ssr:b.ssr,_displayPending:b._displayPending,resetKey:v.loadedAt,parentRouteId:v.matches[y-1]?.routeId}},structuralSharing:!0}),o=n.routesById[r.routeId],s=o.options.pendingComponent??n.options.defaultPendingComponent,a=s?h.jsx(s,{}):null,i=o.options.errorComponent??n.options.defaultErrorComponent,l=o.options.onCatch??n.options.defaultOnCatch,u=o.isRoot?o.options.notFoundComponent??n.options.notFoundRoute?.options.component:o.options.notFoundComponent,f=r.ssr===!1||r.ssr==="data-only",d=(!o.isRoot||o.options.wrapInSuspense||f)&&(o.options.wrapInSuspense??s??(o.options.errorComponent?.preload||f))?c.Suspense:Dn,p=i?Qa:Dn,m=u?Bm:Dn,g=o.isRoot?o.options.shellComponent??Dn:Dn;return h.jsxs(g,{children:[h.jsx(Wo.Provider,{value:t,children:h.jsx(d,{fallback:a,children:h.jsx(p,{getResetKey:()=>r.resetKey,errorComponent:i||Ya,onCatch:(v,y)=>{if(Je(v))throw v;l?.(v,y)},children:h.jsx(m,{fallback:v=>{if(!u||v.routeId&&v.routeId!==r.routeId||!v.routeId&&!o.isRoot)throw v;return c.createElement(u,v)},children:f||r._displayPending?h.jsx(wm,{fallback:a,children:h.jsx(gc,{matchId:t})}):h.jsx(gc,{matchId:t})})})})}),r.parentRouteId===ft&&n.options.scrollRestoration?h.jsxs(h.Fragment,{children:[h.jsx(Um,{}),h.jsx(Zm,{})]}):null]})});function Um(){const e=qe(),t=c.useRef(void 0);return h.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...fn(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const gc=c.memo(function({matchId:t}){const n=qe(),{match:r,key:o,routeId:s}=it({select:l=>{const u=l.matches.find(g=>g.id===t),f=u.routeId,p=(n.routesById[f].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:f,loaderDeps:u.loaderDeps,params:u._strictParams,search:u._strictSearch});return{key:p?JSON.stringify(p):void 0,routeId:f,match:{id:u.id,status:u.status,error:u.error,invalid:u.invalid,_forcePending:u._forcePending,_displayPending:u._displayPending}}},structuralSharing:!0}),a=n.routesById[s],i=c.useMemo(()=>{const l=a.options.component??n.options.defaultComponent;return l?h.jsx(l,{},o):h.jsx(gu,{})},[o,a.options.component,n.options.defaultComponent]);if(r._displayPending)throw n.getMatch(r.id)?._nonReactive.displayPendingPromise;if(r._forcePending)throw n.getMatch(r.id)?._nonReactive.minPendingPromise;if(r.status==="pending"){const l=a.options.pendingMinMs??n.options.defaultPendingMinMs;if(l){const u=n.getMatch(r.id);if(u&&!u._nonReactive.minPendingPromise){const f=Bn();u._nonReactive.minPendingPromise=f,setTimeout(()=>{f.resolve(),u._nonReactive.minPendingPromise=void 0},l)}}throw n.getMatch(r.id)?._nonReactive.loadPromise}if(r.status==="notFound")return en(Je(r.error)),pu(n,a,r.error);if(r.status==="redirected")throw en(at(r.error)),n.getMatch(r.id)?._nonReactive.loadPromise;if(r.status==="error")throw r.error;return i}),gu=c.memo(function(){const t=qe(),n=c.useContext(Wo),r=it({select:u=>u.matches.find(f=>f.id===n)?.routeId}),o=t.routesById[r],s=it({select:u=>{const d=u.matches.find(p=>p.id===n);return en(d),d.globalNotFound}}),a=it({select:u=>{const f=u.matches,d=f.findIndex(p=>p.id===n);return f[d+1]?.id}}),i=t.options.defaultPendingComponent?h.jsx(t.options.defaultPendingComponent,{}):null;if(s)return pu(t,o,void 0);if(!a)return null;const l=h.jsx(mu,{matchId:a});return r===ft?h.jsx(c.Suspense,{fallback:i,children:l}):l});function zm(){const e=qe(),n=e.routesById[ft].options.pendingComponent??e.options.defaultPendingComponent,r=n?h.jsx(n,{}):null,o=typeof document<"u"&&e.ssr?Dn:c.Suspense,s=h.jsxs(o,{fallback:r,children:[h.jsx(Hm,{}),h.jsx(qm,{})]});return e.options.InnerWrap?h.jsx(e.options.InnerWrap,{children:s}):s}function qm(){const e=qe(),t=it({select:o=>o.matches[0]?.id}),n=it({select:o=>o.loadedAt}),r=t?h.jsx(mu,{matchId:t}):null;return h.jsx(Wo.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:h.jsx(Qa,{getResetKey:()=>n,errorComponent:Ya,onCatch:void 0,children:r})})}const Km=e=>new Wm(e);class Wm extends im{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=fc,globalThis.createLazyFileRoute=mc):typeof window<"u"&&(window.createFileRoute=fc,window.createLazyFileRoute=mc);function Gm({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=h.jsx(hu.Provider,{value:e,children:t});return e.options.Wrap?h.jsx(e.options.Wrap,{children:r}):r}function Qm({router:e,...t}){return h.jsx(Gm,{router:e,...t,children:h.jsx(zm,{})})}function Jo(e){return it({select:t=>e?.select?e.select(t.location):t.location})}var Kn=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(){}},Ym={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Xm=class{#e=Ym;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ln=new Xm;function Jm(e){setTimeout(e,0)}var vn=typeof window>"u"||"Deno"in globalThis;function ze(){}function eg(e,t){return typeof e=="function"?e(t):e}function ca(e){return typeof e=="number"&&e>=0&&e!==1/0}function vu(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Jt(e,t){return typeof e=="function"?e(t):e}function ht(e,t){return typeof e=="function"?e(t):e}function vc(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:a,stale:i}=e;if(a){if(r){if(t.queryHash!==Xa(a,t.options))return!1}else if(!Sr(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof i=="boolean"&&t.isStale()!==i||o&&o!==t.state.fetchStatus||s&&!s(t))}function yc(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(s))return!1}else if(!Sr(t.options.mutationKey,s))return!1}return!(r&&t.state.status!==r||o&&!o(t))}function Xa(e,t){return(t?.queryKeyHashFn||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>la(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Sr(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Sr(e[n],t[n])):!1}var tg=Object.prototype.hasOwnProperty;function yu(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=bc(e)&&bc(t);if(!r&&!(la(e)&&la(t)))return t;const s=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),i=a.length,l=r?new Array(i):{};let u=0;for(let f=0;f<i;f++){const d=r?f:a[f],p=e[d],m=t[d];if(p===m){l[d]=p,(r?f<s:tg.call(e,d))&&u++;continue}if(p===null||m===null||typeof p!="object"||typeof m!="object"){l[d]=m;continue}const g=yu(p,m,n+1);l[d]=g,g===p&&u++}return s===i&&u===s?e:l}function Po(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 bc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function la(e){if(!xc(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!xc(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function xc(e){return Object.prototype.toString.call(e)==="[object Object]"}function ng(e){return new Promise(t=>{ln.setTimeout(t,e)})}function ua(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?yu(e,t):t}function rg(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function og(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ja=Symbol();function bu(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ja?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ei(e,t){return typeof e=="function"?e(...t):!!e}function sg(e,t,n){let r=!1,o;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(o??=t(),r||(r=!0,o.aborted?n():o.addEventListener("abort",n,{once:!0})),o)}),e}var ag=class extends Kn{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!vn&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},ti=new ag;function da(){let e,t;const n=new Promise((o,s)=>{e=o,t=s});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}var ig=Jm;function cg(){let e=[],t=0,n=i=>{i()},r=i=>{i()},o=ig;const s=i=>{t?e.push(i):o(()=>{n(i)})},a=()=>{const i=e;e=[],i.length&&o(()=>{r(()=>{i.forEach(l=>{n(l)})})})};return{batch:i=>{let l;t++;try{l=i()}finally{t--,t||a()}return l},batchCalls:i=>(...l)=>{s(()=>{i(...l)})},schedule:s,setNotifyFunction:i=>{n=i},setBatchNotifyFunction:i=>{r=i},setScheduler:i=>{o=i}}}var _e=cg(),lg=class extends Kn{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!vn&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},Mo=new lg;function ug(e){return Math.min(1e3*2**e,3e4)}function xu(e){return(e??"online")==="online"?Mo.isOnline():!0}var fa=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function wu(e){let t=!1,n=0,r;const o=da(),s=()=>o.status!=="pending",a=v=>{if(!s()){const y=new fa(v);p(y),e.onCancel?.(y)}},i=()=>{t=!0},l=()=>{t=!1},u=()=>ti.isFocused()&&(e.networkMode==="always"||Mo.isOnline())&&e.canRun(),f=()=>xu(e.networkMode)&&e.canRun(),d=v=>{s()||(r?.(),o.resolve(v))},p=v=>{s()||(r?.(),o.reject(v))},m=()=>new Promise(v=>{r=y=>{(s()||u())&&v(y)},e.onPause?.()}).then(()=>{r=void 0,s()||e.onContinue?.()}),g=()=>{if(s())return;let v;const y=n===0?e.initialPromise:void 0;try{v=y??e.fn()}catch(b){v=Promise.reject(b)}Promise.resolve(v).then(d).catch(b=>{if(s())return;const x=e.retry??(vn?0:3),w=e.retryDelay??ug,E=typeof w=="function"?w(n,b):w,A=x===!0||typeof x=="number"&&n<x||typeof x=="function"&&x(n,b);if(t||!A){p(b);return}n++,e.onFail?.(n,b),ng(E).then(()=>u()?void 0:m()).then(()=>{t?p(b):g()})})};return{promise:o,status:()=>o.status,cancel:a,continue:()=>(r?.(),o),cancelRetry:i,continueRetry:l,canStart:f,start:()=>(f()?g():m().then(g),o)}}var Eu=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ca(this.gcTime)&&(this.#e=ln.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(vn?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ln.clearTimeout(this.#e),this.#e=void 0)}},dg=class extends Eu{#e;#t;#n;#o;#r;#a;#i;constructor(e){super(),this.#i=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#o=e.client,this.#n=this.#o.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ec(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=Ec(this.options);t.data!==void 0&&(this.setState(wc(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=ua(this.state.data,e,this.options);return this.#s({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(ze).catch(ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>ht(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ja||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Jt(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!vu(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#i?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const i=this.observers.find(l=>l.options.queryFn);i&&this.setOptions(i.options)}const n=new AbortController,r=i=>{Object.defineProperty(i,"signal",{enumerable:!0,get:()=>(this.#i=!0,n.signal)})},o=()=>{const i=bu(this.options,t),u=(()=>{const f={client:this.#o,queryKey:this.queryKey,meta:this.meta};return r(f),f})();return this.#i=!1,this.options.persister?this.options.persister(i,u,this):i(u)},a=(()=>{const i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#o,state:this.state,fetchFn:o};return r(i),i})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:"fetch",meta:a.fetchOptions?.meta}),this.#r=wu({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:i=>{i instanceof fa&&i.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(i,l)=>{this.#s({type:"failed",failureCount:i,error:l})},onPause:()=>{this.#s({type:"pause"})},onContinue:()=>{this.#s({type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{const i=await this.#r.start();if(i===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(i),this.#n.config.onSuccess?.(i,this),this.#n.config.onSettled?.(i,this.state.error,this),i}catch(i){if(i instanceof fa){if(i.silent)return this.#r.promise;if(i.revert){if(this.state.data===void 0)throw i;return this.state.data}}throw this.#s({type:"error",error:i}),this.#n.config.onError?.(i,this),this.#n.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#s(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Su(n.data,this.options),fetchMeta:e.meta??null};case"success":const r={...n,...wc(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?r:void 0,r;case"error":const o=e.error;return{...n,error:o,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),_e.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function Su(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xu(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function wc(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ec(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 Ru=class extends Kn{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=da(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#o=void 0;#r;#a;#i;#s;#m;#f;#h;#l;#u;#c;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Sc(this.#t,this.options)?this.#d():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ha(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ha(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof ht(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#E(),this.#t.setOptions(this.options),t._defaulted&&!Po(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Rc(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),r&&(this.#t!==n||ht(this.options.enabled,this.#t)!==ht(t.enabled,this.#t)||Jt(this.options.staleTime,this.#t)!==Jt(t.staleTime,this.#t))&&this.#g();const o=this.#v();r&&(this.#t!==n||ht(this.options.enabled,this.#t)!==ht(t.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return hg(this,n)&&(this.#o=n,this.#a=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#o}trackResult(e,t){return new Proxy(e,{get:(n,r)=>(this.trackProp(r),t?.(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#i.status==="pending"&&this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,r))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#o))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ze)),t}#g(){this.#x();const e=Jt(this.options.staleTime,this.#t);if(vn||this.#o.isStale||!ca(e))return;const n=vu(this.#o.dataUpdatedAt,e)+1;this.#l=ln.setTimeout(()=>{this.#o.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#c=e,!(vn||ht(this.options.enabled,this.#t)===!1||!ca(this.#c)||this.#c===0)&&(this.#u=ln.setInterval(()=>{(this.options.refetchIntervalInBackground||ti.isFocused())&&this.#d()},this.#c))}#b(){this.#g(),this.#y(this.#v())}#x(){this.#l&&(ln.clearTimeout(this.#l),this.#l=void 0)}#w(){this.#u&&(ln.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,r=this.options,o=this.#o,s=this.#r,a=this.#a,l=e!==n?e.state:this.#n,{state:u}=e;let f={...u},d=!1,p;if(t._optimisticResults){const S=this.hasListeners(),_=!S&&Sc(e,t),D=S&&Rc(e,n,t,r);(_||D)&&(f={...f,...Su(u.data,e.options)}),t._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:m,errorUpdatedAt:g,status:v}=f;p=f.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v==="pending"){let S;o?.isPlaceholderData&&t.placeholderData===a?.placeholderData?(S=o.data,y=!0):S=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,S!==void 0&&(v="success",p=ua(o?.data,S,t),d=!0)}if(t.select&&p!==void 0&&!y)if(o&&p===s?.data&&t.select===this.#m)p=this.#f;else try{this.#m=t.select,p=t.select(p),p=ua(o?.data,p,t),this.#f=p,this.#s=null}catch(S){this.#s=S}this.#s&&(m=this.#s,p=this.#f,g=Date.now(),v="error");const b=f.fetchStatus==="fetching",x=v==="pending",w=v==="error",E=x&&b,A=p!==void 0,R={status:v,fetchStatus:f.fetchStatus,isPending:x,isSuccess:v==="success",isError:w,isInitialLoading:E,isLoading:E,data:p,dataUpdatedAt:f.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>l.dataUpdateCount||f.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:w&&!A,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:w&&A,isStale:ni(e,t),refetch:this.refetch,promise:this.#i,isEnabled:ht(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const S=R.data!==void 0,_=R.status==="error"&&!S,D=Z=>{_?Z.reject(R.error):S&&Z.resolve(R.data)},M=()=>{const Z=this.#i=R.promise=da();D(Z)},k=this.#i;switch(k.status){case"pending":e.queryHash===n.queryHash&&D(k);break;case"fulfilled":(_||R.data!==k.value)&&M();break;case"rejected":(!_||R.error!==k.reason)&&M();break}}return R}updateResult(){const e=this.#o,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#h=this.#t),Po(t,e))return;this.#o=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const s=new Set(o??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#o).some(a=>{const i=a;return this.#o[i]!==e[i]&&s.has(i)})};this.#S({listeners:n()})}#E(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){_e.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#o)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function fg(e,t){return ht(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Sc(e,t){return fg(e,t)||e.state.data!==void 0&&ha(e,t,t.refetchOnMount)}function ha(e,t,n){if(ht(t.enabled,e)!==!1&&Jt(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&ni(e,t)}return!1}function Rc(e,t,n,r){return(e!==t||ht(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&ni(e,n)}function ni(e,t){return ht(t.enabled,e)!==!1&&e.isStaleByTime(Jt(t.staleTime,e))}function hg(e,t){return!Po(e.getCurrentResult(),t)}function Cc(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let i={pages:[],pageParams:[]},l=0;const u=async()=>{let f=!1;const d=g=>{sg(g,()=>t.signal,()=>f=!0)},p=bu(t.options,t.fetchOptions),m=async(g,v,y)=>{if(f)return Promise.reject();if(v==null&&g.pages.length)return Promise.resolve(g);const x=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:v,direction:y?"backward":"forward",meta:t.options.meta};return d(N),N})(),w=await p(x),{maxPages:E}=t.options,A=y?og:rg;return{pages:A(g.pages,w,E),pageParams:A(g.pageParams,v,E)}};if(o&&s.length){const g=o==="backward",v=g?pg:Ac,y={pages:s,pageParams:a},b=v(r,y);i=await m(y,b,g)}else{const g=e??s.length;do{const v=l===0?a[0]??r.initialPageParam:Ac(r,i);if(l>0&&v==null)break;i=await m(i,v),l++}while(l<g)}return i};t.options.persister?t.fetchFn=()=>t.options.persister?.(u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=u}}}function Ac(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 pg(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var mg=class extends Eu{#e;#t;#n;#o;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||Cu(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#o?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#o=wu({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(s,a)=>{this.#r({type:"failed",failureCount:s,error:a})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const r=this.state.status==="pending",o=!this.#o.canStart();try{if(r)t();else{this.#r({type:"pending",variables:e,isPaused:o}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);const a=await this.options.onMutate?.(e,n);a!==this.state.context&&this.#r({type:"pending",context:a,variables:e,isPaused:o})}const s=await this.#o.start();return await this.#n.config.onSuccess?.(s,e,this.state.context,this,n),await this.options.onSuccess?.(s,e,this.state.context,n),await this.#n.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(s,null,e,this.state.context,n),this.#r({type:"success",data:s}),s}catch(s){try{await this.#n.config.onError?.(s,e,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onError?.(s,e,this.state.context,n)}catch(a){Promise.reject(a)}try{await this.#n.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n)}catch(a){Promise.reject(a)}try{await this.options.onSettled?.(void 0,s,e,this.state.context,n)}catch(a){Promise.reject(a)}throw this.#r({type:"error",error:s}),s}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),_e.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function Cu(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var gg=class extends Kn{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const r=new mg({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=Jr(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=Jr(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Jr(e);if(typeof t=="string"){const r=this.#t.get(t)?.find(o=>o.state.status==="pending");return!r||r===e}else return!0}runNext(e){const t=Jr(e);return typeof t=="string"?this.#t.get(t)?.find(r=>r!==e&&r.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){_e.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>yc(t,n))}findAll(e={}){return this.getAll().filter(t=>yc(e,t))}notify(e){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return _e.batch(()=>Promise.all(e.map(t=>t.continue().catch(ze))))}};function Jr(e){return e.options.scope?.id}var vg=class extends Kn{#e;#t=void 0;#n;#o;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),Po(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&yn(n.mutationKey)!==yn(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#a()}mutate(t,n){return this.#o=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??Cu();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){_e.batch(()=>{if(this.#o&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#o.onSuccess?.(t.data,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(t.data,null,n,r,o)}catch(s){Promise.reject(s)}}else if(t?.type==="error"){try{this.#o.onError?.(t.error,n,r,o)}catch(s){Promise.reject(s)}try{this.#o.onSettled?.(void 0,t.error,n,r,o)}catch(s){Promise.reject(s)}}}this.listeners.forEach(n=>{n(this.#t)})})}},yg=class extends Kn{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,o=t.queryHash??Xa(r,t);let s=this.get(o);return s||(s=new dg({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){_e.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>vc(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>vc(e,n)):t}notify(e){_e.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){_e.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){_e.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},bg=class{#e;#t;#n;#o;#r;#a;#i;#s;constructor(e={}){this.#e=e.queryCache||new yg,this.#t=e.mutationCache||new gg,this.#n=e.defaultOptions||{},this.#o=new Map,this.#r=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#i=ti.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Mo.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Jt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),s=this.#e.get(r.queryHash)?.state.data,a=eg(t,s);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _e.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;_e.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return _e.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_e.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(ze).catch(ze)}invalidateQueries(e,t={}){return _e.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_e.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(ze)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(ze)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Jt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ze).catch(ze)}fetchInfiniteQuery(e){return e.behavior=Cc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ze).catch(ze)}ensureInfiniteQueryData(e){return e.behavior=Cc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Mo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(yn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{Sr(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(yn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(r=>{Sr(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Xa(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ja&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},Au=c.createContext(void 0),Wn=e=>{const t=c.useContext(Au);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xg=({client:e,children:t})=>(c.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(Au.Provider,{value:e,children:t})),Tu=c.createContext(!1),wg=()=>c.useContext(Tu);Tu.Provider;function Pu(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Mu=c.createContext(Pu()),Eg=()=>c.useContext(Mu),Sg=({children:e})=>{const[t]=c.useState(()=>Pu());return h.jsx(Mu.Provider,{value:t,children:typeof e=="function"?e(t):e})},Rg=(e,t,n)=>{const r=n?.state.error&&typeof e.throwOnError=="function"?ei(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},Cg=e=>{c.useEffect(()=>{e.clearReset()},[e])},Ag=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:o})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(o&&e.data===void 0||ei(n,[e.error,r])),Tg=(e,t)=>t.state.data===void 0,Pg=e=>{if(e.suspense){const n=o=>o==="static"?o:Math.max(o??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...o)=>n(r(...o)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Mg=(e,t)=>e.isLoading&&e.isFetching&&!t,_g=(e,t)=>e?.suspense&&t.isPending,Tc=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function _u(e,t,n){const r=wg(),o=Eg(),s=Wn(),a=s.defaultQueryOptions(e);s.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const i=s.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",Pg(a),Rg(a,o,i),Cg(o);const l=!s.getQueryCache().get(a.queryHash),[u]=c.useState(()=>new t(s,a)),f=u.getOptimisticResult(a),d=!r&&e.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(p=>{const m=d?u.subscribe(_e.batchCalls(p)):ze;return u.updateResult(),m},[u,d]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),c.useEffect(()=>{u.setOptions(a)},[a,u]),_g(a,f))throw Tc(a,u,o);if(Ag({result:f,errorResetBoundary:o,throwOnError:a.throwOnError,query:i,suspense:a.suspense}))throw f.error;return s.getDefaultOptions().queries?._experimental_afterQuery?.(a,f),a.experimental_prefetchInRender&&!vn&&Mg(f,r)&&(l?Tc(a,u,o):i?.promise)?.catch(ze).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?f:u.trackResult(f)}function Ng(e,t){return _u(e,Ru)}function Nu(e,t){return _u({...e,enabled:!0,suspense:!0,throwOnError:Tg,placeholderData:void 0},Ru)}function Ig(e,t){const n=Wn(),[r]=c.useState(()=>new vg(n,e));c.useEffect(()=>{r.setOptions(e)},[r,e]);const o=c.useSyncExternalStore(c.useCallback(a=>r.subscribe(_e.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),s=c.useCallback((a,i)=>{r.mutate(a,i).catch(ze)},[r]);if(o.error&&ei(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:s,mutateAsync:o.mutate}}var Ds={confirmLabel:"OK",dismissible:!0},Pc={confirmLabel:"Continue",cancelLabel:"Cancel",tone:"default",dismissible:!0},Og=e=>typeof e=="string"?{title:e,...Ds}:{...Ds,...e,dismissible:e.dismissible??Ds.dismissible},Lg=e=>typeof e=="string"?{title:e,...Pc}:{...Pc,...e,dismissible:e.dismissible??e.tone!=="danger"},Dg=()=>{let e={current:null};const t=new Set,n=()=>{t.forEach(l=>l())},r=l=>{e=l,n()},o=()=>e,s=()=>{const l=e.current;!l||l.kind!=="alert"||(r({current:null}),l.resolver())},a=l=>{const u=e.current;!u||u.kind!=="confirm"||(r({current:null}),u.resolver(l))},i=()=>{const l=e.current;if(l){if(l.kind==="confirm"){a(!1);return}s()}};return{subscribe:l=>(t.add(l),()=>{t.delete(l)}),getSnapshot:o,alert:l=>{const u=Og(l);return i(),new Promise(f=>{r({current:{kind:"alert",options:u,resolver:f}})})},confirm:l=>{const u=Lg(l);return i(),new Promise(f=>{r({current:{kind:"confirm",options:u,resolver:f}})})},resolveAlert:s,resolveConfirm:a,dismiss:i,reset:()=>{i()}}},Iu=c.createContext(null),jg=()=>{const e=c.useRef();return e.current||(e.current=Dg()),e.current},Fg=({children:e,components:t})=>{const n=jg(),r=c.useSyncExternalStore(n.subscribe,n.getSnapshot,n.getSnapshot);c.useEffect(()=>()=>{n.reset()},[n]);const o=n,s=r.current;return h.jsxs(Iu.Provider,{value:o,children:[e,s?.kind==="alert"&&h.jsx(t.Alert,{open:!0,options:s.options,onClose:n.resolveAlert}),s?.kind==="confirm"&&h.jsx(t.Confirm,{open:!0,options:s.options,onCancel:()=>n.resolveConfirm(!1),onConfirm:()=>n.resolveConfirm(!0)})]})},kg=()=>{const e=c.useContext(Iu);if(!e)throw new Error("useModal must be used within ModalProvider");return e};function $g(e,t){const n=c.createContext(t),r=s=>{const{children:a,...i}=s,l=c.useMemo(()=>i,Object.values(i));return h.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(s){const a=c.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Nt(e,t=[]){let n=[];function r(s,a){const i=c.createContext(a),l=n.length;n=[...n,a];const u=d=>{const{scope:p,children:m,...g}=d,v=p?.[e]?.[l]||i,y=c.useMemo(()=>g,Object.values(g));return h.jsx(v.Provider,{value:y,children:m})};u.displayName=s+"Provider";function f(d,p){const m=p?.[e]?.[l]||i,g=c.useContext(m);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[u,f]}const o=()=>{const s=n.map(a=>c.createContext(a));return function(i){const l=i?.[e]||s;return c.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,Hg(o,...t)]}function Hg(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const a=r.reduce((i,{useScope:l,scopeName:u})=>{const d=l(s)[`__scope${u}`];return{...i,...d}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Mc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ir(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Mc(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Mc(e[o],null)}}}}function ce(...e){return c.useCallback(Ir(...e),e)}function W(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)}}var Be=globalThis?.document?c.useLayoutEffect:()=>{},Bg=Uo[" useId ".trim().toString()]||(()=>{}),Vg=0;function Tt(e){const[t,n]=c.useState(Bg());return Be(()=>{n(r=>r??String(Vg++))},[e]),t?`radix-${t}`:""}var Zg=Uo[" useInsertionEffect ".trim().toString()]||Be;function Vt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,a]=Ug({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const d=f.current;d!==i&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,r])}const u=c.useCallback(f=>{if(i){const d=zg(f)?f(e):f;d!==e&&a.current?.(d)}else s(f)},[i,e,s,a]);return[l,u]}function Ug({defaultProp:e,onChange:t}){const[n,r]=c.useState(e),o=c.useRef(n),s=c.useRef(t);return Zg(()=>{s.current=t},[t]),c.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}function zg(e){return typeof e=="function"}function Zn(e){const t=qg(e),n=c.forwardRef((r,o)=>{const{children:s,...a}=r,i=c.Children.toArray(s),l=i.find(Kg);if(l){const u=l.props.children,f=i.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function qg(e){const t=c.forwardRef((n,r)=>{const{children:o,...s}=n;if(c.isValidElement(o)){const a=Gg(o),i=Wg(s,o.props);return o.type!==c.Fragment&&(i.ref=r?Ir(r,a):a),c.cloneElement(o,i)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ou=Symbol("radix.slottable");function Lu(e){const t=({children:n})=>h.jsx(h.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ou,t}function Kg(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ou}function Wg(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Gg(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Qg=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=Qg.reduce((e,t)=>{const n=Zn(`Primitive.${t}`),r=c.forwardRef((o,s)=>{const{asChild:a,...i}=o,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),h.jsx(l,{...i,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Du(e,t){e&&Ht.flushSync(()=>e.dispatchEvent(t))}function Mt(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>t.current?.(...n),[])}function Yg(e,t=globalThis?.document){const n=Mt(e);c.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Xg="DismissableLayer",pa="dismissableLayer.update",Jg="dismissableLayer.pointerDownOutside",e2="dismissableLayer.focusOutside",_c,ju=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Or=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:a,onDismiss:i,...l}=e,u=c.useContext(ju),[f,d]=c.useState(null),p=f?.ownerDocument??globalThis?.document,[,m]=c.useState({}),g=ce(t,R=>d(R)),v=Array.from(u.layers),[y]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(y),x=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=b,A=r2(R=>{const S=R.target,_=[...u.branches].some(D=>D.contains(S));!E||_||(o?.(R),a?.(R),R.defaultPrevented||i?.())},p),N=o2(R=>{const S=R.target;[...u.branches].some(D=>D.contains(S))||(s?.(R),a?.(R),R.defaultPrevented||i?.())},p);return Yg(R=>{x===u.layers.size-1&&(r?.(R),!R.defaultPrevented&&i&&(R.preventDefault(),i()))},p),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_c=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Nc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=_c)}},[f,p,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Nc())},[f,u]),c.useEffect(()=>{const R=()=>m({});return document.addEventListener(pa,R),()=>document.removeEventListener(pa,R)},[]),h.jsx(re.div,{...l,ref:g,style:{pointerEvents:w?E?"auto":"none":void 0,...e.style},onFocusCapture:W(e.onFocusCapture,N.onFocusCapture),onBlurCapture:W(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:W(e.onPointerDownCapture,A.onPointerDownCapture)})});Or.displayName=Xg;var t2="DismissableLayerBranch",n2=c.forwardRef((e,t)=>{const n=c.useContext(ju),r=c.useRef(null),o=ce(t,r);return c.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),h.jsx(re.div,{...e,ref:o})});n2.displayName=t2;function r2(e,t=globalThis?.document){const n=Mt(e),r=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const s=i=>{if(i.target&&!r.current){let l=function(){Fu(Jg,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function o2(e,t=globalThis?.document){const n=Mt(e),r=c.useRef(!1);return c.useEffect(()=>{const o=s=>{s.target&&!r.current&&Fu(e2,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Nc(){const e=new CustomEvent(pa);document.dispatchEvent(e)}function Fu(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Du(o,s):o.dispatchEvent(s)}var js="focusScope.autoFocusOnMount",Fs="focusScope.autoFocusOnUnmount",Ic={bubbles:!1,cancelable:!0},s2="FocusScope",es=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...a}=e,[i,l]=c.useState(null),u=Mt(o),f=Mt(s),d=c.useRef(null),p=ce(t,v=>l(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(r){let v=function(w){if(m.paused||!i)return;const E=w.target;i.contains(E)?d.current=E:qt(d.current,{select:!0})},y=function(w){if(m.paused||!i)return;const E=w.relatedTarget;E!==null&&(i.contains(E)||qt(d.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const A of w)A.removedNodes.length>0&&qt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",y);const x=new MutationObserver(b);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",y),x.disconnect()}}},[r,i,m.paused]),c.useEffect(()=>{if(i){Lc.add(m);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(js,Ic);i.addEventListener(js,u),i.dispatchEvent(b),b.defaultPrevented||(a2(d2(ku(i)),{select:!0}),document.activeElement===v&&qt(i))}return()=>{i.removeEventListener(js,u),setTimeout(()=>{const b=new CustomEvent(Fs,Ic);i.addEventListener(Fs,f),i.dispatchEvent(b),b.defaultPrevented||qt(v??document.body,{select:!0}),i.removeEventListener(Fs,f),Lc.remove(m)},0)}}},[i,u,f,m]);const g=c.useCallback(v=>{if(!n&&!r||m.paused)return;const y=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(y&&b){const x=v.currentTarget,[w,E]=i2(x);w&&E?!v.shiftKey&&b===E?(v.preventDefault(),n&&qt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),n&&qt(E,{select:!0})):b===x&&v.preventDefault()}},[n,r,m.paused]);return h.jsx(re.div,{tabIndex:-1,...a,ref:p,onKeyDown:g})});es.displayName=s2;function a2(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(qt(r,{select:t}),document.activeElement!==n)return}function i2(e){const t=ku(e),n=Oc(t,e),r=Oc(t.reverse(),e);return[n,r]}function ku(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Oc(e,t){for(const n of e)if(!c2(n,{upTo:t}))return n}function c2(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function l2(e){return e instanceof HTMLInputElement&&"select"in e}function qt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&l2(e)&&t&&e.select()}}var Lc=u2();function u2(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Dc(e,t),e.unshift(t)},remove(t){e=Dc(e,t),e[0]?.resume()}}}function Dc(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function d2(e){return e.filter(t=>t.tagName!=="A")}var f2="Portal",Lr=c.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=c.useState(!1);Be(()=>s(!0),[]);const a=n||o&&globalThis?.document?.body;return a?ql.createPortal(h.jsx(re.div,{...r,ref:t}),a):null});Lr.displayName=f2;function h2(e,t){return c.useReducer((n,r)=>t[n][r]??n,e)}var It=e=>{const{present:t,children:n}=e,r=p2(t),o=typeof n=="function"?n({present:r.isPresent}):c.Children.only(n),s=ce(r.ref,m2(o));return typeof n=="function"||r.isPresent?c.cloneElement(o,{ref:s}):null};It.displayName="Presence";function p2(e){const[t,n]=c.useState(),r=c.useRef(null),o=c.useRef(e),s=c.useRef("none"),a=e?"mounted":"unmounted",[i,l]=h2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=eo(r.current);s.current=i==="mounted"?u:"none"},[i]),Be(()=>{const u=r.current,f=o.current;if(f!==e){const p=s.current,m=eo(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(f&&p!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Be(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,d=m=>{const v=eo(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},p=m=>{m.target===t&&(s.current=eo(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:c.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function eo(e){return e?.animationName||"none"}function m2(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ks=0;function ri(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??jc()),document.body.insertAdjacentElement("beforeend",e[1]??jc()),ks++,()=>{ks===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ks--}},[])}function jc(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var g2=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},In=new WeakMap,to=new WeakMap,no={},$s=0,$u=function(e){return e&&(e.host||$u(e.parentNode))},v2=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=$u(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},y2=function(e,t,n,r){var o=v2(t,Array.isArray(e)?e:[e]);no[n]||(no[n]=new WeakMap);var s=no[n],a=[],i=new Set,l=new Set(o),u=function(d){!d||i.has(d)||(i.add(d),u(d.parentNode))};o.forEach(u);var f=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(i.has(p))f(p);else try{var m=p.getAttribute(r),g=m!==null&&m!=="false",v=(In.get(p)||0)+1,y=(s.get(p)||0)+1;In.set(p,v),s.set(p,y),a.push(p),v===1&&g&&to.set(p,!0),y===1&&p.setAttribute(n,"true"),g||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return f(t),i.clear(),$s++,function(){a.forEach(function(d){var p=In.get(d)-1,m=s.get(d)-1;In.set(d,p),s.set(d,m),p||(to.has(d)||d.removeAttribute(r),to.delete(d)),m||d.removeAttribute(n)}),$s--,$s||(In=new WeakMap,In=new WeakMap,to=new WeakMap,no={})}},oi=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=g2(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),y2(r,o,n,"aria-hidden")):function(){return null}},ts="Dialog",[Hu,Bu]=Nt(ts),[b2,Et]=Hu(ts),Vu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:a=!0}=e,i=c.useRef(null),l=c.useRef(null),[u,f]=Vt({prop:r,defaultProp:o??!1,onChange:s,caller:ts});return h.jsx(b2,{scope:t,triggerRef:i,contentRef:l,contentId:Tt(),titleId:Tt(),descriptionId:Tt(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(d=>!d),[f]),modal:a,children:n})};Vu.displayName=ts;var Zu="DialogTrigger",Uu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(Zu,n),s=ce(t,o.triggerRef);return h.jsx(re.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ii(o.open),...r,ref:s,onClick:W(e.onClick,o.onOpenToggle)})});Uu.displayName=Zu;var si="DialogPortal",[x2,zu]=Hu(si,{forceMount:void 0}),qu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=Et(si,t);return h.jsx(x2,{scope:t,forceMount:n,children:c.Children.map(r,a=>h.jsx(It,{present:n||s.open,children:h.jsx(Lr,{asChild:!0,container:o,children:a})}))})};qu.displayName=si;var _o="DialogOverlay",Ku=c.forwardRef((e,t)=>{const n=zu(_o,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Et(_o,e.__scopeDialog);return s.modal?h.jsx(It,{present:r||s.open,children:h.jsx(E2,{...o,ref:t})}):null});Ku.displayName=_o;var w2=Zn("DialogOverlay.RemoveScroll"),E2=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(_o,n);return h.jsx(Ba,{as:w2,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(re.div,{"data-state":ii(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),bn="DialogContent",Wu=c.forwardRef((e,t)=>{const n=zu(bn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=Et(bn,e.__scopeDialog);return h.jsx(It,{present:r||s.open,children:s.modal?h.jsx(S2,{...o,ref:t}):h.jsx(R2,{...o,ref:t})})});Wu.displayName=bn;var S2=c.forwardRef((e,t)=>{const n=Et(bn,e.__scopeDialog),r=c.useRef(null),o=ce(t,n.contentRef,r);return c.useEffect(()=>{const s=r.current;if(s)return oi(s)},[]),h.jsx(Gu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:W(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:W(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,i=a.button===0&&a.ctrlKey===!0;(a.button===2||i)&&s.preventDefault()}),onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault())})}),R2=c.forwardRef((e,t)=>{const n=Et(bn,e.__scopeDialog),r=c.useRef(!1),o=c.useRef(!1);return h.jsx(Gu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Gu=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...a}=e,i=Et(bn,n),l=c.useRef(null),u=ce(t,l);return ri(),h.jsxs(h.Fragment,{children:[h.jsx(es,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:h.jsx(Or,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":ii(i.open),...a,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(A2,{titleId:i.titleId}),h.jsx(P2,{contentRef:l,descriptionId:i.descriptionId})]})]})}),ai="DialogTitle",Qu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(ai,n);return h.jsx(re.h2,{id:o.titleId,...r,ref:t})});Qu.displayName=ai;var Yu="DialogDescription",Xu=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(Yu,n);return h.jsx(re.p,{id:o.descriptionId,...r,ref:t})});Xu.displayName=Yu;var Ju="DialogClose",ed=c.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Et(Ju,n);return h.jsx(re.button,{type:"button",...r,ref:t,onClick:W(e.onClick,()=>o.onOpenChange(!1))})});ed.displayName=Ju;function ii(e){return e?"open":"closed"}var td="DialogTitleWarning",[C2,nd]=$g(td,{contentName:bn,titleName:ai,docsSlug:"dialog"}),A2=({titleId:e})=>{const t=nd(td),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
3
|
+
|
|
4
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
5
|
+
|
|
6
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},T2="DialogDescriptionWarning",P2=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nd(T2).contentName}}.`;return c.useEffect(()=>{const o=e.current?.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},rd=Vu,M2=Uu,od=qu,sd=Ku,ad=Wu,id=Qu,cd=Xu,ci=ed,ld="AlertDialog",[_2]=Nt(ld,[Bu]),Zt=Bu(),ud=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zt(t);return h.jsx(rd,{...r,...n,modal:!0})};ud.displayName=ld;var N2="AlertDialogTrigger",I2=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return h.jsx(M2,{...o,...r,ref:t})});I2.displayName=N2;var O2="AlertDialogPortal",dd=e=>{const{__scopeAlertDialog:t,...n}=e,r=Zt(t);return h.jsx(od,{...r,...n})};dd.displayName=O2;var L2="AlertDialogOverlay",fd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return h.jsx(sd,{...o,...r,ref:t})});fd.displayName=L2;var kn="AlertDialogContent",[D2,j2]=_2(kn),F2=Lu("AlertDialogContent"),hd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...o}=e,s=Zt(n),a=c.useRef(null),i=ce(t,a),l=c.useRef(null);return h.jsx(C2,{contentName:kn,titleName:pd,docsSlug:"alert-dialog",children:h.jsx(D2,{scope:n,cancelRef:l,children:h.jsxs(ad,{role:"alertdialog",...s,...o,ref:i,onOpenAutoFocus:W(o.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[h.jsx(F2,{children:r}),h.jsx($2,{contentRef:a})]})})})});hd.displayName=kn;var pd="AlertDialogTitle",md=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return h.jsx(id,{...o,...r,ref:t})});md.displayName=pd;var gd="AlertDialogDescription",vd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return h.jsx(cd,{...o,...r,ref:t})});vd.displayName=gd;var k2="AlertDialogAction",yd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,o=Zt(n);return h.jsx(ci,{...o,...r,ref:t})});yd.displayName=k2;var bd="AlertDialogCancel",xd=c.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:o}=j2(bd,n),s=Zt(n),a=ce(t,o);return h.jsx(ci,{...s,...r,ref:a})});xd.displayName=bd;var $2=({contentRef:e})=>{const t=`\`${kn}\` requires a description for the component to be accessible for screen reader users.
|
|
7
|
+
|
|
8
|
+
You can add a description to the \`${kn}\` by passing a \`${gd}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
9
|
+
|
|
10
|
+
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${kn}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
11
|
+
|
|
12
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return c.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},H2=ud,B2=dd,V2=fd,Z2=hd,U2=yd,z2=xd,q2=md,K2=vd,wd=H2,Ed=B2,Sd=V2,Rd=Z2,W2=z2,Cd=U2,Ad=q2,Td=K2,Hs={exports:{}};var Fc;function G2(){return Fc||(Fc=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(s=o(s,r(i)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(null,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var i in s)t.call(s,i)&&s[i]&&(a=o(a,i));return a}function o(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Hs)),Hs.exports}var Q2=G2();const pe=qn(Q2);var Y2=Symbol.for("react.lazy"),No=Uo[" use ".trim().toString()];function X2(e){return typeof e=="object"&&e!==null&&"then"in e}function Pd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Y2&&"_payload"in e&&X2(e._payload)}function J2(e){const t=tv(e),n=c.forwardRef((r,o)=>{let{children:s,...a}=r;Pd(s)&&typeof No=="function"&&(s=No(s._payload));const i=c.Children.toArray(s),l=i.find(rv);if(l){const u=l.props.children,f=i.map(d=>d===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:d);return h.jsx(t,{...a,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return h.jsx(t,{...a,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var ev=J2("Slot");function tv(e){const t=c.forwardRef((n,r)=>{let{children:o,...s}=n;if(Pd(o)&&typeof No=="function"&&(o=No(o._payload)),c.isValidElement(o)){const a=sv(o),i=ov(s,o.props);return o.type!==c.Fragment&&(i.ref=r?Ir(r,a):a),c.cloneElement(o,i)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var nv=Symbol("radix.slottable");function rv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===nv}function ov(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...i)=>{const l=s(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function sv(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const av=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),iv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm60-80v56a12,12,0,0,1-24,0V143.32a12,12,0,0,1-9.37-22l16-8A12,12,0,0,1,112,124Zm61.49,33.88L163.9,168H168a12,12,0,0,1,0,24H136a12,12,0,0,1-8.71-20.25L155.45,142a4,4,0,0,0,.55-2,4,4,0,0,0-7.47-2,12,12,0,0,1-20.78-12A28,28,0,0,1,180,140a27.77,27.77,0,0,1-5.64,16.86A10.63,10.63,0,0,1,173.49,157.88Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z",opacity:"0.2"}),c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM112,184a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm56-8a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136a23.76,23.76,0,0,1-4.84,14.45L152,176ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-98-90v64a6,6,0,0,1-12,0V129.71l-7.32,3.66a6,6,0,1,1-5.36-10.74l16-8A6,6,0,0,1,110,120Zm59.57,29.25L148,178h20a6,6,0,0,1,0,12H136a6,6,0,0,1-4.8-9.6L160,142a10,10,0,1,0-16.65-11A6,6,0,1,1,133,125a22,22,0,1,1,36.62,24.26Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-96-88v64a8,8,0,0,1-16,0V132.94l-4.42,2.22a8,8,0,0,1-7.16-14.32l16-8A8,8,0,0,1,112,120Zm59.16,30.45L152,176h16a8,8,0,0,1,0,16H136a8,8,0,0,1-6.4-12.8l28.78-38.37A8,8,0,1,0,145.07,132a8,8,0,1,1-13.85-8A24,24,0,0,1,176,136,23.76,23.76,0,0,1,171.16,150.45Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212ZM108,120v64a4,4,0,0,1-8,0V126.47l-10.21,5.11a4,4,0,0,1-3.58-7.16l16-8A4,4,0,0,1,108,120Zm60,28-24,32h24a4,4,0,0,1,0,8H136a4,4,0,0,1-3.2-6.4l28.78-38.37A11.88,11.88,0,0,0,164,136a12,12,0,0,0-22.4-6,4,4,0,0,1-6.92-4A20,20,0,0,1,172,136,19.79,19.79,0,0,1,168,148Z"}))]]),cv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,96l-80,80L48,96Z",opacity:"0.2"}),c.createElement("path",{d:"M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z"}))]]),lv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168.49,199.51a12,12,0,0,1-17,17l-80-80a12,12,0,0,1,0-17l80-80a12,12,0,0,1,17,17L97,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M160,48V208L80,128Z",opacity:"0.2"}),c.createElement("path",{d:"M163.06,40.61a8,8,0,0,0-8.72,1.73l-80,80a8,8,0,0,0,0,11.32l80,80A8,8,0,0,0,168,208V48A8,8,0,0,0,163.06,40.61ZM152,188.69,91.31,128,152,67.31Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,48V208a8,8,0,0,1-13.66,5.66l-80-80a8,8,0,0,1,0-11.32l80-80A8,8,0,0,1,168,48Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M164.24,203.76a6,6,0,1,1-8.48,8.48l-80-80a6,6,0,0,1,0-8.48l80-80a6,6,0,0,1,8.48,8.48L88.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M165.66,202.34a8,8,0,0,1-11.32,11.32l-80-80a8,8,0,0,1,0-11.32l80-80a8,8,0,0,1,11.32,11.32L91.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M162.83,205.17a4,4,0,0,1-5.66,5.66l-80-80a4,4,0,0,1,0-5.66l80-80a4,4,0,1,1,5.66,5.66L85.66,128Z"}))]]),uv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,128,96,208V48Z",opacity:"0.2"}),c.createElement("path",{d:"M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z"}))]]),dv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),fv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M108,60A16,16,0,1,1,92,44,16,16,0,0,1,108,60Zm56,16a16,16,0,1,0-16-16A16,16,0,0,0,164,76ZM92,112a16,16,0,1,0,16,16A16,16,0,0,0,92,112Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,112ZM92,180a16,16,0,1,0,16,16A16,16,0,0,0,92,180Zm72,0a16,16,0,1,0,16,16A16,16,0,0,0,164,180Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32V224a16,16,0,0,1-16,16H64a16,16,0,0,1-16-16V32A16,16,0,0,1,64,16H192A16,16,0,0,1,208,32Z",opacity:"0.2"}),c.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,16H64A16,16,0,0,0,48,32V224a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V32A16,16,0,0,0,192,16ZM100,200a12,12,0,1,1,12-12A12,12,0,0,1,100,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,100,80Zm56,120a12,12,0,1,1,12-12A12,12,0,0,1,156,200Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,140Zm0-60a12,12,0,1,1,12-12A12,12,0,0,1,156,80Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M102,60A10,10,0,1,1,92,50,10,10,0,0,1,102,60Zm62,10a10,10,0,1,0-10-10A10,10,0,0,0,164,70ZM92,118a10,10,0,1,0,10,10A10,10,0,0,0,92,118Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,118ZM92,186a10,10,0,1,0,10,10A10,10,0,0,0,92,186Zm72,0a10,10,0,1,0,10,10A10,10,0,0,0,164,186Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M104,60A12,12,0,1,1,92,48,12,12,0,0,1,104,60Zm60,12a12,12,0,1,0-12-12A12,12,0,0,0,164,72ZM92,116a12,12,0,1,0,12,12A12,12,0,0,0,92,116Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,116ZM92,184a12,12,0,1,0,12,12A12,12,0,0,0,92,184Zm72,0a12,12,0,1,0,12,12A12,12,0,0,0,164,184Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M100,60a8,8,0,1,1-8-8A8,8,0,0,1,100,60Zm64,8a8,8,0,1,0-8-8A8,8,0,0,0,164,68ZM92,120a8,8,0,1,0,8,8A8,8,0,0,0,92,120Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,120ZM92,188a8,8,0,1,0,8,8A8,8,0,0,0,92,188Zm72,0a8,8,0,1,0,8,8A8,8,0,0,0,164,188Z"}))]]),hv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M112,60a16,16,0,1,1,16,16A16,16,0,0,1,112,60Zm16,52a16,16,0,1,0,16,16A16,16,0,0,0,128,112Zm0,68a16,16,0,1,0,16,16A16,16,0,0,0,128,180Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M176,32V224a16,16,0,0,1-16,16H96a16,16,0,0,1-16-16V32A16,16,0,0,1,96,16h64A16,16,0,0,1,176,32Z",opacity:"0.2"}),c.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M160,16H96A16,16,0,0,0,80,32V224a16,16,0,0,0,16,16h64a16,16,0,0,0,16-16V32A16,16,0,0,0,160,16ZM128,208a12,12,0,1,1,12-12A12,12,0,0,1,128,208Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm0-68a12,12,0,1,1,12-12A12,12,0,0,1,128,72Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M118,60a10,10,0,1,1,10,10A10,10,0,0,1,118,60Zm10,58a10,10,0,1,0,10,10A10,10,0,0,0,128,118Zm0,68a10,10,0,1,0,10,10A10,10,0,0,0,128,186Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128ZM128,72a12,12,0,1,0-12-12A12,12,0,0,0,128,72Zm0,112a12,12,0,1,0,12,12A12,12,0,0,0,128,184Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M120,60a8,8,0,1,1,8,8A8,8,0,0,1,120,60Zm8,60a8,8,0,1,0,8,8A8,8,0,0,0,128,120Zm0,68a8,8,0,1,0,8,8A8,8,0,0,0,128,188Z"}))]]),pv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M251,123.13c-.37-.81-9.13-20.26-28.48-39.61C196.63,57.67,164,44,128,44S59.37,57.67,33.51,83.52C14.16,102.87,5.4,122.32,5,123.13a12.08,12.08,0,0,0,0,9.75c.37.82,9.13,20.26,28.49,39.61C59.37,198.34,92,212,128,212s68.63-13.66,94.48-39.51c19.36-19.35,28.12-38.79,28.49-39.61A12.08,12.08,0,0,0,251,123.13Zm-46.06,33C183.47,177.27,157.59,188,128,188s-55.47-10.73-76.91-31.88A130.36,130.36,0,0,1,29.52,128,130.45,130.45,0,0,1,51.09,99.89C72.54,78.73,98.41,68,128,68s55.46,10.73,76.91,31.89A130.36,130.36,0,0,1,226.48,128,130.45,130.45,0,0,1,204.91,156.12ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,64a20,20,0,1,1,20-20A20,20,0,0,1,128,148Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,56C48,56,16,128,16,128s32,72,112,72,112-72,112-72S208,56,128,56Zm0,112a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M245.48,125.57c-.34-.78-8.66-19.23-27.24-37.81C201,70.54,171.38,50,128,50S55,70.54,37.76,87.76c-18.58,18.58-26.9,37-27.24,37.81a6,6,0,0,0,0,4.88c.34.77,8.66,19.22,27.24,37.8C55,185.47,84.62,206,128,206s73-20.53,90.24-37.75c18.58-18.58,26.9-37,27.24-37.8A6,6,0,0,0,245.48,125.57ZM128,194c-31.38,0-58.78-11.42-81.45-33.93A134.77,134.77,0,0,1,22.69,128,134.56,134.56,0,0,1,46.55,95.94C69.22,73.42,96.62,62,128,62s58.78,11.42,81.45,33.94A134.56,134.56,0,0,1,233.31,128C226.94,140.21,195,194,128,194Zm0-112a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.66,126.38c-.34-.76-8.52-18.89-26.83-37.2C199.87,72.22,170.7,52,128,52S56.13,72.22,39.17,89.18c-18.31,18.31-26.49,36.44-26.83,37.2a4.08,4.08,0,0,0,0,3.25c.34.77,8.52,18.89,26.83,37.2,17,17,46.14,37.17,88.83,37.17s71.87-20.21,88.83-37.17c18.31-18.31,26.49-36.43,26.83-37.2A4.08,4.08,0,0,0,243.66,126.38Zm-32.7,35c-23.07,23-51,34.62-83,34.62s-59.89-11.65-83-34.62A135.71,135.71,0,0,1,20.44,128,135.69,135.69,0,0,1,45,94.62C68.11,71.65,96,60,128,60s59.89,11.65,83,34.62A135.79,135.79,0,0,1,235.56,128,135.71,135.71,0,0,1,211,161.38ZM128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Z"}))]]),mv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216.49,79.52l-56-56A12,12,0,0,0,152,20H56A20,20,0,0,0,36,40V216a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V88A12,12,0,0,0,216.49,79.52ZM160,57l23,23H160ZM60,212V44h76V92a12,12,0,0,0,12,12h48V212Zm112-80a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,132Zm0,40a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h64A12,12,0,0,1,172,172Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,88H152V32Z",opacity:"0.2"}),c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,176H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm-8-56V44l44,44Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M212.24,83.76l-56-56A6,6,0,0,0,152,26H56A14,14,0,0,0,42,40V216a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V88A6,6,0,0,0,212.24,83.76ZM158,46.48,193.52,82H158ZM200,218H56a2,2,0,0,1-2-2V40a2,2,0,0,1,2-2h90V88a6,6,0,0,0,6,6h50V216A2,2,0,0,1,200,218Zm-34-82a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,136Zm0,32a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h64A6,6,0,0,1,166,168Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M213.66,82.34l-56-56A8,8,0,0,0,152,24H56A16,16,0,0,0,40,40V216a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V88A8,8,0,0,0,213.66,82.34ZM160,51.31,188.69,80H160ZM200,216H56V40h88V88a8,8,0,0,0,8,8h48V216Zm-32-80a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,136Zm0,32a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h64A8,8,0,0,1,168,168Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M210.83,85.17l-56-56A4,4,0,0,0,152,28H56A12,12,0,0,0,44,40V216a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V88A4,4,0,0,0,210.83,85.17ZM156,41.65,198.34,84H156ZM200,220H56a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h92V88a4,4,0,0,0,4,4h52V216A4,4,0,0,1,200,220Zm-36-84a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,136Zm0,32a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h64A4,4,0,0,1,164,168Z"}))]]),gv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,76a52,52,0,1,0,52,52A52.06,52.06,0,0,0,128,76Zm0,80a28,28,0,1,1,28-28A28,28,0,0,1,128,156Zm92-27.21v-1.58l14-17.51a12,12,0,0,0,2.23-10.59A111.75,111.75,0,0,0,225,71.89,12,12,0,0,0,215.89,66L193.61,63.5l-1.11-1.11L190,40.1A12,12,0,0,0,184.11,31a111.67,111.67,0,0,0-27.23-11.27A12,12,0,0,0,146.3,22L128.79,36h-1.58L109.7,22a12,12,0,0,0-10.59-2.23A111.75,111.75,0,0,0,71.89,31.05,12,12,0,0,0,66,40.11L63.5,62.39,62.39,63.5,40.1,66A12,12,0,0,0,31,71.89,111.67,111.67,0,0,0,19.77,99.12,12,12,0,0,0,22,109.7l14,17.51v1.58L22,146.3a12,12,0,0,0-2.23,10.59,111.75,111.75,0,0,0,11.29,27.22A12,12,0,0,0,40.11,190l22.28,2.48,1.11,1.11L66,215.9A12,12,0,0,0,71.89,225a111.67,111.67,0,0,0,27.23,11.27A12,12,0,0,0,109.7,234l17.51-14h1.58l17.51,14a12,12,0,0,0,10.59,2.23A111.75,111.75,0,0,0,184.11,225a12,12,0,0,0,5.91-9.06l2.48-22.28,1.11-1.11L215.9,190a12,12,0,0,0,9.06-5.91,111.67,111.67,0,0,0,11.27-27.23A12,12,0,0,0,234,146.3Zm-24.12-4.89a70.1,70.1,0,0,1,0,8.2,12,12,0,0,0,2.61,8.22l12.84,16.05A86.47,86.47,0,0,1,207,166.86l-20.43,2.27a12,12,0,0,0-7.65,4,69,69,0,0,1-5.8,5.8,12,12,0,0,0-4,7.65L166.86,207a86.47,86.47,0,0,1-10.49,4.35l-16.05-12.85a12,12,0,0,0-7.5-2.62c-.24,0-.48,0-.72,0a70.1,70.1,0,0,1-8.2,0,12.06,12.06,0,0,0-8.22,2.6L99.63,211.33A86.47,86.47,0,0,1,89.14,207l-2.27-20.43a12,12,0,0,0-4-7.65,69,69,0,0,1-5.8-5.8,12,12,0,0,0-7.65-4L49,166.86a86.47,86.47,0,0,1-4.35-10.49l12.84-16.05a12,12,0,0,0,2.61-8.22,70.1,70.1,0,0,1,0-8.2,12,12,0,0,0-2.61-8.22L44.67,99.63A86.47,86.47,0,0,1,49,89.14l20.43-2.27a12,12,0,0,0,7.65-4,69,69,0,0,1,5.8-5.8,12,12,0,0,0,4-7.65L89.14,49a86.47,86.47,0,0,1,10.49-4.35l16.05,12.85a12.06,12.06,0,0,0,8.22,2.6,70.1,70.1,0,0,1,8.2,0,12,12,0,0,0,8.22-2.6l16.05-12.85A86.47,86.47,0,0,1,166.86,49l2.27,20.43a12,12,0,0,0,4,7.65,69,69,0,0,1,5.8,5.8,12,12,0,0,0,7.65,4L207,89.14a86.47,86.47,0,0,1,4.35,10.49l-12.84,16.05A12,12,0,0,0,195.88,123.9Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M207.86,123.18l16.78-21a99.14,99.14,0,0,0-10.07-24.29l-26.7-3a81,81,0,0,0-6.81-6.81l-3-26.71a99.43,99.43,0,0,0-24.3-10l-21,16.77a81.59,81.59,0,0,0-9.64,0l-21-16.78A99.14,99.14,0,0,0,77.91,41.43l-3,26.7a81,81,0,0,0-6.81,6.81l-26.71,3a99.43,99.43,0,0,0-10,24.3l16.77,21a81.59,81.59,0,0,0,0,9.64l-16.78,21a99.14,99.14,0,0,0,10.07,24.29l26.7,3a81,81,0,0,0,6.81,6.81l3,26.71a99.43,99.43,0,0,0,24.3,10l21-16.77a81.59,81.59,0,0,0,9.64,0l21,16.78a99.14,99.14,0,0,0,24.29-10.07l3-26.7a81,81,0,0,0,6.81-6.81l26.71-3a99.43,99.43,0,0,0,10-24.3l-16.77-21A81.59,81.59,0,0,0,207.86,123.18ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z",opacity:"0.2"}),c.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8.06,8.06,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8.06,8.06,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,130.16q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.6,107.6,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.29,107.29,0,0,0-26.25-10.86,8,8,0,0,0-7.06,1.48L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.6,107.6,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06ZM128,168a40,40,0,1,1,40-40A40,40,0,0,1,128,168Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,82a46,46,0,1,0,46,46A46.06,46.06,0,0,0,128,82Zm0,80a34,34,0,1,1,34-34A34,34,0,0,1,128,162ZM214,130.84c.06-1.89.06-3.79,0-5.68L229.33,106a6,6,0,0,0,1.11-5.29A105.34,105.34,0,0,0,219.76,74.9a6,6,0,0,0-4.53-3l-24.45-2.71q-1.93-2.07-4-4l-2.72-24.46a6,6,0,0,0-3-4.53,105.65,105.65,0,0,0-25.77-10.66A6,6,0,0,0,150,26.68l-19.2,15.37c-1.89-.06-3.79-.06-5.68,0L106,26.67a6,6,0,0,0-5.29-1.11A105.34,105.34,0,0,0,74.9,36.24a6,6,0,0,0-3,4.53L69.23,65.22q-2.07,1.94-4,4L40.76,72a6,6,0,0,0-4.53,3,105.65,105.65,0,0,0-10.66,25.77A6,6,0,0,0,26.68,106l15.37,19.2c-.06,1.89-.06,3.79,0,5.68L26.67,150.05a6,6,0,0,0-1.11,5.29A105.34,105.34,0,0,0,36.24,181.1a6,6,0,0,0,4.53,3l24.45,2.71q1.94,2.07,4,4L72,215.24a6,6,0,0,0,3,4.53,105.65,105.65,0,0,0,25.77,10.66,6,6,0,0,0,5.29-1.11L125.16,214c1.89.06,3.79.06,5.68,0l19.21,15.38a6,6,0,0,0,3.75,1.31,6.2,6.2,0,0,0,1.54-.2,105.34,105.34,0,0,0,25.76-10.68,6,6,0,0,0,3-4.53l2.71-24.45q2.07-1.93,4-4l24.46-2.72a6,6,0,0,0,4.53-3,105.49,105.49,0,0,0,10.66-25.77,6,6,0,0,0-1.11-5.29Zm-3.1,41.63-23.64,2.63a6,6,0,0,0-3.82,2,75.14,75.14,0,0,1-6.31,6.31,6,6,0,0,0-2,3.82l-2.63,23.63A94.28,94.28,0,0,1,155.14,218l-18.57-14.86a6,6,0,0,0-3.75-1.31h-.36a78.07,78.07,0,0,1-8.92,0,6,6,0,0,0-4.11,1.3L100.87,218a94.13,94.13,0,0,1-17.34-7.17L80.9,187.21a6,6,0,0,0-2-3.82,75.14,75.14,0,0,1-6.31-6.31,6,6,0,0,0-3.82-2l-23.63-2.63A94.28,94.28,0,0,1,38,155.14l14.86-18.57a6,6,0,0,0,1.3-4.11,78.07,78.07,0,0,1,0-8.92,6,6,0,0,0-1.3-4.11L38,100.87a94.13,94.13,0,0,1,7.17-17.34L68.79,80.9a6,6,0,0,0,3.82-2,75.14,75.14,0,0,1,6.31-6.31,6,6,0,0,0,2-3.82l2.63-23.63A94.28,94.28,0,0,1,100.86,38l18.57,14.86a6,6,0,0,0,4.11,1.3,78.07,78.07,0,0,1,8.92,0,6,6,0,0,0,4.11-1.3L155.13,38a94.13,94.13,0,0,1,17.34,7.17l2.63,23.64a6,6,0,0,0,2,3.82,75.14,75.14,0,0,1,6.31,6.31,6,6,0,0,0,3.82,2l23.63,2.63A94.28,94.28,0,0,1,218,100.86l-14.86,18.57a6,6,0,0,0-1.3,4.11,78.07,78.07,0,0,1,0,8.92,6,6,0,0,0,1.3,4.11L218,155.13A94.13,94.13,0,0,1,210.85,172.47Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,80a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Zm88-29.84q.06-2.16,0-4.32l14.92-18.64a8,8,0,0,0,1.48-7.06,107.21,107.21,0,0,0-10.88-26.25,8,8,0,0,0-6-3.93l-23.72-2.64q-1.48-1.56-3-3L186,40.54a8,8,0,0,0-3.94-6,107.71,107.71,0,0,0-26.25-10.87,8,8,0,0,0-7.06,1.49L130.16,40Q128,40,125.84,40L107.2,25.11a8,8,0,0,0-7.06-1.48A107.6,107.6,0,0,0,73.89,34.51a8,8,0,0,0-3.93,6L67.32,64.27q-1.56,1.49-3,3L40.54,70a8,8,0,0,0-6,3.94,107.71,107.71,0,0,0-10.87,26.25,8,8,0,0,0,1.49,7.06L40,125.84Q40,128,40,130.16L25.11,148.8a8,8,0,0,0-1.48,7.06,107.21,107.21,0,0,0,10.88,26.25,8,8,0,0,0,6,3.93l23.72,2.64q1.49,1.56,3,3L70,215.46a8,8,0,0,0,3.94,6,107.71,107.71,0,0,0,26.25,10.87,8,8,0,0,0,7.06-1.49L125.84,216q2.16.06,4.32,0l18.64,14.92a8,8,0,0,0,7.06,1.48,107.21,107.21,0,0,0,26.25-10.88,8,8,0,0,0,3.93-6l2.64-23.72q1.56-1.48,3-3L215.46,186a8,8,0,0,0,6-3.94,107.71,107.71,0,0,0,10.87-26.25,8,8,0,0,0-1.49-7.06Zm-16.1-6.5a73.93,73.93,0,0,1,0,8.68,8,8,0,0,0,1.74,5.48l14.19,17.73a91.57,91.57,0,0,1-6.23,15L187,173.11a8,8,0,0,0-5.1,2.64,74.11,74.11,0,0,1-6.14,6.14,8,8,0,0,0-2.64,5.1l-2.51,22.58a91.32,91.32,0,0,1-15,6.23l-17.74-14.19a8,8,0,0,0-5-1.75h-.48a73.93,73.93,0,0,1-8.68,0,8,8,0,0,0-5.48,1.74L100.45,215.8a91.57,91.57,0,0,1-15-6.23L82.89,187a8,8,0,0,0-2.64-5.1,74.11,74.11,0,0,1-6.14-6.14,8,8,0,0,0-5.1-2.64L46.43,170.6a91.32,91.32,0,0,1-6.23-15l14.19-17.74a8,8,0,0,0,1.74-5.48,73.93,73.93,0,0,1,0-8.68,8,8,0,0,0-1.74-5.48L40.2,100.45a91.57,91.57,0,0,1,6.23-15L69,82.89a8,8,0,0,0,5.1-2.64,74.11,74.11,0,0,1,6.14-6.14A8,8,0,0,0,82.89,69L85.4,46.43a91.32,91.32,0,0,1,15-6.23l17.74,14.19a8,8,0,0,0,5.48,1.74,73.93,73.93,0,0,1,8.68,0,8,8,0,0,0,5.48-1.74L155.55,40.2a91.57,91.57,0,0,1,15,6.23L173.11,69a8,8,0,0,0,2.64,5.1,74.11,74.11,0,0,1,6.14,6.14,8,8,0,0,0,5.1,2.64l22.58,2.51a91.32,91.32,0,0,1,6.23,15l-14.19,17.74A8,8,0,0,0,199.87,123.66Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,84a44,44,0,1,0,44,44A44.05,44.05,0,0,0,128,84Zm0,80a36,36,0,1,1,36-36A36,36,0,0,1,128,164Zm83.93-32.49q.13-3.51,0-7l15.83-19.79a4,4,0,0,0,.75-3.53A103.64,103.64,0,0,0,218,75.9a4,4,0,0,0-3-2l-25.19-2.8c-1.58-1.71-3.24-3.37-4.95-4.95L182.07,41a4,4,0,0,0-2-3A104,104,0,0,0,154.82,27.5a4,4,0,0,0-3.53.74L131.51,44.07q-3.51-.14-7,0L104.7,28.24a4,4,0,0,0-3.53-.75A103.64,103.64,0,0,0,75.9,38a4,4,0,0,0-2,3l-2.8,25.19c-1.71,1.58-3.37,3.24-4.95,4.95L41,73.93a4,4,0,0,0-3,2A104,104,0,0,0,27.5,101.18a4,4,0,0,0,.74,3.53l15.83,19.78q-.14,3.51,0,7L28.24,151.3a4,4,0,0,0-.75,3.53A103.64,103.64,0,0,0,38,180.1a4,4,0,0,0,3,2l25.19,2.8c1.58,1.71,3.24,3.37,4.95,4.95l2.8,25.2a4,4,0,0,0,2,3,104,104,0,0,0,25.28,10.46,4,4,0,0,0,3.53-.74l19.78-15.83q3.51.13,7,0l19.79,15.83a4,4,0,0,0,2.5.88,4,4,0,0,0,1-.13A103.64,103.64,0,0,0,180.1,218a4,4,0,0,0,2-3l2.8-25.19c1.71-1.58,3.37-3.24,4.95-4.95l25.2-2.8a4,4,0,0,0,3-2,104,104,0,0,0,10.46-25.28,4,4,0,0,0-.74-3.53Zm.17,42.83-24.67,2.74a4,4,0,0,0-2.55,1.32,76.2,76.2,0,0,1-6.48,6.48,4,4,0,0,0-1.32,2.55l-2.74,24.66a95.45,95.45,0,0,1-19.64,8.15l-19.38-15.51a4,4,0,0,0-2.5-.87h-.24a73.67,73.67,0,0,1-9.16,0,4,4,0,0,0-2.74.87l-19.37,15.5a95.33,95.33,0,0,1-19.65-8.13l-2.74-24.67a4,4,0,0,0-1.32-2.55,76.2,76.2,0,0,1-6.48-6.48,4,4,0,0,0-2.55-1.32l-24.66-2.74a95.45,95.45,0,0,1-8.15-19.64l15.51-19.38a4,4,0,0,0,.87-2.74,77.76,77.76,0,0,1,0-9.16,4,4,0,0,0-.87-2.74l-15.5-19.37A95.33,95.33,0,0,1,43.9,81.66l24.67-2.74a4,4,0,0,0,2.55-1.32,76.2,76.2,0,0,1,6.48-6.48,4,4,0,0,0,1.32-2.55l2.74-24.66a95.45,95.45,0,0,1,19.64-8.15l19.38,15.51a4,4,0,0,0,2.74.87,73.67,73.67,0,0,1,9.16,0,4,4,0,0,0,2.74-.87l19.37-15.5a95.33,95.33,0,0,1,19.65,8.13l2.74,24.67a4,4,0,0,0,1.32,2.55,76.2,76.2,0,0,1,6.48,6.48,4,4,0,0,0,2.55,1.32l24.66,2.74a95.45,95.45,0,0,1,8.15,19.64l-15.51,19.38a4,4,0,0,0-.87,2.74,77.76,77.76,0,0,1,0,9.16,4,4,0,0,0,.87,2.74l15.5,19.37A95.33,95.33,0,0,1,212.1,174.34Z"}))]]),vv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z",opacity:"0.2"}),c.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z"}))]]),yv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128ZM40,76H216a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24ZM216,180H40a12,12,0,0,0,0,24H216a12,12,0,0,0,0-24Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,64V192H40V64Z",opacity:"0.2"}),c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM192,184H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Zm0-48H64a8,8,0,0,1,0-16H192a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128ZM40,70H216a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12ZM216,186H40a6,6,0,0,0,0,12H216a6,6,0,0,0,0-12Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128ZM40,72H216a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16ZM216,184H40a8,8,0,0,0,0,16H216a8,8,0,0,0,0-16Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128ZM40,68H216a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8ZM216,188H40a4,4,0,0,0,0,8H216a4,4,0,0,0,0-8Z"}))]]),bv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z",opacity:"0.2"}),c.createElement("path",{d:"M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z"}))]]),xv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),wv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M238.15,78.54,177.46,17.86a20,20,0,0,0-28.3,0L97.2,70c-12.43-3.33-36.68-5.72-61.74,14.5a20,20,0,0,0-1.6,29.73l45.46,45.47-39.8,39.8a12,12,0,0,0,17,17l39.8-39.81,45.47,45.46A20,20,0,0,0,155.91,228c.46,0,.93,0,1.4-.05A20,20,0,0,0,171.87,220c4.69-6.23,11-16.13,14.44-28s3.45-22.88.16-33.4l51.7-51.87A20,20,0,0,0,238.15,78.54Zm-74.26,68.79a12,12,0,0,0-2.23,13.84c3.43,6.86,6.9,21-6.28,40.65L54.08,100.53c21.09-14.59,39.53-6.64,41-6a11.67,11.67,0,0,0,13.81-2.29l54.43-54.61,55,55Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M229.66,98.34,172.39,155.8c11.46,22.93-1.72,45.86-10.11,57a8,8,0,0,1-12,.83L42.34,105.76A8,8,0,0,1,43,93.85c29.65-23.92,57.4-10,57.4-10l57.27-57.46a8,8,0,0,1,11.31,0L229.66,87A8,8,0,0,1,229.66,98.34Z",opacity:"0.2"}),c.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.33,104l-53.47,53.65c4.56,12.67,6.45,33.89-13.19,60A15.93,15.93,0,0,1,157,224c-.38,0-.75,0-1.13,0a16,16,0,0,1-11.32-4.69L96.29,171,53.66,213.66a8,8,0,0,1-11.32-11.32L85,159.71l-48.3-48.3A16,16,0,0,1,38,87.63c25.42-20.51,49.75-16.48,60.4-13.14L152,20.7a16,16,0,0,1,22.63,0l60.69,60.68A16,16,0,0,1,235.33,104Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M233.91,82.79,173.22,22.1a14,14,0,0,0-19.81,0L98.93,76.77c-9.52-3.25-34-8.34-59.71,12.41A14,14,0,0,0,38.1,110l49.71,49.71-44.05,44a6,6,0,1,0,8.48,8.48l44.05-44.05L146,217.89a14,14,0,0,0,9.9,4.11q.49,0,1,0a14,14,0,0,0,10.19-5.54c19.72-26.21,17.15-47.23,12.46-59.3l54.37-54.55A14,14,0,0,0,233.91,82.79ZM225.42,94.1h0l-57.27,57.46a6,6,0,0,0-1.11,6.92c9.94,19.88-1.71,40.32-9.54,50.72a2,2,0,0,1-3,.2L46.58,101.51a2,2,0,0,1,.18-3c12.5-10.09,24.5-12.76,33.7-12.76a42.13,42.13,0,0,1,17.25,3.41A6,6,0,0,0,104.64,88L161.9,30.59a2,2,0,0,1,2.83,0l60.69,60.68A2,2,0,0,1,225.42,94.1Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M235.32,81.37,174.63,20.69a16,16,0,0,0-22.63,0L98.37,74.49c-10.66-3.34-35-7.37-60.4,13.14a16,16,0,0,0-1.29,23.78L85,159.71,42.34,202.34a8,8,0,0,0,11.32,11.32L96.29,171l48.29,48.29A16,16,0,0,0,155.9,224c.38,0,.75,0,1.13,0a15.93,15.93,0,0,0,11.64-6.33c19.64-26.1,17.75-47.32,13.19-60L235.33,104A16,16,0,0,0,235.32,81.37ZM224,92.69h0l-57.27,57.46a8,8,0,0,0-1.49,9.22c9.46,18.93-1.8,38.59-9.34,48.62L48,100.08c12.08-9.74,23.64-12.31,32.48-12.31A40.13,40.13,0,0,1,96.81,91a8,8,0,0,0,9.25-1.51L163.32,32,224,92.68Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M232.49,84.2,171.8,23.51a12,12,0,0,0-17,0L99.45,79.07c-8.08-3-32.79-9.45-59,11.67a12,12,0,0,0-1,17.84l51.13,51.13L45.17,205.17a4,4,0,0,0,5.66,5.66l45.46-45.47,51.12,51.12A12,12,0,0,0,155.9,220c.28,0,.57,0,.85,0a12,12,0,0,0,8.73-4.74c19.83-26.36,16.51-47.18,11.71-58.57l55.3-55.49A12,12,0,0,0,232.49,84.2Zm-5.66,11.31h0L169.56,153a4,4,0,0,0-.75,4.61c10.43,20.85-1.62,42-9.73,52.83a4,4,0,0,1-6,.4L45.17,102.93a4,4,0,0,1,.33-6C58.44,86.53,70.86,83.74,80.44,83.74A43.9,43.9,0,0,1,98.6,87.38a4,4,0,0,0,4.62-.75l57.27-57.46a4,4,0,0,1,5.66,0l60.68,60.69A4,4,0,0,1,226.83,95.51Z"}))]]),Ev=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,128a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24h68A12,12,0,0,1,128,128ZM48,76H180a12,12,0,0,0,0-24H48a12,12,0,0,0,0,24Zm52,104H48a12,12,0,0,0,0,24h52a12,12,0,0,0,0-24Zm132.49-20.49a12,12,0,0,0-17,0L196,179V112a12,12,0,0,0-24,0v67l-19.51-19.52a12,12,0,0,0-17,17l40,40a12,12,0,0,0,17,0l40-40A12,12,0,0,0,232.49,159.51Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,80v88l-24,24H48V64H208A16,16,0,0,1,224,80Z",opacity:"0.2"}),c.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,72h96a8,8,0,0,1,0,16H72a8,8,0,0,1,0-16Zm40,112H72a8,8,0,0,1,0-16h40a8,8,0,0,1,0,16Zm8-48H72a8,8,0,0,1,0-16h48a8,8,0,0,1,0,16Zm77.66,29.66-24,24a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L160,164.69V120a8,8,0,0,1,16,0v44.69l10.34-10.35a8,8,0,0,1,11.32,11.32Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M126,128a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12h72A6,6,0,0,1,126,128ZM48,70H184a6,6,0,0,0,0-12H48a6,6,0,0,0,0,12Zm56,116H48a6,6,0,0,0,0,12h56a6,6,0,0,0,0-12Zm124.24-22.24a6,6,0,0,0-8.48,0L190,193.51V112a6,6,0,0,0-12,0v81.51l-29.76-29.75a6,6,0,0,0-8.48,8.48l40,40a6,6,0,0,0,8.48,0l40-40A6,6,0,0,0,228.24,163.76Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,128a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16h72A8,8,0,0,1,128,128ZM48,72H184a8,8,0,0,0,0-16H48a8,8,0,0,0,0,16Zm56,112H48a8,8,0,0,0,0,16h56a8,8,0,0,0,0-16Zm125.66-21.66a8,8,0,0,0-11.32,0L192,188.69V112a8,8,0,0,0-16,0v76.69l-26.34-26.35a8,8,0,0,0-11.32,11.32l40,40a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,229.66,162.34Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M124,128a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8h72A4,4,0,0,1,124,128ZM48,68H184a4,4,0,0,0,0-8H48a4,4,0,0,0,0,8Zm56,120H48a4,4,0,0,0,0,8h56a4,4,0,0,0,0-8Zm122.83-22.83a4,4,0,0,0-5.66,0L188,198.34V112a4,4,0,0,0-8,0v86.34l-33.17-33.17a4,4,0,0,0-5.66,5.66l40,40a4,4,0,0,0,5.66,0l40-40A4,4,0,0,0,226.83,165.17Z"}))]]),Sv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M140,32V64a12,12,0,0,1-24,0V32a12,12,0,0,1,24,0Zm33.25,62.75a12,12,0,0,0,8.49-3.52L204.37,68.6a12,12,0,0,0-17-17L164.77,74.26a12,12,0,0,0,8.48,20.49ZM224,116H192a12,12,0,0,0,0,24h32a12,12,0,0,0,0-24Zm-42.26,48.77a12,12,0,1,0-17,17l22.63,22.63a12,12,0,0,0,17-17ZM128,180a12,12,0,0,0-12,12v32a12,12,0,0,0,24,0V192A12,12,0,0,0,128,180ZM74.26,164.77,51.63,187.4a12,12,0,0,0,17,17l22.63-22.63a12,12,0,1,0-17-17ZM76,128a12,12,0,0,0-12-12H32a12,12,0,0,0,0,24H64A12,12,0,0,0,76,128ZM68.6,51.63a12,12,0,1,0-17,17L74.26,91.23a12,12,0,0,0,17-17Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),c.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm33.94,58.75,17-17a8,8,0,0,1,11.32,11.32l-17,17a8,8,0,0,1-11.31-11.31ZM48,136a8,8,0,0,1,0-16H72a8,8,0,0,1,0,16Zm46.06,37.25-17,17a8,8,0,0,1-11.32-11.32l17-17a8,8,0,0,1,11.31,11.31Zm0-79.19a8,8,0,0,1-11.31,0l-17-17A8,8,0,0,1,77.09,65.77l17,17A8,8,0,0,1,94.06,94.06ZM136,208a8,8,0,0,1-16,0V184a8,8,0,0,1,16,0Zm0-136a8,8,0,0,1-16,0V48a8,8,0,0,1,16,0Zm54.23,118.23a8,8,0,0,1-11.32,0l-17-17a8,8,0,0,1,11.31-11.31l17,17A8,8,0,0,1,190.23,190.23ZM208,136H184a8,8,0,0,1,0-16h24a8,8,0,0,1,0,16Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M134,32V64a6,6,0,0,1-12,0V32a6,6,0,0,1,12,0Zm39.25,56.75A6,6,0,0,0,177.5,87l22.62-22.63a6,6,0,0,0-8.48-8.48L169,78.5a6,6,0,0,0,4.24,10.25ZM224,122H192a6,6,0,0,0,0,12h32a6,6,0,0,0,0-12Zm-46.5,47A6,6,0,0,0,169,177.5l22.63,22.62a6,6,0,0,0,8.48-8.48ZM128,186a6,6,0,0,0-6,6v32a6,6,0,0,0,12,0V192A6,6,0,0,0,128,186ZM78.5,169,55.88,191.64a6,6,0,1,0,8.48,8.48L87,177.5A6,6,0,1,0,78.5,169ZM70,128a6,6,0,0,0-6-6H32a6,6,0,0,0,0,12H64A6,6,0,0,0,70,128ZM64.36,55.88a6,6,0,0,0-8.48,8.48L78.5,87A6,6,0,1,0,87,78.5Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M136,32V64a8,8,0,0,1-16,0V32a8,8,0,0,1,16,0Zm37.25,58.75a8,8,0,0,0,5.66-2.35l22.63-22.62a8,8,0,0,0-11.32-11.32L167.6,77.09a8,8,0,0,0,5.65,13.66ZM224,120H192a8,8,0,0,0,0,16h32a8,8,0,0,0,0-16Zm-45.09,47.6a8,8,0,0,0-11.31,11.31l22.62,22.63a8,8,0,0,0,11.32-11.32ZM128,184a8,8,0,0,0-8,8v32a8,8,0,0,0,16,0V192A8,8,0,0,0,128,184ZM77.09,167.6,54.46,190.22a8,8,0,0,0,11.32,11.32L88.4,178.91A8,8,0,0,0,77.09,167.6ZM72,128a8,8,0,0,0-8-8H32a8,8,0,0,0,0,16H64A8,8,0,0,0,72,128ZM65.78,54.46A8,8,0,0,0,54.46,65.78L77.09,88.4A8,8,0,0,0,88.4,77.09Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M132,32V64a4,4,0,0,1-8,0V32a4,4,0,0,1,8,0Zm41.25,54.75a4,4,0,0,0,2.83-1.18L198.71,63a4,4,0,0,0-5.66-5.66L170.43,79.92a4,4,0,0,0,2.82,6.83ZM224,124H192a4,4,0,0,0,0,8h32a4,4,0,0,0,0-8Zm-47.92,46.43a4,4,0,1,0-5.65,5.65l22.62,22.63a4,4,0,0,0,5.66-5.66ZM128,188a4,4,0,0,0-4,4v32a4,4,0,0,0,8,0V192A4,4,0,0,0,128,188ZM79.92,170.43,57.29,193.05A4,4,0,0,0,63,198.71l22.62-22.63a4,4,0,1,0-5.65-5.65ZM68,128a4,4,0,0,0-4-4H32a4,4,0,0,0,0,8H64A4,4,0,0,0,68,128ZM63,57.29A4,4,0,0,0,57.29,63L79.92,85.57a4,4,0,1,0,5.65-5.65Z"}))]]),Rv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M246.15,133.18,146.83,33.86A19.85,19.85,0,0,0,132.69,28H40A12,12,0,0,0,28,40v92.69a19.85,19.85,0,0,0,5.86,14.14l99.32,99.32a20,20,0,0,0,28.28,0l84.69-84.69A20,20,0,0,0,246.15,133.18Zm-98.83,93.17L52,131V52h79l95.32,95.32ZM104,88A16,16,0,1,1,88,72,16,16,0,0,1,104,88Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M237.66,153,153,237.66a8,8,0,0,1-11.31,0L42.34,138.34A8,8,0,0,1,40,132.69V40h92.69a8,8,0,0,1,5.65,2.34l99.32,99.32A8,8,0,0,1,237.66,153Z",opacity:"0.2"}),c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63ZM84,96A12,12,0,1,1,96,84,12,12,0,0,1,84,96Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M241.91,137.42,142.59,38.1a13.94,13.94,0,0,0-9.9-4.1H40a6,6,0,0,0-6,6v92.69a13.94,13.94,0,0,0,4.1,9.9l99.32,99.32a14,14,0,0,0,19.8,0l84.69-84.69A14,14,0,0,0,241.91,137.42Zm-8.49,11.31-84.69,84.69a2,2,0,0,1-2.83,0L46.59,134.1a2,2,0,0,1-.59-1.41V46h86.69a2,2,0,0,1,1.41.59l99.32,99.31A2,2,0,0,1,233.42,148.73ZM94,84A10,10,0,1,1,84,74,10,10,0,0,1,94,84Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M243.31,136,144,36.69A15.86,15.86,0,0,0,132.69,32H40a8,8,0,0,0-8,8v92.69A15.86,15.86,0,0,0,36.69,144L136,243.31a16,16,0,0,0,22.63,0l84.68-84.68a16,16,0,0,0,0-22.63Zm-96,96L48,132.69V48h84.69L232,147.31ZM96,84A12,12,0,1,1,84,72,12,12,0,0,1,96,84Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M240.49,138.83,141.17,39.51A11.93,11.93,0,0,0,132.69,36H40a4,4,0,0,0-4,4v92.69a11.93,11.93,0,0,0,3.51,8.48l99.32,99.32a12,12,0,0,0,17,0l84.69-84.69a12,12,0,0,0,0-17Zm-5.66,11.31-84.69,84.69a4,4,0,0,1-5.65,0L45.17,135.51A4,4,0,0,1,44,132.69V44h88.69a4,4,0,0,1,2.82,1.17l99.32,99.32A4,4,0,0,1,234.83,150.14ZM92,84a8,8,0,1,1-8-8A8,8,0,0,1,92,84Z"}))]]),Cv=new Map([["bold",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",c.createElement(c.Fragment,null,c.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",c.createElement(c.Fragment,null,c.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",c.createElement(c.Fragment,null,c.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",c.createElement(c.Fragment,null,c.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",c.createElement(c.Fragment,null,c.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),Av=c.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),Ae=c.forwardRef((e,t)=>{const{alt:n,color:r,size:o,weight:s,mirrored:a,children:i,weights:l,...u}=e,{color:f="currentColor",size:d,weight:p="regular",mirrored:m=!1,...g}=c.useContext(Av);return c.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:o??d,height:o??d,fill:r??f,viewBox:"0 0 256 256",transform:a||m?"scale(-1, 1)":void 0,...g,...u},!!n&&c.createElement("title",null,n),i,l.get(s??p))});Ae.displayName="IconBase";const Md=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:av}));Md.displayName="BellIcon";const Tv=Md,_d=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:iv}));_d.displayName="CalendarIcon";const Pv=_d,Nd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:cv}));Nd.displayName="CaretDownIcon";const Mv=Nd,Id=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:lv}));Id.displayName="CaretLeftIcon";const Bs=Id,Od=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:uv}));Od.displayName="CaretRightIcon";const gr=Od,Ld=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:dv}));Ld.displayName="CheckIcon";const _v=Ld,Dd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:fv}));Dd.displayName="DotsSixVerticalIcon";const Nv=Dd,jd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:hv}));jd.displayName="DotsThreeVerticalIcon";const Iv=jd,Fd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:pv}));Fd.displayName="EyeIcon";const Ov=Fd,kd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:mv}));kd.displayName="FileTextIcon";const Lv=kd,$d=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:gv}));$d.displayName="GearIcon";const Dv=$d,Hd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:vv}));Hd.displayName="GridFourIcon";const Bd=Hd,Vd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:yv}));Vd.displayName="ListIcon";const jv=Vd,Zd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:bv}));Zd.displayName="MagnifyingGlassIcon";const Fv=Zd,Ud=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:xv}));Ud.displayName="PencilSimpleIcon";const kv=Ud,zd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:wv}));zd.displayName="PushPinIcon";const qd=zd,Kd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Ev}));Kd.displayName="SortAscendingIcon";const $v=Kd,Wd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Sv}));Wd.displayName="SpinnerIcon";const Hv=Wd,Gd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Rv}));Gd.displayName="TagIcon";const Bv=Gd,Qd=c.forwardRef((e,t)=>c.createElement(Ae,{ref:t,...e,weights:Cv}));Qd.displayName="XIcon";const Yd=Qd;function Vv(e){return h.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",...e,children:[h.jsx("circle",{cx:"6",cy:"6",r:"3"}),h.jsx("circle",{cx:"18",cy:"6",r:"3"}),h.jsx("circle",{cx:"6",cy:"18",r:"3"}),h.jsx("circle",{cx:"18",cy:"18",r:"3"}),h.jsx("circle",{cx:"12",cy:"12",r:"3"}),h.jsx("line",{x1:"8.5",y1:"7.5",x2:"10",y2:"10"}),h.jsx("line",{x1:"15.5",y1:"7.5",x2:"14",y2:"10"}),h.jsx("line",{x1:"8.5",y1:"16.5",x2:"10",y2:"14"}),h.jsx("line",{x1:"15.5",y1:"16.5",x2:"14",y2:"14"})]})}const kc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,$c=kp,De=(e,t)=>n=>{var r;if(t?.variants==null)return $c(e,n?.class,n?.className);const{variants:o,defaultVariants:s}=t,a=Object.keys(o).map(u=>{const f=n?.[u],d=s?.[u];if(f===null)return null;const p=kc(f)||kc(d);return o[u][p]}),i=n&&Object.entries(n).reduce((u,f)=>{let[d,p]=f;return p===void 0||(u[d]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:d,className:p,...m}=f;return Object.entries(m).every(g=>{let[v,y]=g;return Array.isArray(y)?y.includes({...s,...i}[v]):{...s,...i}[v]===y})?[...u,d,p]:u},[]);return $c(e,a,l,n?.class,n?.className)},Zv=De(["inline-flex","items-center","justify-center","gap-2","font-medium","transition-colors","duration-200","border","focus-ring-soft","outline-none","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{primary:["bg-cta","border-transparent","text-fg-on-filled","hover:bg-cta-hover","active:bg-cta-hover"],signature:["bg-accent-secondary","border-transparent","text-fg-on-filled","hover:bg-accent-secondary-hover","active:bg-accent-secondary-hover"],subtle:["bg-transparent","border-border","text-fg-default","hover:bg-hover-subtle","hover:border-border-secondary","active:bg-hover"],ghost:["border-transparent","bg-transparent","text-fg-secondary","hover:bg-hover-subtle","hover:border-border-subtle","hover:text-fg-default","active:bg-hover"],danger:["bg-accent-danger","border-transparent","text-fg-on-filled","hover:bg-accent-danger-hover","active:bg-accent-danger-hover"],"soft-success":["bg-accent-soft-success","border-transparent","text-accent-success","hover:bg-accent-soft-success-hover","active:bg-accent-soft-success-hover"],"soft-danger":["bg-accent-soft-danger","border-transparent","text-fg-error","hover:bg-accent-soft-danger-hover","active:bg-accent-soft-danger-hover"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-4 text-sm rounded-[14px]",lg:"h-11 px-5 text-body rounded-[16px]",icon:"h-9 w-9 rounded-[14px]","icon-sm":"h-8 w-8 rounded-[12px]"}},defaultVariants:{variant:"primary",size:"md"}}),bt=c.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isLoading:o,children:s,disabled:a,...i},l)=>{const u=r?ev:"button";return h.jsx(u,{ref:l,className:Zv({variant:t,size:n,className:e}),disabled:a||o,...i,children:o?h.jsxs(h.Fragment,{children:[h.jsx(Hv,{className:"animate-spin h-4 w-4"}),s]}):s})});bt.displayName="Button";const li=De(["relative","pointer-events-auto","w-full","max-h-[calc(100dvh-2rem)]","overflow-y-auto","border","border-border-subtle","overscroll-contain","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95"],{variants:{variant:{default:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-32px_rgba(15,18,24,0.36)]",compact:"max-w-[480px] rounded-[18px] bg-surface shadow-[0_18px_44px_-28px_rgba(15,18,24,0.28)]",form:"max-w-[560px] rounded-[20px] bg-elevated shadow-[0_22px_56px_-30px_rgba(15,18,24,0.32)]",inspect:"max-w-[640px] rounded-[20px] bg-elevated shadow-[0_24px_64px_-30px_rgba(15,18,24,0.34)]",confirm:"max-w-[336px] rounded-[18px] bg-surface shadow-[0_16px_36px_-24px_rgba(15,18,24,0.24)]"}},defaultVariants:{variant:"default"}}),Uv=De(["flex","items-center","justify-between"],{variants:{variant:{default:"border-b border-border-subtle/70 px-4 py-3.5",compact:"border-b border-border-subtle/60 px-4 py-3",form:"border-b border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-b border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"px-4 pb-1 pt-4"}},defaultVariants:{variant:"default"}}),ui=De("",{variants:{variant:{default:"px-4 py-5 sm:px-5",compact:"px-4 py-4",form:"px-4 py-4 sm:px-5 sm:py-5",inspect:"px-4 py-4 sm:px-5 sm:py-5",confirm:"space-y-1 px-5 pb-4 pt-5"}},defaultVariants:{variant:"default"}}),di=De(["flex","items-center","justify-end"],{variants:{variant:{default:"border-t border-border-subtle/70 px-4 py-3.5",compact:"px-4 pb-4 pt-0",form:"border-t border-border-subtle/65 px-4 py-3 sm:px-5",inspect:"border-t border-border-subtle/70 px-4 py-3.5 sm:px-5",confirm:"justify-end gap-2 px-5 pb-5 pt-0"}},defaultVariants:{variant:"default"}}),zv=De(["flex","items-center","justify-center","text-fg-secondary","transition-colors","hover:bg-hover-subtle","hover:text-fg-default","focus-ring-soft"],{variants:{variant:{default:"h-10 w-10 rounded-[14px]",compact:"h-9 w-9 rounded-[12px]",form:"h-9 w-9 rounded-[12px]",inspect:"h-10 w-10 rounded-[14px]",confirm:"h-9 w-9 rounded-[12px]"}},defaultVariants:{variant:"default"}}),fi=De("text-fg-default font-semibold",{variants:{variant:{default:"text-heading tracking-[-0.02em]",compact:"text-subheading tracking-[-0.01em]",form:"text-heading tracking-[-0.02em]",inspect:"text-heading tracking-[-0.02em]",confirm:"text-subheading tracking-[-0.01em]"}},defaultVariants:{variant:"default"}}),hi=De("text-fg-secondary",{variants:{variant:{default:"text-meta",compact:"text-meta",form:"text-meta",inspect:"text-meta",confirm:"text-meta"}},defaultVariants:{variant:"default"}}),qv=De("",{variants:{variant:{display:"text-display",heading:"text-heading",subheading:"text-subheading",body:"text-body",meta:"text-meta",label:"text-label",micro:"text-micro"},weight:{regular:"font-normal",medium:"font-medium",semibold:"font-semibold",bold:"font-bold"},tone:{default:"text-fg-default",secondary:"text-fg-secondary",tertiary:"text-fg-tertiary",muted:"text-fg-muted",placeholder:"text-fg-placeholder",error:"text-fg-error",onFilled:"text-fg-on-filled"},tracking:{normal:"",tight:"tracking-[-0.01em]",tighter:"tracking-[-0.02em]",wide:"tracking-[0.08em]",wider:"tracking-[0.12em]",widest:"tracking-[0.16em]"},transform:{none:"",uppercase:"uppercase"},truncate:{true:"truncate",false:""}},defaultVariants:{variant:"body",weight:"regular",tone:"default",tracking:"normal",transform:"none",truncate:!1}});function se({as:e="span",className:t,variant:n,weight:r,tone:o,tracking:s,transform:a,truncate:i,children:l,...u}){const f=e;return h.jsx(f,{className:qv({variant:n,weight:r,tone:o,tracking:s,transform:a,truncate:i,className:t}),...u,children:l})}const Xd=pe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0"),Kv=({open:e,options:t,onClose:n})=>h.jsx(wd,{open:e,onOpenChange:r=>{!r&&t.dismissible&&n()},children:h.jsxs(Ed,{children:[h.jsx(Sd,{className:Xd}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsxs(Rd,{className:li({variant:"confirm"}),children:[h.jsxs("div",{className:ui({variant:"confirm"}),children:[h.jsx(Ad,{className:fi({variant:"confirm"}),children:t.title}),t.description?h.jsx(Td,{className:hi({variant:"confirm"}),children:t.description}):null]}),h.jsx("div",{className:di({variant:"confirm"}),children:h.jsx(Cd,{asChild:!0,children:h.jsx(bt,{size:"sm",onClick:n,children:t.confirmLabel})})})]})})]})}),Wv=({open:e,options:t,onCancel:n,onConfirm:r})=>h.jsx(wd,{open:e,onOpenChange:o=>{!o&&t.dismissible&&n()},children:h.jsxs(Ed,{children:[h.jsx(Sd,{className:Xd}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsxs(Rd,{className:li({variant:"confirm"}),children:[h.jsxs("div",{className:ui({variant:"confirm"}),children:[h.jsx(Ad,{className:fi({variant:"confirm"}),children:t.title}),t.description?h.jsx(Td,{className:hi({variant:"confirm"}),children:h.jsx(se,{as:"span",variant:"meta",tone:"secondary",children:t.description})}):null]}),h.jsxs("div",{className:di({variant:"confirm"}),children:[h.jsx(W2,{asChild:!0,children:h.jsx(bt,{variant:"ghost",size:"sm",onClick:n,children:t.cancelLabel})}),h.jsx(Cd,{asChild:!0,children:h.jsx(bt,{variant:t.tone==="danger"?"danger":"primary",size:"sm",onClick:r,children:t.confirmLabel})})]})]})})]})});function Gv({children:e}){return h.jsx(Fg,{components:{Alert:Kv,Confirm:Wv},children:e})}function Jd(){const{confirm:e}=kg();return c.useCallback(t=>e({title:"Confirm",description:t,confirmLabel:"OK",cancelLabel:"Cancel",tone:"danger"}),[e])}function Qv(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Yv=e=>{switch(e){case"success":return ey;case"info":return ny;case"warning":return ty;case"error":return ry;default:return null}},Xv=Array(12).fill(0),Jv=({visible:e,className:t})=>P.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},P.createElement("div",{className:"sonner-spinner"},Xv.map((n,r)=>P.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),ey=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ty=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ny=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ry=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},P.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),oy=P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},P.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),P.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),sy=()=>{const[e,t]=P.useState(document.hidden);return P.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ma=1;class ay{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,s=typeof t?.id=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ma++,a=this.toasts.find(l=>l.id===s),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:r}),{...l,...t,id:s,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let s=r!==void 0,a;const i=o.then(async u=>{if(a=["resolve",u],P.isValidElement(u))s=!1,this.create({id:r,type:"default",message:u});else if(cy(u)&&!u.ok){s=!1;const d=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,g=typeof d=="object"&&!P.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...g})}else if(u instanceof Error){s=!1;const d=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof d=="object"&&!P.isValidElement(d)?d:{message:d};this.create({id:r,type:"error",description:p,...g})}else if(n.success!==void 0){s=!1;const d=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,g=typeof d=="object"&&!P.isValidElement(d)?d:{message:d};this.create({id:r,type:"success",description:p,...g})}}).catch(async u=>{if(a=["reject",u],n.error!==void 0){s=!1;const f=typeof n.error=="function"?await n.error(u):n.error,d=typeof n.description=="function"?await n.description(u):n.description,m=typeof f=="object"&&!P.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:d,...m})}}).finally(()=>{s&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,f)=>i.then(()=>a[0]==="reject"?f(a[1]):u(a[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=n?.id||ma++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Xe=new ay,iy=(e,t)=>{const n=t?.id||ma++;return Xe.addToast({title:e,...t,id:n}),n},cy=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",ly=iy,uy=()=>Xe.toasts,dy=()=>Xe.getActiveToasts(),fy=Object.assign(ly,{success:Xe.success,info:Xe.info,warning:Xe.warning,error:Xe.error,custom:Xe.custom,message:Xe.message,promise:Xe.promise,dismiss:Xe.dismiss,loading:Xe.loading},{getHistory:uy,getToasts:dy});Qv("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function ro(e){return e.label!==void 0}const hy=3,py="24px",my="16px",Hc=4e3,gy=356,vy=14,yy=45,by=200;function Ct(...e){return e.filter(Boolean).join(" ")}function xy(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const wy=e=>{var t,n,r,o,s,a,i,l,u;const{invert:f,toast:d,unstyled:p,interacting:m,setHeights:g,visibleToasts:v,heights:y,index:b,toasts:x,expanded:w,removeToast:E,defaultRichColors:A,closeButton:N,style:R,cancelButtonStyle:S,actionButtonStyle:_,className:D="",descriptionClassName:M="",duration:k,position:Z,gap:j,expandByDefault:F,classNames:C,icons:L,closeButtonAriaLabel:O="Close toast"}=e,[I,V]=P.useState(null),[q,G]=P.useState(null),[H,z]=P.useState(!1),[K,Y]=P.useState(!1),[$,U]=P.useState(!1),[te,B]=P.useState(!1),[X,J]=P.useState(!1),[ue,ve]=P.useState(0),[Qe,Fe]=P.useState(0),Ze=P.useRef(d.duration||k||Hc),ct=P.useRef(null),Oe=P.useRef(null),Ne=b===0,Ut=b+1<=v,Te=d.type,lt=d.dismissible!==!1,Tn=d.className||"",Pn=d.descriptionClassName||"",ie=P.useMemo(()=>y.findIndex(Q=>Q.toastId===d.id)||0,[y,d.id]),me=P.useMemo(()=>{var Q;return(Q=d.closeButton)!=null?Q:N},[d.closeButton,N]),Re=P.useMemo(()=>d.duration||k||Hc,[d.duration,k]),ut=P.useRef(0),Ot=P.useRef(0),vt=P.useRef(0),Lt=P.useRef(null),[Es,Ss]=Z.split("-"),Mn=P.useMemo(()=>y.reduce((Q,fe,de)=>de>=ie?Q:Q+fe.height,0),[y,ie]),rr=sy(),Rs=d.invert||f,_n=Te==="loading";Ot.current=P.useMemo(()=>ie*j+Mn,[ie,Mn]),P.useEffect(()=>{Ze.current=Re},[Re]),P.useEffect(()=>{z(!0)},[]),P.useEffect(()=>{const Q=Oe.current;if(Q){const fe=Q.getBoundingClientRect().height;return Fe(fe),g(de=>[{toastId:d.id,height:fe,position:d.position},...de]),()=>g(de=>de.filter(he=>he.toastId!==d.id))}},[g,d.id]),P.useLayoutEffect(()=>{if(!H)return;const Q=Oe.current,fe=Q.style.height;Q.style.height="auto";const de=Q.getBoundingClientRect().height;Q.style.height=fe,Fe(de),g(he=>he.find(ye=>ye.toastId===d.id)?he.map(ye=>ye.toastId===d.id?{...ye,height:de}:ye):[{toastId:d.id,height:de,position:d.position},...he])},[H,d.title,d.description,g,d.id,d.jsx,d.action,d.cancel]);const Rt=P.useCallback(()=>{Y(!0),ve(Ot.current),g(Q=>Q.filter(fe=>fe.toastId!==d.id)),setTimeout(()=>{E(d)},by)},[d,E,g,Ot]);P.useEffect(()=>{if(d.promise&&Te==="loading"||d.duration===1/0||d.type==="loading")return;let Q;return w||m||rr?(()=>{if(vt.current<ut.current){const he=new Date().getTime()-ut.current;Ze.current=Ze.current-he}vt.current=new Date().getTime()})():Ze.current!==1/0&&(ut.current=new Date().getTime(),Q=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Rt()},Ze.current)),()=>clearTimeout(Q)},[w,m,d,Te,rr,Rt]),P.useEffect(()=>{d.delete&&(Rt(),d.onDismiss==null||d.onDismiss.call(d,d))},[Rt,d.delete]);function Cs(){var Q;if(L?.loading){var fe;return P.createElement("div",{className:Ct(C?.loader,d==null||(fe=d.classNames)==null?void 0:fe.loader,"sonner-loader"),"data-visible":Te==="loading"},L.loading)}return P.createElement(Jv,{className:Ct(C?.loader,d==null||(Q=d.classNames)==null?void 0:Q.loader),visible:Te==="loading"})}const As=d.icon||L?.[Te]||Yv(Te);var Pe,ke;return P.createElement("li",{tabIndex:0,ref:Oe,className:Ct(D,Tn,C?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,C?.default,C?.[Te],d==null||(n=d.classNames)==null?void 0:n[Te]),"data-sonner-toast":"","data-rich-colors":(Pe=d.richColors)!=null?Pe:A,"data-styled":!(d.jsx||d.unstyled||p),"data-mounted":H,"data-promise":!!d.promise,"data-swiped":X,"data-removed":K,"data-visible":Ut,"data-y-position":Es,"data-x-position":Ss,"data-index":b,"data-front":Ne,"data-swiping":$,"data-dismissible":lt,"data-type":Te,"data-invert":Rs,"data-swipe-out":te,"data-swipe-direction":q,"data-expanded":!!(w||F&&H),"data-testid":d.testId,style:{"--index":b,"--toasts-before":b,"--z-index":x.length-b,"--offset":`${K?ue:Ot.current}px`,"--initial-height":F?"auto":`${Qe}px`,...R,...d.style},onDragEnd:()=>{U(!1),V(null),Lt.current=null},onPointerDown:Q=>{Q.button!==2&&(_n||!lt||(ct.current=new Date,ve(Ot.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(U(!0),Lt.current={x:Q.clientX,y:Q.clientY})))},onPointerUp:()=>{var Q,fe,de;if(te||!lt)return;Lt.current=null;const he=Number(((Q=Oe.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ue=Number(((fe=Oe.current)==null?void 0:fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ye=new Date().getTime()-((de=ct.current)==null?void 0:de.getTime()),le=I==="x"?he:Ue,rt=Math.abs(le)/ye;if(Math.abs(le)>=yy||rt>.11){ve(Ot.current),d.onDismiss==null||d.onDismiss.call(d,d),G(I==="x"?he>0?"right":"left":Ue>0?"down":"up"),Rt(),B(!0);return}else{var Ee,Ce;(Ee=Oe.current)==null||Ee.style.setProperty("--swipe-amount-x","0px"),(Ce=Oe.current)==null||Ce.style.setProperty("--swipe-amount-y","0px")}J(!1),U(!1),V(null)},onPointerMove:Q=>{var fe,de,he;if(!Lt.current||!lt||((fe=window.getSelection())==null?void 0:fe.toString().length)>0)return;const ye=Q.clientY-Lt.current.y,le=Q.clientX-Lt.current.x;var rt;const Ee=(rt=e.swipeDirections)!=null?rt:xy(Z);!I&&(Math.abs(le)>1||Math.abs(ye)>1)&&V(Math.abs(le)>Math.abs(ye)?"x":"y");let Ce={x:0,y:0};const zt=ot=>1/(1.5+Math.abs(ot)/20);if(I==="y"){if(Ee.includes("top")||Ee.includes("bottom"))if(Ee.includes("top")&&ye<0||Ee.includes("bottom")&&ye>0)Ce.y=ye;else{const ot=ye*zt(ye);Ce.y=Math.abs(ot)<Math.abs(ye)?ot:ye}}else if(I==="x"&&(Ee.includes("left")||Ee.includes("right")))if(Ee.includes("left")&&le<0||Ee.includes("right")&&le>0)Ce.x=le;else{const ot=le*zt(le);Ce.x=Math.abs(ot)<Math.abs(le)?ot:le}(Math.abs(Ce.x)>0||Math.abs(Ce.y)>0)&&J(!0),(de=Oe.current)==null||de.style.setProperty("--swipe-amount-x",`${Ce.x}px`),(he=Oe.current)==null||he.style.setProperty("--swipe-amount-y",`${Ce.y}px`)}},me&&!d.jsx&&Te!=="loading"?P.createElement("button",{"aria-label":O,"data-disabled":_n,"data-close-button":!0,onClick:_n||!lt?()=>{}:()=>{Rt(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Ct(C?.closeButton,d==null||(r=d.classNames)==null?void 0:r.closeButton)},(ke=L?.close)!=null?ke:oy):null,(Te||d.icon||d.promise)&&d.icon!==null&&(L?.[Te]!==null||d.icon)?P.createElement("div",{"data-icon":"",className:Ct(C?.icon,d==null||(o=d.classNames)==null?void 0:o.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||Cs():null,d.type!=="loading"?As:null):null,P.createElement("div",{"data-content":"",className:Ct(C?.content,d==null||(s=d.classNames)==null?void 0:s.content)},P.createElement("div",{"data-title":"",className:Ct(C?.title,d==null||(a=d.classNames)==null?void 0:a.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?P.createElement("div",{"data-description":"",className:Ct(M,Pn,C?.description,d==null||(i=d.classNames)==null?void 0:i.description)},typeof d.description=="function"?d.description():d.description):null),P.isValidElement(d.cancel)?d.cancel:d.cancel&&ro(d.cancel)?P.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||S,onClick:Q=>{ro(d.cancel)&<&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,Q),Rt())},className:Ct(C?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,P.isValidElement(d.action)?d.action:d.action&&ro(d.action)?P.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||_,onClick:Q=>{ro(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,Q),!Q.defaultPrevented&&Rt())},className:Ct(C?.actionButton,d==null||(u=d.classNames)==null?void 0:u.actionButton)},d.action.label):null)};function Bc(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function Ey(e,t){const n={};return[e,t].forEach((r,o)=>{const s=o===1,a=s?"--mobile-offset":"--offset",i=s?my:py;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${a}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${a}-${u}`]=i:n[`${a}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const Sy=P.forwardRef(function(t,n){const{id:r,invert:o,position:s="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:l,className:u,offset:f,mobileOffset:d,theme:p="light",richColors:m,duration:g,style:v,visibleToasts:y=hy,toastOptions:b,dir:x=Bc(),gap:w=vy,icons:E,containerAriaLabel:A="Notifications"}=t,[N,R]=P.useState([]),S=P.useMemo(()=>r?N.filter(H=>H.toasterId===r):N.filter(H=>!H.toasterId),[N,r]),_=P.useMemo(()=>Array.from(new Set([s].concat(S.filter(H=>H.position).map(H=>H.position)))),[S,s]),[D,M]=P.useState([]),[k,Z]=P.useState(!1),[j,F]=P.useState(!1),[C,L]=P.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),O=P.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),V=P.useRef(null),q=P.useRef(!1),G=P.useCallback(H=>{R(z=>{var K;return(K=z.find(Y=>Y.id===H.id))!=null&&K.delete||Xe.dismiss(H.id),z.filter(({id:Y})=>Y!==H.id)})},[]);return P.useEffect(()=>Xe.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(z=>z.map(K=>K.id===H.id?{...K,delete:!0}:K))});return}setTimeout(()=>{ql.flushSync(()=>{R(z=>{const K=z.findIndex(Y=>Y.id===H.id);return K!==-1?[...z.slice(0,K),{...z[K],...H},...z.slice(K+1)]:[H,...z]})})})}),[N]),P.useEffect(()=>{if(p!=="system"){L(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?L("dark"):L("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:z})=>{L(z?"dark":"light")})}catch{H.addListener(({matches:K})=>{try{L(K?"dark":"light")}catch(Y){console.error(Y)}})}},[p]),P.useEffect(()=>{N.length<=1&&Z(!1)},[N]),P.useEffect(()=>{const H=z=>{var K;if(a.every(U=>z[U]||z.code===U)){var $;Z(!0),($=O.current)==null||$.focus()}z.code==="Escape"&&(document.activeElement===O.current||(K=O.current)!=null&&K.contains(document.activeElement))&&Z(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),P.useEffect(()=>{if(O.current)return()=>{V.current&&(V.current.focus({preventScroll:!0}),V.current=null,q.current=!1)}},[O.current]),P.createElement("section",{ref:n,"aria-label":`${A} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},_.map((H,z)=>{var K;const[Y,$]=H.split("-");return S.length?P.createElement("ol",{key:H,dir:x==="auto"?Bc():x,tabIndex:-1,ref:O,className:u,"data-sonner-toaster":!0,"data-sonner-theme":C,"data-y-position":Y,"data-x-position":$,style:{"--front-toast-height":`${((K=D[0])==null?void 0:K.height)||0}px`,"--width":`${gy}px`,"--gap":`${w}px`,...v,...Ey(f,d)},onBlur:U=>{q.current&&!U.currentTarget.contains(U.relatedTarget)&&(q.current=!1,V.current&&(V.current.focus({preventScroll:!0}),V.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||q.current||(q.current=!0,V.current=U.relatedTarget)},onMouseEnter:()=>Z(!0),onMouseMove:()=>Z(!0),onMouseLeave:()=>{j||Z(!1)},onDragEnd:()=>Z(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},S.filter(U=>!U.position&&z===0||U.position===H).map((U,te)=>{var B,X;return P.createElement(wy,{key:U.id,icons:E,index:te,toast:U,defaultRichColors:m,duration:(B=b?.duration)!=null?B:g,className:b?.className,descriptionClassName:b?.descriptionClassName,invert:o,visibleToasts:y,closeButton:(X=b?.closeButton)!=null?X:l,interacting:j,position:H,style:b?.style,unstyled:b?.unstyled,classNames:b?.classNames,cancelButtonStyle:b?.cancelButtonStyle,actionButtonStyle:b?.actionButtonStyle,closeButtonAriaLabel:b?.closeButtonAriaLabel,removeToast:G,toasts:S.filter(J=>J.position==U.position),heights:D.filter(J=>J.position==U.position),setHeights:M,expandByDefault:i,gap:w,expanded:k,swipeDirections:t.swipeDirections})})):null}))});var On=(e,t)=>({...e,...t}),Ry=(e,t)=>Object.assign((n,r)=>e(n,On(t,r)),{success:(n,r)=>e.success(n,On(t,r)),error:(n,r)=>e.error(n,On(t,r)),info:(n,r)=>e.info(n,On(t,r)),warning:(n,r)=>e.warning(n,On(t,r)),loading:(n,r)=>e.loading(n,On(t,r)),dismiss:n=>e.dismiss(n)}),ef=(e={})=>Ry(fy,e);ef();var Cy=e=>h.jsx(Sy,{...e});const Ay=ef({duration:3e3});function Ty({children:e}){return h.jsxs(h.Fragment,{children:[e,h.jsx(Cy,{position:"bottom-center",expand:!1,visibleToasts:3,toastOptions:{duration:3e3,classNames:{toast:"surface-floating whitespace-nowrap px-5 py-3 text-sm font-medium text-fg-secondary shadow-sm",title:"text-sm font-medium text-fg-secondary"}}})]})}function tf(){return Ay}const Py=new bg({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1}}});function nf(e,t){return function(){return e.apply(t,arguments)}}const{toString:My}=Object.prototype,{getPrototypeOf:pi}=Object,{iterator:ns,toStringTag:rf}=Symbol,rs=(e=>t=>{const n=My.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),St=e=>(e=e.toLowerCase(),t=>rs(t)===e),os=e=>t=>typeof t===e,{isArray:Gn}=Array,Un=os("undefined");function Dr(e){return e!==null&&!Un(e)&&e.constructor!==null&&!Un(e.constructor)&&et(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const of=St("ArrayBuffer");function _y(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&of(e.buffer),t}const Ny=os("string"),et=os("function"),sf=os("number"),jr=e=>e!==null&&typeof e=="object",Iy=e=>e===!0||e===!1,ho=e=>{if(rs(e)!=="object")return!1;const t=pi(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(rf in e)&&!(ns in e)},Oy=e=>{if(!jr(e)||Dr(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Ly=St("Date"),Dy=St("File"),jy=e=>!!(e&&typeof e.uri<"u"),Fy=e=>e&&typeof e.getParts<"u",ky=St("Blob"),$y=St("FileList"),Hy=e=>jr(e)&&et(e.pipe);function By(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vc=By(),Zc=typeof Vc.FormData<"u"?Vc.FormData:void 0,Vy=e=>{let t;return e&&(Zc&&e instanceof Zc||et(e.append)&&((t=rs(e))==="formdata"||t==="object"&&et(e.toString)&&e.toString()==="[object FormData]"))},Zy=St("URLSearchParams"),[Uy,zy,qy,Ky]=["ReadableStream","Request","Response","Headers"].map(St),Wy=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Fr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),Gn(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Dr(e))return;const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let i;for(r=0;r<a;r++)i=s[r],t.call(null,e[i],i,e)}}function af(e,t){if(Dr(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const un=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,cf=e=>!Un(e)&&e!==un;function ga(){const{caseless:e,skipUndefined:t}=cf(this)&&this||{},n={},r=(o,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const a=e&&af(n,s)||s;ho(n[a])&&ho(o)?n[a]=ga(n[a],o):ho(o)?n[a]=ga({},o):Gn(o)?n[a]=o.slice():(!t||!Un(o))&&(n[a]=o)};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&Fr(arguments[o],r);return n}const Gy=(e,t,n,{allOwnKeys:r}={})=>(Fr(t,(o,s)=>{n&&et(o)?Object.defineProperty(e,s,{value:nf(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,s,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Qy=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Yy=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xy=(e,t,n,r)=>{let o,s,a;const i={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)a=o[s],(!r||r(a,e,t))&&!i[a]&&(t[a]=e[a],i[a]=!0);e=n!==!1&&pi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Jy=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},e6=e=>{if(!e)return null;if(Gn(e))return e;let t=e.length;if(!sf(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},t6=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&pi(Uint8Array)),n6=(e,t)=>{const r=(e&&e[ns]).call(e);let o;for(;(o=r.next())&&!o.done;){const s=o.value;t.call(e,s[0],s[1])}},r6=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},o6=St("HTMLFormElement"),s6=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),Uc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),a6=St("RegExp"),lf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Fr(n,(o,s)=>{let a;(a=t(o,s,e))!==!1&&(r[s]=a||o)}),Object.defineProperties(e,r)},i6=e=>{lf(e,(t,n)=>{if(et(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(et(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},c6=(e,t)=>{const n={},r=o=>{o.forEach(s=>{n[s]=!0})};return Gn(e)?r(e):r(String(e).split(t)),n},l6=()=>{},u6=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function d6(e){return!!(e&&et(e.append)&&e[rf]==="FormData"&&e[ns])}const f6=e=>{const t=new Array(10),n=(r,o)=>{if(jr(r)){if(t.indexOf(r)>=0)return;if(Dr(r))return r;if(!("toJSON"in r)){t[o]=r;const s=Gn(r)?[]:{};return Fr(r,(a,i)=>{const l=n(a,o+1);!Un(l)&&(s[i]=l)}),t[o]=void 0,s}}return r};return n(e,0)},h6=St("AsyncFunction"),p6=e=>e&&(jr(e)||et(e))&&et(e.then)&&et(e.catch),uf=((e,t)=>e?setImmediate:t?((n,r)=>(un.addEventListener("message",({source:o,data:s})=>{o===un&&s===n&&r.length&&r.shift()()},!1),o=>{r.push(o),un.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",et(un.postMessage)),m6=typeof queueMicrotask<"u"?queueMicrotask.bind(un):typeof process<"u"&&process.nextTick||uf,g6=e=>e!=null&&et(e[ns]),T={isArray:Gn,isArrayBuffer:of,isBuffer:Dr,isFormData:Vy,isArrayBufferView:_y,isString:Ny,isNumber:sf,isBoolean:Iy,isObject:jr,isPlainObject:ho,isEmptyObject:Oy,isReadableStream:Uy,isRequest:zy,isResponse:qy,isHeaders:Ky,isUndefined:Un,isDate:Ly,isFile:Dy,isReactNativeBlob:jy,isReactNative:Fy,isBlob:ky,isRegExp:a6,isFunction:et,isStream:Hy,isURLSearchParams:Zy,isTypedArray:t6,isFileList:$y,forEach:Fr,merge:ga,extend:Gy,trim:Wy,stripBOM:Qy,inherits:Yy,toFlatObject:Xy,kindOf:rs,kindOfTest:St,endsWith:Jy,toArray:e6,forEachEntry:n6,matchAll:r6,isHTMLForm:o6,hasOwnProperty:Uc,hasOwnProp:Uc,reduceDescriptors:lf,freezeMethods:i6,toObjectSet:c6,toCamelCase:s6,noop:l6,toFiniteNumber:u6,findKey:af,global:un,isContextDefined:cf,isSpecCompliantForm:d6,toJSONObject:f6,isAsyncFn:h6,isThenable:p6,setImmediate:uf,asap:m6,isIterable:g6};let ee=class df extends Error{static from(t,n,r,o,s,a){const i=new df(t.message,n||t.code,r,o,s);return i.cause=t,i.name=t.name,t.status!=null&&i.status==null&&(i.status=t.status),a&&Object.assign(i,a),i}constructor(t,n,r,o,s){super(t),Object.defineProperty(this,"message",{value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:T.toJSONObject(this.config),code:this.code,status:this.status}}};ee.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";ee.ERR_BAD_OPTION="ERR_BAD_OPTION";ee.ECONNABORTED="ECONNABORTED";ee.ETIMEDOUT="ETIMEDOUT";ee.ERR_NETWORK="ERR_NETWORK";ee.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";ee.ERR_DEPRECATED="ERR_DEPRECATED";ee.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";ee.ERR_BAD_REQUEST="ERR_BAD_REQUEST";ee.ERR_CANCELED="ERR_CANCELED";ee.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";ee.ERR_INVALID_URL="ERR_INVALID_URL";const v6=null;function va(e){return T.isPlainObject(e)||T.isArray(e)}function ff(e){return T.endsWith(e,"[]")?e.slice(0,-2):e}function Vs(e,t,n){return e?e.concat(t).map(function(o,s){return o=ff(o),!n&&s?"["+o+"]":o}).join(n?".":""):t}function y6(e){return T.isArray(e)&&!e.some(va)}const b6=T.toFlatObject(T,{},null,function(t){return/^is[A-Z]/.test(t)});function ss(e,t,n){if(!T.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=T.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!T.isUndefined(y[v])});const r=n.metaTokens,o=n.visitor||f,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&T.isSpecCompliantForm(t);if(!T.isFunction(o))throw new TypeError("visitor must be a function");function u(g){if(g===null)return"";if(T.isDate(g))return g.toISOString();if(T.isBoolean(g))return g.toString();if(!l&&T.isBlob(g))throw new ee("Blob is not supported. Use a Buffer instead.");return T.isArrayBuffer(g)||T.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function f(g,v,y){let b=g;if(T.isReactNative(t)&&T.isReactNativeBlob(g))return t.append(Vs(y,v,s),u(g)),!1;if(g&&!y&&typeof g=="object"){if(T.endsWith(v,"{}"))v=r?v:v.slice(0,-2),g=JSON.stringify(g);else if(T.isArray(g)&&y6(g)||(T.isFileList(g)||T.endsWith(v,"[]"))&&(b=T.toArray(g)))return v=ff(v),b.forEach(function(w,E){!(T.isUndefined(w)||w===null)&&t.append(a===!0?Vs([v],E,s):a===null?v:v+"[]",u(w))}),!1}return va(g)?!0:(t.append(Vs(y,v,s),u(g)),!1)}const d=[],p=Object.assign(b6,{defaultVisitor:f,convertValue:u,isVisitable:va});function m(g,v){if(!T.isUndefined(g)){if(d.indexOf(g)!==-1)throw Error("Circular reference detected in "+v.join("."));d.push(g),T.forEach(g,function(b,x){(!(T.isUndefined(b)||b===null)&&o.call(t,b,T.isString(x)?x.trim():x,v,p))===!0&&m(b,v?v.concat(x):[x])}),d.pop()}}if(!T.isObject(e))throw new TypeError("data must be an object");return m(e),t}function zc(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function mi(e,t){this._pairs=[],e&&ss(e,this,t)}const hf=mi.prototype;hf.append=function(t,n){this._pairs.push([t,n])};hf.toString=function(t){const n=t?function(r){return t.call(this,r,zc)}:zc;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function x6(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function pf(e,t,n){if(!t)return e;const r=n&&n.encode||x6,o=T.isFunction(n)?{serialize:n}:n,s=o&&o.serialize;let a;if(s?a=s(t,o):a=T.isURLSearchParams(t)?t.toString():new mi(t,o).toString(r),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class qc{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){T.forEach(this.handlers,function(r){r!==null&&t(r)})}}const gi={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},w6=typeof URLSearchParams<"u"?URLSearchParams:mi,E6=typeof FormData<"u"?FormData:null,S6=typeof Blob<"u"?Blob:null,R6={isBrowser:!0,classes:{URLSearchParams:w6,FormData:E6,Blob:S6},protocols:["http","https","file","blob","url","data"]},vi=typeof window<"u"&&typeof document<"u",ya=typeof navigator=="object"&&navigator||void 0,C6=vi&&(!ya||["ReactNative","NativeScript","NS"].indexOf(ya.product)<0),A6=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",T6=vi&&window.location.href||"http://localhost",P6=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vi,hasStandardBrowserEnv:C6,hasStandardBrowserWebWorkerEnv:A6,navigator:ya,origin:T6},Symbol.toStringTag,{value:"Module"})),He={...P6,...R6};function M6(e,t){return ss(e,new He.classes.URLSearchParams,{visitor:function(n,r,o,s){return He.isNode&&T.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function _6(e){return T.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function N6(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}function mf(e){function t(n,r,o,s){let a=n[s++];if(a==="__proto__")return!0;const i=Number.isFinite(+a),l=s>=n.length;return a=!a&&T.isArray(o)?o.length:a,l?(T.hasOwnProp(o,a)?o[a]=[o[a],r]:o[a]=r,!i):((!o[a]||!T.isObject(o[a]))&&(o[a]=[]),t(n,r,o[a],s)&&T.isArray(o[a])&&(o[a]=N6(o[a])),!i)}if(T.isFormData(e)&&T.isFunction(e.entries)){const n={};return T.forEachEntry(e,(r,o)=>{t(_6(r),o,n,0)}),n}return null}function I6(e,t,n){if(T.isString(e))try{return(t||JSON.parse)(e),T.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const kr={transitional:gi,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,s=T.isObject(t);if(s&&T.isHTMLForm(t)&&(t=new FormData(t)),T.isFormData(t))return o?JSON.stringify(mf(t)):t;if(T.isArrayBuffer(t)||T.isBuffer(t)||T.isStream(t)||T.isFile(t)||T.isBlob(t)||T.isReadableStream(t))return t;if(T.isArrayBufferView(t))return t.buffer;if(T.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let i;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return M6(t,this.formSerializer).toString();if((i=T.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ss(i?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||o?(n.setContentType("application/json",!1),I6(t)):t}],transformResponse:[function(t){const n=this.transitional||kr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(T.isResponse(t)||T.isReadableStream(t))return t;if(t&&T.isString(t)&&(r&&!this.responseType||o)){const a=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(i){if(a)throw i.name==="SyntaxError"?ee.from(i,ee.ERR_BAD_RESPONSE,this,null,this.response):i}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:He.classes.FormData,Blob:He.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};T.forEach(["delete","get","head","post","put","patch"],e=>{kr.headers[e]={}});const O6=T.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),L6=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
13
|
+
`).forEach(function(a){o=a.indexOf(":"),n=a.substring(0,o).trim().toLowerCase(),r=a.substring(o+1).trim(),!(!n||t[n]&&O6[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Kc=Symbol("internals"),D6=e=>!/[\r\n]/.test(e);function gf(e,t){if(!(e===!1||e==null)){if(T.isArray(e)){e.forEach(n=>gf(n,t));return}if(!D6(String(e)))throw new Error(`Invalid character in header content ["${t}"]`)}}function lr(e){return e&&String(e).trim().toLowerCase()}function j6(e){let t=e.length;for(;t>0;){const n=e.charCodeAt(t-1);if(n!==10&&n!==13)break;t-=1}return t===e.length?e:e.slice(0,t)}function po(e){return e===!1||e==null?e:T.isArray(e)?e.map(po):j6(String(e))}function F6(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const k6=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Zs(e,t,n,r,o){if(T.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!T.isString(t)){if(T.isString(r))return t.indexOf(r)!==-1;if(T.isRegExp(r))return r.test(t)}}function $6(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function H6(e,t){const n=T.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,s,a){return this[r].call(this,t,o,s,a)},configurable:!0})})}let tt=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function s(i,l,u){const f=lr(l);if(!f)throw new Error("header name must be a non-empty string");const d=T.findKey(o,f);(!d||o[d]===void 0||u===!0||u===void 0&&o[d]!==!1)&&(gf(i,l),o[d||l]=po(i))}const a=(i,l)=>T.forEach(i,(u,f)=>s(u,f,l));if(T.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(T.isString(t)&&(t=t.trim())&&!k6(t))a(L6(t),n);else if(T.isObject(t)&&T.isIterable(t)){let i={},l,u;for(const f of t){if(!T.isArray(f))throw TypeError("Object iterator must return a key-value pair");i[u=f[0]]=(l=i[u])?T.isArray(l)?[...l,f[1]]:[l,f[1]]:f[1]}a(i,n)}else t!=null&&s(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=T.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return F6(o);if(T.isFunction(n))return n.call(this,o,r);if(T.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=T.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Zs(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function s(a){if(a=lr(a),a){const i=T.findKey(r,a);i&&(!n||Zs(r,r[i],i,n))&&(delete r[i],o=!0)}}return T.isArray(t)?t.forEach(s):s(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const s=n[r];(!t||Zs(this,this[s],s,t,!0))&&(delete this[s],o=!0)}return o}normalize(t){const n=this,r={};return T.forEach(this,(o,s)=>{const a=T.findKey(r,s);if(a){n[a]=po(o),delete n[s];return}const i=t?$6(s):String(s).trim();i!==s&&delete n[s],n[i]=po(o),r[i]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return T.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&T.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
|
|
14
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Kc]=this[Kc]={accessors:{}}).accessors,o=this.prototype;function s(a){const i=lr(a);r[i]||(H6(o,a),r[i]=!0)}return T.isArray(t)?t.forEach(s):s(t),this}};tt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);T.reduceDescriptors(tt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});T.freezeMethods(tt);function Us(e,t){const n=this||kr,r=t||n,o=tt.from(r.headers);let s=r.data;return T.forEach(e,function(i){s=i.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function vf(e){return!!(e&&e.__CANCEL__)}let $r=class extends ee{constructor(t,n,r){super(t??"canceled",ee.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function yf(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new ee("Request failed with status code "+n.status,[ee.ERR_BAD_REQUEST,ee.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function B6(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function V6(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),f=r[s];a||(a=u),n[o]=l,r[o]=u;let d=s,p=0;for(;d!==o;)p+=n[d++],d=d%e;if(o=(o+1)%e,o===s&&(s=(s+1)%e),u-a<t)return;const m=f&&u-f;return m?Math.round(p*1e3/m):void 0}}function Z6(e,t){let n=0,r=1e3/t,o,s;const a=(u,f=Date.now())=>{n=f,o=null,s&&(clearTimeout(s),s=null),e(...u)};return[(...u)=>{const f=Date.now(),d=f-n;d>=r?a(u,f):(o=u,s||(s=setTimeout(()=>{s=null,a(o)},r-d)))},()=>o&&a(o)]}const Io=(e,t,n=3)=>{let r=0;const o=V6(50,250);return Z6(s=>{const a=s.loaded,i=s.lengthComputable?s.total:void 0,l=a-r,u=o(l),f=a<=i;r=a;const d={loaded:a,total:i,progress:i?a/i:void 0,bytes:l,rate:u||void 0,estimated:u&&i&&f?(i-a)/u:void 0,event:s,lengthComputable:i!=null,[t?"download":"upload"]:!0};e(d)},n)},Wc=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Gc=e=>(...t)=>T.asap(()=>e(...t)),U6=He.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,He.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(He.origin),He.navigator&&/(msie|trident)/i.test(He.navigator.userAgent)):()=>!0,z6=He.hasStandardBrowserEnv?{write(e,t,n,r,o,s,a){if(typeof document>"u")return;const i=[`${e}=${encodeURIComponent(t)}`];T.isNumber(n)&&i.push(`expires=${new Date(n).toUTCString()}`),T.isString(r)&&i.push(`path=${r}`),T.isString(o)&&i.push(`domain=${o}`),s===!0&&i.push("secure"),T.isString(a)&&i.push(`SameSite=${a}`),document.cookie=i.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function q6(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function K6(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function bf(e,t,n){let r=!q6(t);return e&&(r||n==!1)?K6(e,t):t}const Qc=e=>e instanceof tt?{...e}:e;function xn(e,t){t=t||{};const n={};function r(u,f,d,p){return T.isPlainObject(u)&&T.isPlainObject(f)?T.merge.call({caseless:p},u,f):T.isPlainObject(f)?T.merge({},f):T.isArray(f)?f.slice():f}function o(u,f,d,p){if(T.isUndefined(f)){if(!T.isUndefined(u))return r(void 0,u,d,p)}else return r(u,f,d,p)}function s(u,f){if(!T.isUndefined(f))return r(void 0,f)}function a(u,f){if(T.isUndefined(f)){if(!T.isUndefined(u))return r(void 0,u)}else return r(void 0,f)}function i(u,f,d){if(d in t)return r(u,f);if(d in e)return r(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(u,f,d)=>o(Qc(u),Qc(f),d,!0)};return T.forEach(Object.keys({...e,...t}),function(f){if(f==="__proto__"||f==="constructor"||f==="prototype")return;const d=T.hasOwnProp(l,f)?l[f]:o,p=d(e[f],t[f],f);T.isUndefined(p)&&d!==i||(n[f]=p)}),n}const xf=e=>{const t=xn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:a,auth:i}=t;if(t.headers=a=tt.from(a),t.url=pf(bf(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),i&&a.set("Authorization","Basic "+btoa((i.username||"")+":"+(i.password?unescape(encodeURIComponent(i.password)):""))),T.isFormData(n)){if(He.hasStandardBrowserEnv||He.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(T.isFunction(n.getHeaders)){const l=n.getHeaders(),u=["content-type","content-length"];Object.entries(l).forEach(([f,d])=>{u.includes(f.toLowerCase())&&a.set(f,d)})}}if(He.hasStandardBrowserEnv&&(r&&T.isFunction(r)&&(r=r(t)),r||r!==!1&&U6(t.url))){const l=o&&s&&z6.read(s);l&&a.set(o,l)}return t},W6=typeof XMLHttpRequest<"u",G6=W6&&function(e){return new Promise(function(n,r){const o=xf(e);let s=o.data;const a=tt.from(o.headers).normalize();let{responseType:i,onUploadProgress:l,onDownloadProgress:u}=o,f,d,p,m,g;function v(){m&&m(),g&&g(),o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(o.method.toUpperCase(),o.url,!0),y.timeout=o.timeout;function b(){if(!y)return;const w=tt.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),A={data:!i||i==="text"||i==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:w,config:e,request:y};yf(function(R){n(R),v()},function(R){r(R),v()},A),y=null}"onloadend"in y?y.onloadend=b:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(b)},y.onabort=function(){y&&(r(new ee("Request aborted",ee.ECONNABORTED,e,y)),y=null)},y.onerror=function(E){const A=E&&E.message?E.message:"Network Error",N=new ee(A,ee.ERR_NETWORK,e,y);N.event=E||null,r(N),y=null},y.ontimeout=function(){let E=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const A=o.transitional||gi;o.timeoutErrorMessage&&(E=o.timeoutErrorMessage),r(new ee(E,A.clarifyTimeoutError?ee.ETIMEDOUT:ee.ECONNABORTED,e,y)),y=null},s===void 0&&a.setContentType(null),"setRequestHeader"in y&&T.forEach(a.toJSON(),function(E,A){y.setRequestHeader(A,E)}),T.isUndefined(o.withCredentials)||(y.withCredentials=!!o.withCredentials),i&&i!=="json"&&(y.responseType=o.responseType),u&&([p,g]=Io(u,!0),y.addEventListener("progress",p)),l&&y.upload&&([d,m]=Io(l),y.upload.addEventListener("progress",d),y.upload.addEventListener("loadend",m)),(o.cancelToken||o.signal)&&(f=w=>{y&&(r(!w||w.type?new $r(null,e,y):w),y.abort(),y=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const x=B6(o.url);if(x&&He.protocols.indexOf(x)===-1){r(new ee("Unsupported protocol "+x+":",ee.ERR_BAD_REQUEST,e));return}y.send(s||null)})},Q6=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const s=function(u){if(!o){o=!0,i();const f=u instanceof Error?u:this.reason;r.abort(f instanceof ee?f:new $r(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new ee(`timeout of ${t}ms exceeded`,ee.ETIMEDOUT))},t);const i=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=r;return l.unsubscribe=()=>T.asap(i),l}},Y6=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},X6=async function*(e,t){for await(const n of J6(e))yield*Y6(n,t)},J6=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:r}=await t.read();if(n)break;yield r}}finally{await t.cancel()}},Yc=(e,t,n,r)=>{const o=X6(e,t);let s=0,a,i=l=>{a||(a=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:u,value:f}=await o.next();if(u){i(),l.close();return}let d=f.byteLength;if(n){let p=s+=d;n(p)}l.enqueue(new Uint8Array(f))}catch(u){throw i(u),u}},cancel(l){return i(l),o.return()}},{highWaterMark:2})},Xc=64*1024,{isFunction:oo}=T,e8=(({Request:e,Response:t})=>({Request:e,Response:t}))(T.global),{ReadableStream:Jc,TextEncoder:el}=T.global,tl=(e,...t)=>{try{return!!e(...t)}catch{return!1}},t8=e=>{e=T.merge.call({skipUndefined:!0},e8,e);const{fetch:t,Request:n,Response:r}=e,o=t?oo(t):typeof fetch=="function",s=oo(n),a=oo(r);if(!o)return!1;const i=o&&oo(Jc),l=o&&(typeof el=="function"?(g=>v=>g.encode(v))(new el):async g=>new Uint8Array(await new n(g).arrayBuffer())),u=s&&i&&tl(()=>{let g=!1;const v=new Jc,y=new n(He.origin,{body:v,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return v.cancel(),g&&!y}),f=a&&i&&tl(()=>T.isReadableStream(new r("").body)),d={stream:f&&(g=>g.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!d[g]&&(d[g]=(v,y)=>{let b=v&&v[g];if(b)return b.call(v);throw new ee(`Response type '${g}' is not supported`,ee.ERR_NOT_SUPPORT,y)})});const p=async g=>{if(g==null)return 0;if(T.isBlob(g))return g.size;if(T.isSpecCompliantForm(g))return(await new n(He.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(T.isArrayBufferView(g)||T.isArrayBuffer(g))return g.byteLength;if(T.isURLSearchParams(g)&&(g=g+""),T.isString(g))return(await l(g)).byteLength},m=async(g,v)=>{const y=T.toFiniteNumber(g.getContentLength());return y??p(v)};return async g=>{let{url:v,method:y,data:b,signal:x,cancelToken:w,timeout:E,onDownloadProgress:A,onUploadProgress:N,responseType:R,headers:S,withCredentials:_="same-origin",fetchOptions:D}=xf(g),M=t||fetch;R=R?(R+"").toLowerCase():"text";let k=Q6([x,w&&w.toAbortSignal()],E),Z=null;const j=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let F;try{if(N&&u&&y!=="get"&&y!=="head"&&(F=await m(S,b))!==0){let q=new n(v,{method:"POST",body:b,duplex:"half"}),G;if(T.isFormData(b)&&(G=q.headers.get("content-type"))&&S.setContentType(G),q.body){const[H,z]=Wc(F,Io(Gc(N)));b=Yc(q.body,Xc,H,z)}}T.isString(_)||(_=_?"include":"omit");const C=s&&"credentials"in n.prototype,L={...D,signal:k,method:y.toUpperCase(),headers:S.normalize().toJSON(),body:b,duplex:"half",credentials:C?_:void 0};Z=s&&new n(v,L);let O=await(s?M(Z,D):M(v,L));const I=f&&(R==="stream"||R==="response");if(f&&(A||I&&j)){const q={};["status","statusText","headers"].forEach(K=>{q[K]=O[K]});const G=T.toFiniteNumber(O.headers.get("content-length")),[H,z]=A&&Wc(G,Io(Gc(A),!0))||[];O=new r(Yc(O.body,Xc,H,()=>{z&&z(),j&&j()}),q)}R=R||"text";let V=await d[T.findKey(d,R)||"text"](O,g);return!I&&j&&j(),await new Promise((q,G)=>{yf(q,G,{data:V,headers:tt.from(O.headers),status:O.status,statusText:O.statusText,config:g,request:Z})})}catch(C){throw j&&j(),C&&C.name==="TypeError"&&/Load failed|fetch/i.test(C.message)?Object.assign(new ee("Network Error",ee.ERR_NETWORK,g,Z,C&&C.response),{cause:C.cause||C}):ee.from(C,C&&C.code,g,Z,C&&C.response)}}},n8=new Map,wf=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let a=s.length,i=a,l,u,f=n8;for(;i--;)l=s[i],u=f.get(l),u===void 0&&f.set(l,u=i?new Map:t8(t)),f=u;return u};wf();const yi={http:v6,xhr:G6,fetch:{get:wf}};T.forEach(yi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nl=e=>`- ${e}`,r8=e=>T.isFunction(e)||e===null||e===!1;function o8(e,t){e=T.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let a=0;a<n;a++){r=e[a];let i;if(o=r,!r8(r)&&(o=yi[(i=String(r)).toLowerCase()],o===void 0))throw new ee(`Unknown adapter '${i}'`);if(o&&(T.isFunction(o)||(o=o.get(t))))break;s[i||"#"+a]=o}if(!o){const a=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let i=n?a.length>1?`since :
|
|
15
|
+
`+a.map(nl).join(`
|
|
16
|
+
`):" "+nl(a[0]):"as no adapter specified";throw new ee("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return o}const Ef={getAdapter:o8,adapters:yi};function zs(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $r(null,e)}function rl(e){return zs(e),e.headers=tt.from(e.headers),e.data=Us.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ef.getAdapter(e.adapter||kr.adapter,e)(e).then(function(r){return zs(e),r.data=Us.call(e,e.transformResponse,r),r.headers=tt.from(r.headers),r},function(r){return vf(r)||(zs(e),r&&r.response&&(r.response.data=Us.call(e,e.transformResponse,r.response),r.response.headers=tt.from(r.response.headers))),Promise.reject(r)})}const Sf="1.15.0",as={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{as[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ol={};as.transitional=function(t,n,r){function o(s,a){return"[Axios v"+Sf+"] Transitional option '"+s+"'"+a+(r?". "+r:"")}return(s,a,i)=>{if(t===!1)throw new ee(o(a," has been removed"+(n?" in "+n:"")),ee.ERR_DEPRECATED);return n&&!ol[a]&&(ol[a]=!0,console.warn(o(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,a,i):!0}};as.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function s8(e,t,n){if(typeof e!="object")throw new ee("options must be an object",ee.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const i=e[s],l=i===void 0||a(i,s,e);if(l!==!0)throw new ee("option "+s+" must be "+l,ee.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new ee("Unknown option "+s,ee.ERR_BAD_OPTION)}}const mo={assertOptions:s8,validators:as},dt=mo.validators;let hn=class{constructor(t){this.defaults=t||{},this.interceptors={request:new qc,response:new qc}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const s=(()=>{if(!o.stack)return"";const a=o.stack.indexOf(`
|
|
17
|
+
`);return a===-1?"":o.stack.slice(a+1)})();try{if(!r.stack)r.stack=s;else if(s){const a=s.indexOf(`
|
|
18
|
+
`),i=a===-1?-1:s.indexOf(`
|
|
19
|
+
`,a+1),l=i===-1?"":s.slice(i+1);String(r.stack).endsWith(l)||(r.stack+=`
|
|
20
|
+
`+s)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:s}=n;r!==void 0&&mo.assertOptions(r,{silentJSONParsing:dt.transitional(dt.boolean),forcedJSONParsing:dt.transitional(dt.boolean),clarifyTimeoutError:dt.transitional(dt.boolean),legacyInterceptorReqResOrdering:dt.transitional(dt.boolean)},!1),o!=null&&(T.isFunction(o)?n.paramsSerializer={serialize:o}:mo.assertOptions(o,{encode:dt.function,serialize:dt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),mo.assertOptions(n,{baseUrl:dt.spelling("baseURL"),withXsrfToken:dt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=s&&T.merge(s.common,s[n.method]);s&&T.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),n.headers=tt.concat(a,s);const i=[];let l=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;l=l&&v.synchronous;const y=n.transitional||gi;y&&y.legacyInterceptorReqResOrdering?i.unshift(v.fulfilled,v.rejected):i.push(v.fulfilled,v.rejected)});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let f,d=0,p;if(!l){const g=[rl.bind(this),void 0];for(g.unshift(...i),g.push(...u),p=g.length,f=Promise.resolve(n);d<p;)f=f.then(g[d++],g[d++]);return f}p=i.length;let m=n;for(;d<p;){const g=i[d++],v=i[d++];try{m=g(m)}catch(y){v.call(this,y);break}}try{f=rl.call(this,m)}catch(g){return Promise.reject(g)}for(d=0,p=u.length;d<p;)f=f.then(u[d++],u[d++]);return f}getUri(t){t=xn(this.defaults,t);const n=bf(t.baseURL,t.url,t.allowAbsoluteUrls);return pf(n,t.params,t.paramsSerializer)}};T.forEach(["delete","get","head","options"],function(t){hn.prototype[t]=function(n,r){return this.request(xn(r||{},{method:t,url:n,data:(r||{}).data}))}});T.forEach(["post","put","patch"],function(t){function n(r){return function(s,a,i){return this.request(xn(i||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}hn.prototype[t]=n(),hn.prototype[t+"Form"]=n(!0)});let a8=class Rf{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(o=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](o);r._listeners=null}),this.promise.then=o=>{let s;const a=new Promise(i=>{r.subscribe(i),s=i}).then(o);return a.cancel=function(){r.unsubscribe(s)},a},t(function(s,a,i){r.reason||(r.reason=new $r(s,a,i),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new Rf(function(o){t=o}),cancel:t}}};function i8(e){return function(n){return e.apply(null,n)}}function c8(e){return T.isObject(e)&&e.isAxiosError===!0}const ba={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ba).forEach(([e,t])=>{ba[t]=e});function Cf(e){const t=new hn(e),n=nf(hn.prototype.request,t);return T.extend(n,hn.prototype,t,{allOwnKeys:!0}),T.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Cf(xn(e,o))},n}const ge=Cf(kr);ge.Axios=hn;ge.CanceledError=$r;ge.CancelToken=a8;ge.isCancel=vf;ge.VERSION=Sf;ge.toFormData=ss;ge.AxiosError=ee;ge.Cancel=ge.CanceledError;ge.all=function(t){return Promise.all(t)};ge.spread=i8;ge.isAxiosError=c8;ge.mergeConfig=xn;ge.AxiosHeaders=tt;ge.formToJSON=e=>mf(T.isHTMLForm(e)?new FormData(e):e);ge.getAdapter=Ef.getAdapter;ge.HttpStatusCode=ba;ge.default=ge;const{Axios:RC,AxiosError:CC,CanceledError:AC,isCancel:TC,CancelToken:PC,VERSION:MC,all:_C,Cancel:NC,isAxiosError:IC,spread:OC,toFormData:LC,AxiosHeaders:DC,HttpStatusCode:jC,formToJSON:FC,getAdapter:kC,mergeConfig:$C}=ge,bi="/login",l8="/api/auth/";let sl,al=!1;const u8=e=>{const t=`${e.pathname||"/"}${e.search}${e.hash}`;return`${bi}?next=${encodeURIComponent(t)}`},d8=e=>{if(!ge.isAxiosError(e)||e.response?.status!==401)return!1;const t=e.config?.url??"";return!t.startsWith(l8)&&t!==bi},f8=e=>!!(e.authRequired&&!e.authenticated),Af=(e=window.location)=>{al||e.pathname===bi||(al=!0,e.assign(u8(e)))},h8=async(e=fetch)=>{const t=await e("/api/auth/session").catch(()=>{});if(!t?.ok)return;const n=await t.json();f8(n)&&Af()},p8=()=>{sl===void 0&&(sl=ge.interceptors.response.use(e=>e,e=>(d8(e)&&Af(),Promise.reject(e))))},m8=e=>!e||e.length===0?null:[...new Set(e)].sort(),g8=e=>!e||e.length===0?[]:[...new Set(e.map(t=>t.trim()).filter(Boolean))].sort(),v8=e=>!e||e.length===0?null:[...new Set(e)].sort(),ae={notes:{all:()=>["notes"],listAll:()=>["notes","list"],list:(e={})=>["notes","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",sortBy:e.sortBy??null,sortOrder:e.sortOrder??null,pinnedFirst:e.pinnedFirst??null,fields:m8(e.fields)}],tagListAll:()=>["notes","tag-list"],tagList:(e={})=>["notes","tag-list",{limit:e.limit??25,offset:e.offset??0,query:e.query??""}],tagNameListAll:()=>["notes","tag-name-list"],tagNameList:e=>["notes","tag-name-list",{limit:e.limit??25,offset:e.offset??0,mode:e.mode??"and",tagNames:g8(e.tagNames)}],detail:e=>["notes","detail",{id:e}],snapshots:(e,t=5)=>["notes","snapshots",{id:e,limit:t}],trashAll:()=>["notes","trash"],trash:(e={})=>["notes","trash",{limit:e.limit??25,offset:e.offset??0}],trashDetail:e=>["notes","trash","detail",{id:e}],pinned:()=>["notes","pinned"],backReferencesAll:()=>["notes","back-references"],backReferences:e=>["notes","back-references",{noteId:e}],graph:()=>["notes","graph"]},tags:{all:()=>["tags"],list:(e={})=>["tags","list",{limit:e.limit??50,offset:e.offset??0,query:e.query??""}]},images:{all:()=>["images"],listAll:()=>["images","list"],list:(e={})=>["images","list",{limit:e.limit??50,offset:e.offset??0}],detail:e=>["images","detail",{id:e}],notes:e=>["images","notes",{id:e}]},reminders:{all:()=>["reminders"],note:(e,t={})=>["reminders","note",e,{limit:t.limit??10,offset:t.offset??0}],noteAllPages:e=>["reminders","note",e],upcoming:(e={})=>["reminders","upcoming",{limit:e.limit??10,offset:e.offset??0}],upcomingAllPages:()=>["reminders","upcoming"],inDateRangeAll:()=>["reminders","in-date-range"],inDateRange:(e,t)=>["reminders","in-date-range",{year:e,month:t}]},placeholders:{all:()=>["placeholders"],listAll:()=>["placeholders","list"],list:(e={})=>["placeholders","list",{limit:e.limit??25,offset:e.offset??0,query:e.query??"",fields:v8(e.fields)}]},calendar:{all:()=>["calendar"],notesInDateRange:(e,t)=>["calendar","notes-in-date-range",{year:e,month:t}]},views:{all:()=>["views"],workspace:()=>["views","workspace"],section:e=>["views","section",{id:e}],sectionNotesAll:()=>["views","section-notes"],sectionNotes:(e,t={})=>["views","section-notes",{id:e,limit:t.limit??25,offset:t.offset??0}]},ui:{heroBanner:()=>["ui","hero-banner"]}},y8=async(e,t)=>{switch(t.type){case"mcp.note.created":case"mcp.note.updated":await Promise.all([e.invalidateQueries({queryKey:ae.notes.listAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.tagListAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.tagNameListAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.pinned(),exact:!0}),e.invalidateQueries({queryKey:ae.notes.backReferencesAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.graph(),exact:!0}),e.invalidateQueries({queryKey:ae.views.sectionNotesAll(),exact:!1}),e.invalidateQueries({queryKey:ae.tags.all(),exact:!1})]);return;case"mcp.note.deleted":await Promise.all([e.invalidateQueries({queryKey:ae.notes.listAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.tagListAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.tagNameListAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.trashAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.pinned(),exact:!0}),e.invalidateQueries({queryKey:ae.notes.backReferencesAll(),exact:!1}),e.invalidateQueries({queryKey:ae.notes.graph(),exact:!0}),e.invalidateQueries({queryKey:ae.views.sectionNotesAll(),exact:!1}),e.invalidateQueries({queryKey:ae.tags.all(),exact:!1}),e.invalidateQueries({queryKey:ae.reminders.all(),exact:!1}),e.invalidateQueries({queryKey:ae.images.all(),exact:!1}),e.invalidateQueries({queryKey:ae.calendar.all(),exact:!1})]);return}},b8=["mcp.note.created","mcp.note.updated","mcp.note.deleted"],xa=new Set,x8=e=>typeof e=="object"&&e!==null,w8=e=>!x8(e)||e.source!=="mcp"||typeof e.noteId!="string"||typeof e.type!="string"?!1:e.type==="mcp.note.deleted"||(e.type==="mcp.note.created"||e.type==="mcp.note.updated")&&typeof e.updatedAt=="string",E8=e=>{try{const t=JSON.parse(e);return w8(t)?t:null}catch{return null}},S8=e=>{xa.forEach(t=>{t(e)})},HC=e=>(xa.add(e),()=>{xa.delete(e)}),R8=(e,t)=>n=>{if(!(n instanceof MessageEvent)||typeof n.data!="string")return;const r=E8(n.data);!r||r.type!==t||(S8(r),y8(e,r))},C8=()=>{const e=Wn();return c.useEffect(()=>{if(typeof EventSource>"u")return;const t=new EventSource("/api/events"),n=()=>{h8()},r=b8.map(o=>{const s=R8(e,o);return t.addEventListener(o,s),()=>{t.removeEventListener(o,s)}});return t.addEventListener("error",n),()=>{r.forEach(o=>{o()}),t.removeEventListener("error",n),t.close()}},[e]),null},A8=({children:e})=>h.jsx(xg,{client:Py,children:h.jsx(Gv,{children:h.jsxs(Ty,{children:[h.jsx(C8,{}),e]})})}),T8={sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"},il={sm:10,md:12,lg:14},Tf=c.forwardRef(({className:e,size:t="md",checked:n,disabled:r,...o},s)=>h.jsxs("label",{className:pe("relative inline-flex items-center justify-center cursor-pointer",r&&"cursor-not-allowed opacity-50",e),children:[h.jsx("input",{ref:s,type:"checkbox",checked:n,disabled:r,className:"sr-only peer",...o}),h.jsx("span",{className:pe(T8[t],"flex items-center justify-center","border border-border-secondary","rounded-[6px]","bg-surface","transition-all duration-200","peer-checked:bg-cta","peer-checked:border-cta","focus-ring-soft"),children:n&&h.jsx(_v,{width:il[t],height:il[t],className:"text-fg-on-filled",weight:"bold"})})]}));Tf.displayName="Checkbox";var P8=rd,M8=od,Pf=sd,Mf=ad,_8=ci,_f=id,Nf=cd;const N8=P8,I8=M8,O8=_8,If=c.createContext("default"),Hr=()=>c.useContext(If),Of=c.forwardRef(({className:e,...t},n)=>h.jsx(Pf,{ref:n,className:pe("fixed","inset-0","z-[1090]","bg-overlay","backdrop-blur-[2px]","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0",e),...t}));Of.displayName=Pf.displayName;const Lf=c.forwardRef(({className:e,children:t,variant:n="default",...r},o)=>h.jsxs(I8,{children:[h.jsx(Of,{}),h.jsx("div",{className:"pointer-events-none fixed inset-0 z-[1100] flex items-center justify-center p-4",children:h.jsx(Mf,{ref:o,"data-dialog-variant":n,className:li({variant:n,className:e}),...r,children:h.jsx(If.Provider,{value:n,children:t})})})]}));Lf.displayName=Mf.displayName;const Df=({title:e,onClose:t,className:n})=>{const r=Hr();return h.jsxs("div",{className:Uv({variant:r,className:n}),children:[h.jsx(kf,{children:e}),t&&h.jsx(O8,{asChild:!0,children:h.jsx("button",{type:"button",className:zv({variant:r}),onClick:t,children:h.jsx(Yd,{className:r==="compact"||r==="form"||r==="confirm"?"h-[18px] w-[18px]":"h-5 w-5"})})})]})};Df.displayName="DialogHeader";const jf=c.forwardRef(({className:e,...t},n)=>{const r=Hr();return h.jsx("div",{ref:n,className:ui({variant:r,className:e}),...t})});jf.displayName="DialogBody";const Ff=c.forwardRef(({className:e,...t},n)=>{const r=Hr();return h.jsx("div",{ref:n,className:di({variant:r,className:e}),...t})});Ff.displayName="DialogFooter";const kf=c.forwardRef(({className:e,...t},n)=>{const r=Hr();return h.jsx(_f,{ref:n,className:pe(fi({variant:r}),e),...t})});kf.displayName=_f.displayName;const $f=c.forwardRef(({className:e,...t},n)=>{const r=Hr();return h.jsx(Nf,{ref:n,className:pe(hi({variant:r}),e),...t})});$f.displayName=Nf.displayName;const $t=({isOpen:e,onClose:t,children:n,className:r,variant:o="default"})=>h.jsx(N8,{open:e,onOpenChange:s=>!s&&t(),children:h.jsx(Lf,{variant:o,className:r,children:n})});$t.Header=Df;$t.Body=jf;$t.Footer=Ff;$t.Description=$f;function xi(e){const t=e+"CollectionProvider",[n,r]=Nt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:y,children:b}=v,x=P.useRef(null),w=P.useRef(new Map).current;return h.jsx(o,{scope:y,itemMap:w,collectionRef:x,children:b})};a.displayName=t;const i=e+"CollectionSlot",l=Zn(i),u=P.forwardRef((v,y)=>{const{scope:b,children:x}=v,w=s(i,b),E=ce(y,w.collectionRef);return h.jsx(l,{ref:E,children:x})});u.displayName=i;const f=e+"CollectionItemSlot",d="data-radix-collection-item",p=Zn(f),m=P.forwardRef((v,y)=>{const{scope:b,children:x,...w}=v,E=P.useRef(null),A=ce(y,E),N=s(f,b);return P.useEffect(()=>(N.itemMap.set(E,{ref:E,...w}),()=>{N.itemMap.delete(E)})),h.jsx(p,{[d]:"",ref:A,children:x})});m.displayName=f;function g(v){const y=s(e+"CollectionConsumer",v);return P.useCallback(()=>{const x=y.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((N,R)=>w.indexOf(N.ref.current)-w.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},g,r]}var L8=c.createContext(void 0);function is(e){const t=c.useContext(L8);return e||t||"ltr"}var D8="Arrow",Hf=c.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return h.jsx(re.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Hf.displayName=D8;var j8=Hf;function F8(e){const[t,n]=c.useState(void 0);return Be(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let a,i;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,i=u.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var wi="Popper",[Bf,Qn]=Nt(wi),[k8,Vf]=Bf(wi),Zf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=c.useState(null);return h.jsx(k8,{scope:t,anchor:r,onAnchorChange:o,children:n})};Zf.displayName=wi;var Uf="PopperAnchor",zf=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Vf(Uf,n),a=c.useRef(null),i=ce(t,a),l=c.useRef(null);return c.useEffect(()=>{const u=l.current;l.current=r?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),r?null:h.jsx(re.div,{...o,ref:i})});zf.displayName=Uf;var Ei="PopperContent",[$8,H8]=Bf(Ei),qf=c.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:a=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:p=!1,updatePositionStrategy:m="optimized",onPlaced:g,...v}=e,y=Vf(Ei,n),[b,x]=c.useState(null),w=ce(t,$=>x($)),[E,A]=c.useState(null),N=F8(E),R=N?.width??0,S=N?.height??0,_=r+(s!=="center"?"-"+s:""),D=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},M=Array.isArray(u)?u:[u],k=M.length>0,Z={padding:D,boundary:M.filter(V8),altBoundary:k},{refs:j,floatingStyles:F,placement:C,isPositioned:L,middlewareData:O}=$p({strategy:"fixed",placement:_,whileElementsMounted:(...$)=>qp(...$,{animationFrame:m==="always"}),elements:{reference:y.anchor},middleware:[Hp({mainAxis:o+S,alignmentAxis:a}),l&&Bp({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Kp():void 0,...Z}),l&&Vp({...Z}),Zp({...Z,apply:({elements:$,rects:U,availableWidth:te,availableHeight:B})=>{const{width:X,height:J}=U.reference,ue=$.floating.style;ue.setProperty("--radix-popper-available-width",`${te}px`),ue.setProperty("--radix-popper-available-height",`${B}px`),ue.setProperty("--radix-popper-anchor-width",`${X}px`),ue.setProperty("--radix-popper-anchor-height",`${J}px`)}}),E&&Up({element:E,padding:i}),Z8({arrowWidth:R,arrowHeight:S}),p&&zp({strategy:"referenceHidden",...Z})]}),[I,V]=Gf(C),q=Mt(g);Be(()=>{L&&q?.()},[L,q]);const G=O.arrow?.x,H=O.arrow?.y,z=O.arrow?.centerOffset!==0,[K,Y]=c.useState();return Be(()=>{b&&Y(window.getComputedStyle(b).zIndex)},[b]),h.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:L?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[O.transformOrigin?.x,O.transformOrigin?.y].join(" "),...O.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:h.jsx($8,{scope:n,placedSide:I,onArrowChange:A,arrowX:G,arrowY:H,shouldHideArrow:z,children:h.jsx(re.div,{"data-side":I,"data-align":V,...v,ref:w,style:{...v.style,animation:L?void 0:"none"}})})})});qf.displayName=Ei;var Kf="PopperArrow",B8={top:"bottom",right:"left",bottom:"top",left:"right"},Wf=c.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=H8(Kf,r),a=B8[s.placedSide];return h.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:h.jsx(j8,{...o,ref:n,style:{...o.style,display:"block"}})})});Wf.displayName=Kf;function V8(e){return e!==null}var Z8=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,a=o.arrow?.centerOffset!==0,i=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,f]=Gf(n),d={start:"0%",center:"50%",end:"100%"}[f],p=(o.arrow?.x??0)+i/2,m=(o.arrow?.y??0)+l/2;let g="",v="";return u==="bottom"?(g=a?d:`${p}px`,v=`${-l}px`):u==="top"?(g=a?d:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(g=`${-l}px`,v=a?d:`${m}px`):u==="left"&&(g=`${r.floating.width+l}px`,v=a?d:`${m}px`),{data:{x:g,y:v}}}});function Gf(e){const[t,n="center"]=e.split("-");return[t,n]}var Si=Zf,Ri=zf,Ci=qf,Ai=Wf,qs="rovingFocusGroup.onEntryFocus",U8={bubbles:!1,cancelable:!0},Br="RovingFocusGroup",[wa,Qf,z8]=xi(Br),[q8,cs]=Nt(Br,[z8]),[K8,W8]=q8(Br),Yf=c.forwardRef((e,t)=>h.jsx(wa.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(wa.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(G8,{...e,ref:t})})}));Yf.displayName=Br;var G8=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...d}=e,p=c.useRef(null),m=ce(t,p),g=is(s),[v,y]=Vt({prop:a,defaultProp:i??null,onChange:l,caller:Br}),[b,x]=c.useState(!1),w=Mt(u),E=Qf(n),A=c.useRef(!1),[N,R]=c.useState(0);return c.useEffect(()=>{const S=p.current;if(S)return S.addEventListener(qs,w),()=>S.removeEventListener(qs,w)},[w]),h.jsx(K8,{scope:n,orientation:r,dir:g,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(S=>y(S),[y]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>R(S=>S+1),[]),onFocusableItemRemove:c.useCallback(()=>R(S=>S-1),[]),children:h.jsx(re.div,{tabIndex:b||N===0?-1:0,"data-orientation":r,...d,ref:m,style:{outline:"none",...e.style},onMouseDown:W(e.onMouseDown,()=>{A.current=!0}),onFocus:W(e.onFocus,S=>{const _=!A.current;if(S.target===S.currentTarget&&_&&!b){const D=new CustomEvent(qs,U8);if(S.currentTarget.dispatchEvent(D),!D.defaultPrevented){const M=E().filter(C=>C.focusable),k=M.find(C=>C.active),Z=M.find(C=>C.id===v),F=[k,Z,...M].filter(Boolean).map(C=>C.ref.current);e0(F,f)}}A.current=!1}),onBlur:W(e.onBlur,()=>x(!1))})})}),Xf="RovingFocusGroupItem",Jf=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:a,...i}=e,l=Tt(),u=s||l,f=W8(Xf,n),d=f.currentTabStopId===u,p=Qf(n),{onFocusableItemAdd:m,onFocusableItemRemove:g,currentTabStopId:v}=f;return c.useEffect(()=>{if(r)return m(),()=>g()},[r,m,g]),h.jsx(wa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:h.jsx(re.span,{tabIndex:d?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:W(e.onMouseDown,y=>{r?f.onItemFocus(u):y.preventDefault()}),onFocus:W(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:W(e.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){f.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const b=X8(y,f.orientation,f.dir);if(b!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=p().filter(E=>E.focusable).map(E=>E.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const E=w.indexOf(y.currentTarget);w=f.loop?J8(w,E+1):w.slice(E+1)}setTimeout(()=>e0(w))}}),children:typeof a=="function"?a({isCurrentTabStop:d,hasTabStop:v!=null}):a})})});Jf.displayName=Xf;var Q8={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Y8(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function X8(e,t,n){const r=Y8(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Q8[r]}function e0(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function J8(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var t0=Yf,n0=Jf,Ea=["Enter"," "],eb=["ArrowDown","PageUp","Home"],r0=["ArrowUp","PageDown","End"],tb=[...eb,...r0],nb={ltr:[...Ea,"ArrowRight"],rtl:[...Ea,"ArrowLeft"]},rb={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Vr="Menu",[Rr,ob,sb]=xi(Vr),[Cn,o0]=Nt(Vr,[sb,Qn,cs]),ls=Qn(),s0=cs(),[ab,An]=Cn(Vr),[ib,Zr]=Cn(Vr),a0=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:a=!0}=e,i=ls(t),[l,u]=c.useState(null),f=c.useRef(!1),d=Mt(s),p=is(o);return c.useEffect(()=>{const m=()=>{f.current=!0,document.addEventListener("pointerdown",g,{capture:!0,once:!0}),document.addEventListener("pointermove",g,{capture:!0,once:!0})},g=()=>f.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",g,{capture:!0}),document.removeEventListener("pointermove",g,{capture:!0})}},[]),h.jsx(Si,{...i,children:h.jsx(ab,{scope:t,open:n,onOpenChange:d,content:l,onContentChange:u,children:h.jsx(ib,{scope:t,onClose:c.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:f,dir:p,modal:a,children:r})})})};a0.displayName=Vr;var cb="MenuAnchor",Ti=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ls(n);return h.jsx(Ri,{...o,...r,ref:t})});Ti.displayName=cb;var Pi="MenuPortal",[lb,i0]=Cn(Pi,{forceMount:void 0}),c0=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=An(Pi,t);return h.jsx(lb,{scope:t,forceMount:n,children:h.jsx(It,{present:n||s.open,children:h.jsx(Lr,{asChild:!0,container:o,children:r})})})};c0.displayName=Pi;var mt="MenuContent",[ub,Mi]=Cn(mt),l0=c.forwardRef((e,t)=>{const n=i0(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=An(mt,e.__scopeMenu),a=Zr(mt,e.__scopeMenu);return h.jsx(Rr.Provider,{scope:e.__scopeMenu,children:h.jsx(It,{present:r||s.open,children:h.jsx(Rr.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(db,{...o,ref:t}):h.jsx(fb,{...o,ref:t})})})})}),db=c.forwardRef((e,t)=>{const n=An(mt,e.__scopeMenu),r=c.useRef(null),o=ce(t,r);return c.useEffect(()=>{const s=r.current;if(s)return oi(s)},[]),h.jsx(_i,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:W(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),fb=c.forwardRef((e,t)=>{const n=An(mt,e.__scopeMenu);return h.jsx(_i,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),hb=Zn("MenuContent.ScrollLock"),_i=c.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,disableOutsideScroll:g,...v}=e,y=An(mt,n),b=Zr(mt,n),x=ls(n),w=s0(n),E=ob(n),[A,N]=c.useState(null),R=c.useRef(null),S=ce(t,R,y.onContentChange),_=c.useRef(0),D=c.useRef(""),M=c.useRef(0),k=c.useRef(null),Z=c.useRef("right"),j=c.useRef(0),F=g?Ba:c.Fragment,C=g?{as:hb,allowPinchZoom:!0}:void 0,L=I=>{const V=D.current+I,q=E().filter($=>!$.disabled),G=document.activeElement,H=q.find($=>$.ref.current===G)?.textValue,z=q.map($=>$.textValue),K=Cb(z,V,H),Y=q.find($=>$.textValue===K)?.ref.current;(function $(U){D.current=U,window.clearTimeout(_.current),U!==""&&(_.current=window.setTimeout(()=>$(""),1e3))})(V),Y&&setTimeout(()=>Y.focus())};c.useEffect(()=>()=>window.clearTimeout(_.current),[]),ri();const O=c.useCallback(I=>Z.current===k.current?.side&&Tb(I,k.current?.area),[]);return h.jsx(ub,{scope:n,searchRef:D,onItemEnter:c.useCallback(I=>{O(I)&&I.preventDefault()},[O]),onItemLeave:c.useCallback(I=>{O(I)||(R.current?.focus(),N(null))},[O]),onTriggerLeave:c.useCallback(I=>{O(I)&&I.preventDefault()},[O]),pointerGraceTimerRef:M,onPointerGraceIntentChange:c.useCallback(I=>{k.current=I},[]),children:h.jsx(F,{...C,children:h.jsx(es,{asChild:!0,trapped:o,onMountAutoFocus:W(s,I=>{I.preventDefault(),R.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:h.jsx(Or,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:d,onInteractOutside:p,onDismiss:m,children:h.jsx(t0,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:A,onCurrentTabStopIdChange:N,onEntryFocus:W(l,I=>{b.isUsingKeyboardRef.current||I.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(Ci,{role:"menu","aria-orientation":"vertical","data-state":C0(y.open),"data-radix-menu-content":"",dir:b.dir,...x,...v,ref:S,style:{outline:"none",...v.style},onKeyDown:W(v.onKeyDown,I=>{const q=I.target.closest("[data-radix-menu-content]")===I.currentTarget,G=I.ctrlKey||I.altKey||I.metaKey,H=I.key.length===1;q&&(I.key==="Tab"&&I.preventDefault(),!G&&H&&L(I.key));const z=R.current;if(I.target!==z||!tb.includes(I.key))return;I.preventDefault();const Y=E().filter($=>!$.disabled).map($=>$.ref.current);r0.includes(I.key)&&Y.reverse(),Sb(Y)}),onBlur:W(e.onBlur,I=>{I.currentTarget.contains(I.target)||(window.clearTimeout(_.current),D.current="")}),onPointerMove:W(e.onPointerMove,Cr(I=>{const V=I.target,q=j.current!==I.clientX;if(I.currentTarget.contains(V)&&q){const G=I.clientX>j.current?"right":"left";Z.current=G,j.current=I.clientX}}))})})})})})})});l0.displayName=mt;var pb="MenuGroup",Ni=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{role:"group",...r,ref:t})});Ni.displayName=pb;var mb="MenuLabel",u0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{...r,ref:t})});u0.displayName=mb;var Oo="MenuItem",cl="menu.itemSelect",us=c.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=c.useRef(null),a=Zr(Oo,e.__scopeMenu),i=Mi(Oo,e.__scopeMenu),l=ce(t,s),u=c.useRef(!1),f=()=>{const d=s.current;if(!n&&d){const p=new CustomEvent(cl,{bubbles:!0,cancelable:!0});d.addEventListener(cl,m=>r?.(m),{once:!0}),Du(d,p),p.defaultPrevented?u.current=!1:a.onClose()}};return h.jsx(d0,{...o,ref:l,disabled:n,onClick:W(e.onClick,f),onPointerDown:d=>{e.onPointerDown?.(d),u.current=!0},onPointerUp:W(e.onPointerUp,d=>{u.current||d.currentTarget?.click()}),onKeyDown:W(e.onKeyDown,d=>{const p=i.searchRef.current!=="";n||p&&d.key===" "||Ea.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});us.displayName=Oo;var d0=c.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,a=Mi(Oo,n),i=s0(n),l=c.useRef(null),u=ce(t,l),[f,d]=c.useState(!1),[p,m]=c.useState("");return c.useEffect(()=>{const g=l.current;g&&m((g.textContent??"").trim())},[s.children]),h.jsx(Rr.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:h.jsx(n0,{asChild:!0,...i,focusable:!r,children:h.jsx(re.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:u,onPointerMove:W(e.onPointerMove,Cr(g=>{r?a.onItemLeave(g):(a.onItemEnter(g),g.defaultPrevented||g.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:W(e.onPointerLeave,Cr(g=>a.onItemLeave(g))),onFocus:W(e.onFocus,()=>d(!0)),onBlur:W(e.onBlur,()=>d(!1))})})})}),gb="MenuCheckboxItem",f0=c.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(v0,{scope:e.__scopeMenu,checked:n,children:h.jsx(us,{role:"menuitemcheckbox","aria-checked":Lo(n)?"mixed":n,...o,ref:t,"data-state":Oi(n),onSelect:W(o.onSelect,()=>r?.(Lo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});f0.displayName=gb;var h0="MenuRadioGroup",[vb,yb]=Cn(h0,{value:void 0,onValueChange:()=>{}}),p0=c.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=Mt(r);return h.jsx(vb,{scope:e.__scopeMenu,value:n,onValueChange:s,children:h.jsx(Ni,{...o,ref:t})})});p0.displayName=h0;var m0="MenuRadioItem",g0=c.forwardRef((e,t)=>{const{value:n,...r}=e,o=yb(m0,e.__scopeMenu),s=n===o.value;return h.jsx(v0,{scope:e.__scopeMenu,checked:s,children:h.jsx(us,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Oi(s),onSelect:W(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});g0.displayName=m0;var Ii="MenuItemIndicator",[v0,bb]=Cn(Ii,{checked:!1}),y0=c.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=bb(Ii,n);return h.jsx(It,{present:r||Lo(s.checked)||s.checked===!0,children:h.jsx(re.span,{...o,ref:t,"data-state":Oi(s.checked)})})});y0.displayName=Ii;var xb="MenuSeparator",b0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(re.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});b0.displayName=xb;var wb="MenuArrow",x0=c.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=ls(n);return h.jsx(Ai,{...o,...r,ref:t})});x0.displayName=wb;var Eb="MenuSub",[BC,w0]=Cn(Eb),fr="MenuSubTrigger",E0=c.forwardRef((e,t)=>{const n=An(fr,e.__scopeMenu),r=Zr(fr,e.__scopeMenu),o=w0(fr,e.__scopeMenu),s=Mi(fr,e.__scopeMenu),a=c.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},f=c.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return c.useEffect(()=>f,[f]),c.useEffect(()=>{const d=i.current;return()=>{window.clearTimeout(d),l(null)}},[i,l]),h.jsx(Ti,{asChild:!0,...u,children:h.jsx(d0,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":C0(n.open),...e,ref:Ir(t,o.onTriggerChange),onClick:d=>{e.onClick?.(d),!(e.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:W(e.onPointerMove,Cr(d=>{s.onItemEnter(d),!d.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:W(e.onPointerLeave,Cr(d=>{f();const p=n.content?.getBoundingClientRect();if(p){const m=n.content?.dataset.side,g=m==="right",v=g?-5:5,y=p[g?"left":"right"],b=p[g?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+v,y:d.clientY},{x:y,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x:y,y:p.bottom}],side:m}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:W(e.onKeyDown,d=>{const p=s.searchRef.current!=="";e.disabled||p&&d.key===" "||nb[r.dir].includes(d.key)&&(n.onOpenChange(!0),n.content?.focus(),d.preventDefault())})})})});E0.displayName=fr;var S0="MenuSubContent",R0=c.forwardRef((e,t)=>{const n=i0(mt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=An(mt,e.__scopeMenu),a=Zr(mt,e.__scopeMenu),i=w0(S0,e.__scopeMenu),l=c.useRef(null),u=ce(t,l);return h.jsx(Rr.Provider,{scope:e.__scopeMenu,children:h.jsx(It,{present:r||s.open,children:h.jsx(Rr.Slot,{scope:e.__scopeMenu,children:h.jsx(_i,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{a.isUsingKeyboardRef.current&&l.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:W(e.onFocusOutside,f=>{f.target!==i.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:W(e.onEscapeKeyDown,f=>{a.onClose(),f.preventDefault()}),onKeyDown:W(e.onKeyDown,f=>{const d=f.currentTarget.contains(f.target),p=rb[a.dir].includes(f.key);d&&p&&(s.onOpenChange(!1),i.trigger?.focus(),f.preventDefault())})})})})})});R0.displayName=S0;function C0(e){return e?"open":"closed"}function Lo(e){return e==="indeterminate"}function Oi(e){return Lo(e)?"indeterminate":e?"checked":"unchecked"}function Sb(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Rb(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Cb(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Rb(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ab(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,f=i.y,d=l.x,p=l.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function Tb(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ab(n,t)}function Cr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Pb=a0,Mb=Ti,_b=c0,Nb=l0,Ib=Ni,Ob=u0,Lb=us,Db=f0,jb=p0,Fb=g0,kb=y0,$b=b0,Hb=x0,Bb=E0,Vb=R0,ds="DropdownMenu",[Zb]=Nt(ds,[o0]),Ge=o0(),[Ub,A0]=Zb(ds),T0=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:a,modal:i=!0}=e,l=Ge(t),u=c.useRef(null),[f,d]=Vt({prop:o,defaultProp:s??!1,onChange:a,caller:ds});return h.jsx(Ub,{scope:t,triggerId:Tt(),triggerRef:u,contentId:Tt(),open:f,onOpenChange:d,onOpenToggle:c.useCallback(()=>d(p=>!p),[d]),modal:i,children:h.jsx(Pb,{...l,open:f,onOpenChange:d,dir:r,modal:i,children:n})})};T0.displayName=ds;var P0="DropdownMenuTrigger",M0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=A0(P0,n),a=Ge(n);return h.jsx(Mb,{asChild:!0,...a,children:h.jsx(re.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ir(t,s.triggerRef),onPointerDown:W(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(s.onOpenToggle(),s.open||i.preventDefault())}),onKeyDown:W(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&s.onOpenToggle(),i.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});M0.displayName=P0;var zb="DropdownMenuPortal",_0=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ge(t);return h.jsx(_b,{...r,...n})};_0.displayName=zb;var N0="DropdownMenuContent",I0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=A0(N0,n),s=Ge(n),a=c.useRef(!1);return h.jsx(Nb,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:W(e.onCloseAutoFocus,i=>{a.current||o.triggerRef.current?.focus(),a.current=!1,i.preventDefault()}),onInteractOutside:W(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.button===2||u;(!o.modal||f)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});I0.displayName=N0;var qb="DropdownMenuGroup",Kb=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Ib,{...o,...r,ref:t})});Kb.displayName=qb;var Wb="DropdownMenuLabel",O0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Ob,{...o,...r,ref:t})});O0.displayName=Wb;var Gb="DropdownMenuItem",L0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Lb,{...o,...r,ref:t})});L0.displayName=Gb;var Qb="DropdownMenuCheckboxItem",D0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Db,{...o,...r,ref:t})});D0.displayName=Qb;var Yb="DropdownMenuRadioGroup",Xb=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(jb,{...o,...r,ref:t})});Xb.displayName=Yb;var Jb="DropdownMenuRadioItem",j0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Fb,{...o,...r,ref:t})});j0.displayName=Jb;var e4="DropdownMenuItemIndicator",F0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(kb,{...o,...r,ref:t})});F0.displayName=e4;var t4="DropdownMenuSeparator",k0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx($b,{...o,...r,ref:t})});k0.displayName=t4;var n4="DropdownMenuArrow",r4=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Hb,{...o,...r,ref:t})});r4.displayName=n4;var o4="DropdownMenuSubTrigger",$0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Bb,{...o,...r,ref:t})});$0.displayName=o4;var s4="DropdownMenuSubContent",H0=c.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ge(n);return h.jsx(Vb,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});H0.displayName=s4;var a4=T0,i4=M0,c4=_0,l4=I0,u4=O0,d4=L0,f4=D0,h4=j0,p4=F0,m4=k0,g4=$0,v4=H0,y4=a4,b4=i4,x4=c4,B0=l4,V0=d4,Z0=f4,U0=h4,z0=p4,q0=u4,K0=m4,W0=g4,G0=v4;const w4=y4,E4=b4,S4=c.forwardRef(({className:e,inset:t,children:n,...r},o)=>h.jsx(W0,{ref:o,className:pe("flex","cursor-default","select-none","items-center","rounded-[10px]","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","focus:bg-hover-subtle","focus:text-fg-default","data-[state=open]:bg-hover-subtle","data-[state=open]:text-fg-default",t&&"pl-8",e),...r,children:n}));S4.displayName=W0.displayName;const R4=c.forwardRef(({className:e,...t},n)=>h.jsx(G0,{ref:n,className:pe("z-50","min-w-[8rem]","overflow-hidden","surface-floating","p-1",e),...t}));R4.displayName=G0.displayName;const Q0=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(x4,{children:h.jsx(B0,{ref:r,sideOffset:t,className:pe("z-[1100]","min-w-[10rem]","overflow-hidden","surface-floating","p-1","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n})}));Q0.displayName=B0.displayName;const Y0=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(V0,{ref:r,className:pe("relative","flex","cursor-pointer","select-none","items-center","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Y0.displayName=V0.displayName;const C4=c.forwardRef(({className:e,children:t,checked:n,...r},o)=>h.jsxs(Z0,{ref:o,className:pe("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),checked:n,...r,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(z0,{children:"✓"})}),t]}));C4.displayName=Z0.displayName;const A4=c.forwardRef(({className:e,children:t,...n},r)=>h.jsxs(U0,{ref:r,className:pe("relative","flex","cursor-pointer","select-none","items-center","rounded-[10px]","py-2","pl-8","pr-3","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","focus:bg-hover-subtle","focus:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:[h.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:h.jsx(z0,{children:"●"})}),t]}));A4.displayName=U0.displayName;const T4=c.forwardRef(({className:e,inset:t,...n},r)=>h.jsx(q0,{ref:r,className:pe("px-2","py-1.5","text-sm","font-semibold","text-fg-secondary",t&&"pl-8",e),...n}));T4.displayName=q0.displayName;const X0=c.forwardRef(({className:e,...t},n)=>h.jsx(K0,{ref:n,className:pe("-mx-1","my-1","h-px","bg-divider",e),...t}));X0.displayName=K0.displayName;const P4=({button:e,items:t})=>h.jsxs(w4,{children:[h.jsx(E4,{asChild:!0,children:e}),h.jsx(Q0,{align:"end",children:t.map((n,r)=>n.type==="separator"?h.jsx(X0,{},n.key??`separator-${r}`):h.jsx(Y0,{onClick:n.onClick,children:n.name},n.name))})]}),J0=c.forwardRef(({title:e,description:t,className:n="",...r},o)=>h.jsxs("div",{ref:o,className:pe("flex flex-col items-center justify-center text-center","h-[400px]","bg-muted/30","border-2 border-dashed","border-border-secondary","rounded-[20px]","p-8",n),...r,children:[e&&h.jsx(se,{as:"h3",variant:"heading",weight:"bold",tone:"muted",className:"mb-2",children:e}),t&&h.jsx(se,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"max-w-[400px]",children:t})]}));J0.displayName="Empty";const M4=De(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),_4=c.forwardRef(({className:e,variant:t,size:n,type:r="text",...o},s)=>h.jsx("input",{ref:s,type:r,className:M4({variant:t,size:n,className:e}),...o}));_4.displayName="Input";const N4=De(["font-bold","text-fg-muted","whitespace-nowrap"],{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"sm"}}),eh=c.forwardRef(({className:e,size:t,...n},r)=>h.jsx("label",{ref:r,className:N4({size:t,className:e}),...n}));eh.displayName="Label";const I4=De(["focus-ring-soft","inline-flex","shrink-0","items-center","justify-center","bg-transparent","text-fg-default/70","outline-none","transition-colors","hover:bg-hover-subtle","hover:text-fg-default"],{variants:{size:{sm:"h-7 w-7 rounded-[8px]",md:"h-8 w-8 rounded-[10px]",lg:"h-9 w-9 rounded-[12px]"}},defaultVariants:{size:"md"}}),O4={sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"};function L4({label:e,size:t="md",iconClassName:n,className:r,type:o="button",...s}){return h.jsx("button",{type:o,"aria-label":e,className:I4({size:t,className:r}),...s,children:h.jsx(Iv,{className:n??O4[t]})})}const th=c.forwardRef(({page:e,last:t,onChange:n,className:r="",...o},s)=>{const a=Number(e),i=Number(t),l=[];for(let d=1;d<i+1;d++)(a===d||a===1&&d<a+5||a===2&&d<a+4||d>a-3&&d<a+3||a===i-1&&d>a-4||a===i&&d>a-5)&&l.push(d);const u=a===1,f=a===i;return h.jsxs("nav",{ref:s,className:`mt-8 flex justify-center items-center gap-1 ${r}`,...o,children:[h.jsxs(jn,{disabled:u,onClick:()=>!u&&n(1),"aria-label":"First page",isSkip:!0,children:[h.jsx(Bs,{width:16}),h.jsx(Bs,{width:16})]}),h.jsx(jn,{disabled:u,onClick:()=>!u&&n(a-1),"aria-label":"Previous page",children:h.jsx(Bs,{width:20})}),l.map(d=>h.jsx(jn,{active:a===d,onClick:()=>n(d),"aria-label":`Page ${d}`,"aria-current":a===d?"page":void 0,children:d},d)),h.jsx(jn,{disabled:f,onClick:()=>!f&&n(a+1),"aria-label":"Next page",children:h.jsx(gr,{width:20})}),h.jsxs(jn,{disabled:f,onClick:()=>!f&&n(i),"aria-label":"Last page",isSkip:!0,children:[h.jsx(gr,{width:16}),h.jsx(gr,{width:16})]})]})});th.displayName="Pagination";const jn=c.forwardRef(({active:e,disabled:t,isSkip:n,children:r,className:o="",...s},a)=>{const i=`
|
|
21
|
+
flex justify-center items-center
|
|
22
|
+
leading-normal text-base font-medium
|
|
23
|
+
w-9 h-9 md:w-10 md:h-10
|
|
24
|
+
border border-transparent
|
|
25
|
+
rounded-[10px]
|
|
26
|
+
transition-all duration-200
|
|
27
|
+
`,l=e?"cursor-default bg-cta border-cta text-fg-on-filled":t?"cursor-default text-fg-disabled border-transparent":"cursor-pointer text-fg-default hover:bg-hover hover:border-border-subtle",u=n?"relative [&>svg]:absolute [&>svg:first-child]:-translate-x-[3px] [&>svg:last-child]:translate-x-[3px]":"";return h.jsx("button",{ref:a,type:"button",disabled:t,className:`${i} ${l} ${u} ${o}`,...s,children:r})});jn.displayName="PaginationItem";const D4=De(["h-full","transition-all","duration-300","ease-out"],{variants:{color:{primary:"bg-pastel-blue-200",success:"bg-pastel-green-200",danger:"bg-pastel-pink-200",warning:"bg-pastel-orange-200"}},defaultVariants:{color:"primary"}}),j4=c.forwardRef(({value:e,max:t,color:n,className:r="",...o},s)=>{const a=Math.min(100,Math.max(0,e/t*100));return h.jsx("div",{ref:s,className:pe("w-full h-3","bg-surface","border-2 border-border","rounded-[6px]","overflow-hidden",r),role:"progressbar","aria-valuenow":e,"aria-valuemin":0,"aria-valuemax":t,...o,children:h.jsx("div",{className:`progress-fill ${D4({color:n})}`,style:{"--progress-width":`${a}%`}})})});j4.displayName="Progress";function ll(e,[t,n]){return Math.min(n,Math.max(t,e))}function F4(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nh=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),k4="VisuallyHidden",rh=c.forwardRef((e,t)=>h.jsx(re.span,{...e,ref:t,style:{...nh,...e.style}}));rh.displayName=k4;var $4=rh,H4=[" ","Enter","ArrowUp","ArrowDown"],B4=[" ","Enter"],wn="Select",[fs,hs,V4]=xi(wn),[Yn]=Nt(wn,[V4,Qn]),ps=Qn(),[Z4,tn]=Yn(wn),[U4,z4]=Yn(wn),oh=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:a,defaultValue:i,onValueChange:l,dir:u,name:f,autoComplete:d,disabled:p,required:m,form:g}=e,v=ps(t),[y,b]=c.useState(null),[x,w]=c.useState(null),[E,A]=c.useState(!1),N=is(u),[R,S]=Vt({prop:r,defaultProp:o??!1,onChange:s,caller:wn}),[_,D]=Vt({prop:a,defaultProp:i,onChange:l,caller:wn}),M=c.useRef(null),k=y?g||!!y.closest("form"):!0,[Z,j]=c.useState(new Set),F=Array.from(Z).map(C=>C.props.value).join(";");return h.jsx(Si,{...v,children:h.jsxs(Z4,{required:m,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:E,onValueNodeHasChildrenChange:A,contentId:Tt(),value:_,onValueChange:D,open:R,onOpenChange:S,dir:N,triggerPointerDownPosRef:M,disabled:p,children:[h.jsx(fs.Provider,{scope:t,children:h.jsx(U4,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(C=>{j(L=>new Set(L).add(C))},[]),onNativeOptionRemove:c.useCallback(C=>{j(L=>{const O=new Set(L);return O.delete(C),O})},[]),children:n})}),k?h.jsxs(Sh,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:d,value:_,onChange:C=>D(C.target.value),disabled:p,form:g,children:[_===void 0?h.jsx("option",{value:""}):null,Array.from(Z)]},F):null]})})};oh.displayName=wn;var sh="SelectTrigger",ah=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=ps(n),a=tn(sh,n),i=a.disabled||r,l=ce(t,a.onTriggerChange),u=hs(n),f=c.useRef("touch"),[d,p,m]=Ch(v=>{const y=u().filter(w=>!w.disabled),b=y.find(w=>w.value===a.value),x=Ah(y,v,b);x!==void 0&&a.onValueChange(x.value)}),g=v=>{i||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return h.jsx(Ri,{asChild:!0,...s,children:h.jsx(re.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Rh(a.value)?"":void 0,...o,ref:l,onClick:W(o.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&g(v)}),onPointerDown:W(o.onPointerDown,v=>{f.current=v.pointerType;const y=v.target;y.hasPointerCapture(v.pointerId)&&y.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:W(o.onKeyDown,v=>{const y=d.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(y&&v.key===" ")&&H4.includes(v.key)&&(g(),v.preventDefault())})})})});ah.displayName=sh;var ih="SelectValue",ch=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:a="",...i}=e,l=tn(ih,n),{onValueNodeHasChildrenChange:u}=l,f=s!==void 0,d=ce(t,l.onValueNodeChange);return Be(()=>{u(f)},[u,f]),h.jsx(re.span,{...i,ref:d,style:{pointerEvents:"none"},children:Rh(l.value)?h.jsx(h.Fragment,{children:a}):s})});ch.displayName=ih;var q4="SelectIcon",lh=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(re.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});lh.displayName=q4;var K4="SelectPortal",uh=e=>h.jsx(Lr,{asChild:!0,...e});uh.displayName=K4;var En="SelectContent",dh=c.forwardRef((e,t)=>{const n=tn(En,e.__scopeSelect),[r,o]=c.useState();if(Be(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Ht.createPortal(h.jsx(fh,{scope:e.__scopeSelect,children:h.jsx(fs.Slot,{scope:e.__scopeSelect,children:h.jsx("div",{children:e.children})})}),s):null}return h.jsx(hh,{...e,ref:t})});dh.displayName=En;var yt=10,[fh,nn]=Yn(En),W4="SelectContentImpl",G4=Zn("SelectContent.RemoveScroll"),hh=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:a,side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y,...b}=e,x=tn(En,n),[w,E]=c.useState(null),[A,N]=c.useState(null),R=ce(t,$=>E($)),[S,_]=c.useState(null),[D,M]=c.useState(null),k=hs(n),[Z,j]=c.useState(!1),F=c.useRef(!1);c.useEffect(()=>{if(w)return oi(w)},[w]),ri();const C=c.useCallback($=>{const[U,...te]=k().map(J=>J.ref.current),[B]=te.slice(-1),X=document.activeElement;for(const J of $)if(J===X||(J?.scrollIntoView({block:"nearest"}),J===U&&A&&(A.scrollTop=0),J===B&&A&&(A.scrollTop=A.scrollHeight),J?.focus(),document.activeElement!==X))return},[k,A]),L=c.useCallback(()=>C([S,w]),[C,S,w]);c.useEffect(()=>{Z&&L()},[Z,L]);const{onOpenChange:O,triggerPointerDownPosRef:I}=x;c.useEffect(()=>{if(w){let $={x:0,y:0};const U=B=>{$={x:Math.abs(Math.round(B.pageX)-(I.current?.x??0)),y:Math.abs(Math.round(B.pageY)-(I.current?.y??0))}},te=B=>{$.x<=10&&$.y<=10?B.preventDefault():w.contains(B.target)||O(!1),document.removeEventListener("pointermove",U),I.current=null};return I.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",te,{capture:!0})}}},[w,O,I]),c.useEffect(()=>{const $=()=>O(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[O]);const[V,q]=Ch($=>{const U=k().filter(X=>!X.disabled),te=U.find(X=>X.ref.current===document.activeElement),B=Ah(U,$,te);B&&setTimeout(()=>B.ref.current.focus())}),G=c.useCallback(($,U,te)=>{const B=!F.current&&!te;(x.value!==void 0&&x.value===U||B)&&(_($),B&&(F.current=!0))},[x.value]),H=c.useCallback(()=>w?.focus(),[w]),z=c.useCallback(($,U,te)=>{const B=!F.current&&!te;(x.value!==void 0&&x.value===U||B)&&M($)},[x.value]),K=r==="popper"?Sa:ph,Y=K===Sa?{side:i,sideOffset:l,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:p,collisionPadding:m,sticky:g,hideWhenDetached:v,avoidCollisions:y}:{};return h.jsx(fh,{scope:n,content:w,viewport:A,onViewportChange:N,itemRefCallback:G,selectedItem:S,onItemLeave:H,itemTextRefCallback:z,focusSelectedItem:L,selectedItemText:D,position:r,isPositioned:Z,searchRef:V,children:h.jsx(Ba,{as:G4,allowPinchZoom:!0,children:h.jsx(es,{asChild:!0,trapped:x.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:W(o,$=>{x.trigger?.focus({preventScroll:!0}),$.preventDefault()}),children:h.jsx(Or,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:h.jsx(K,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:$=>$.preventDefault(),...b,...Y,onPlaced:()=>j(!0),ref:R,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:W(b.onKeyDown,$=>{const U=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!U&&$.key.length===1&&q($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let B=k().filter(X=>!X.disabled).map(X=>X.ref.current);if(["ArrowUp","End"].includes($.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const X=$.target,J=B.indexOf(X);B=B.slice(J+1)}setTimeout(()=>C(B)),$.preventDefault()}})})})})})})});hh.displayName=W4;var Q4="SelectItemAlignedPosition",ph=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=tn(En,n),a=nn(En,n),[i,l]=c.useState(null),[u,f]=c.useState(null),d=ce(t,R=>f(R)),p=hs(n),m=c.useRef(!1),g=c.useRef(!0),{viewport:v,selectedItem:y,selectedItemText:b,focusSelectedItem:x}=a,w=c.useCallback(()=>{if(s.trigger&&s.valueNode&&i&&u&&v&&y&&b){const R=s.trigger.getBoundingClientRect(),S=u.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),D=b.getBoundingClientRect();if(s.dir!=="rtl"){const X=D.left-S.left,J=_.left-X,ue=R.left-J,ve=R.width+ue,Qe=Math.max(ve,S.width),Fe=window.innerWidth-yt,Ze=ll(J,[yt,Math.max(yt,Fe-Qe)]);i.style.minWidth=ve+"px",i.style.left=Ze+"px"}else{const X=S.right-D.right,J=window.innerWidth-_.right-X,ue=window.innerWidth-R.right-J,ve=R.width+ue,Qe=Math.max(ve,S.width),Fe=window.innerWidth-yt,Ze=ll(J,[yt,Math.max(yt,Fe-Qe)]);i.style.minWidth=ve+"px",i.style.right=Ze+"px"}const M=p(),k=window.innerHeight-yt*2,Z=v.scrollHeight,j=window.getComputedStyle(u),F=parseInt(j.borderTopWidth,10),C=parseInt(j.paddingTop,10),L=parseInt(j.borderBottomWidth,10),O=parseInt(j.paddingBottom,10),I=F+C+Z+O+L,V=Math.min(y.offsetHeight*5,I),q=window.getComputedStyle(v),G=parseInt(q.paddingTop,10),H=parseInt(q.paddingBottom,10),z=R.top+R.height/2-yt,K=k-z,Y=y.offsetHeight/2,$=y.offsetTop+Y,U=F+C+$,te=I-U;if(U<=z){const X=M.length>0&&y===M[M.length-1].ref.current;i.style.bottom="0px";const J=u.clientHeight-v.offsetTop-v.offsetHeight,ue=Math.max(K,Y+(X?H:0)+J+L),ve=U+ue;i.style.height=ve+"px"}else{const X=M.length>0&&y===M[0].ref.current;i.style.top="0px";const ue=Math.max(z,F+v.offsetTop+(X?G:0)+Y)+te;i.style.height=ue+"px",v.scrollTop=U-z+v.offsetTop}i.style.margin=`${yt}px 0`,i.style.minHeight=V+"px",i.style.maxHeight=k+"px",r?.(),requestAnimationFrame(()=>m.current=!0)}},[p,s.trigger,s.valueNode,i,u,v,y,b,s.dir,r]);Be(()=>w(),[w]);const[E,A]=c.useState();Be(()=>{u&&A(window.getComputedStyle(u).zIndex)},[u]);const N=c.useCallback(R=>{R&&g.current===!0&&(w(),x?.(),g.current=!1)},[w,x]);return h.jsx(X4,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:m,onScrollButtonChange:N,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(re.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ph.displayName=Q4;var Y4="SelectPopperPosition",Sa=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=yt,...s}=e,a=ps(n);return h.jsx(Ci,{...a,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});Sa.displayName=Y4;var[X4,Li]=Yn(En,{}),Ra="SelectViewport",mh=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=nn(Ra,n),a=Li(Ra,n),i=ce(t,s.onViewportChange),l=c.useRef(0);return h.jsxs(h.Fragment,{children:[h.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),h.jsx(fs.Slot,{scope:n,children:h.jsx(re.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:W(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:p}=a;if(p?.current&&d){const m=Math.abs(l.current-f.scrollTop);if(m>0){const g=window.innerHeight-yt*2,v=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),b=Math.max(v,y);if(b<g){const x=b+m,w=Math.min(g,x),E=x-w;d.style.height=w+"px",d.style.bottom==="0px"&&(f.scrollTop=E>0?E:0,d.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});mh.displayName=Ra;var gh="SelectGroup",[J4,ex]=Yn(gh),tx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Tt();return h.jsx(J4,{scope:n,id:o,children:h.jsx(re.div,{role:"group","aria-labelledby":o,...r,ref:t})})});tx.displayName=gh;var vh="SelectLabel",nx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ex(vh,n);return h.jsx(re.div,{id:o.id,...r,ref:t})});nx.displayName=vh;var Do="SelectItem",[rx,yh]=Yn(Do),bh=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...a}=e,i=tn(Do,n),l=nn(Do,n),u=i.value===r,[f,d]=c.useState(s??""),[p,m]=c.useState(!1),g=ce(t,x=>l.itemRefCallback?.(x,r,o)),v=Tt(),y=c.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return h.jsx(rx,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:c.useCallback(x=>{d(w=>w||(x?.textContent??"").trim())},[]),children:h.jsx(fs.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:h.jsx(re.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...a,ref:g,onFocus:W(a.onFocus,()=>m(!0)),onBlur:W(a.onBlur,()=>m(!1)),onClick:W(a.onClick,()=>{y.current!=="mouse"&&b()}),onPointerUp:W(a.onPointerUp,()=>{y.current==="mouse"&&b()}),onPointerDown:W(a.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:W(a.onPointerMove,x=>{y.current=x.pointerType,o?l.onItemLeave?.():y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:W(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:W(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(B4.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});bh.displayName=Do;var hr="SelectItemText",xh=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,a=tn(hr,n),i=nn(hr,n),l=yh(hr,n),u=z4(hr,n),[f,d]=c.useState(null),p=ce(t,b=>d(b),l.onItemTextChange,b=>i.itemTextRefCallback?.(b,l.value,l.disabled)),m=f?.textContent,g=c.useMemo(()=>h.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:y}=u;return Be(()=>(v(g),()=>y(g)),[v,y,g]),h.jsxs(h.Fragment,{children:[h.jsx(re.span,{id:l.textId,...s,ref:p}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Ht.createPortal(s.children,a.valueNode):null]})});xh.displayName=hr;var wh="SelectItemIndicator",ox=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yh(wh,n).isSelected?h.jsx(re.span,{"aria-hidden":!0,...r,ref:t}):null});ox.displayName=wh;var Ca="SelectScrollUpButton",sx=c.forwardRef((e,t)=>{const n=nn(Ca,e.__scopeSelect),r=Li(Ca,e.__scopeSelect),[o,s]=c.useState(!1),a=ce(t,r.onScrollButtonChange);return Be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?h.jsx(Eh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});sx.displayName=Ca;var Aa="SelectScrollDownButton",ax=c.forwardRef((e,t)=>{const n=nn(Aa,e.__scopeSelect),r=Li(Aa,e.__scopeSelect),[o,s]=c.useState(!1),a=ce(t,r.onScrollButtonChange);return Be(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;s(f)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?h.jsx(Eh,{...e,ref:a,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ax.displayName=Aa;var Eh=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=nn("SelectScrollButton",n),a=c.useRef(null),i=hs(n),l=c.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),Be(()=>{i().find(f=>f.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[i]),h.jsx(re.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:W(o.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:W(o.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:W(o.onPointerLeave,()=>{l()})})}),ix="SelectSeparator",cx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(re.div,{"aria-hidden":!0,...r,ref:t})});cx.displayName=ix;var Ta="SelectArrow",lx=c.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ps(n),s=tn(Ta,n),a=nn(Ta,n);return s.open&&a.position==="popper"?h.jsx(Ai,{...o,...r,ref:t}):null});lx.displayName=Ta;var ux="SelectBubbleInput",Sh=c.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=c.useRef(null),s=ce(r,o),a=F4(t);return c.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&f){const d=new Event("change",{bubbles:!0});f.call(i,t),i.dispatchEvent(d)}},[a,t]),h.jsx(re.select,{...n,style:{...nh,...n.style},ref:s,defaultValue:t})});Sh.displayName=ux;function Rh(e){return e===""||e===void 0}function Ch(e){const t=Mt(e),n=c.useRef(""),r=c.useRef(0),o=c.useCallback(a=>{const i=n.current+a;t(i),(function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))})(i)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ah(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=dx(e,Math.max(s,0));o.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function dx(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fx=oh,hx=ah,px=ch,mx=lh,gx=uh,vx=dh,yx=mh,bx=bh,xx=xh,wx=fx,Ex=px,Sx=hx,Rx=mx,Cx=gx,Ax=vx,Tx=yx,Px=bx,Mx=xx;const _x=De(["inline-flex","items-center","justify-between","gap-2","border","border-border-subtle","bg-elevated","text-fg-default","font-medium","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","cursor-pointer","whitespace-nowrap"],{variants:{variant:{default:["border-border-subtle"],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"]},size:{sm:"h-8 px-3 text-sm rounded-[12px]",md:"h-9 px-3 text-sm rounded-[14px]",lg:"h-11 px-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),go=({value:e,defaultValue:t,onValueChange:n,placeholder:r,variant:o,size:s,className:a,children:i,disabled:l})=>h.jsxs(wx,{value:e,defaultValue:t,onValueChange:n,disabled:l,children:[h.jsxs(Sx,{className:_x({variant:o,size:s,className:a}),children:[h.jsx(Ex,{placeholder:r}),h.jsx(Rx,{children:h.jsx(Mv,{className:"w-3.5 h-3.5 opacity-60"})})]}),h.jsx(Cx,{children:h.jsx(Th,{children:h.jsx(Tx,{className:"p-1",children:i})})})]}),Th=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(Ax,{ref:r,position:"popper",sideOffset:4,className:pe("z-[1100]","min-w-[var(--radix-select-trigger-width)]","overflow-hidden","surface-floating","data-[state=open]:animate-fade-in","data-[state=open]:animate-zoom-in",e),...n,children:t}));Th.displayName="SelectContent";const Ft=c.forwardRef(({className:e,children:t,...n},r)=>h.jsx(Px,{ref:r,className:pe("relative","flex","items-center","cursor-pointer","select-none","px-3","py-2","text-sm","font-medium","text-fg-secondary","outline-none","focus-ring-soft","transition-colors","rounded-[10px]","data-[highlighted]:bg-hover-subtle","data-[highlighted]:text-fg-default","data-[disabled]:pointer-events-none","data-[disabled]:opacity-50",e),...n,children:h.jsx(Mx,{children:t})}));Ft.displayName="SelectItem";go.displayName="Select";const ul=e=>typeof e=="number"?`${e}px`:e,Bt=c.forwardRef(({width:e,height:t=30,opacity:n,className:r="",style:o,...s},a)=>h.jsx("div",{ref:a,className:pe("rounded-[14px]","skeleton-sized","bg-[length:200%_100%]","bg-gradient-to-r","from-pastel-lavender-200/30","via-pastel-yellow-200/20","to-pastel-lavender-200/30","animate-shimmer","animate-fade-in",r),style:{"--skeleton-width":ul(e),"--skeleton-height":ul(t),"--skeleton-opacity":n,...o},...s}));Bt.displayName="Skeleton";const Nx=c.forwardRef(({checked:e,onCheckedChange:t,onClick:n,className:r,disabled:o,...s},a)=>h.jsx("button",{ref:a,type:"button",role:"switch","aria-checked":e,disabled:o,className:pe("focus-ring-soft relative inline-flex h-7 w-12 items-center rounded-full border p-1 transition-colors duration-200 outline-none",e?"border-transparent bg-cta hover:bg-cta-hover active:bg-cta-hover":"border-border bg-subtle hover:bg-hover active:bg-active",o&&"cursor-not-allowed opacity-80",r),onClick:i=>{n?.(i),!(i.defaultPrevented||o)&&t?.(!e)},...s,children:h.jsx("span",{"aria-hidden":"true",className:pe("pointer-events-none inline-block h-5 w-5 rounded-full shadow-sm transition-transform duration-200",e?"translate-x-5 bg-white":"translate-x-0 bg-fg-secondary")})}));Nx.displayName="Switch";const Ix=De(["w-full","border","border-border-subtle","bg-elevated","text-fg-default","placeholder:text-fg-placeholder","transition-colors","outline-none","focus-ring-soft","disabled:cursor-not-allowed","disabled:opacity-50","resize-none"],{variants:{variant:{default:[],ghost:["border-transparent","bg-subtle","hover:bg-hover-subtle"],error:["border-border-error","bg-accent-soft-danger/40","text-fg-default"]},size:{sm:"min-h-[60px] p-3 text-sm rounded-[12px]",md:"min-h-[80px] p-3 text-sm rounded-[14px]",lg:"min-h-[100px] p-4 text-base rounded-[16px]"}},defaultVariants:{variant:"default",size:"md"}}),Ox=c.forwardRef(({className:e,variant:t,size:n,...r},o)=>h.jsx("textarea",{ref:o,className:Ix({variant:t,size:n,className:e}),...r}));Ox.displayName="Textarea";var Ph="Toggle",Mh=c.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:o,...s}=e,[a,i]=Vt({prop:n,onChange:o,defaultProp:r??!1,caller:Ph});return h.jsx(re.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:W(e.onClick,()=>{e.disabled||i(!a)})})});Mh.displayName=Ph;var rn="ToggleGroup",[_h]=Nt(rn,[cs]),Nh=cs(),Di=P.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const o=r;return h.jsx(Lx,{...o,ref:t})}if(n==="multiple"){const o=r;return h.jsx(Dx,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${rn}\``)});Di.displayName=rn;var[Ih,Oh]=_h(rn),Lx=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Vt({prop:n,defaultProp:r??"",onChange:o,caller:rn});return h.jsx(Ih,{scope:e.__scopeToggleGroup,type:"single",value:P.useMemo(()=>a?[a]:[],[a]),onItemActivate:i,onItemDeactivate:P.useCallback(()=>i(""),[i]),children:h.jsx(Lh,{...s,ref:t})})}),Dx=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[a,i]=Vt({prop:n,defaultProp:r??[],onChange:o,caller:rn}),l=P.useCallback(f=>i((d=[])=>[...d,f]),[i]),u=P.useCallback(f=>i((d=[])=>d.filter(p=>p!==f)),[i]);return h.jsx(Ih,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:u,children:h.jsx(Lh,{...s,ref:t})})});Di.displayName=rn;var[jx,Fx]=_h(rn),Lh=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:o=!0,orientation:s,dir:a,loop:i=!0,...l}=e,u=Nh(n),f=is(a),d={role:"group",dir:f,...l};return h.jsx(jx,{scope:n,rovingFocus:o,disabled:r,children:o?h.jsx(t0,{asChild:!0,...u,orientation:s,dir:f,loop:i,children:h.jsx(re.div,{...d,ref:t})}):h.jsx(re.div,{...d,ref:t})})}),jo="ToggleGroupItem",Dh=P.forwardRef((e,t)=>{const n=Oh(jo,e.__scopeToggleGroup),r=Fx(jo,e.__scopeToggleGroup),o=Nh(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,i={...e,pressed:s,disabled:a},l=P.useRef(null);return r.rovingFocus?h.jsx(n0,{asChild:!0,...o,focusable:!a,active:s,ref:l,children:h.jsx(dl,{...i,ref:t})}):h.jsx(dl,{...i,ref:t})});Dh.displayName=jo;var dl=P.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...o}=e,s=Oh(jo,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=s.type==="single"?a:void 0;return h.jsx(Mh,{...i,...o,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),kx=Di,$x=Dh,Hx=kx,Bx=$x;const Vx=De(["inline-flex","gap-0.5","overflow-hidden"],{variants:{variant:{default:["border-2","border-border","rounded-[10px]","bg-surface"],outline:["border-2","border-border","rounded-[10px]","bg-transparent"],pills:["surface-base","p-1"],quiet:["rounded-[12px]","border","border-border-subtle/80","bg-hover-subtle/55","p-0.5"]}},defaultVariants:{variant:"default"}}),Zx=De(["flex","items-center","justify-center","font-bold","border","border-transparent","transition-colors","duration-200","disabled:pointer-events-none","disabled:opacity-50"],{variants:{variant:{default:["text-fg-muted","hover:bg-hover","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],outline:["text-fg-muted","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled"],pills:["text-fg-secondary","rounded-[10px]","hover:bg-hover-subtle","data-[state=on]:bg-cta","data-[state=on]:text-fg-on-filled","data-[state=on]:border-border-secondary"],quiet:["rounded-[10px]","font-medium","text-fg-secondary","hover:bg-hover-subtle/80","data-[state=on]:border-border-secondary/70","data-[state=on]:bg-elevated","data-[state=on]:text-fg-default","data-[state=on]:shadow-[0_8px_18px_-16px_rgba(15,18,24,0.28)]"]},size:{sm:"px-2 py-1.5 text-xs",md:"px-3 py-2 text-sm",lg:"px-4 py-2.5 text-sm"}},defaultVariants:{variant:"default",size:"md"}}),jh=c.createContext({}),Ux=c.forwardRef(({className:e,variant:t,size:n,children:r,...o},s)=>h.jsx(jh.Provider,{value:{variant:t??"default",size:n??"md"},children:h.jsx(Hx,{ref:s,className:Vx({variant:t,className:e}),...o,children:r})}));Ux.displayName="ToggleGroup";const zx=c.forwardRef(({className:e,activeClassName:t,children:n,...r},o)=>{const s=c.useContext(jh);return h.jsx(Bx,{ref:o,className:Zx({variant:s.variant,size:s.size,className:pe(e,t)}),...r,children:n})});zx.displayName="ToggleGroupItem";var[ms]=Nt("Tooltip",[Qn]),gs=Qn(),Fh="TooltipProvider",qx=700,Pa="tooltip.open",[Kx,ji]=ms(Fh),kh=e=>{const{__scopeTooltip:t,delayDuration:n=qx,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,a=c.useRef(!0),i=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),h.jsx(Kx,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:c.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:s})};kh.displayName=Fh;var Ar="Tooltip",[Wx,Ur]=ms(Ar),$h=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:a,delayDuration:i}=e,l=ji(Ar,e.__scopeTooltip),u=gs(t),[f,d]=c.useState(null),p=Tt(),m=c.useRef(0),g=a??l.disableHoverableContent,v=i??l.delayDuration,y=c.useRef(!1),[b,x]=Vt({prop:r,defaultProp:o??!1,onChange:R=>{R?(l.onOpen(),document.dispatchEvent(new CustomEvent(Pa))):l.onClose(),s?.(R)},caller:Ar}),w=c.useMemo(()=>b?y.current?"delayed-open":"instant-open":"closed",[b]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,y.current=!1,x(!0)},[x]),A=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{y.current=!0,x(!0),m.current=0},v)},[v,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),h.jsx(Si,{...u,children:h.jsx(Wx,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:f,onTriggerChange:d,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?N():E()},[l.isOpenDelayedRef,N,E]),onTriggerLeave:c.useCallback(()=>{g?A():(window.clearTimeout(m.current),m.current=0)},[A,g]),onOpen:E,onClose:A,disableHoverableContent:g,children:n})})};$h.displayName=Ar;var Ma="TooltipTrigger",Hh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ur(Ma,n),s=ji(Ma,n),a=gs(n),i=c.useRef(null),l=ce(t,i,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),d=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),h.jsx(Ri,{asChild:!0,...a,children:h.jsx(re.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:W(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:W(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:W(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:W(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:W(e.onBlur,o.onClose),onClick:W(e.onClick,o.onClose)})})});Hh.displayName=Ma;var Fi="TooltipPortal",[Gx,Qx]=ms(Fi,{forceMount:void 0}),Bh=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,s=Ur(Fi,t);return h.jsx(Gx,{scope:t,forceMount:n,children:h.jsx(It,{present:n||s.open,children:h.jsx(Lr,{asChild:!0,container:o,children:r})})})};Bh.displayName=Fi;var zn="TooltipContent",Vh=c.forwardRef((e,t)=>{const n=Qx(zn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,a=Ur(zn,e.__scopeTooltip);return h.jsx(It,{present:r||a.open,children:a.disableHoverableContent?h.jsx(Zh,{side:o,...s,ref:t}):h.jsx(Yx,{side:o,...s,ref:t})})}),Yx=c.forwardRef((e,t)=>{const n=Ur(zn,e.__scopeTooltip),r=ji(zn,e.__scopeTooltip),o=c.useRef(null),s=ce(t,o),[a,i]=c.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:d}=r,p=c.useCallback(()=>{i(null),d(!1)},[d]),m=c.useCallback((g,v)=>{const y=g.currentTarget,b={x:g.clientX,y:g.clientY},x=nw(b,y.getBoundingClientRect()),w=rw(b,x),E=ow(v.getBoundingClientRect()),A=aw([...w,...E]);i(A),d(!0)},[d]);return c.useEffect(()=>()=>p(),[p]),c.useEffect(()=>{if(l&&f){const g=y=>m(y,f),v=y=>m(y,l);return l.addEventListener("pointerleave",g),f.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",g),f.removeEventListener("pointerleave",v)}}},[l,f,m,p]),c.useEffect(()=>{if(a){const g=v=>{const y=v.target,b={x:v.clientX,y:v.clientY},x=l?.contains(y)||f?.contains(y),w=!sw(b,a);x?p():w&&(p(),u())};return document.addEventListener("pointermove",g),()=>document.removeEventListener("pointermove",g)}},[l,f,a,u,p]),h.jsx(Zh,{...e,ref:s})}),[Xx,Jx]=ms(Ar,{isInside:!1}),ew=Lu("TooltipContent"),Zh=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:a,...i}=e,l=Ur(zn,n),u=gs(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Pa,f),()=>document.removeEventListener(Pa,f)),[f]),c.useEffect(()=>{if(l.trigger){const d=p=>{p.target?.contains(l.trigger)&&f()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,f]),h.jsx(Or,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:f,children:h.jsxs(Ci,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[h.jsx(ew,{children:r}),h.jsx(Xx,{scope:n,isInside:!0,children:h.jsx($4,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Vh.displayName=zn;var Uh="TooltipArrow",tw=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=gs(n);return Jx(Uh,n).isInside?null:h.jsx(Ai,{...o,...r,ref:t})});tw.displayName=Uh;function nw(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rw(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function ow(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function sw(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const i=t[s],l=t[a],u=i.x,f=i.y,d=l.x,p=l.y;f>r!=p>r&&n<(d-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function aw(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),iw(t)}function iw(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(o.y-a.y)>=(s.y-a.y)*(o.x-a.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var cw=kh,lw=$h,uw=Hh,dw=Bh,fw=Vh,hw=cw,pw=lw,mw=uw,gw=dw,zh=fw;const vw=hw,yw=pw,bw=mw,qh=c.forwardRef(({className:e,sideOffset:t=4,...n},r)=>h.jsx(zh,{ref:r,sideOffset:t,className:pe("z-50","overflow-hidden","px-3","py-1.5","text-xs","font-bold","bg-elevated","text-fg-secondary","border","border-border-subtle","shadow-sm","rounded-[8px]","animate-in","fade-in-0","zoom-in-95","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2",e),...n}));qh.displayName=zh.displayName;const VC=({content:e,children:t,side:n="top",delayDuration:r=200})=>h.jsx(vw,{children:h.jsxs(yw,{delayDuration:r,children:[h.jsx(bw,{asChild:!0,children:t}),h.jsx(gw,{children:h.jsx(qh,{side:n,children:e})})]})}),fl=({children:e,fallback:t})=>e||t;function xw({children:e}){return h.jsx("div",{className:"flex w-full flex-col-reverse gap-2 sm:flex-row sm:justify-end",children:e})}function ww({itemsPerPage:e,onItemsPerPageChange:t,isAutoLimit:n=!1,sortBy:r,onSortByChange:o,sortOrder:s,onSortOrderChange:a,pinnedFirst:i,onPinnedFirstChange:l}){return h.jsx("div",{className:"flex justify-end",children:h.jsxs("div",{className:"surface-base inline-flex flex-wrap items-center gap-3 rounded-[16px] px-3.5 py-2.5",children:[h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx(Bd,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Items"}),h.jsxs(go,{value:n?"auto":String(e),onValueChange:u=>{u!=="auto"&&t(Number(u))},variant:"ghost",size:"sm",children:[n&&h.jsxs(Ft,{value:"auto",children:["Auto (",e,")"]}),h.jsx(Ft,{value:"25",children:"25"}),h.jsx(Ft,{value:"50",children:"50"}),h.jsx(Ft,{value:"100",children:"100"})]})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx($v,{className:"h-4 w-4 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"tertiary",children:"Sort"}),h.jsxs(go,{value:r,onValueChange:u=>o(u),variant:"ghost",size:"sm",children:[h.jsx(Ft,{value:"updatedAt",children:"Updated"}),h.jsx(Ft,{value:"createdAt",children:"Created"})]}),h.jsxs(go,{value:s,onValueChange:u=>a(u),variant:"ghost",size:"sm",children:[h.jsx(Ft,{value:"desc",children:"Newest"}),h.jsx(Ft,{value:"asc",children:"Oldest"})]})]}),h.jsx("div",{className:"h-5 w-px bg-divider"}),h.jsxs(eh,{htmlFor:"pinnedFirst",size:"sm",className:"flex cursor-pointer items-center gap-1.5",children:[h.jsx(Tf,{id:"pinnedFirst",size:"sm",checked:i,onChange:u=>l(u.target.checked)}),h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:"Pinned First"})]})]})})}var Ks,hl;function Ew(){if(hl)return Ks;hl=1;function e(i){return i&&typeof i=="object"&&"default"in i?i.default:i}var t=Gp(),n=e(t);function r(i,l,u){return l in i?Object.defineProperty(i,l,{value:u,enumerable:!0,configurable:!0,writable:!0}):i[l]=u,i}function o(i,l){i.prototype=Object.create(l.prototype),i.prototype.constructor=i,i.__proto__=l}var s=!!(typeof window<"u"&&window.document&&window.document.createElement);function a(i,l,u){if(typeof i!="function")throw new Error("Expected reducePropsToState to be a function.");if(typeof l!="function")throw new Error("Expected handleStateChangeOnClient to be a function.");if(typeof u<"u"&&typeof u!="function")throw new Error("Expected mapStateOnServer to either be undefined or a function.");function f(d){return d.displayName||d.name||"Component"}return function(p){if(typeof p!="function")throw new Error("Expected WrappedComponent to be a React component.");var m=[],g;function v(){g=i(m.map(function(b){return b.props})),y.canUseDOM?l(g):u&&(g=u(g))}var y=(function(b){o(x,b);function x(){return b.apply(this,arguments)||this}x.peek=function(){return g},x.rewind=function(){if(x.canUseDOM)throw new Error("You may only call rewind() on the server. Call peek() to read the current state.");var A=g;return g=void 0,m=[],A};var w=x.prototype;return w.UNSAFE_componentWillMount=function(){m.push(this),v()},w.componentDidUpdate=function(){v()},w.componentWillUnmount=function(){var A=m.indexOf(this);m.splice(A,1),v()},w.render=function(){return n.createElement(p,this.props)},x})(t.PureComponent);return r(y,"displayName","SideEffect("+f(p)+")"),r(y,"canUseDOM",s),y}}return Ks=a,Ks}var Sw=Ew();const Rw=qn(Sw);var Ws,pl;function Cw(){if(pl)return Ws;pl=1;var e=typeof Element<"u",t=typeof Map=="function",n=typeof Set=="function",r=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function o(s,a){if(s===a)return!0;if(s&&a&&typeof s=="object"&&typeof a=="object"){if(s.constructor!==a.constructor)return!1;var i,l,u;if(Array.isArray(s)){if(i=s.length,i!=a.length)return!1;for(l=i;l--!==0;)if(!o(s[l],a[l]))return!1;return!0}var f;if(t&&s instanceof Map&&a instanceof Map){if(s.size!==a.size)return!1;for(f=s.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;for(f=s.entries();!(l=f.next()).done;)if(!o(l.value[1],a.get(l.value[0])))return!1;return!0}if(n&&s instanceof Set&&a instanceof Set){if(s.size!==a.size)return!1;for(f=s.entries();!(l=f.next()).done;)if(!a.has(l.value[0]))return!1;return!0}if(r&&ArrayBuffer.isView(s)&&ArrayBuffer.isView(a)){if(i=s.length,i!=a.length)return!1;for(l=i;l--!==0;)if(s[l]!==a[l])return!1;return!0}if(s.constructor===RegExp)return s.source===a.source&&s.flags===a.flags;if(s.valueOf!==Object.prototype.valueOf&&typeof s.valueOf=="function"&&typeof a.valueOf=="function")return s.valueOf()===a.valueOf();if(s.toString!==Object.prototype.toString&&typeof s.toString=="function"&&typeof a.toString=="function")return s.toString()===a.toString();if(u=Object.keys(s),i=u.length,i!==Object.keys(a).length)return!1;for(l=i;l--!==0;)if(!Object.prototype.hasOwnProperty.call(a,u[l]))return!1;if(e&&s instanceof Element)return!1;for(l=i;l--!==0;)if(!((u[l]==="_owner"||u[l]==="__v"||u[l]==="__o")&&s.$$typeof)&&!o(s[u[l]],a[u[l]]))return!1;return!0}return s!==s&&a!==a}return Ws=function(a,i){try{return o(a,i)}catch(l){if((l.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw l}},Ws}var Aw=Cw();const Tw=qn(Aw);var Gs,ml;function Pw(){if(ml)return Gs;ml=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(s){if(s==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(s)}function o(){try{if(!Object.assign)return!1;var s=new String("abc");if(s[5]="de",Object.getOwnPropertyNames(s)[0]==="5")return!1;for(var a={},i=0;i<10;i++)a["_"+String.fromCharCode(i)]=i;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(f){u[f]=f}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Gs=o()?Object.assign:function(s,a){for(var i,l=r(s),u,f=1;f<arguments.length;f++){i=Object(arguments[f]);for(var d in i)t.call(i,d)&&(l[d]=i[d]);if(e){u=e(i);for(var p=0;p<u.length;p++)n.call(i,u[p])&&(l[u[p]]=i[u[p]])}}return l},Gs}var Mw=Pw();const _w=qn(Mw);var pn={BODY:"bodyAttributes",HTML:"htmlAttributes",TITLE:"titleAttributes"},ne={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(ne).map(function(e){return ne[e]});var xe={CHARSET:"charset",CSS_TEXT:"cssText",HREF:"href",HTTPEQUIV:"http-equiv",INNER_HTML:"innerHTML",ITEM_PROP:"itemprop",NAME:"name",PROPERTY:"property",REL:"rel",SRC:"src",TARGET:"target"},Fo={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Tr={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate"},Nw=Object.keys(Fo).reduce(function(e,t){return e[Fo[t]]=t,e},{}),Iw=[ne.NOSCRIPT,ne.SCRIPT,ne.STYLE],xt="data-react-helmet",Ow=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Lw=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},Dw=(function(){function e(t,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}})(),Ye=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jw=function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},gl=function(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},Fw=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e},_a=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return n===!1?String(t):String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},kw=function(t){var n=$n(t,ne.TITLE),r=$n(t,Tr.TITLE_TEMPLATE);if(r&&n)return r.replace(/%s/g,function(){return Array.isArray(n)?n.join(""):n});var o=$n(t,Tr.DEFAULT_TITLE);return n||o||void 0},$w=function(t){return $n(t,Tr.ON_CHANGE_CLIENT_STATE)||function(){}},Qs=function(t,n){return n.filter(function(r){return typeof r[t]<"u"}).map(function(r){return r[t]}).reduce(function(r,o){return Ye({},r,o)},{})},Hw=function(t,n){return n.filter(function(r){return typeof r[ne.BASE]<"u"}).map(function(r){return r[ne.BASE]}).reverse().reduce(function(r,o){if(!r.length)for(var s=Object.keys(o),a=0;a<s.length;a++){var i=s[a],l=i.toLowerCase();if(t.indexOf(l)!==-1&&o[l])return r.concat(o)}return r},[])},ur=function(t,n,r){var o={};return r.filter(function(s){return Array.isArray(s[t])?!0:(typeof s[t]<"u"&&Uw("Helmet: "+t+' should be of type "Array". Instead found type "'+Ow(s[t])+'"'),!1)}).map(function(s){return s[t]}).reverse().reduce(function(s,a){var i={};a.filter(function(p){for(var m=void 0,g=Object.keys(p),v=0;v<g.length;v++){var y=g[v],b=y.toLowerCase();n.indexOf(b)!==-1&&!(m===xe.REL&&p[m].toLowerCase()==="canonical")&&!(b===xe.REL&&p[b].toLowerCase()==="stylesheet")&&(m=b),n.indexOf(y)!==-1&&(y===xe.INNER_HTML||y===xe.CSS_TEXT||y===xe.ITEM_PROP)&&(m=y)}if(!m||!p[m])return!1;var x=p[m].toLowerCase();return o[m]||(o[m]={}),i[m]||(i[m]={}),o[m][x]?!1:(i[m][x]=!0,!0)}).reverse().forEach(function(p){return s.push(p)});for(var l=Object.keys(i),u=0;u<l.length;u++){var f=l[u],d=_w({},o[f],i[f]);o[f]=d}return s},[]).reverse()},$n=function(t,n){for(var r=t.length-1;r>=0;r--){var o=t[r];if(o.hasOwnProperty(n))return o[n]}return null},Bw=function(t){return{baseTag:Hw([xe.HREF,xe.TARGET],t),bodyAttributes:Qs(pn.BODY,t),defer:$n(t,Tr.DEFER),encode:$n(t,Tr.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Qs(pn.HTML,t),linkTags:ur(ne.LINK,[xe.REL,xe.HREF],t),metaTags:ur(ne.META,[xe.NAME,xe.CHARSET,xe.HTTPEQUIV,xe.PROPERTY,xe.ITEM_PROP],t),noscriptTags:ur(ne.NOSCRIPT,[xe.INNER_HTML],t),onChangeClientState:$w(t),scriptTags:ur(ne.SCRIPT,[xe.SRC,xe.INNER_HTML],t),styleTags:ur(ne.STYLE,[xe.CSS_TEXT],t),title:kw(t),titleAttributes:Qs(pn.TITLE,t)}},Na=(function(){var e=Date.now();return function(t){var n=Date.now();n-e>16?(e=n,t(n)):setTimeout(function(){Na(t)},0)}})(),vl=function(t){return clearTimeout(t)},Vw=typeof window<"u"?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||Na:global.requestAnimationFrame||Na,Zw=typeof window<"u"?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||vl:global.cancelAnimationFrame||vl,Uw=function(t){return console&&typeof console.warn=="function"&&console.warn(t)},dr=null,zw=function(t){dr&&Zw(dr),t.defer?dr=Vw(function(){yl(t,function(){dr=null})}):(yl(t),dr=null)},yl=function(t,n){var r=t.baseTag,o=t.bodyAttributes,s=t.htmlAttributes,a=t.linkTags,i=t.metaTags,l=t.noscriptTags,u=t.onChangeClientState,f=t.scriptTags,d=t.styleTags,p=t.title,m=t.titleAttributes;Ia(ne.BODY,o),Ia(ne.HTML,s),qw(p,m);var g={baseTag:Ln(ne.BASE,r),linkTags:Ln(ne.LINK,a),metaTags:Ln(ne.META,i),noscriptTags:Ln(ne.NOSCRIPT,l),scriptTags:Ln(ne.SCRIPT,f),styleTags:Ln(ne.STYLE,d)},v={},y={};Object.keys(g).forEach(function(b){var x=g[b],w=x.newTags,E=x.oldTags;w.length&&(v[b]=w),E.length&&(y[b]=g[b].oldTags)}),n&&n(),u(t,v,y)},Kh=function(t){return Array.isArray(t)?t.join(""):t},qw=function(t,n){typeof t<"u"&&document.title!==t&&(document.title=Kh(t)),Ia(ne.TITLE,n)},Ia=function(t,n){var r=document.getElementsByTagName(t)[0];if(r){for(var o=r.getAttribute(xt),s=o?o.split(","):[],a=[].concat(s),i=Object.keys(n),l=0;l<i.length;l++){var u=i[l],f=n[u]||"";r.getAttribute(u)!==f&&r.setAttribute(u,f),s.indexOf(u)===-1&&s.push(u);var d=a.indexOf(u);d!==-1&&a.splice(d,1)}for(var p=a.length-1;p>=0;p--)r.removeAttribute(a[p]);s.length===a.length?r.removeAttribute(xt):r.getAttribute(xt)!==i.join(",")&&r.setAttribute(xt,i.join(","))}},Ln=function(t,n){var r=document.head||document.querySelector(ne.HEAD),o=r.querySelectorAll(t+"["+xt+"]"),s=Array.prototype.slice.call(o),a=[],i=void 0;return n&&n.length&&n.forEach(function(l){var u=document.createElement(t);for(var f in l)if(l.hasOwnProperty(f))if(f===xe.INNER_HTML)u.innerHTML=l.innerHTML;else if(f===xe.CSS_TEXT)u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText));else{var d=typeof l[f]>"u"?"":l[f];u.setAttribute(f,d)}u.setAttribute(xt,"true"),s.some(function(p,m){return i=m,u.isEqualNode(p)})?s.splice(i,1):a.push(u)}),s.forEach(function(l){return l.parentNode.removeChild(l)}),a.forEach(function(l){return r.appendChild(l)}),{oldTags:s,newTags:a}},Wh=function(t){return Object.keys(t).reduce(function(n,r){var o=typeof t[r]<"u"?r+'="'+t[r]+'"':""+r;return n?n+" "+o:o},"")},Kw=function(t,n,r,o){var s=Wh(r),a=Kh(n);return s?"<"+t+" "+xt+'="true" '+s+">"+_a(a,o)+"</"+t+">":"<"+t+" "+xt+'="true">'+_a(a,o)+"</"+t+">"},Ww=function(t,n,r){return n.reduce(function(o,s){var a=Object.keys(s).filter(function(u){return!(u===xe.INNER_HTML||u===xe.CSS_TEXT)}).reduce(function(u,f){var d=typeof s[f]>"u"?f:f+'="'+_a(s[f],r)+'"';return u?u+" "+d:d},""),i=s.innerHTML||s.cssText||"",l=Iw.indexOf(t)===-1;return o+"<"+t+" "+xt+'="true" '+a+(l?"/>":">"+i+"</"+t+">")},"")},Gh=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Fo[o]||o]=t[o],r},n)},Gw=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.keys(t).reduce(function(r,o){return r[Nw[o]||o]=t[o],r},n)},Qw=function(t,n,r){var o,s=(o={key:n},o[xt]=!0,o),a=Gh(r,s);return[P.createElement(ne.TITLE,a,n)]},Yw=function(t,n){return n.map(function(r,o){var s,a=(s={key:o},s[xt]=!0,s);return Object.keys(r).forEach(function(i){var l=Fo[i]||i;if(l===xe.INNER_HTML||l===xe.CSS_TEXT){var u=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:u}}else a[l]=r[i]}),P.createElement(t,a)})},jt=function(t,n,r){switch(t){case ne.TITLE:return{toComponent:function(){return Qw(t,n.title,n.titleAttributes)},toString:function(){return Kw(t,n.title,n.titleAttributes,r)}};case pn.BODY:case pn.HTML:return{toComponent:function(){return Gh(n)},toString:function(){return Wh(n)}};default:return{toComponent:function(){return Yw(t,n)},toString:function(){return Ww(t,n,r)}}}},Qh=function(t){var n=t.baseTag,r=t.bodyAttributes,o=t.encode,s=t.htmlAttributes,a=t.linkTags,i=t.metaTags,l=t.noscriptTags,u=t.scriptTags,f=t.styleTags,d=t.title,p=d===void 0?"":d,m=t.titleAttributes;return{base:jt(ne.BASE,n,o),bodyAttributes:jt(pn.BODY,r,o),htmlAttributes:jt(pn.HTML,s,o),link:jt(ne.LINK,a,o),meta:jt(ne.META,i,o),noscript:jt(ne.NOSCRIPT,l,o),script:jt(ne.SCRIPT,u,o),style:jt(ne.STYLE,f,o),title:jt(ne.TITLE,{title:p,titleAttributes:m},o)}},Xw=function(t){var n,r;return r=n=(function(o){jw(s,o);function s(){return Lw(this,s),Fw(this,o.apply(this,arguments))}return s.prototype.shouldComponentUpdate=function(i){return!Tw(this.props,i)},s.prototype.mapNestedChildrenToProps=function(i,l){if(!l)return null;switch(i.type){case ne.SCRIPT:case ne.NOSCRIPT:return{innerHTML:l};case ne.STYLE:return{cssText:l}}throw new Error("<"+i.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},s.prototype.flattenArrayTypeChildren=function(i){var l,u=i.child,f=i.arrayTypeChildren,d=i.newChildProps,p=i.nestedChildren;return Ye({},f,(l={},l[u.type]=[].concat(f[u.type]||[],[Ye({},d,this.mapNestedChildrenToProps(u,p))]),l))},s.prototype.mapObjectTypeChildren=function(i){var l,u,f=i.child,d=i.newProps,p=i.newChildProps,m=i.nestedChildren;switch(f.type){case ne.TITLE:return Ye({},d,(l={},l[f.type]=m,l.titleAttributes=Ye({},p),l));case ne.BODY:return Ye({},d,{bodyAttributes:Ye({},p)});case ne.HTML:return Ye({},d,{htmlAttributes:Ye({},p)})}return Ye({},d,(u={},u[f.type]=Ye({},p),u))},s.prototype.mapArrayTypeChildrenToProps=function(i,l){var u=Ye({},l);return Object.keys(i).forEach(function(f){var d;u=Ye({},u,(d={},d[f]=i[f],d))}),u},s.prototype.warnOnInvalidChildren=function(i,l){return!0},s.prototype.mapChildrenToProps=function(i,l){var u=this,f={};return P.Children.forEach(i,function(d){if(!(!d||!d.props)){var p=d.props,m=p.children,g=gl(p,["children"]),v=Gw(g);switch(u.warnOnInvalidChildren(d,m),d.type){case ne.LINK:case ne.META:case ne.NOSCRIPT:case ne.SCRIPT:case ne.STYLE:f=u.flattenArrayTypeChildren({child:d,arrayTypeChildren:f,newChildProps:v,nestedChildren:m});break;default:l=u.mapObjectTypeChildren({child:d,newProps:l,newChildProps:v,nestedChildren:m});break}}}),l=this.mapArrayTypeChildrenToProps(f,l),l},s.prototype.render=function(){var i=this.props,l=i.children,u=gl(i,["children"]),f=Ye({},u);return l&&(f=this.mapChildrenToProps(l,f)),P.createElement(t,f)},Dw(s,null,[{key:"canUseDOM",set:function(i){t.canUseDOM=i}}]),s})(P.Component),n.propTypes={base:be.object,bodyAttributes:be.object,children:be.oneOfType([be.arrayOf(be.node),be.node]),defaultTitle:be.string,defer:be.bool,encodeSpecialCharacters:be.bool,htmlAttributes:be.object,link:be.arrayOf(be.object),meta:be.arrayOf(be.object),noscript:be.arrayOf(be.object),onChangeClientState:be.func,script:be.arrayOf(be.object),style:be.arrayOf(be.object),title:be.string,titleAttributes:be.object,titleTemplate:be.string},n.defaultProps={defer:!0,encodeSpecialCharacters:!0},n.peek=t.peek,n.rewind=function(){var o=t.rewind();return o||(o=Qh({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),o},r},Jw=function(){return null},e3=Rw(Bw,zw,Qh)(Jw),Oa=Xw(e3);Oa.renderStatic=Oa.rewind;function bl(e,t){return t==null?h.jsx(se,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:e}):typeof t=="string"||typeof t=="number"?h.jsx(se,{as:"h1",variant:"heading",weight:"bold",tracking:"tighter",children:t}):h.jsx("div",{role:"heading","aria-level":1,children:t})}function xl(e){return e==null?null:typeof e=="string"||typeof e=="number"?h.jsx(se,{as:"p",variant:"meta",weight:"medium",tone:"tertiary",className:"mt-1",children:e}):h.jsx("div",{className:"mt-1",children:e})}function vs({title:e,heading:t,variant:n="default",description:r,headerRight:o,children:s}){return h.jsxs(h.Fragment,{children:[h.jsx(Oa,{children:h.jsx("title",{children:e?`${e} | Ocean Brain`:"Ocean Brain"})}),n==="default"&&h.jsx("div",{className:"mb-5 border-b border-border-subtle/80 pb-4",children:h.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[h.jsxs("div",{children:[bl(e,t),xl(r)]}),o]})}),n==="subtle"&&h.jsx("div",{className:"mb-6",children:h.jsxs("div",{className:o?"flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between":void 0,children:[h.jsxs("div",{children:[bl(e,t),xl(r)]}),o]})}),s]})}const t3=e=>{let t=!1;return()=>{t||(window.requestAnimationFrame(()=>{e(),t=!1}),t=!0)}},Ys=new Map;function n3(){const e=Jo({select:n=>n.pathname}),t=c.useRef(null);return c.useEffect(()=>{if(t.current?.parentElement){const{parentElement:n}=t.current,r=a=>{if(a!==0){Ys.set(e,a);return}Ys.delete(e)},o=t3(()=>{if(t.current){const{scrollTop:a}=n;r(a)}}),s=Ys.get(e);return s&&(n.scrollTop=s),n.addEventListener("scroll",o),()=>{n.removeEventListener("scroll",o)}}},[e]),h.jsx("div",{ref:t,className:"hidden"})}const zr="/",Yh="/views",r3="/views/notes",Xh="/calendar",Jh="/reminders",ep="/graph",tp="/search",np="/tag",Xn="/$id",ki="/tag/$id",rp="/setting",o3="/setting/mcp",s3="/setting/trash",a3="/setting/manage-image",i3="/setting/manage-image/$id",c3="/setting/placeholder",La="An unexpected routing error occurred.",op=e=>typeof e=="object"&&e!==null&&"errors"in e&&Array.isArray(e.errors),l3=e=>e instanceof Error?e.message:op(e)?e.errors?.[0]?.message??La:La,u3=e=>{if(op(e))return e.errors?.[0]?.code};function $i({title:e,error:t,description:n,onRetry:r,showBackAction:o=!0,showHomeAction:s=!0}){const a=Rn(),i=qe(),[l,u]=c.useState("idle"),f=l3(t),d=u3(t),p=async()=>{try{const m=[d,f].filter(Boolean).join(" :: ");await navigator.clipboard.writeText(m||La),u("copied")}catch{u("failed")}};return h.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[h.jsx(se,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:e}),n&&h.jsx(se,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:n}),h.jsxs(se,{as:"div",variant:"body",tone:"secondary",className:"mt-4 rounded-[14px] border border-border-subtle bg-subtle px-3 py-2",children:[f,d&&h.jsxs(se,{as:"span",variant:"body",weight:"bold",tone:"tertiary",className:"ml-2",children:["[",d,"]"]})]}),h.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[r&&h.jsx(bt,{size:"sm",onClick:r,children:"Try again"}),o&&h.jsx(bt,{size:"sm",variant:"ghost",onClick:()=>i.history.back(),children:"Go back"}),s&&h.jsx(bt,{size:"sm",variant:"ghost",onClick:()=>a({to:zr,search:{page:1,sortBy:"updatedAt",sortOrder:"desc",pinnedFirst:!1}}),children:"Go home"}),h.jsx(bt,{size:"sm",variant:"ghost",onClick:p,children:l==="copied"?"Copied details":l==="failed"?"Copy failed":"Copy details"})]})]})}function Ve({title:e="Loading page",description:t="Preparing route resources."}){return h.jsx(vs,{title:e,description:t,variant:"none",children:h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsx(Bt,{height:"56px"}),h.jsx(Bt,{height:"220px"}),h.jsx(Bt,{height:"160px"})]})})}function d3({error:e,reset:t}){return h.jsx(vs,{title:"Something went wrong",variant:"none",children:h.jsx($i,{title:"Route failed to render",description:"Retry the route or navigate somewhere safe.",error:e,onRetry:t})})}function f3(){return h.jsx(vs,{title:"Not found",variant:"none",children:h.jsxs("div",{className:"rounded-[18px] border-2 border-border bg-surface p-6",children:[h.jsx(se,{as:"p",variant:"heading",weight:"bold",tracking:"tighter",children:"This page does not exist."}),h.jsx(se,{as:"p",variant:"meta",tone:"tertiary",className:"mt-2",children:"Check the URL or navigate from the sidebar."})]})})}const h3=(e=[],t=[])=>e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]));class p3 extends c.Component{state={error:null};static getDerivedStateFromError(t){return{error:t}}componentDidUpdate(t){this.state.error!==null&&h3(t.resetKeys,this.props.resetKeys)&&this.resetErrorBoundary()}resetErrorBoundary=()=>{this.props.onReset?.(),this.setState({error:null})};render(){return this.state.error!==null?this.props.fallbackRender({error:this.state.error,resetErrorBoundary:this.resetErrorBoundary}):this.props.children}}function sp({children:e,fallback:t,errorTitle:n,errorDescription:r,resetKeys:o,renderError:s}){return h.jsx(Sg,{children:({reset:a})=>h.jsx(p3,{onReset:a,resetKeys:o,fallbackRender:({error:i,resetErrorBoundary:l})=>s?s({error:i,retry:l}):h.jsx($i,{title:n,description:r,error:i,onRetry:l}),children:h.jsx(c.Suspense,{fallback:t,children:e})})})}const wl=e=>{let t;const n=new Set,r=(u,f)=>{const d=typeof u=="function"?u(t):u;if(!Object.is(d,t)){const p=t;t=f??(typeof d!="object"||d===null)?d:Object.assign({},t,d),n.forEach(m=>m(t,p))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>l,subscribe:u=>(n.add(u),()=>n.delete(u))},l=t=e(r,o,i);return i},m3=(e=>e?wl(e):wl),g3=e=>e;function v3(e,t=g3){const n=P.useSyncExternalStore(e.subscribe,P.useCallback(()=>t(e.getState()),[e,t]),P.useCallback(()=>t(e.getInitialState()),[e,t]));return P.useDebugValue(n),n}const El=e=>{const t=m3(e),n=r=>v3(t,r);return Object.assign(n,t),n},y3=(e=>e?El(e):El),ap="theme",Sl="(prefers-color-scheme: dark)";function b3(e){return e==="light"||e==="dark"}function x3(){return typeof document>"u"?null:document.documentElement}function ip(){return typeof window>"u"?null:window.localStorage}function cp(e){const t=x3();t&&(t.classList.remove("light","dark"),t.classList.add(e))}function ko(){const e=ip()?.getItem(ap)??null;return b3(e)?e:null}function w3({storedTheme:e,systemPrefersDark:t}){return e||(t?"dark":"light")}function E3(e,t={}){cp(e),t.persist!==!1&&ip()?.setItem(ap,e)}function S3(e={}){const t=e.matchMedia?e.matchMedia(Sl).matches:typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia(Sl).matches:!1,n=w3({storedTheme:ko(),systemPrefersDark:t});return cp(n),n}const Rl=ko(),$o=y3(e=>({explicitTheme:Rl,theme:Rl??"light",setTheme:t=>{e({explicitTheme:t,theme:t})},setSystemTheme:t=>{e(n=>n.explicitTheme?n:{theme:t})},toggleTheme:()=>{e(t=>{const n=t.theme==="light"?"dark":"light";return{explicitTheme:n,theme:n}})}}));$o.subscribe(e=>{E3(e.theme,{persist:e.explicitTheme===e.theme})});var Xs={exports:{}};var Cl;function R3(){return Cl||(Cl=1,(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var s="",a=0;a<arguments.length;a++){var i=arguments[a];i&&(s=o(s,r.call(this,i)))}return s}function r(s){if(typeof s=="string"||typeof s=="number")return this&&this[s]||s;if(typeof s!="object")return"";if(Array.isArray(s))return n.apply(this,s);if(s.toString!==Object.prototype.toString&&!s.toString.toString().includes("[native code]"))return s.toString();var a="";for(var i in s)t.call(s,i)&&s[i]&&(a=o(a,this&&this[i]||i));return a}function o(s,a){return a?s?s+" "+a:s+a:s}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Xs)),Xs.exports}var C3=R3();const A3=qn(C3),T3="_SiteLayout_lbflf_1",P3="_side_lbflf_7",M3="_open_lbflf_24",_3="_menu_lbflf_29",N3="_top_lbflf_57",I3="_center_lbflf_86",O3="_content_lbflf_96",L3={SiteLayout:T3,side:P3,open:M3,menu:_3,top:N3,"top-content":"_top-content_lbflf_76",center:I3,content:O3},sn=A3.bind(L3),D3=({sidebar:e,topNavigation:t,children:n})=>{const r=Jo({select:i=>i.pathname}),[o,s]=c.useState(!1),a="site-layout-sidebar";return c.useEffect(()=>{s(!1)},[r]),h.jsxs("div",{className:sn("SiteLayout"),children:[h.jsx("div",{className:"md:hidden",children:h.jsx("button",{type:"button",className:sn("menu"),"aria-label":"Toggle sidebar","aria-controls":a,"aria-expanded":o,onClick:()=>s(i=>!i),children:h.jsx(jv,{className:"h-6 w-6"})})}),h.jsx("aside",{id:a,className:sn("side",{open:o}),children:e}),h.jsxs("main",{className:sn("center"),children:[h.jsx("div",{className:sn("top"),children:h.jsx("div",{className:sn("top-content"),children:t})}),h.jsx("div",{className:sn("content"),children:n}),h.jsx(n3,{})]})]})},j3=e=>({type:"error",category:"graphql",errors:e.map(t=>({code:t.extensions?.code??"GRAPHQL_ERROR",message:t.message??"GraphQL request failed",details:t}))}),F3=e=>{const t=ge.isAxiosError(e)?e.response?.data?.message??e.message??"Network request failed":"Network request failed",n=ge.isAxiosError(e)?e.code??(e.response?.status?`HTTP_${e.response.status}`:"NETWORK_ERROR"):"NETWORK_ERROR",r=ge.isAxiosError(e)?e.response?.data:void 0;return{type:"error",category:"network",errors:[{code:n,message:t,details:r}]}};async function Se(e,t,n){const r=typeof e=="string"?{query:e,variables:t,operationName:n}:e;try{const{data:o}=await ge.post("/graphql",r);return o.errors&&o.errors.length>0?j3(o.errors):o.data?{type:"success",...o.data}:{type:"error",category:"graphql",errors:[{code:"EMPTY_RESPONSE",message:"GraphQL response data is empty",details:o}]}}catch(o){return F3(o)}}const lp=e=>typeof e=="object"&&e!==null&&"value"in e&&typeof e.value=="string",up=(e,t)=>({type:"error",category:"graphql",errors:[{code:"INVALID_RESPONSE_SHAPE",message:`GraphQL response field "${e}" is missing or invalid`,details:t}]}),k3=async e=>{try{const t=await Se(`
|
|
28
|
+
query GetServerCache($key: String!) {
|
|
29
|
+
cache(key: $key) {
|
|
30
|
+
value
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
`,{key:e});if(t.type==="error")throw t;if(!lp(t.cache))throw up("cache",t);return t.cache.value}catch{return""}},$3=async(e,t)=>{const n=await Se(`
|
|
34
|
+
mutation SetServerCache($key: String!, $value: String!) {
|
|
35
|
+
setCache(key: $key, value: $value) {
|
|
36
|
+
value
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`,{key:e,value:encodeURIComponent(t)});return n.type==="error"?n:lp(n.setCache)?{...n,setCache:n.setCache}:up("setCache",n)},H3=()=>{const e=Jd(),t=tf(),n=Wn(),{data:r}=Ng({queryKey:ae.ui.heroBanner(),async queryFn(){return k3("heroBanner")}});return r?h.jsx("div",{className:"p-3 pb-0",children:h.jsxs("button",{type:"button","aria-label":"Remove hero banner",className:"surface-base focus-ring-soft group relative block w-full overflow-hidden text-left outline-none",onClick:async()=>{if(await e("Remove this hero banner from the sidebar?")){const o=await $3("heroBanner","");if(o.type==="error"){t(o.errors[0]?.message??"Failed to remove hero banner");return}await n.invalidateQueries({queryKey:ae.ui.heroBanner(),exact:!0})}},children:[h.jsx("img",{alt:"Studio atmosphere banner",className:"w-full object-cover transition duration-500 group-hover:scale-[1.01] group-hover:opacity-90 dark:brightness-[0.85] dark:saturate-[0.9]",src:r}),h.jsx("div",{className:"pointer-events-none absolute inset-0 bg-[linear-gradient(180deg,rgba(18,24,34,0.1),rgba(18,24,34,0.38))] opacity-0 transition-opacity duration-300 group-hover:opacity-100"}),h.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 flex items-end justify-between gap-3 p-3",children:h.jsx(se,{as:"span",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",className:"rounded-[12px] border border-white/14 bg-black/16 px-2.5 py-2 text-white/80 opacity-0 backdrop-blur-sm transition-opacity duration-300 group-hover:opacity-100",children:"Remove"})})]})}):null},B3=new Set(["content","order","layout"]),V3=`query FetchNotes(
|
|
40
|
+
$searchFilter: SearchFilterInput,
|
|
41
|
+
$pagination: PaginationInput
|
|
42
|
+
) {
|
|
43
|
+
allNotes(
|
|
44
|
+
searchFilter: $searchFilter,
|
|
45
|
+
pagination: $pagination
|
|
46
|
+
) {
|
|
47
|
+
totalCount
|
|
48
|
+
notes {
|
|
49
|
+
__NOTE_ADDITIONAL_FIELDS__ id
|
|
50
|
+
title
|
|
51
|
+
pinned
|
|
52
|
+
createdAt
|
|
53
|
+
updatedAt
|
|
54
|
+
tags {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}`,Z3=e=>{if(!e||e.length===0)return"";const t=Array.from(new Set(e.filter(n=>B3.has(n))));return t.length===0?"":t.map(n=>" "+n).join(`
|
|
61
|
+
`)+`
|
|
62
|
+
`};function dp({limit:e=25,offset:t=0,query:n="",sortBy:r,sortOrder:o,pinnedFirst:s,fields:a}={}){const i=Z3(a),l=V3.replace("__NOTE_ADDITIONAL_FIELDS__",i);return Se(l,{searchFilter:{query:n,sortBy:r,sortOrder:o,pinnedFirst:s},pagination:{limit:e,offset:t}})}function ZC({query:e="",limit:t=25,offset:n=0}={}){return Se(`query FetchTagNotes(
|
|
63
|
+
$searchFilter: SearchFilterInput,
|
|
64
|
+
$pagination: PaginationInput
|
|
65
|
+
) {
|
|
66
|
+
tagNotes(
|
|
67
|
+
searchFilter: $searchFilter,
|
|
68
|
+
pagination: $pagination
|
|
69
|
+
) {
|
|
70
|
+
totalCount
|
|
71
|
+
notes {
|
|
72
|
+
id
|
|
73
|
+
title
|
|
74
|
+
pinned
|
|
75
|
+
tags {
|
|
76
|
+
id
|
|
77
|
+
name
|
|
78
|
+
}
|
|
79
|
+
createdAt
|
|
80
|
+
updatedAt
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function UC(e){return Se(`query FetchNote($id: ID!) {
|
|
84
|
+
note(id: $id) {
|
|
85
|
+
title
|
|
86
|
+
pinned
|
|
87
|
+
layout
|
|
88
|
+
content
|
|
89
|
+
createdAt
|
|
90
|
+
updatedAt
|
|
91
|
+
}
|
|
92
|
+
}`,{id:e})}function U3(e){return Se(`query FetchBackReferences($id: ID!) {
|
|
93
|
+
backReferences(id: $id) {
|
|
94
|
+
id
|
|
95
|
+
title
|
|
96
|
+
}
|
|
97
|
+
}`,{id:e})}function zC(e){return Se(`query FetchImageNotes($src: String!) {
|
|
98
|
+
imageNotes(src: $src) {
|
|
99
|
+
id
|
|
100
|
+
title
|
|
101
|
+
createdAt
|
|
102
|
+
updatedAt
|
|
103
|
+
}
|
|
104
|
+
}`,{src:e})}function z3(e){return Se(`mutation CreateNote($note: NoteInput!) {
|
|
105
|
+
createNote(note: $note) {
|
|
106
|
+
id
|
|
107
|
+
}
|
|
108
|
+
}`,{note:e})}const qC=({id:e,editSessionId:t,...n})=>Se(`mutation UpdateNote($id: ID!, $note: NoteInput!, $editSessionId: String) {
|
|
109
|
+
updateNote(id: $id, note: $note, editSessionId: $editSessionId) {
|
|
110
|
+
id
|
|
111
|
+
title
|
|
112
|
+
}
|
|
113
|
+
}`,{id:e,note:n,...t?{editSessionId:t}:{}});function KC(e,t=5){return Se(`query FetchNoteSnapshots($id: ID!, $limit: Int) {
|
|
114
|
+
noteSnapshots(id: $id, limit: $limit) {
|
|
115
|
+
id
|
|
116
|
+
title
|
|
117
|
+
createdAt
|
|
118
|
+
meta {
|
|
119
|
+
entrypoint
|
|
120
|
+
label
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}`,{id:e,limit:t})}function WC(e){return Se(`mutation RestoreNoteSnapshot($id: ID!) {
|
|
124
|
+
restoreNoteSnapshot(id: $id) {
|
|
125
|
+
id
|
|
126
|
+
title
|
|
127
|
+
pinned
|
|
128
|
+
layout
|
|
129
|
+
content
|
|
130
|
+
updatedAt
|
|
131
|
+
}
|
|
132
|
+
}`,{id:e})}function GC({limit:e=25,offset:t=0}={}){return Se(`query FetchTrashedNotes($pagination: PaginationInput) {
|
|
133
|
+
trashedNotes(pagination: $pagination) {
|
|
134
|
+
totalCount
|
|
135
|
+
notes {
|
|
136
|
+
id
|
|
137
|
+
title
|
|
138
|
+
createdAt
|
|
139
|
+
updatedAt
|
|
140
|
+
deletedAt
|
|
141
|
+
contentPreview
|
|
142
|
+
pinned
|
|
143
|
+
order
|
|
144
|
+
layout
|
|
145
|
+
tagNames
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}`,{pagination:{limit:e,offset:t}})}function QC(e){return Se(`query FetchTrashedNote($id: ID!) {
|
|
149
|
+
trashedNote(id: $id) {
|
|
150
|
+
id
|
|
151
|
+
title
|
|
152
|
+
createdAt
|
|
153
|
+
updatedAt
|
|
154
|
+
deletedAt
|
|
155
|
+
contentPreview
|
|
156
|
+
contentAsMarkdown
|
|
157
|
+
pinned
|
|
158
|
+
order
|
|
159
|
+
layout
|
|
160
|
+
tagNames
|
|
161
|
+
}
|
|
162
|
+
}`,{id:e})}function YC(e){return Se(`mutation RestoreTrashedNote($id: ID!) {
|
|
163
|
+
restoreTrashedNote(id: $id) {
|
|
164
|
+
id
|
|
165
|
+
title
|
|
166
|
+
pinned
|
|
167
|
+
layout
|
|
168
|
+
content
|
|
169
|
+
updatedAt
|
|
170
|
+
}
|
|
171
|
+
}`,{id:e})}function XC(e){return Se(`mutation PurgeTrashedNote($id: ID!) {
|
|
172
|
+
purgeTrashedNote(id: $id)
|
|
173
|
+
}`,{id:e})}function q3(e,t){return Se(`mutation PinNote($id: ID!, $pinned: Boolean!) {
|
|
174
|
+
pinNote(id: $id, pinned: $pinned) {
|
|
175
|
+
id
|
|
176
|
+
title
|
|
177
|
+
pinned
|
|
178
|
+
createdAt
|
|
179
|
+
updatedAt
|
|
180
|
+
}
|
|
181
|
+
}`,{id:e,pinned:t})}function K3(e){return Se(`mutation DeleteNote($id: ID!) {
|
|
182
|
+
deleteNote(id: $id)
|
|
183
|
+
}`,{id:e})}function W3(e){return Se(`mutation ReorderNotes($notes: [NoteOrderInput!]!) {
|
|
184
|
+
reorderNotes(notes: $notes) {
|
|
185
|
+
id
|
|
186
|
+
order
|
|
187
|
+
}
|
|
188
|
+
}`,{notes:e})}function JC(){return Se(`query FetchNoteGraph {
|
|
189
|
+
noteGraph {
|
|
190
|
+
nodes {
|
|
191
|
+
id
|
|
192
|
+
title
|
|
193
|
+
connections
|
|
194
|
+
}
|
|
195
|
+
links {
|
|
196
|
+
source
|
|
197
|
+
target
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}`)}function G3(e){const t=new Date,n=new Date(e),r=Math.floor((t.getTime()-n.getTime())/1e3);let o=Math.floor(r/31536e3);return o>=1?o+" years ago":(o=Math.floor(r/2592e3),o>=1?o+" months ago":(o=Math.floor(r/86400),o>=1?o+" days ago":(o=Math.floor(r/3600),o>=1?o+" hours ago":(o=Math.floor(r/60),o>=1?o+" minutes ago":Math.floor(r)+" seconds ago"))))}function Q3({id:e,title:t,tags:n,pinned:r,updatedAt:o,onPinned:s,onDelete:a}){const i=G3(Number(o));return h.jsxs("div",{className:pe("surface-base group relative flex h-full flex-col px-4 py-3.5 transition-colors"),children:[r&&h.jsx("div",{className:"absolute left-1/2 top-0 z-[1] -translate-x-1/2 -translate-y-[38%]",children:h.jsxs("div",{className:"inline-flex h-7 w-7 items-center justify-center rounded-full border border-border-secondary/70 bg-elevated text-fg-tertiary shadow-[0_8px_18px_-14px_rgba(23,29,38,0.32)]",children:[h.jsx(qd,{className:"h-3.5 w-3.5",weight:"fill"}),h.jsx("span",{className:"sr-only",children:"Pinned note"})]})}),h.jsxs("div",{className:"flex h-full flex-col gap-2.5",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2.5",children:[h.jsx("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2.5 gap-y-1",children:h.jsxs(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",children:["Updated ",i]})}),h.jsx(P4,{button:h.jsx(L4,{label:"Note actions",size:"sm"}),items:[{name:r?"Unpin":"Pin",onClick:()=>s?.()},{name:"Delete",onClick:()=>a?.()}]})]}),h.jsxs("div",{className:"flex flex-1 flex-col justify-between gap-2.5",children:[h.jsx(se,{as:"div",variant:"body",weight:"semibold",tracking:"tight",className:"leading-[1.45]",children:h.jsx(Pt,{className:"line-clamp-2 transition-colors hover:text-fg-default/85",to:Xn,params:{id:e},children:t||"Untitled"})}),n.length>0&&h.jsx("div",{className:"flex flex-wrap gap-1.5 pt-0.5",children:n.map(l=>h.jsx(Pt,{to:ki,params:{id:l.id},search:{page:1},children:h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:"inline-flex items-center rounded-full border border-border-subtle bg-transparent px-2 py-0.5 transition-colors hover:bg-hover-subtle hover:text-fg-default",children:l.name})},l.id))})]})]})]},e)}function Y3({isOpen:e,title:t,description:n,references:r,confirmLabel:o,onClose:s,onConfirm:a,confirmVariant:i="primary",isConfirming:l=!1}){return h.jsxs($t,{isOpen:e,onClose:s,variant:"inspect",children:[h.jsx($t.Header,{title:t,onClose:s}),h.jsx($t.Body,{children:h.jsxs("div",{className:"flex flex-col gap-3",children:[h.jsx($t.Description,{className:"text-meta font-normal text-fg-secondary",children:n}),h.jsxs("div",{className:"overflow-hidden rounded-[16px] border border-border-subtle bg-hover-subtle/40",children:[h.jsxs("div",{className:"flex items-center justify-between gap-2 border-b border-border-subtle px-4 py-3",children:[h.jsx(se,{as:"p",variant:"micro",weight:"semibold",tracking:"wider",transform:"uppercase",tone:"tertiary",children:"Referenced notes"}),h.jsxs(se,{as:"p",variant:"label",tone:"tertiary",children:[r.length," ",r.length===1?"note":"notes"]})]}),h.jsx("ul",{className:"flex flex-col",children:r.map((u,f)=>h.jsx("li",{className:f>0?"border-t border-border-subtle":void 0,children:h.jsxs("div",{className:"flex flex-col gap-3 px-4 py-3 sm:flex-row sm:items-center sm:justify-between",children:[h.jsx(se,{as:"p",variant:"body",weight:"medium",className:"min-w-0 flex-1 break-words",children:u.title||"Untitled note"}),h.jsx(bt,{asChild:!0,variant:"ghost",size:"sm",className:"self-start sm:self-auto",children:h.jsx(Pt,{to:Xn,params:{id:u.id},children:"Open note"})})]})},u.id))})]})]})}),h.jsx($t.Footer,{children:h.jsxs(xw,{children:[h.jsx(bt,{variant:"ghost",size:"sm",onClick:s,disabled:l,children:"Cancel"}),h.jsx(bt,{variant:i,size:"sm",onClick:a,isLoading:l,children:o})]})})]})}var vo={exports:{}},X3=vo.exports,Al;function J3(){return Al||(Al=1,(function(e,t){(function(n,r){e.exports=r()})(X3,(function(){var n=1e3,r=6e4,o=36e5,s="millisecond",a="second",i="minute",l="hour",u="day",f="week",d="month",p="quarter",m="year",g="date",v="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|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,x={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(j){var F=["th","st","nd","rd"],C=j%100;return"["+j+(F[(C-20)%10]||F[C]||F[0])+"]"}},w=function(j,F,C){var L=String(j);return!L||L.length>=F?j:""+Array(F+1-L.length).join(C)+j},E={s:w,z:function(j){var F=-j.utcOffset(),C=Math.abs(F),L=Math.floor(C/60),O=C%60;return(F<=0?"+":"-")+w(L,2,"0")+":"+w(O,2,"0")},m:function j(F,C){if(F.date()<C.date())return-j(C,F);var L=12*(C.year()-F.year())+(C.month()-F.month()),O=F.clone().add(L,d),I=C-O<0,V=F.clone().add(L+(I?-1:1),d);return+(-(L+(C-O)/(I?O-V:V-O))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:d,y:m,w:f,d:u,D:g,h:l,m:i,s:a,ms:s,Q:p}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},A="en",N={};N[A]=x;var R="$isDayjsObject",S=function(j){return j instanceof k||!(!j||!j[R])},_=function j(F,C,L){var O;if(!F)return A;if(typeof F=="string"){var I=F.toLowerCase();N[I]&&(O=I),C&&(N[I]=C,O=I);var V=F.split("-");if(!O&&V.length>1)return j(V[0])}else{var q=F.name;N[q]=F,O=q}return!L&&O&&(A=O),O||!L&&A},D=function(j,F){if(S(j))return j.clone();var C=typeof F=="object"?F:{};return C.date=j,C.args=arguments,new k(C)},M=E;M.l=_,M.i=S,M.w=function(j,F){return D(j,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var k=(function(){function j(C){this.$L=_(C.locale,null,!0),this.parse(C),this.$x=this.$x||C.x||{},this[R]=!0}var F=j.prototype;return F.parse=function(C){this.$d=(function(L){var O=L.date,I=L.utc;if(O===null)return new Date(NaN);if(M.u(O))return new Date;if(O instanceof Date)return new Date(O);if(typeof O=="string"&&!/Z$/i.test(O)){var V=O.match(y);if(V){var q=V[2]-1||0,G=(V[7]||"0").substring(0,3);return I?new Date(Date.UTC(V[1],q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,G)):new Date(V[1],q,V[3]||1,V[4]||0,V[5]||0,V[6]||0,G)}}return new Date(O)})(C),this.init()},F.init=function(){var C=this.$d;this.$y=C.getFullYear(),this.$M=C.getMonth(),this.$D=C.getDate(),this.$W=C.getDay(),this.$H=C.getHours(),this.$m=C.getMinutes(),this.$s=C.getSeconds(),this.$ms=C.getMilliseconds()},F.$utils=function(){return M},F.isValid=function(){return this.$d.toString()!==v},F.isSame=function(C,L){var O=D(C);return this.startOf(L)<=O&&O<=this.endOf(L)},F.isAfter=function(C,L){return D(C)<this.startOf(L)},F.isBefore=function(C,L){return this.endOf(L)<D(C)},F.$g=function(C,L,O){return M.u(C)?this[L]:this.set(O,C)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(C,L){var O=this,I=!!M.u(L)||L,V=M.p(C),q=function(te,B){var X=M.w(O.$u?Date.UTC(O.$y,B,te):new Date(O.$y,B,te),O);return I?X:X.endOf(u)},G=function(te,B){return M.w(O.toDate()[te].apply(O.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(B)),O)},H=this.$W,z=this.$M,K=this.$D,Y="set"+(this.$u?"UTC":"");switch(V){case m:return I?q(1,0):q(31,11);case d:return I?q(1,z):q(0,z+1);case f:var $=this.$locale().weekStart||0,U=(H<$?H+7:H)-$;return q(I?K-U:K+(6-U),z);case u:case g:return G(Y+"Hours",0);case l:return G(Y+"Minutes",1);case i:return G(Y+"Seconds",2);case a:return G(Y+"Milliseconds",3);default:return this.clone()}},F.endOf=function(C){return this.startOf(C,!1)},F.$set=function(C,L){var O,I=M.p(C),V="set"+(this.$u?"UTC":""),q=(O={},O[u]=V+"Date",O[g]=V+"Date",O[d]=V+"Month",O[m]=V+"FullYear",O[l]=V+"Hours",O[i]=V+"Minutes",O[a]=V+"Seconds",O[s]=V+"Milliseconds",O)[I],G=I===u?this.$D+(L-this.$W):L;if(I===d||I===m){var H=this.clone().set(g,1);H.$d[q](G),H.init(),this.$d=H.set(g,Math.min(this.$D,H.daysInMonth())).$d}else q&&this.$d[q](G);return this.init(),this},F.set=function(C,L){return this.clone().$set(C,L)},F.get=function(C){return this[M.p(C)]()},F.add=function(C,L){var O,I=this;C=Number(C);var V=M.p(L),q=function(z){var K=D(I);return M.w(K.date(K.date()+Math.round(z*C)),I)};if(V===d)return this.set(d,this.$M+C);if(V===m)return this.set(m,this.$y+C);if(V===u)return q(1);if(V===f)return q(7);var G=(O={},O[i]=r,O[l]=o,O[a]=n,O)[V]||1,H=this.$d.getTime()+C*G;return M.w(H,this)},F.subtract=function(C,L){return this.add(-1*C,L)},F.format=function(C){var L=this,O=this.$locale();if(!this.isValid())return O.invalidDate||v;var I=C||"YYYY-MM-DDTHH:mm:ssZ",V=M.z(this),q=this.$H,G=this.$m,H=this.$M,z=O.weekdays,K=O.months,Y=O.meridiem,$=function(B,X,J,ue){return B&&(B[X]||B(L,I))||J[X].slice(0,ue)},U=function(B){return M.s(q%12||12,B,"0")},te=Y||function(B,X,J){var ue=B<12?"AM":"PM";return J?ue.toLowerCase():ue};return I.replace(b,(function(B,X){return X||(function(J){switch(J){case"YY":return String(L.$y).slice(-2);case"YYYY":return M.s(L.$y,4,"0");case"M":return H+1;case"MM":return M.s(H+1,2,"0");case"MMM":return $(O.monthsShort,H,K,3);case"MMMM":return $(K,H);case"D":return L.$D;case"DD":return M.s(L.$D,2,"0");case"d":return String(L.$W);case"dd":return $(O.weekdaysMin,L.$W,z,2);case"ddd":return $(O.weekdaysShort,L.$W,z,3);case"dddd":return z[L.$W];case"H":return String(q);case"HH":return M.s(q,2,"0");case"h":return U(1);case"hh":return U(2);case"a":return te(q,G,!0);case"A":return te(q,G,!1);case"m":return String(G);case"mm":return M.s(G,2,"0");case"s":return String(L.$s);case"ss":return M.s(L.$s,2,"0");case"SSS":return M.s(L.$ms,3,"0");case"Z":return V}return null})(B)||V.replace(":","")}))},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(C,L,O){var I,V=this,q=M.p(L),G=D(C),H=(G.utcOffset()-this.utcOffset())*r,z=this-G,K=function(){return M.m(V,G)};switch(q){case m:I=K()/12;break;case d:I=K();break;case p:I=K()/3;break;case f:I=(z-H)/6048e5;break;case u:I=(z-H)/864e5;break;case l:I=z/o;break;case i:I=z/r;break;case a:I=z/n;break;default:I=z}return O?I:M.a(I)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return N[this.$L]},F.locale=function(C,L){if(!C)return this.$L;var O=this.clone(),I=_(C,L,!0);return I&&(O.$L=I),O},F.clone=function(){return M.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},j})(),Z=k.prototype;return D.prototype=Z,[["$ms",s],["$s",a],["$m",i],["$H",l],["$W",u],["$M",d],["$y",m],["$D",g]].forEach((function(j){Z[j[1]]=function(F){return this.$g(F,j[0],j[1])}})),D.extend=function(j,F){return j.$i||(j(F,k,D),j.$i=!0),D},D.locale=_,D.isDayjs=S,D.unix=function(j){return D(1e3*j)},D.en=N[A],D.Ls=N,D.p={},D}))})(vo)),vo.exports}var eE=J3();const $e=qn(eE),tE=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear(),s=new Date(r,n,1).getDay();return Math.ceil((t+s)/7)},nE=()=>[{name:"Year",template:"year",replacement:$e().format("YYYY")},{name:"Month",template:"month",replacement:$e().format("MM")},{name:"Short Month",template:"mon",replacement:$e().format("M")},{name:"Day",template:"day",replacement:$e().format("DD")},{name:"Short Day",template:"d",replacement:$e().format("D")},{name:"Week of Month",template:"week_of_month",replacement:tE().toString()},{name:"Hour 24",template:"hour",replacement:$e().format("HH")},{name:"Hour 12",template:"hour_12",replacement:$e().format("hh")},{name:"Short Hour 24",template:"h",replacement:$e().format("H")},{name:"Short Hour 12",template:"h_12",replacement:$e().format("h")},{name:"AM/PM",template:"ampm",replacement:$e().format("A")},{name:"Minute",template:"minute",replacement:$e().format("mm")},{name:"Short Minute",template:"m",replacement:$e().format("m")},{name:"Second",template:"second",replacement:$e().format("ss")},{name:"Short Second",template:"s",replacement:$e().format("s")}],rE="{%",oE="%}",Tl=e=>e.replace(new RegExp(`${rE}([^}]+)${oE}`,"g"),(t,n)=>nE().find(o=>o.template===n)?.replacement||t),so={title:"Move note to Trash?",description:"This note is referenced by the notes below. Those links may stop opening while this note stays in Trash. If you restore this note later, the links will work again.",confirmLabel:"Move to Trash",confirmVariant:"soft-danger"},fp=()=>{const e=Jd(),t=tf(),n=Wn(),r=Rn(),[o,s]=c.useState(null),a=async(d="",p="",m)=>{const g=Tl(d),v=Tl(p),y=await z3({title:g,content:v,...m&&{layout:m}});y.type!=="error"&&r({to:Xn,params:{id:y.createNote.id}})},i=async(d,p,m)=>{try{const g=await q3(d,!p);if(g.type==="error"){t(g.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:ae.notes.listAll(),exact:!1}),n.invalidateQueries({queryKey:ae.notes.tagListAll(),exact:!1}),n.invalidateQueries({queryKey:ae.notes.pinned(),exact:!0})]),m?.()}catch{t("Failed to update note pin status")}},l=async(d,p)=>{const m=await K3(d);if(m.type==="error"){t(m.errors[0].message);return}await Promise.all([n.invalidateQueries({queryKey:ae.notes.all(),exact:!1}),n.invalidateQueries({queryKey:ae.tags.all(),exact:!1}),n.invalidateQueries({queryKey:ae.reminders.all(),exact:!1}),n.invalidateQueries({queryKey:ae.images.all(),exact:!1}),n.invalidateQueries({queryKey:["calendar"],exact:!1})]),t("The note has been moved to trash."),p?.()},u=async()=>{if(!o)return;const{id:d,callback:p}=o;s(null),await l(d,p)};return{onCreate:a,onPinned:i,onDelete:async(d,p)=>{const m=await U3(d);if(m.type==="error"){t("Failed to check linked notes before moving this note to Trash.");return}if(n.setQueryData(ae.notes.backReferences(d),m.backReferences),m.backReferences.length>0){s({id:d,callback:p,backReferences:m.backReferences});return}await e("Move this note to trash?")&&await l(d,p)},deleteWarningDialog:h.jsx(Y3,{isOpen:!!o,title:so.title,description:so.description,references:o?.backReferences??[],confirmLabel:so.confirmLabel,confirmVariant:so.confirmVariant,onClose:()=>s(null),onConfirm:()=>{u()}})}};function sE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const ys=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Jn(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Hi(e){return"nodeType"in e}function nt(e){var t,n;return e?Jn(e)?e:Hi(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Bi(e){const{Document:t}=nt(e);return e instanceof t}function qr(e){return Jn(e)?!1:e instanceof nt(e).HTMLElement}function hp(e){return e instanceof nt(e).SVGElement}function er(e){return e?Jn(e)?e.document:Hi(e)?Bi(e)?e:qr(e)||hp(e)?e.ownerDocument:document:document:document}const _t=ys?c.useLayoutEffect:c.useEffect;function Vi(e){const t=c.useRef(e);return _t(()=>{t.current=e}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function aE(){const e=c.useRef(null),t=c.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=c.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Pr(e,t){t===void 0&&(t=[e]);const n=c.useRef(e);return _t(()=>{n.current!==e&&(n.current=e)},t),n}function Kr(e,t){const n=c.useRef();return c.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function Ho(e){const t=Vi(e),n=c.useRef(null),r=c.useCallback(o=>{o!==n.current&&t?.(o,n.current),n.current=o},[]);return[n,r]}function Da(e){const t=c.useRef();return c.useEffect(()=>{t.current=e},[e]),t.current}let Js={};function Wr(e,t){return c.useMemo(()=>{if(t)return t;const n=Js[e]==null?0:Js[e]+1;return Js[e]=n,e+"-"+n},[e,t])}function pp(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((s,a)=>{const i=Object.entries(a);for(const[l,u]of i){const f=s[l];f!=null&&(s[l]=f+e*u)}return s},{...t})}}const Hn=pp(1),Mr=pp(-1);function iE(e){return"clientX"in e&&"clientY"in e}function Zi(e){if(!e)return!1;const{KeyboardEvent:t}=nt(e.target);return t&&e instanceof t}function cE(e){if(!e)return!1;const{TouchEvent:t}=nt(e.target);return t&&e instanceof t}function ja(e){if(cE(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return iE(e)?{x:e.clientX,y:e.clientY}:null}const _r=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[_r.Translate.toString(e),_r.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Pl="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function lE(e){return e.matches(Pl)?e:e.querySelector(Pl)}const uE={display:"none"};function dE(e){let{id:t,value:n}=e;return P.createElement("div",{id:t,style:uE},n)}function fE(e){let{id:t,announcement:n,ariaLiveType:r="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return P.createElement("div",{id:t,style:o,role:"status","aria-live":r,"aria-atomic":!0},n)}function hE(){const[e,t]=c.useState("");return{announce:c.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const mp=c.createContext(null);function pE(e){const t=c.useContext(mp);c.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function mE(){const[e]=c.useState(()=>new Set),t=c.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[c.useCallback(r=>{let{type:o,event:s}=r;e.forEach(a=>{var i;return(i=a[o])==null?void 0:i.call(a,s)})},[e]),t]}const gE={draggable:`
|
|
201
|
+
To pick up a draggable item, press the space bar.
|
|
202
|
+
While dragging, use the arrow keys to move the item.
|
|
203
|
+
Press space again to drop the item in its new position, or press escape to cancel.
|
|
204
|
+
`},vE={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function yE(e){let{announcements:t=vE,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=gE}=e;const{announce:s,announcement:a}=hE(),i=Wr("DndLiveRegion"),[l,u]=c.useState(!1);if(c.useEffect(()=>{u(!0)},[]),pE(c.useMemo(()=>({onDragStart(d){let{active:p}=d;s(t.onDragStart({active:p}))},onDragMove(d){let{active:p,over:m}=d;t.onDragMove&&s(t.onDragMove({active:p,over:m}))},onDragOver(d){let{active:p,over:m}=d;s(t.onDragOver({active:p,over:m}))},onDragEnd(d){let{active:p,over:m}=d;s(t.onDragEnd({active:p,over:m}))},onDragCancel(d){let{active:p,over:m}=d;s(t.onDragCancel({active:p,over:m}))}}),[s,t])),!l)return null;const f=P.createElement(P.Fragment,null,P.createElement(dE,{id:r,value:o.draggable}),P.createElement(fE,{id:i,announcement:a}));return n?Ht.createPortal(f,n):f}var Me;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Me||(Me={}));function Bo(){}function Ml(e,t){return c.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function bE(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return c.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const wt=Object.freeze({x:0,y:0});function gp(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function vp(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function xE(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function _l(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function yp(e,t){if(!e||e.length===0)return null;const[n]=e;return n[t]}function Nl(e,t,n){return t===void 0&&(t=e.left),n===void 0&&(n=e.top),{x:t+e.width*.5,y:n+e.height*.5}}const wE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Nl(t,t.left,t.top),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=gp(Nl(l),o);s.push({id:i,data:{droppableContainer:a,value:u}})}}return s.sort(vp)},EE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=_l(t),s=[];for(const a of r){const{id:i}=a,l=n.get(i);if(l){const u=_l(l),f=o.reduce((p,m,g)=>p+gp(u[g],m),0),d=Number((f/4).toFixed(4));s.push({id:i,data:{droppableContainer:a,value:d}})}}return s.sort(vp)};function SE(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),s=Math.min(t.top+t.height,e.top+e.height),a=o-r,i=s-n;if(r<o&&n<s){const l=t.width*t.height,u=e.width*e.height,f=a*i,d=f/(l+u-f);return Number(d.toFixed(4))}return 0}const RE=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const s of r){const{id:a}=s,i=n.get(a);if(i){const l=SE(i,t);l>0&&o.push({id:a,data:{droppableContainer:s,value:l}})}}return o.sort(xE)};function CE(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function bp(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:wt}function AE(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),s=1;s<r;s++)o[s-1]=arguments[s];return o.reduce((a,i)=>({...a,top:a.top+e*i.y,bottom:a.bottom+e*i.y,left:a.left+e*i.x,right:a.right+e*i.x}),{...n})}}const TE=AE(1);function PE(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function ME(e,t,n){const r=PE(t);if(!r)return e;const{scaleX:o,scaleY:s,x:a,y:i}=r,l=e.left-a-(1-o)*parseFloat(n),u=e.top-i-(1-s)*parseFloat(n.slice(n.indexOf(" ")+1)),f=o?e.width/o:e.width,d=s?e.height/s:e.height;return{width:f,height:d,top:u,right:l+f,bottom:u+d,left:l}}const _E={ignoreTransform:!1};function tr(e,t){t===void 0&&(t=_E);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:u,transformOrigin:f}=nt(e).getComputedStyle(e);u&&(n=ME(n,u,f))}const{top:r,left:o,width:s,height:a,bottom:i,right:l}=n;return{top:r,left:o,width:s,height:a,bottom:i,right:l}}function Il(e){return tr(e,{ignoreTransform:!0})}function NE(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function IE(e,t){return t===void 0&&(t=nt(e).getComputedStyle(e)),t.position==="fixed"}function OE(e,t){t===void 0&&(t=nt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=t[o];return typeof s=="string"?n.test(s):!1})}function bs(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Bi(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!qr(o)||hp(o)||n.includes(o))return n;const s=nt(e).getComputedStyle(o);return o!==e&&OE(o,s)&&n.push(o),IE(o,s)?n:r(o.parentNode)}return e?r(e):n}function xp(e){const[t]=bs(e,1);return t??null}function ea(e){return!ys||!e?null:Jn(e)?e:Hi(e)?Bi(e)||e===er(e).scrollingElement?window:qr(e)?e:null:null}function wp(e){return Jn(e)?e.scrollX:e.scrollLeft}function Ep(e){return Jn(e)?e.scrollY:e.scrollTop}function Fa(e){return{x:wp(e),y:Ep(e)}}var Ie;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Ie||(Ie={}));function Sp(e){return!ys||!e?!1:e===document.scrollingElement}function Rp(e){const t={x:0,y:0},n=Sp(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,s=e.scrollLeft<=t.x,a=e.scrollTop>=r.y,i=e.scrollLeft>=r.x;return{isTop:o,isLeft:s,isBottom:a,isRight:i,maxScroll:r,minScroll:t}}const LE={x:.2,y:.2};function DE(e,t,n,r,o){let{top:s,left:a,right:i,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=LE);const{isTop:u,isBottom:f,isLeft:d,isRight:p}=Rp(e),m={x:0,y:0},g={x:0,y:0},v={height:t.height*o.y,width:t.width*o.x};return!u&&s<=t.top+v.height?(m.y=Ie.Backward,g.y=r*Math.abs((t.top+v.height-s)/v.height)):!f&&l>=t.bottom-v.height&&(m.y=Ie.Forward,g.y=r*Math.abs((t.bottom-v.height-l)/v.height)),!p&&i>=t.right-v.width?(m.x=Ie.Forward,g.x=r*Math.abs((t.right-v.width-i)/v.width)):!d&&a<=t.left+v.width&&(m.x=Ie.Backward,g.x=r*Math.abs((t.left+v.width-a)/v.width)),{direction:m,speed:g}}function jE(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:a}=window;return{top:0,left:0,right:s,bottom:a,width:s,height:a}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function Cp(e){return e.reduce((t,n)=>Hn(t,Fa(n)),wt)}function FE(e){return e.reduce((t,n)=>t+wp(n),0)}function kE(e){return e.reduce((t,n)=>t+Ep(n),0)}function $E(e,t){if(t===void 0&&(t=tr),!e)return;const{top:n,left:r,bottom:o,right:s}=t(e);xp(e)&&(o<=0||s<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const HE=[["x",["left","right"],FE],["y",["top","bottom"],kE]];class Ui{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=bs(n),o=Cp(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[s,a,i]of HE)for(const l of a)Object.defineProperty(this,l,{get:()=>{const u=i(r),f=o[s]-u;return this.rect[l]+f},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class vr{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function BE(e){const{EventTarget:t}=nt(e);return e instanceof t?e:er(e)}function ta(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var pt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(pt||(pt={}));function Ol(e){e.preventDefault()}function VE(e){e.stopPropagation()}var oe;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(oe||(oe={}));const Ap={start:[oe.Space,oe.Enter],cancel:[oe.Esc],end:[oe.Space,oe.Enter,oe.Tab]},ZE=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case oe.Right:return{...n,x:n.x+25};case oe.Left:return{...n,x:n.x-25};case oe.Down:return{...n,y:n.y+25};case oe.Up:return{...n,y:n.y-25}}};class zi{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new vr(er(n)),this.windowListeners=new vr(nt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(pt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&$E(r),n(wt)}handleKeyDown(t){if(Zi(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:s=Ap,coordinateGetter:a=ZE,scrollBehavior:i="smooth"}=o,{code:l}=t;if(s.end.includes(l)){this.handleEnd(t);return}if(s.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:u}=r.current,f=u?{x:u.left,y:u.top}:wt;this.referenceCoordinates||(this.referenceCoordinates=f);const d=a(t,{active:n,context:r.current,currentCoordinates:f});if(d){const p=Mr(d,f),m={x:0,y:0},{scrollableAncestors:g}=r.current;for(const v of g){const y=t.code,{isTop:b,isRight:x,isLeft:w,isBottom:E,maxScroll:A,minScroll:N}=Rp(v),R=jE(v),S={x:Math.min(y===oe.Right?R.right-R.width/2:R.right,Math.max(y===oe.Right?R.left:R.left+R.width/2,d.x)),y:Math.min(y===oe.Down?R.bottom-R.height/2:R.bottom,Math.max(y===oe.Down?R.top:R.top+R.height/2,d.y))},_=y===oe.Right&&!x||y===oe.Left&&!w,D=y===oe.Down&&!E||y===oe.Up&&!b;if(_&&S.x!==d.x){const M=v.scrollLeft+p.x,k=y===oe.Right&&M<=A.x||y===oe.Left&&M>=N.x;if(k&&!p.y){v.scrollTo({left:M,behavior:i});return}k?m.x=v.scrollLeft-M:m.x=y===oe.Right?v.scrollLeft-A.x:v.scrollLeft-N.x,m.x&&v.scrollBy({left:-m.x,behavior:i});break}else if(D&&S.y!==d.y){const M=v.scrollTop+p.y,k=y===oe.Down&&M<=A.y||y===oe.Up&&M>=N.y;if(k&&!p.x){v.scrollTo({top:M,behavior:i});return}k?m.y=v.scrollTop-M:m.y=y===oe.Down?v.scrollTop-A.y:v.scrollTop-N.y,m.y&&v.scrollBy({top:-m.y,behavior:i});break}}this.handleMove(t,Hn(Mr(d,this.referenceCoordinates),m))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}zi.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=Ap,onActivation:o}=t,{active:s}=n;const{code:a}=e.nativeEvent;if(r.start.includes(a)){const i=s.activatorNode.current;return i&&e.target!==i?!1:(e.preventDefault(),o?.({event:e.nativeEvent}),!0)}return!1}}];function Ll(e){return!!(e&&"distance"in e)}function Dl(e){return!!(e&&"delay"in e)}class qi{constructor(t,n,r){var o;r===void 0&&(r=BE(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:s}=t,{target:a}=s;this.props=t,this.events=n,this.document=er(a),this.documentListeners=new vr(this.document),this.listeners=new vr(r),this.windowListeners=new vr(nt(a)),this.initialCoordinates=(o=ja(s))!=null?o:wt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n,bypassActivationConstraint:r}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(pt.Resize,this.handleCancel),this.windowListeners.add(pt.DragStart,Ol),this.windowListeners.add(pt.VisibilityChange,this.handleCancel),this.windowListeners.add(pt.ContextMenu,Ol),this.documentListeners.add(pt.Keydown,this.handleKeydown),n){if(r!=null&&r({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Dl(n)){this.timeoutId=setTimeout(this.handleStart,n.delay),this.handlePending(n);return}if(Ll(n)){this.handlePending(n);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,n){const{active:r,onPending:o}=this.props;o(r,t,this.initialCoordinates,n)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(pt.Click,VE,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(pt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:s}=this,{onMove:a,options:{activationConstraint:i}}=s;if(!o)return;const l=(n=ja(t))!=null?n:wt,u=Mr(o,l);if(!r&&i){if(Ll(i)){if(i.tolerance!=null&&ta(u,i.tolerance))return this.handleCancel();if(ta(u,i.distance))return this.handleStart()}if(Dl(i)&&ta(u,i.tolerance))return this.handleCancel();this.handlePending(i,u);return}t.cancelable&&t.preventDefault(),a(l)}handleEnd(){const{onAbort:t,onEnd:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleCancel(){const{onAbort:t,onCancel:n}=this.props;this.detach(),this.activated||t(this.props.active),n()}handleKeydown(t){t.code===oe.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const UE={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Ki extends qi{constructor(t){const{event:n}=t,r=er(n.target);super(t,UE,r)}}Ki.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];const zE={move:{name:"mousemove"},end:{name:"mouseup"}};var ka;(function(e){e[e.RightClick=2]="RightClick"})(ka||(ka={}));class qE extends qi{constructor(t){super(t,zE,er(t.event.target))}}qE.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===ka.RightClick?!1:(r?.({event:n}),!0)}}];const na={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class KE extends qi{constructor(t){super(t,na)}static setup(){return window.addEventListener(na.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(na.move.name,t)};function t(){}}}KE.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r?.({event:n}),!0)}}];var yr;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(yr||(yr={}));var Vo;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Vo||(Vo={}));function WE(e){let{acceleration:t,activator:n=yr.Pointer,canScroll:r,draggingRect:o,enabled:s,interval:a=5,order:i=Vo.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:f,delta:d,threshold:p}=e;const m=QE({delta:d,disabled:!s}),[g,v]=aE(),y=c.useRef({x:0,y:0}),b=c.useRef({x:0,y:0}),x=c.useMemo(()=>{switch(n){case yr.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case yr.DraggableRect:return o}},[n,o,l]),w=c.useRef(null),E=c.useCallback(()=>{const N=w.current;if(!N)return;const R=y.current.x*b.current.x,S=y.current.y*b.current.y;N.scrollBy(R,S)},[]),A=c.useMemo(()=>i===Vo.TreeOrder?[...u].reverse():u,[i,u]);c.useEffect(()=>{if(!s||!u.length||!x){v();return}for(const N of A){if(r?.(N)===!1)continue;const R=u.indexOf(N),S=f[R];if(!S)continue;const{direction:_,speed:D}=DE(N,S,x,t,p);for(const M of["x","y"])m[M][_[M]]||(D[M]=0,_[M]=0);if(D.x>0||D.y>0){v(),w.current=N,g(E,a),y.current=D,b.current=_;return}}y.current={x:0,y:0},b.current={x:0,y:0},v()},[t,E,r,v,s,a,JSON.stringify(x),JSON.stringify(m),g,u,A,f,JSON.stringify(p)])}const GE={x:{[Ie.Backward]:!1,[Ie.Forward]:!1},y:{[Ie.Backward]:!1,[Ie.Forward]:!1}};function QE(e){let{delta:t,disabled:n}=e;const r=Da(t);return Kr(o=>{if(n||!r||!o)return GE;const s={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Ie.Backward]:o.x[Ie.Backward]||s.x===-1,[Ie.Forward]:o.x[Ie.Forward]||s.x===1},y:{[Ie.Backward]:o.y[Ie.Backward]||s.y===-1,[Ie.Forward]:o.y[Ie.Forward]||s.y===1}}},[n,t,r])}function YE(e,t){const n=t!=null?e.get(t):void 0,r=n?n.node.current:null;return Kr(o=>{var s;return t==null?null:(s=r??o)!=null?s:null},[r,t])}function XE(e,t){return c.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,s=o.activators.map(a=>({eventName:a.eventName,handler:t(a.handler,r)}));return[...n,...s]},[]),[e,t])}var Nr;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Nr||(Nr={}));var $a;(function(e){e.Optimized="optimized"})($a||($a={}));const jl=new Map;function JE(e,t){let{dragging:n,dependencies:r,config:o}=t;const[s,a]=c.useState(null),{frequency:i,measure:l,strategy:u}=o,f=c.useRef(e),d=y(),p=Pr(d),m=c.useCallback(function(b){b===void 0&&(b=[]),!p.current&&a(x=>x===null?b:x.concat(b.filter(w=>!x.includes(w))))},[p]),g=c.useRef(null),v=Kr(b=>{if(d&&!n)return jl;if(!b||b===jl||f.current!==e||s!=null){const x=new Map;for(let w of e){if(!w)continue;if(s&&s.length>0&&!s.includes(w.id)&&w.rect.current){x.set(w.id,w.rect.current);continue}const E=w.node.current,A=E?new Ui(l(E),E):null;w.rect.current=A,A&&x.set(w.id,A)}return x}return b},[e,s,n,d,l]);return c.useEffect(()=>{f.current=e},[e]),c.useEffect(()=>{d||m()},[n,d]),c.useEffect(()=>{s&&s.length>0&&a(null)},[JSON.stringify(s)]),c.useEffect(()=>{d||typeof i!="number"||g.current!==null||(g.current=setTimeout(()=>{m(),g.current=null},i))},[i,d,m,...r]),{droppableRects:v,measureDroppableContainers:m,measuringScheduled:s!=null};function y(){switch(u){case Nr.Always:return!1;case Nr.BeforeDragging:return n;default:return!n}}}function Tp(e,t){return Kr(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function eS(e,t){return Tp(e,t)}function tS(e){let{callback:t,disabled:n}=e;const r=Vi(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(r)},[r,n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function xs(e){let{callback:t,disabled:n}=e;const r=Vi(t),o=c.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(r)},[n]);return c.useEffect(()=>()=>o?.disconnect(),[o]),o}function nS(e){return new Ui(tr(e),e)}function Fl(e,t,n){t===void 0&&(t=nS);const[r,o]=c.useState(null);function s(){o(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??n)!=null?u:null}const f=t(e);return JSON.stringify(l)===JSON.stringify(f)?l:f})}const a=tS({callback(l){if(e)for(const u of l){const{type:f,target:d}=u;if(f==="childList"&&d instanceof HTMLElement&&d.contains(e)){s();break}}}}),i=xs({callback:s});return _t(()=>{s(),e?(i?.observe(e),a?.observe(document.body,{childList:!0,subtree:!0})):(i?.disconnect(),a?.disconnect())},[e]),r}function rS(e){const t=Tp(e);return bp(e,t)}const kl=[];function oS(e){const t=c.useRef(e),n=Kr(r=>e?r&&r!==kl&&e&&t.current&&e.parentNode===t.current.parentNode?r:bs(e):kl,[e]);return c.useEffect(()=>{t.current=e},[e]),n}function sS(e){const[t,n]=c.useState(null),r=c.useRef(e),o=c.useCallback(s=>{const a=ea(s.target);a&&n(i=>i?(i.set(a,Fa(a)),new Map(i)):null)},[]);return c.useEffect(()=>{const s=r.current;if(e!==s){a(s);const i=e.map(l=>{const u=ea(l);return u?(u.addEventListener("scroll",o,{passive:!0}),[u,Fa(u)]):null}).filter(l=>l!=null);n(i.length?new Map(i):null),r.current=e}return()=>{a(e),a(s)};function a(i){i.forEach(l=>{const u=ea(l);u?.removeEventListener("scroll",o)})}},[o,e]),c.useMemo(()=>e.length?t?Array.from(t.values()).reduce((s,a)=>Hn(s,a),wt):Cp(e):wt,[e,t])}function $l(e,t){t===void 0&&(t=[]);const n=c.useRef(null);return c.useEffect(()=>{n.current=null},t),c.useEffect(()=>{const r=e!==wt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Mr(e,n.current):wt}function aS(e){c.useEffect(()=>{if(!ys)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n?.()}},e.map(t=>{let{sensor:n}=t;return n}))}function iS(e,t){return c.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:s}=r;return n[o]=a=>{s(a,t)},n},{}),[e,t])}function Pp(e){return c.useMemo(()=>e?NE(e):null,[e])}const Hl=[];function cS(e,t){t===void 0&&(t=tr);const[n]=e,r=Pp(n?nt(n):null),[o,s]=c.useState(Hl);function a(){s(()=>e.length?e.map(l=>Sp(l)?r:new Ui(t(l),l)):Hl)}const i=xs({callback:a});return _t(()=>{i?.disconnect(),a(),e.forEach(l=>i?.observe(l))},[e]),o}function lS(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return qr(t)?t:e}function uS(e){let{measure:t}=e;const[n,r]=c.useState(null),o=c.useCallback(u=>{for(const{target:f}of u)if(qr(f)){r(d=>{const p=t(f);return d?{...d,width:p.width,height:p.height}:p});break}},[t]),s=xs({callback:o}),a=c.useCallback(u=>{const f=lS(u);s?.disconnect(),f&&s?.observe(f),r(f?t(f):null)},[t,s]),[i,l]=Ho(a);return c.useMemo(()=>({nodeRef:i,rect:n,setRef:l}),[n,i,l])}const dS=[{sensor:Ki,options:{}},{sensor:zi,options:{}}],fS={current:{}},yo={draggable:{measure:Il},droppable:{measure:Il,strategy:Nr.WhileDragging,frequency:$a.Optimized},dragOverlay:{measure:tr}};class br extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const hS={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new br,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Bo},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:yo,measureDroppableContainers:Bo,windowRect:null,measuringScheduled:!1},pS={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Bo,draggableNodes:new Map,over:null,measureDroppableContainers:Bo},ws=c.createContext(pS),Mp=c.createContext(hS);function mS(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new br}}}function gS(e,t){switch(t.type){case Me.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Me.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Me.DragEnd:case Me.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Me.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new br(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Me.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,s=e.droppable.containers.get(n);if(!s||r!==s.key)return e;const a=new br(e.droppable.containers);return a.set(n,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:a}}}case Me.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const s=new br(e.droppable.containers);return s.delete(n),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function vS(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=c.useContext(ws),s=Da(r),a=Da(n?.id);return c.useEffect(()=>{if(!t&&!r&&s&&a!=null){if(!Zi(s)||document.activeElement===s.target)return;const i=o.get(a);if(!i)return;const{activatorNode:l,node:u}=i;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(const f of[l.current,u.current]){if(!f)continue;const d=lE(f);if(d){d.focus();break}}})}},[r,t,o,a,s]),null}function yS(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...r}),n):n}function bS(e){return c.useMemo(()=>({draggable:{...yo.draggable,...e?.draggable},droppable:{...yo.droppable,...e?.droppable},dragOverlay:{...yo.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function xS(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const s=c.useRef(!1),{x:a,y:i}=typeof o=="boolean"?{x:o,y:o}:o;_t(()=>{if(!a&&!i||!t){s.current=!1;return}if(s.current||!r)return;const u=t?.node.current;if(!u||u.isConnected===!1)return;const f=n(u),d=bp(f,r);if(a||(d.x=0),i||(d.y=0),s.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const p=xp(u);p&&p.scrollBy({top:d.y,left:d.x})}},[t,a,i,r,n])}const _p=c.createContext({...wt,scaleX:1,scaleY:1});var Wt;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Wt||(Wt={}));const wS=c.memo(function(t){var n,r,o,s;let{id:a,accessibility:i,autoScroll:l=!0,children:u,sensors:f=dS,collisionDetection:d=RE,measuring:p,modifiers:m,...g}=t;const v=c.useReducer(gS,void 0,mS),[y,b]=v,[x,w]=mE(),[E,A]=c.useState(Wt.Uninitialized),N=E===Wt.Initialized,{draggable:{active:R,nodes:S,translate:_},droppable:{containers:D}}=y,M=R!=null?S.get(R):null,k=c.useRef({initial:null,translated:null}),Z=c.useMemo(()=>{var Pe;return R!=null?{id:R,data:(Pe=M?.data)!=null?Pe:fS,rect:k}:null},[R,M]),j=c.useRef(null),[F,C]=c.useState(null),[L,O]=c.useState(null),I=Pr(g,Object.values(g)),V=Wr("DndDescribedBy",a),q=c.useMemo(()=>D.getEnabled(),[D]),G=bS(p),{droppableRects:H,measureDroppableContainers:z,measuringScheduled:K}=JE(q,{dragging:N,dependencies:[_.x,_.y],config:G.droppable}),Y=YE(S,R),$=c.useMemo(()=>L?ja(L):null,[L]),U=As(),te=eS(Y,G.draggable.measure);xS({activeNode:R!=null?S.get(R):null,config:U.layoutShiftCompensation,initialRect:te,measure:G.draggable.measure});const B=Fl(Y,G.draggable.measure,te),X=Fl(Y?Y.parentElement:null),J=c.useRef({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:H,draggableNodes:S,draggingNode:null,draggingNodeRect:null,droppableContainers:D,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ue=D.getNodeFor((n=J.current.over)==null?void 0:n.id),ve=uS({measure:G.dragOverlay.measure}),Qe=(r=ve.nodeRef.current)!=null?r:Y,Fe=N?(o=ve.rect)!=null?o:B:null,Ze=!!(ve.nodeRef.current&&ve.rect),ct=rS(Ze?null:B),Oe=Pp(Qe?nt(Qe):null),Ne=oS(N?ue??Y:null),Ut=cS(Ne),Te=yS(m,{transform:{x:_.x-ct.x,y:_.y-ct.y,scaleX:1,scaleY:1},activatorEvent:L,active:Z,activeNodeRect:B,containerNodeRect:X,draggingNodeRect:Fe,over:J.current.over,overlayNodeRect:ve.rect,scrollableAncestors:Ne,scrollableAncestorRects:Ut,windowRect:Oe}),lt=$?Hn($,_):null,Tn=sS(Ne),Pn=$l(Tn),ie=$l(Tn,[B]),me=Hn(Te,Pn),Re=Fe?TE(Fe,Te):null,ut=Z&&Re?d({active:Z,collisionRect:Re,droppableRects:H,droppableContainers:q,pointerCoordinates:lt}):null,Ot=yp(ut,"id"),[vt,Lt]=c.useState(null),Es=Ze?Te:Hn(Te,ie),Ss=CE(Es,(s=vt?.rect)!=null?s:null,B),Mn=c.useRef(null),rr=c.useCallback((Pe,ke)=>{let{sensor:Q,options:fe}=ke;if(j.current==null)return;const de=S.get(j.current);if(!de)return;const he=Pe.nativeEvent,Ue=new Q({active:j.current,activeNode:de,event:he,options:fe,context:J,onAbort(le){if(!S.get(le))return;const{onDragAbort:Ee}=I.current,Ce={id:le};Ee?.(Ce),x({type:"onDragAbort",event:Ce})},onPending(le,rt,Ee,Ce){if(!S.get(le))return;const{onDragPending:ot}=I.current,Dt={id:le,constraint:rt,initialCoordinates:Ee,offset:Ce};ot?.(Dt),x({type:"onDragPending",event:Dt})},onStart(le){const rt=j.current;if(rt==null)return;const Ee=S.get(rt);if(!Ee)return;const{onDragStart:Ce}=I.current,zt={activatorEvent:he,active:{id:rt,data:Ee.data,rect:k}};Ht.unstable_batchedUpdates(()=>{Ce?.(zt),A(Wt.Initializing),b({type:Me.DragStart,initialCoordinates:le,active:rt}),x({type:"onDragStart",event:zt}),C(Mn.current),O(he)})},onMove(le){b({type:Me.DragMove,coordinates:le})},onEnd:ye(Me.DragEnd),onCancel:ye(Me.DragCancel)});Mn.current=Ue;function ye(le){return async function(){const{active:Ee,collisions:Ce,over:zt,scrollAdjustedTranslate:ot}=J.current;let Dt=null;if(Ee&&ot){const{cancelDrop:or}=I.current;Dt={activatorEvent:he,active:Ee,collisions:Ce,delta:ot,over:zt},le===Me.DragEnd&&typeof or=="function"&&await Promise.resolve(or(Dt))&&(le=Me.DragCancel)}j.current=null,Ht.unstable_batchedUpdates(()=>{b({type:le}),A(Wt.Uninitialized),Lt(null),C(null),O(null),Mn.current=null;const or=le===Me.DragEnd?"onDragEnd":"onDragCancel";if(Dt){const Ts=I.current[or];Ts?.(Dt),x({type:or,event:Dt})}})}}},[S]),Rs=c.useCallback((Pe,ke)=>(Q,fe)=>{const de=Q.nativeEvent,he=S.get(fe);if(j.current!==null||!he||de.dndKit||de.defaultPrevented)return;const Ue={active:he};Pe(Q,ke.options,Ue)===!0&&(de.dndKit={capturedBy:ke.sensor},j.current=fe,rr(Q,ke))},[S,rr]),_n=XE(f,Rs);aS(f),_t(()=>{B&&E===Wt.Initializing&&A(Wt.Initialized)},[B,E]),c.useEffect(()=>{const{onDragMove:Pe}=I.current,{active:ke,activatorEvent:Q,collisions:fe,over:de}=J.current;if(!ke||!Q)return;const he={active:ke,activatorEvent:Q,collisions:fe,delta:{x:me.x,y:me.y},over:de};Ht.unstable_batchedUpdates(()=>{Pe?.(he),x({type:"onDragMove",event:he})})},[me.x,me.y]),c.useEffect(()=>{const{active:Pe,activatorEvent:ke,collisions:Q,droppableContainers:fe,scrollAdjustedTranslate:de}=J.current;if(!Pe||j.current==null||!ke||!de)return;const{onDragOver:he}=I.current,Ue=fe.get(Ot),ye=Ue&&Ue.rect.current?{id:Ue.id,rect:Ue.rect.current,data:Ue.data,disabled:Ue.disabled}:null,le={active:Pe,activatorEvent:ke,collisions:Q,delta:{x:de.x,y:de.y},over:ye};Ht.unstable_batchedUpdates(()=>{Lt(ye),he?.(le),x({type:"onDragOver",event:le})})},[Ot]),_t(()=>{J.current={activatorEvent:L,active:Z,activeNode:Y,collisionRect:Re,collisions:ut,droppableRects:H,draggableNodes:S,draggingNode:Qe,draggingNodeRect:Fe,droppableContainers:D,over:vt,scrollableAncestors:Ne,scrollAdjustedTranslate:me},k.current={initial:Fe,translated:Re}},[Z,Y,ut,Re,S,Qe,Fe,H,D,vt,Ne,me]),WE({...U,delta:_,draggingRect:Re,pointerCoordinates:lt,scrollableAncestors:Ne,scrollableAncestorRects:Ut});const Rt=c.useMemo(()=>({active:Z,activeNode:Y,activeNodeRect:B,activatorEvent:L,collisions:ut,containerNodeRect:X,dragOverlay:ve,draggableNodes:S,droppableContainers:D,droppableRects:H,over:vt,measureDroppableContainers:z,scrollableAncestors:Ne,scrollableAncestorRects:Ut,measuringConfiguration:G,measuringScheduled:K,windowRect:Oe}),[Z,Y,B,L,ut,X,ve,S,D,H,vt,z,Ne,Ut,G,K,Oe]),Cs=c.useMemo(()=>({activatorEvent:L,activators:_n,active:Z,activeNodeRect:B,ariaDescribedById:{draggable:V},dispatch:b,draggableNodes:S,over:vt,measureDroppableContainers:z}),[L,_n,Z,B,b,V,S,vt,z]);return P.createElement(mp.Provider,{value:w},P.createElement(ws.Provider,{value:Cs},P.createElement(Mp.Provider,{value:Rt},P.createElement(_p.Provider,{value:Ss},u)),P.createElement(vS,{disabled:i?.restoreFocus===!1})),P.createElement(yE,{...i,hiddenTextDescribedById:V}));function As(){const Pe=F?.autoScrollEnabled===!1,ke=typeof l=="object"?l.enabled===!1:l===!1,Q=N&&!Pe&&!ke;return typeof l=="object"?{...l,enabled:Q}:{enabled:Q}}}),ES=c.createContext(null),Bl="button",SS="Draggable";function RS(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const s=Wr(SS),{activators:a,activatorEvent:i,active:l,activeNodeRect:u,ariaDescribedById:f,draggableNodes:d,over:p}=c.useContext(ws),{role:m=Bl,roleDescription:g="draggable",tabIndex:v=0}=o??{},y=l?.id===t,b=c.useContext(y?_p:ES),[x,w]=Ho(),[E,A]=Ho(),N=iS(a,t),R=Pr(n);_t(()=>(d.set(t,{id:t,key:s,node:x,activatorNode:E,data:R}),()=>{const _=d.get(t);_&&_.key===s&&d.delete(t)}),[d,t]);const S=c.useMemo(()=>({role:m,tabIndex:v,"aria-disabled":r,"aria-pressed":y&&m===Bl?!0:void 0,"aria-roledescription":g,"aria-describedby":f.draggable}),[r,m,v,y,g,f.draggable]);return{active:l,activatorEvent:i,activeNodeRect:u,attributes:S,isDragging:y,listeners:r?void 0:N,node:x,over:p,setNodeRef:w,setActivatorNodeRef:A,transform:b}}function CS(){return c.useContext(Mp)}const AS="Droppable",TS={timeout:25};function PS(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const s=Wr(AS),{active:a,dispatch:i,over:l,measureDroppableContainers:u}=c.useContext(ws),f=c.useRef({disabled:n}),d=c.useRef(!1),p=c.useRef(null),m=c.useRef(null),{disabled:g,updateMeasurementsFor:v,timeout:y}={...TS,...o},b=Pr(v??r),x=c.useCallback(()=>{if(!d.current){d.current=!0;return}m.current!=null&&clearTimeout(m.current),m.current=setTimeout(()=>{u(Array.isArray(b.current)?b.current:[b.current]),m.current=null},y)},[y]),w=xs({callback:x,disabled:g||!a}),E=c.useCallback((S,_)=>{w&&(_&&(w.unobserve(_),d.current=!1),S&&w.observe(S))},[w]),[A,N]=Ho(E),R=Pr(t);return c.useEffect(()=>{!w||!A.current||(w.disconnect(),d.current=!1,w.observe(A.current))},[A,w]),c.useEffect(()=>(i({type:Me.RegisterDroppable,element:{id:r,key:s,disabled:n,node:A,rect:p,data:R}}),()=>i({type:Me.UnregisterDroppable,key:s,id:r})),[r]),c.useEffect(()=>{n!==f.current.disabled&&(i({type:Me.SetDroppableDisabled,id:r,key:s,disabled:n}),f.current.disabled=n)},[r,s,n,i]),{active:a,rect:p,isOver:l?.id===r,node:A,over:l,setNodeRef:N}}const e5=e=>{let{transform:t}=e;return{...t,y:0}},MS=e=>{let{transform:t}=e;return{...t,x:0}};function Wi(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function _S(e,t){return e.reduce((n,r,o)=>{const s=t.get(r);return s&&(n[o]=s),n},Array(e.length))}function ao(e){return e!==null&&e>=0}function NS(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function IS(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const io={scaleX:1,scaleY:1},t5=e=>{var t;let{rects:n,activeNodeRect:r,activeIndex:o,overIndex:s,index:a}=e;const i=(t=n[o])!=null?t:r;if(!i)return null;const l=OS(n,a,o);if(a===o){const u=n[s];return u?{x:o<s?u.left+u.width-(i.left+i.width):u.left-i.left,y:0,...io}:null}return a>o&&a<=s?{x:-i.width-l,y:0,...io}:a<o&&a>=s?{x:i.width+l,y:0,...io}:{x:0,y:0,...io}};function OS(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return!r||!o&&!s?0:n<t?o?r.left-(o.left+o.width):s.left-(r.left+r.width):s?s.left-(r.left+r.width):r.left-(o.left+o.width)}const Np=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const s=Wi(t,r,n),a=t[o],i=s[o];return!i||!a?null:{x:i.left-a.left,y:i.top-a.top,scaleX:i.width/a.width,scaleY:i.height/a.height}},co={scaleX:1,scaleY:1},LS=e=>{var t;let{activeIndex:n,activeNodeRect:r,index:o,rects:s,overIndex:a}=e;const i=(t=s[n])!=null?t:r;if(!i)return null;if(o===n){const u=s[a];return u?{x:0,y:n<a?u.top+u.height-(i.top+i.height):u.top-i.top,...co}:null}const l=DS(s,o,n);return o>n&&o<=a?{x:0,y:-i.height-l,...co}:o<n&&o>=a?{x:0,y:i.height+l,...co}:{x:0,y:0,...co}};function DS(e,t,n){const r=e[t],o=e[t-1],s=e[t+1];return r?n<t?o?r.top-(o.top+o.height):s?s.top-(r.top+r.height):0:s?s.top-(r.top+r.height):o?r.top-(o.top+o.height):0:0}const Ip="Sortable",Op=P.createContext({activeIndex:-1,containerId:Ip,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Np,disabled:{draggable:!1,droppable:!1}});function jS(e){let{children:t,id:n,items:r,strategy:o=Np,disabled:s=!1}=e;const{active:a,dragOverlay:i,droppableRects:l,over:u,measureDroppableContainers:f}=CS(),d=Wr(Ip,n),p=i.rect!==null,m=c.useMemo(()=>r.map(N=>typeof N=="object"&&"id"in N?N.id:N),[r]),g=a!=null,v=a?m.indexOf(a.id):-1,y=u?m.indexOf(u.id):-1,b=c.useRef(m),x=!NS(m,b.current),w=y!==-1&&v===-1||x,E=IS(s);_t(()=>{x&&g&&f(m)},[x,m,g,f]),c.useEffect(()=>{b.current=m},[m]);const A=c.useMemo(()=>({activeIndex:v,containerId:d,disabled:E,disableTransforms:w,items:m,overIndex:y,useDragOverlay:p,sortedRects:_S(m,l),strategy:o}),[v,d,E.draggable,E.droppable,w,m,y,l,p,o]);return P.createElement(Op.Provider,{value:A},t)}const FS=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return Wi(n,r,o).indexOf(t)},kS=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:s,newIndex:a,previousItems:i,previousContainerId:l,transition:u}=e;return!u||!r||i!==s&&o===a?!1:n?!0:a!==o&&t===l},$S={duration:200,easing:"ease"},Lp="transform",HS=_r.Transition.toString({property:Lp,duration:0,easing:"linear"}),BS={roleDescription:"sortable"};function VS(e){let{disabled:t,index:n,node:r,rect:o}=e;const[s,a]=c.useState(null),i=c.useRef(n);return _t(()=>{if(!t&&n!==i.current&&r.current){const l=o.current;if(l){const u=tr(r.current,{ignoreTransform:!0}),f={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(f.x||f.y)&&a(f)}}n!==i.current&&(i.current=n)},[t,n,r,o]),c.useEffect(()=>{s&&a(null)},[s]),s}function ZS(e){let{animateLayoutChanges:t=kS,attributes:n,disabled:r,data:o,getNewIndex:s=FS,id:a,strategy:i,resizeObserverConfig:l,transition:u=$S}=e;const{items:f,containerId:d,activeIndex:p,disabled:m,disableTransforms:g,sortedRects:v,overIndex:y,useDragOverlay:b,strategy:x}=c.useContext(Op),w=US(r,m),E=f.indexOf(a),A=c.useMemo(()=>({sortable:{containerId:d,index:E,items:f},...o}),[d,o,E,f]),N=c.useMemo(()=>f.slice(f.indexOf(a)),[f,a]),{rect:R,node:S,isOver:_,setNodeRef:D}=PS({id:a,data:A,disabled:w.droppable,resizeObserverConfig:{updateMeasurementsFor:N,...l}}),{active:M,activatorEvent:k,activeNodeRect:Z,attributes:j,setNodeRef:F,listeners:C,isDragging:L,over:O,setActivatorNodeRef:I,transform:V}=RS({id:a,data:A,attributes:{...BS,...n},disabled:w.draggable}),q=sE(D,F),G=!!M,H=G&&!g&&ao(p)&&ao(y),z=!b&&L,K=z&&H?V:null,$=H?K??(i??x)({rects:v,activeNodeRect:Z,activeIndex:p,overIndex:y,index:E}):null,U=ao(p)&&ao(y)?s({id:a,items:f,activeIndex:p,overIndex:y}):E,te=M?.id,B=c.useRef({activeId:te,items:f,newIndex:U,containerId:d}),X=f!==B.current.items,J=t({active:M,containerId:d,isDragging:L,isSorting:G,id:a,index:E,items:f,newIndex:B.current.newIndex,previousItems:B.current.items,previousContainerId:B.current.containerId,transition:u,wasDragging:B.current.activeId!=null}),ue=VS({disabled:!J,index:E,node:S,rect:R});return c.useEffect(()=>{G&&B.current.newIndex!==U&&(B.current.newIndex=U),d!==B.current.containerId&&(B.current.containerId=d),f!==B.current.items&&(B.current.items=f)},[G,U,d,f]),c.useEffect(()=>{if(te===B.current.activeId)return;if(te!=null&&B.current.activeId==null){B.current.activeId=te;return}const Qe=setTimeout(()=>{B.current.activeId=te},50);return()=>clearTimeout(Qe)},[te]),{active:M,activeIndex:p,attributes:j,data:A,rect:R,index:E,newIndex:U,items:f,isOver:_,isSorting:G,isDragging:L,listeners:C,node:S,overIndex:y,over:O,setNodeRef:q,setActivatorNodeRef:I,setDroppableNodeRef:D,setDraggableNodeRef:F,transform:ue??$,transition:ve()};function ve(){if(ue||X&&B.current.newIndex===E)return HS;if(!(z&&!Zi(k)||!u)&&(G||J))return _r.Transition.toString({...u,property:Lp})}}function US(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e?.draggable)!=null?n:t.draggable,droppable:(r=e?.droppable)!=null?r:t.droppable}}function Zo(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const zS=[oe.Down,oe.Right,oe.Up,oe.Left],qS=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:s,over:a,scrollableAncestors:i}}=t;if(zS.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];s.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const p=o.get(d.id);if(p)switch(e.code){case oe.Down:r.top<p.top&&l.push(d);break;case oe.Up:r.top>p.top&&l.push(d);break;case oe.Left:r.left>p.left&&l.push(d);break;case oe.Right:r.left<p.left&&l.push(d);break}});const u=EE({collisionRect:r,droppableRects:o,droppableContainers:l});let f=yp(u,"id");if(f===a?.id&&u.length>1&&(f=u[1].id),f!=null){const d=s.get(n.id),p=s.get(f),m=p?o.get(p.id):null,g=p?.node.current;if(g&&m&&d&&p){const y=bs(g).some((N,R)=>i[R]!==N),b=Dp(d,p),x=KS(d,p),w=y||!b?{x:0,y:0}:{x:x?r.width-m.width:0,y:x?r.height-m.height:0},E={x:m.left,y:m.top};return w.x&&w.y?E:Mr(E,w)}}}};function Dp(e,t){return!Zo(e)||!Zo(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function KS(e,t){return!Zo(e)||!Zo(t)||!Dp(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const WS=e=>{const{data:t}=Nu({queryKey:ae.notes.list(e.searchParams),async queryFn(){const n=await dp(e.searchParams);if(n.type==="error")throw n;return n.allNotes}});return e.render(t)},GS=e=>{const{data:t}=Nu({queryKey:ae.notes.pinned(),async queryFn(){const n=await Se(`
|
|
205
|
+
query {
|
|
206
|
+
pinnedNotes {
|
|
207
|
+
id
|
|
208
|
+
title
|
|
209
|
+
order
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
`);if(n.type==="error")throw n;return n.pinnedNotes}});return h.jsx(h.Fragment,{children:e.render(t)})};function QS({query:e="",limit:t=50,offset:n=0}={}){return Se(`query FetchTags(
|
|
213
|
+
$searchFilter: SearchFilterInput,
|
|
214
|
+
$pagination: PaginationInput
|
|
215
|
+
) {
|
|
216
|
+
allTags(
|
|
217
|
+
searchFilter: $searchFilter,
|
|
218
|
+
pagination: $pagination
|
|
219
|
+
) {
|
|
220
|
+
totalCount
|
|
221
|
+
tags {
|
|
222
|
+
id
|
|
223
|
+
name
|
|
224
|
+
referenceCount
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}`,{searchFilter:{query:e},pagination:{limit:t,offset:n}})}function n5({name:e=""}){return Se(`mutation CreateTag($name: String!) {
|
|
228
|
+
createTag(name: $name) {
|
|
229
|
+
id
|
|
230
|
+
name
|
|
231
|
+
}
|
|
232
|
+
}`,{name:e})}const YS="focus-ring-soft flex h-8 w-8 items-center justify-center rounded-[10px] text-fg-default/70 outline-none transition-colors hover:text-fg-default active:cursor-grabbing touch-none",XS="focus-ring-soft block truncate rounded-[10px] px-1.5 py-1 outline-none transition-colors";function JS({id:e,title:t,isActive:n=!1,children:r}){const{attributes:o,listeners:s,setNodeRef:a,setActivatorNodeRef:i,transform:l,transition:u,isDragging:f}=ZS({id:e}),d={transform:_r.Transform.toString(l),transition:u,opacity:f?.5:1};return h.jsxs("div",{ref:a,style:d,className:pe("group flex min-h-[40px] items-center gap-1.5 rounded-[12px] px-1.5 py-1 transition-colors",n&&"bg-hover-subtle"),children:[h.jsx("button",{type:"button",ref:i,"aria-label":`Reorder note ${t??"Untitled"}`,...o,...s,className:pe(YS,f?"cursor-grabbing":"cursor-grab"),children:h.jsx(Nv,{className:"size-4"})}),h.jsx(se,{as:"div",truncate:!0,variant:"body",weight:"medium",className:"min-w-0 flex-1",children:r})]})}function eR({notes:e,pathname:t,pinnedItems:n,setPinnedItems:r,handleDragEnd:o,sensors:s}){c.useEffect(()=>{r(e)},[e,r]);const a=n.length>0?n:e;return a.length===0?null:h.jsx(wS,{sensors:s,collisionDetection:wE,onDragEnd:o,modifiers:[MS],children:h.jsx(jS,{items:a.map(i=>i.id),strategy:LS,children:a.map(i=>h.jsx(JS,{id:i.id,title:i.title||"Untitled",isActive:t===`/${i.id}`,children:h.jsx(Pt,{"aria-current":t===`/${i.id}`?"page":void 0,className:pe(XS,t===`/${i.id}`?"text-fg-default":"text-fg-secondary hover:bg-hover-subtle hover:text-fg-default"),to:Xn,params:{id:i.id},children:i.title||"Untitled"})},i.id))})})}const tR=()=>{const e=Jo({select:i=>i.pathname}),t=Wn(),[n,r]=c.useState([]),o=Ig({mutationFn:W3,onSuccess:()=>{t.invalidateQueries({queryKey:ae.notes.pinned(),exact:!0})}}),s=bE(Ml(Ki,{activationConstraint:{distance:8}}),Ml(zi,{coordinateGetter:qS})),a=i=>{const{active:l,over:u}=i;u&&l.id!==u.id&&r(f=>{const d=f.findIndex(g=>g.id===l.id),p=f.findIndex(g=>g.id===u.id),m=Wi(f,d,p);return o.mutate(m.map((g,v)=>({id:g.id,order:v}))),m})};return h.jsx("div",{className:"flex flex-col gap-1",children:h.jsx(sp,{fallback:h.jsxs("div",{className:"space-y-1",children:[h.jsx(Bt,{height:"40px",opacity:.4}),h.jsx(Bt,{height:"40px",opacity:.4})]}),errorTitle:"Failed to load pinned notes",errorDescription:"Retry loading the pinned note list.",renderError:({error:i,retry:l})=>h.jsx($i,{title:"Failed to load pinned notes",description:"Retry loading the pinned note list.",error:i,onRetry:l,showBackAction:!1,showHomeAction:!1}),children:h.jsx(GS,{render:i=>i.length>0?h.jsx(eR,{notes:i,pathname:e,pinnedItems:n,setPinnedItems:r,handleDragEnd:a,sensors:s}):h.jsx(se,{as:"div",variant:"meta",tone:"secondary",className:"px-2 py-2.5 leading-6",children:"Pin a note to keep it in view while the rest of the workspace changes."})})})})},nR="mb-2.5 flex items-center justify-between gap-3 px-1",rR="flex min-w-0 items-center gap-2",oR="inline-flex h-4 w-4 shrink-0 items-center justify-center text-fg-tertiary",sR=({title:e,icon:t,detail:n})=>h.jsxs("div",{className:nR,children:[h.jsxs("div",{className:rR,children:[t?h.jsx("span",{className:oR,children:t}):null,h.jsx(se,{variant:"label",weight:"medium",tone:"tertiary",children:e})]}),n?h.jsx(se,{as:"div",variant:"meta",weight:"medium",tone:"tertiary",children:n}):null]}),aR="flex flex-col gap-3.5 p-3 pt-2",iR="focus-ring-soft surface-base group flex w-full items-center justify-between gap-2.5 px-3 py-2.5 text-left text-fg-default outline-none transition-colors hover:bg-hover-subtle",cR="flex items-center gap-2.5",lR="inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-[13px] bg-cta text-fg-on-filled",uR="flex flex-col",dR="h-4 w-4 text-fg-tertiary transition-colors group-hover:text-fg-default",fR=()=>{const{onCreate:e}=fp();return h.jsxs("div",{className:aR,children:[h.jsxs("button",{type:"button",className:iR,onClick:()=>e(),children:[h.jsxs("span",{className:cR,children:[h.jsx("span",{className:lR,children:h.jsx(kv,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsxs("span",{className:uR,children:[h.jsx(se,{variant:"meta",weight:"semibold",tracking:"tight",children:"Capture"}),h.jsx(se,{variant:"label",tone:"secondary",children:"Open a new note"})]})]}),h.jsx(gr,{className:dR,weight:"bold"})]}),h.jsxs("section",{className:"pt-1",children:[h.jsx(sR,{title:"Pinned",icon:h.jsx(qd,{className:"h-4 w-4",weight:"fill"})}),h.jsx(tR,{})]})]})},hR=e=>{const[t,n]=c.useState(!1),r=c.useRef(null),o=c.useRef(!0),s=c.useRef(0),a=c.useCallback(()=>{r.current!==null&&(clearTimeout(r.current),r.current=null)},[]);c.useEffect(()=>(o.current=!0,()=>{o.current=!1,a()}),[a]);const i=c.useCallback(l=>{s.current+=1;const u=s.current;a(),o.current&&n(!0),r.current=setTimeout(()=>{r.current=null,Promise.resolve().then(l).catch(()=>{}).finally(()=>{o.current&&s.current===u&&n(!1)})},e)},[a,e]);return[t,i]},pR="flex flex-col gap-2.5",mR="surface-base overflow-hidden",gR="grid-search-bar grid items-center border-b border-transparent px-2.5 py-1.5 transition-colors",vR="border-border-subtle/70 bg-muted/25",yR="hover:bg-hover-subtle/60",Vl="flex h-10 items-center justify-center text-fg-tertiary transition-colors hover:text-fg-default sm:h-8",bR="h-10 w-full bg-transparent py-2 text-meta text-fg-default outline-none placeholder:text-fg-placeholder sm:h-8 sm:py-1.5",xR="px-1 py-1.5",wR="px-2 pb-0.5 pt-1",ER="px-2 pb-0.5 pt-1.5",SR="flex min-h-10 items-center gap-2 rounded-[10px] px-2.5 py-2 transition-colors hover:bg-hover-subtle sm:min-h-0 sm:px-2 sm:py-1.5",RR="min-w-0 flex-1",CR="flex flex-wrap gap-1.5 px-1.5 py-1",AR="inline-flex items-center rounded-full border border-border-subtle bg-hover-subtle px-2 py-0.75 sm:py-0.5",TR="mt-1 border-t border-border-subtle/50 px-2 pb-0.5 pt-1.5",PR="flex min-h-9 items-center gap-1.5 text-fg-secondary transition-colors hover:text-fg-default",MR=()=>{const e=Rn(),[t,n]=c.useState(""),[r,o]=c.useState([]),[s,a]=c.useState([]),[,i]=hR(500);c.useEffect(()=>{if(t.length<=0){i(()=>{}),o([]),a([]);return}i(()=>{dp({query:t,limit:5}).then(d=>{d.type==="success"&&o(d.allNotes.notes)}),QS({query:t,limit:5}).then(d=>{d.type==="success"&&a(d.allTags.tags)})})},[t,i]);const l=d=>{d?.preventDefault(),e({to:tp,search:{query:t,page:1}})},u=()=>{n("")},f=r.length>0||s.length>0;return h.jsx("div",{className:"p-3",children:h.jsx("form",{className:pR,onSubmit:l,children:h.jsxs("div",{className:mR,children:[h.jsxs("div",{className:`${gR} ${f?vR:yR}`,children:[h.jsx("button",{type:"submit",className:Vl,children:h.jsx(Fv,{className:"h-4.5 w-4.5",weight:"bold"})}),h.jsx("input",{type:"text",placeholder:"Search notes or tags",value:t,onChange:d=>n(d.target.value),className:bR}),t&&h.jsx("button",{type:"button",className:Vl,onClick:u,children:h.jsx(Yd,{className:"h-4 w-4",weight:"bold"})})]}),f&&h.jsxs("div",{className:xR,children:[r.length>0&&h.jsxs("div",{children:[s.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:wR,children:"Notes"}),r.map(({id:d,title:p})=>h.jsxs(Pt,{to:Xn,params:{id:d},className:SR,children:[h.jsx(Lv,{className:"h-3.5 w-3.5 shrink-0 text-fg-tertiary"}),h.jsx(se,{as:"span",truncate:!0,variant:"meta",weight:"medium",className:RR,children:p||"Untitled"})]},d))]}),s.length>0&&h.jsxs("div",{children:[r.length>0&&h.jsx(se,{as:"div",variant:"label",weight:"medium",tone:"tertiary",className:ER,children:"Tags"}),h.jsx("div",{className:CR,children:s.map(({id:d,name:p})=>h.jsx(Pt,{to:ki,params:{id:d},search:{page:1},children:h.jsx(se,{as:"span",variant:"label",weight:"medium",tone:"secondary",className:AR,children:p})},d))})]}),h.jsx("div",{className:TR,children:h.jsxs("button",{type:"submit",className:PR,children:[h.jsx(se,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:"View all results"}),h.jsx(gr,{className:"h-3.5 w-3.5",weight:"bold"})]})})]})]})})})},_R=[{name:"Notes",path:zr,icon:Bd},{name:"Views",path:Yh,icon:Ov},{name:"Graph",path:ep,icon:Vv},{name:"Calendar",path:Xh,icon:Pv},{name:"Reminders",path:Jh,icon:Tv},{name:"Tags",path:np,icon:Bv},{name:"Setting",path:rp,icon:Dv}],NR=()=>{const e=Jo({select:t=>t.pathname});return h.jsx("nav",{"aria-label":"Primary navigation",className:"flex items-center gap-1 px-4 py-2.5",children:_R.map((t,n)=>{const r=e===t.path||t.path!==zr&&e.startsWith(`${t.path}/`);return h.jsxs(c.Fragment,{children:[n>0&&h.jsx("span",{className:"h-3.5 w-px shrink-0 bg-border-subtle"}),h.jsx(Pt,{to:t.path,children:h.jsxs("div",{className:`flex min-w-26 items-center justify-center gap-2 border-b px-2 py-2 transition-colors ${r?"border-fg-muted text-fg-default":"border-transparent text-fg-secondary hover:border-border-subtle hover:text-fg-default"}`,children:[h.jsx(t.icon,{className:"size-5",weight:r?"fill":"regular"}),h.jsx(se,{as:"span",variant:"meta",weight:"medium",className:"text-current",children:t.name})]})})]},t.path)})})},IR=({children:e})=>h.jsx(D3,{sidebar:h.jsxs(h.Fragment,{children:[h.jsx(H3,{}),h.jsx(MR,{}),h.jsx(fR,{})]}),topNavigation:h.jsx(NR,{}),children:e}),OR=["updatedAt","createdAt"],LR=["asc","desc"],DR=["create","update"],Gr=e=>Array.isArray(e)?e[0]:e,Sn=(e,t,{min:n=1,max:r=Number.MAX_SAFE_INTEGER}={})=>{const o=Gr(e),s=typeof o=="number"?o:typeof o=="string"?Number(o):Number.NaN;return!Number.isInteger(s)||s<n||s>r?t:s},jR=e=>{const t=Gr(e);if(t==null||t==="")return;const n=Sn(t,Number.NaN);return Number.isNaN(n)?void 0:n},FR=(e,t=!1)=>{const n=Gr(e);return n===!0||n==="true"?!0:n===!1||n==="false"?!1:t},jp=(e,t="")=>{const n=Gr(e);return typeof n=="string"?n:t},Ha=(e,t,n)=>{const r=Gr(e);return typeof r!="string"?n:t.includes(r)?r:n},kR=e=>({page:Sn(e.page,1),limit:jR(e.limit),sortBy:Ha(e.sortBy,OR,"updatedAt"),sortOrder:Ha(e.sortOrder,LR,"desc"),pinnedFirst:FR(e.pinnedFirst,!1)}),nr=e=>({page:Sn(e.page,1)}),$R=e=>({page:Sn(e.page,1),query:jp(e.query,"")}),HR=e=>({year:Sn(e.year,$e().year(),{min:1970,max:9999}),month:Sn(e.month,$e().month()+1,{min:1,max:12}),type:Ha(e.type,DR,"create")}),BR=e=>({page:Sn(e.page,1),sectionId:jp(e.sectionId,"")}),Zl=16;function VR(e,t,n){return Math.max(Math.floor((Math.max(e,0)+n)/(t+n)),1)}function Ul(e,t,n){return e*t+(e-1)*n}function ZR({minItemWidth:e,gap:t,rows:n,fallback:r,override:o}){const[s,a]=c.useState(null),[i,l]=c.useState(r??n),u=c.useRef(null),f=c.useCallback(m=>{a(m)},[]),d=o==null,p=d?i:o;return c.useLayoutEffect(()=>{if(!d){u.current=null;return}if(!s){u.current=null,l(y=>y===(r??n)?y:r??n);return}let m=null;const g=()=>{const y=s.offsetWidth,b=VR(y,e,t),x=u.current;let w=b;if(x!==null&&x!==b)if(b>x){const A=Ul(x+1,e,t);y<A+Zl&&(w=x)}else{const A=Ul(x,e,t);y>A-Zl&&(w=x)}u.current=w;const E=Math.max(w*n,n);l(A=>A===E?A:E)},v=()=>{m===null&&(m=window.requestAnimationFrame(()=>{m=null,g()}))};if(v(),typeof ResizeObserver<"u"){const y=new ResizeObserver(()=>{v()});return y.observe(s),()=>{y.disconnect(),m!==null&&window.cancelAnimationFrame(m)}}return window.addEventListener("resize",v),window.addEventListener("orientationchange",v),()=>{window.removeEventListener("resize",v),window.removeEventListener("orientationchange",v),m!==null&&window.cancelAnimationFrame(m)}},[s,r,t,d,e,n]),{containerRef:f,limit:p,isAutoLimit:d}}const UR=240,zR=20,qR=6,zl=Dm(zr);function KR(){const e=zl.useNavigate(),{limit:t,page:n,sortBy:r,sortOrder:o,pinnedFirst:s}=zl.useSearch(),{containerRef:a,limit:i,isAutoLimit:l}=ZR({minItemWidth:UR,gap:zR,rows:qR,override:t??null}),{onDelete:u,onPinned:f,deleteWarningDialog:d}=fp(),p=m=>{e({search:g=>({...g,...m})})};return h.jsxs(vs,{title:"",variant:"none",children:[h.jsxs("div",{ref:a,className:"flex flex-col gap-5",children:[h.jsx(ww,{itemsPerPage:i,onItemsPerPageChange:m=>p({limit:m,page:1}),isAutoLimit:l,sortBy:r,onSortByChange:m=>p({sortBy:m,page:1}),sortOrder:o,onSortOrderChange:m=>p({sortOrder:m,page:1}),pinnedFirst:s,onPinnedFirstChange:m=>p({pinnedFirst:m,page:1})}),h.jsx(sp,{fallback:h.jsxs("div",{className:"grid-auto-cards grid gap-5",children:[h.jsx(Bt,{height:"112px"}),h.jsx(Bt,{height:"112px"}),h.jsx(Bt,{height:"112px"})]}),errorTitle:"Failed to load notes",errorDescription:"Retry loading the current note list.",resetKeys:[n,i,r,o,s],children:h.jsx(WS,{searchParams:{offset:(n-1)*i,limit:i,sortBy:r,sortOrder:o,pinnedFirst:s},render:({notes:m,totalCount:g})=>h.jsx(fl,{fallback:h.jsx(J0,{title:"Ocean is calm",description:"Capture anything and make waves in the ocean!"}),children:m.length>0&&h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"grid-auto-cards grid gap-5",children:m.map(v=>h.jsx(Q3,{...v,onPinned:()=>f(v.id,v.pinned),onDelete:()=>u(v.id)},v.id))}),h.jsx(fl,{fallback:null,children:g&&i<g&&h.jsx(th,{page:n,last:Math.ceil(g/i),onChange:v=>{p({page:v})}})})]})})})})]}),d]})}const je=$m({component:()=>h.jsx(IR,{children:h.jsx(gu,{})}),errorComponent:d3,notFoundComponent:f3}),WR=Le({getParentRoute:()=>je,path:zr,component:KR,validateSearch:kR}),GR=Le({getParentRoute:()=>je,path:Xh,component:We(()=>Ke(()=>import("./Calendar-D4KkvcU8.js"),__vite__mapDeps([0,1,2,3,4]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading calendar",description:"Preparing note and reminder snapshots."}),validateSearch:HR}),QR=Le({getParentRoute:()=>je,path:Yh,component:We(()=>Ke(()=>import("./Views-D4LGh30P.js"),__vite__mapDeps([5,1,2,3,6,7,8]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading views",description:"Preparing your saved dashboards."})}),YR=Le({getParentRoute:()=>je,path:Jh,component:We(()=>Ke(()=>import("./Reminders-FrTR9ny8.js"),__vite__mapDeps([9,1,2,3,10]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading reminders",description:"Collecting upcoming reminder cards."}),validateSearch:nr}),XR=Le({getParentRoute:()=>je,path:ep,component:We(()=>Ke(()=>import("./Graph-C8pBdJzV.js"),__vite__mapDeps([11,1,2,3]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading graph",description:"Preparing the linked note constellation."})}),JR=Le({getParentRoute:()=>je,path:tp,component:We(()=>Ke(()=>import("./Search-BPf2LO1Y.js"),__vite__mapDeps([12,1,2,3]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading search",description:"Preparing indexed note results."}),validateSearch:$R}),eC=Le({getParentRoute:()=>je,path:np,component:We(()=>Ke(()=>import("./Tag-uArdLjo1.js"),__vite__mapDeps([13,1,2,3]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading tags",description:"Preparing the tag catalog."}),validateSearch:nr}),tC=Le({getParentRoute:()=>je,path:Xn,component:We(()=>Ke(()=>import("./Note-ODOESft3.js"),__vite__mapDeps([14,1,2,3,4,10,8,15,16]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading note",description:"Preparing the editor and note content."})}),nC=Le({getParentRoute:()=>je,path:ki,component:We(()=>Ke(()=>import("./TagNotes-DDvXHB9I.js"),__vite__mapDeps([17,1,2,3]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading tagged notes",description:"Preparing notes for the selected tag."}),validateSearch:nr}),rC=Le({getParentRoute:()=>je,path:r3,component:We(()=>Ke(()=>import("./ViewNotes-BVu9lEs-.js"),__vite__mapDeps([18,1,2,3,6]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading view notes",description:"Preparing notes for this saved view section."}),validateSearch:BR}),oC=Le({getParentRoute:()=>je,path:rp,component:We(()=>Ke(()=>import("./index-C7YGbIuA.js"),__vite__mapDeps([19,1,2,3,20,21]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading settings",description:"Preparing workspace preferences."})}),sC=Le({getParentRoute:()=>je,path:o3,component:We(()=>Ke(()=>import("./mcp-CvCGaYSz.js"),__vite__mapDeps([22,1,2,3,7]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading MCP settings",description:"Preparing MCP access controls."})}),aC=Le({getParentRoute:()=>je,path:s3,component:We(()=>Ke(()=>import("./trash-R0sww0ur.js"),__vite__mapDeps([23,1,2,3,7]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading trash",description:"Preparing deleted notes for restore."}),validateSearch:nr}),iC=Le({getParentRoute:()=>je,path:a3,component:We(()=>Ke(()=>import("./manage-image-DiuREdeE.js"),__vite__mapDeps([24,1,2,3,15,25,7,20]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading image manager",description:"Preparing uploaded image metadata."}),validateSearch:nr}),cC=Le({getParentRoute:()=>je,path:i3,component:We(()=>Ke(()=>import("./manage-image-detail-D8Eorq3u.js"),__vite__mapDeps([26,1,2,3,15,25,7,20,21]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading image detail",description:"Preparing references for the selected image."})}),lC=Le({getParentRoute:()=>je,path:c3,component:We(()=>Ke(()=>import("./placeholder-znZDfNAE.js"),__vite__mapDeps([27,1,2,3,7,8]))),pendingComponent:()=>h.jsx(Ve,{title:"Loading placeholders",description:"Preparing template replacement rules."}),validateSearch:nr}),uC=je.addChildren([WR,QR,GR,YR,XR,JR,eC,tC,nC,rC,oC,sC,aC,iC,cC,lC]),dC=Km({routeTree:uC,defaultPendingComponent:()=>h.jsx(Ve,{title:"Loading page",description:"Preparing the next route."})});function fC(){const e=$o(n=>n.setSystemTheme),t=$o(n=>n.setTheme);return c.useEffect(()=>{const n=ko();return n&&t(n),Xp.listenThemeChange(r=>{ko()||e(r?"dark":"light")},n==null)},[e,t]),h.jsx(A8,{children:h.jsx(Qm,{router:dC})})}$o.setState({theme:S3()});p8();Wp.createRoot(document.getElementById("root")).render(h.jsx(P.StrictMode,{children:h.jsx(fC,{})}));export{sp as $,qS as A,bt as B,Xh as C,P4 as D,Ki as E,J0 as F,wS as G,e5 as H,_4 as I,wE as J,zi as K,Pt as L,$t as M,Xn as N,jS as O,vs as P,t5 as Q,MS as R,go as S,se as T,LS as U,r3 as V,tf as W,ZS as X,Nv as Y,_r as Z,Tf as _,Tv as a,th as a0,Jh as a1,$i as a2,Rn as a3,$o as a4,Nu as a5,JC as a6,Yd as a7,WS as a8,tp as a9,ge as aA,Nx as aB,GC as aC,YC as aD,XC as aE,Y3 as aF,QC as aG,i3 as aH,Oa as aI,zC as aJ,$3 as aK,VC as aL,nE as aM,rE as aN,oE as aO,De as aP,ZR as aa,fl as ab,ki as ac,np as ad,KC as ae,Ig as af,WC as ag,U3 as ah,Mv as ai,jv as aj,dp as ak,A3 as al,n5 as am,UC as an,hR as ao,HC as ap,fp as aq,s3 as ar,qd as as,qC as at,ZC as au,Q3 as av,o3 as aw,a3 as ax,c3 as ay,kv as az,Pv as b,pe as c,$e as d,Ft as e,Bs as f,gr as g,Se as h,Bt as i,Dm as j,L4 as k,eh as l,Ox as m,Ux as n,zx as o,Ae as p,ae as q,xw as r,Lv as s,G3 as t,Ng as u,Jd as v,Wn as w,QS as x,bE as y,Ml as z};
|