@kimuson/claude-code-viewer 0.4.7 → 0.4.9

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.
@@ -0,0 +1,56 @@
1
+ import{c as ae,r as f,hd as qt,j as s,gI as B,hg as oe,gF as Le,gH as X,hh as Wn,gG as Ze,gE as Ge,gJ as I,gK as ht,gL as Ln,gR as $n,hi as wr,gS as U,L as br,gX as Ne,gO as _t,gM as Cr,gP as Sr,gN as Pr,gQ as jr,hj as Ot,T as j,hk as Tr,B as Nr,g as At,hl as hn,h as kr,h7 as Mr,g_ as Rr,h5 as Er,p as _r,gC as Or,hm as Ar,hn as Dr,ho as Ir,hp as Wr,hq as Lr,u as Fn,a as Hn,hr as $r}from"./index-BGKS2Bbu.js";/**
2
+ * @license lucide-react v0.548.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const Fr=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Bn=ae("check",Fr);/**
7
+ * @license lucide-react v0.548.0 - ISC
8
+ *
9
+ * This source code is licensed under the ISC license.
10
+ * See the LICENSE file in the root directory of this source tree.
11
+ */const Hr=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xt=ae("chevron-down",Hr);/**
12
+ * @license lucide-react v0.548.0 - ISC
13
+ *
14
+ * This source code is licensed under the ISC license.
15
+ * See the LICENSE file in the root directory of this source tree.
16
+ */const Br=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vr=ae("chevron-right",Br);/**
17
+ * @license lucide-react v0.548.0 - ISC
18
+ *
19
+ * This source code is licensed under the ISC license.
20
+ * See the LICENSE file in the root directory of this source tree.
21
+ */const Yr=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],zr=ae("chevron-up",Yr);/**
22
+ * @license lucide-react v0.548.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */const qr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xr=ae("circle-check",qr);/**
27
+ * @license lucide-react v0.548.0 - ISC
28
+ *
29
+ * This source code is licensed under the ISC license.
30
+ * See the LICENSE file in the root directory of this source tree.
31
+ */const Ur=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Gr=ae("circle-x",Ur);/**
32
+ * @license lucide-react v0.548.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */const Qr=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],vd=ae("folder",Qr);/**
37
+ * @license lucide-react v0.548.0 - ISC
38
+ *
39
+ * This source code is licensed under the ISC license.
40
+ * See the LICENSE file in the root directory of this source tree.
41
+ */const Kr=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Jr=ae("info",Kr);/**
42
+ * @license lucide-react v0.548.0 - ISC
43
+ *
44
+ * This source code is licensed under the ISC license.
45
+ * See the LICENSE file in the root directory of this source tree.
46
+ */const Zr=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],es=ae("log-out",Zr);/**
47
+ * @license lucide-react v0.548.0 - ISC
48
+ *
49
+ * This source code is licensed under the ISC license.
50
+ * See the LICENSE file in the root directory of this source tree.
51
+ */const ts=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],wd=ae("plus",ts);/**
52
+ * @license lucide-react v0.548.0 - ISC
53
+ *
54
+ * This source code is licensed under the ISC license.
55
+ * See the LICENSE file in the root directory of this source tree.
56
+ */const ns=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],os=ae("settings",ns),rs=["top","right","bottom","left"],ve=Math.min,ee=Math.max,at=Math.round,nt=Math.floor,de=e=>({x:e,y:e}),ss={left:"right",right:"left",bottom:"top",top:"bottom"},is={start:"end",end:"start"};function Dt(e,t,n){return ee(e,ve(t,n))}function me(e,t){return typeof e=="function"?e(t):e}function pe(e){return e.split("-")[0]}function $e(e){return e.split("-")[1]}function Ut(e){return e==="x"?"y":"x"}function Gt(e){return e==="y"?"height":"width"}const as=new Set(["top","bottom"]);function le(e){return as.has(pe(e))?"y":"x"}function Qt(e){return Ut(le(e))}function cs(e,t,n){n===void 0&&(n=!1);const o=$e(e),r=Qt(e),i=Gt(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ct(a)),[a,ct(a)]}function ls(e){const t=ct(e);return[It(e),t,It(t)]}function It(e){return e.replace(/start|end/g,t=>is[t])}const mn=["left","right"],pn=["right","left"],ds=["top","bottom"],us=["bottom","top"];function fs(e,t,n){switch(e){case"top":case"bottom":return n?t?pn:mn:t?mn:pn;case"left":case"right":return t?ds:us;default:return[]}}function hs(e,t,n,o){const r=$e(e);let i=fs(pe(e),n==="start",o);return r&&(i=i.map(a=>a+"-"+r),t&&(i=i.concat(i.map(It)))),i}function ct(e){return e.replace(/left|right|bottom|top/g,t=>ss[t])}function ms(e){return{top:0,right:0,bottom:0,left:0,...e}}function Vn(e){return typeof e!="number"?ms(e):{top:e,right:e,bottom:e,left:e}}function lt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function gn(e,t,n){let{reference:o,floating:r}=e;const i=le(t),a=Qt(t),c=Gt(a),l=pe(t),d=i==="y",u=o.x+o.width/2-r.width/2,h=o.y+o.height/2-r.height/2,x=o[c]/2-r[c]/2;let p;switch(l){case"top":p={x:u,y:o.y-r.height};break;case"bottom":p={x:u,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:h};break;case"left":p={x:o.x-r.width,y:h};break;default:p={x:o.x,y:o.y}}switch($e(t)){case"start":p[a]-=x*(n&&d?-1:1);break;case"end":p[a]+=x*(n&&d?-1:1);break}return p}const ps=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let d=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:u,y:h}=gn(d,o,l),x=o,p={},y=0;for(let m=0;m<c.length;m++){const{name:v,fn:w}=c[m],{x:g,y:b,data:C,reset:S}=await w({x:u,y:h,initialPlacement:o,placement:x,strategy:r,middlewareData:p,rects:d,platform:a,elements:{reference:e,floating:t}});u=g??u,h=b??h,p={...p,[v]:{...p[v],...C}},S&&y<=50&&(y++,typeof S=="object"&&(S.placement&&(x=S.placement),S.rects&&(d=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:u,y:h}=gn(d,x,l)),m=-1)}return{x:u,y:h,placement:x,strategy:r,middlewareData:p}};async function Qe(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:i,rects:a,elements:c,strategy:l}=e,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:h="floating",altBoundary:x=!1,padding:p=0}=me(t,e),y=Vn(p),v=c[x?h==="floating"?"reference":"floating":h],w=lt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(v)))==null||n?v:v.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:l})),g=h==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),C=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},S=lt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:g,offsetParent:b,strategy:l}):g);return{top:(w.top-S.top+y.top)/C.y,bottom:(S.bottom-w.bottom+y.bottom)/C.y,left:(w.left-S.left+y.left)/C.x,right:(S.right-w.right+y.right)/C.x}}const gs=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:i,platform:a,elements:c,middlewareData:l}=t,{element:d,padding:u=0}=me(e,t)||{};if(d==null)return{};const h=Vn(u),x={x:n,y:o},p=Qt(r),y=Gt(p),m=await a.getDimensions(d),v=p==="y",w=v?"top":"left",g=v?"bottom":"right",b=v?"clientHeight":"clientWidth",C=i.reference[y]+i.reference[p]-x[p]-i.floating[y],S=x[p]-i.reference[p],k=await(a.getOffsetParent==null?void 0:a.getOffsetParent(d));let P=k?k[b]:0;(!P||!await(a.isElement==null?void 0:a.isElement(k)))&&(P=c.floating[b]||i.floating[y]);const M=C/2-S/2,V=P/2-m[y]/2-1,D=ve(h[w],V),W=ve(h[g],V),L=D,A=P-m[y]-W,E=P/2-m[y]/2+M,Y=Dt(L,E,A),R=!l.arrow&&$e(r)!=null&&E!==Y&&i.reference[y]/2-(E<L?D:W)-m[y]/2<0,_=R?E<L?E-L:E-A:0;return{[p]:x[p]+_,data:{[p]:Y,centerOffset:E-Y-_,...R&&{alignmentOffset:_}},reset:R}}}),xs=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:i,rects:a,initialPlacement:c,platform:l,elements:d}=t,{mainAxis:u=!0,crossAxis:h=!0,fallbackPlacements:x,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:m=!0,...v}=me(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const w=pe(r),g=le(c),b=pe(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(d.floating)),S=x||(b||!m?[ct(c)]:ls(c)),k=y!=="none";!x&&k&&S.push(...hs(c,m,y,C));const P=[c,...S],M=await Qe(t,v),V=[];let D=((o=i.flip)==null?void 0:o.overflows)||[];if(u&&V.push(M[w]),h){const E=cs(r,a,C);V.push(M[E[0]],M[E[1]])}if(D=[...D,{placement:r,overflows:V}],!V.every(E=>E<=0)){var W,L;const E=(((W=i.flip)==null?void 0:W.index)||0)+1,Y=P[E];if(Y&&(!(h==="alignment"?g!==le(Y):!1)||D.every(N=>le(N.placement)===g?N.overflows[0]>0:!0)))return{data:{index:E,overflows:D},reset:{placement:Y}};let R=(L=D.filter(_=>_.overflows[0]<=0).sort((_,N)=>_.overflows[1]-N.overflows[1])[0])==null?void 0:L.placement;if(!R)switch(p){case"bestFit":{var A;const _=(A=D.filter(N=>{if(k){const $=le(N.placement);return $===g||$==="y"}return!0}).map(N=>[N.placement,N.overflows.filter($=>$>0).reduce(($,J)=>$+J,0)]).sort((N,$)=>N[1]-$[1])[0])==null?void 0:A[0];_&&(R=_);break}case"initialPlacement":R=c;break}if(r!==R)return{reset:{placement:R}}}return{}}}};function xn(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function yn(e){return rs.some(t=>e[t]>=0)}const ys=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=me(e,t);switch(o){case"referenceHidden":{const i=await Qe(t,{...r,elementContext:"reference"}),a=xn(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:yn(a)}}}case"escaped":{const i=await Qe(t,{...r,altBoundary:!0}),a=xn(i,n.floating);return{data:{escapedOffsets:a,escaped:yn(a)}}}default:return{}}}}},Yn=new Set(["left","top"]);async function vs(e,t){const{placement:n,platform:o,elements:r}=e,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=pe(n),c=$e(n),l=le(n)==="y",d=Yn.has(a)?-1:1,u=i&&l?-1:1,h=me(t,e);let{mainAxis:x,crossAxis:p,alignmentAxis:y}=typeof h=="number"?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return c&&typeof y=="number"&&(p=c==="end"?y*-1:y),l?{x:p*u,y:x*d}:{x:x*d,y:p*u}}const ws=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:i,placement:a,middlewareData:c}=t,l=await vs(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:a}}}}},bs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:c={fn:v=>{let{x:w,y:g}=v;return{x:w,y:g}}},...l}=me(e,t),d={x:n,y:o},u=await Qe(t,l),h=le(pe(r)),x=Ut(h);let p=d[x],y=d[h];if(i){const v=x==="y"?"top":"left",w=x==="y"?"bottom":"right",g=p+u[v],b=p-u[w];p=Dt(g,p,b)}if(a){const v=h==="y"?"top":"left",w=h==="y"?"bottom":"right",g=y+u[v],b=y-u[w];y=Dt(g,y,b)}const m=c.fn({...t,[x]:p,[h]:y});return{...m,data:{x:m.x-n,y:m.y-o,enabled:{[x]:i,[h]:a}}}}}},Cs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:d=!0}=me(e,t),u={x:n,y:o},h=le(r),x=Ut(h);let p=u[x],y=u[h];const m=me(c,t),v=typeof m=="number"?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const b=x==="y"?"height":"width",C=i.reference[x]-i.floating[b]+v.mainAxis,S=i.reference[x]+i.reference[b]-v.mainAxis;p<C?p=C:p>S&&(p=S)}if(d){var w,g;const b=x==="y"?"width":"height",C=Yn.has(pe(r)),S=i.reference[h]-i.floating[b]+(C&&((w=a.offset)==null?void 0:w[h])||0)+(C?0:v.crossAxis),k=i.reference[h]+i.reference[b]+(C?0:((g=a.offset)==null?void 0:g[h])||0)-(C?v.crossAxis:0);y<S?y=S:y>k&&(y=k)}return{[x]:p,[h]:y}}}},Ss=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:i,platform:a,elements:c}=t,{apply:l=()=>{},...d}=me(e,t),u=await Qe(t,d),h=pe(r),x=$e(r),p=le(r)==="y",{width:y,height:m}=i.floating;let v,w;h==="top"||h==="bottom"?(v=h,w=x===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(w=h,v=x==="end"?"top":"bottom");const g=m-u.top-u.bottom,b=y-u.left-u.right,C=ve(m-u[v],g),S=ve(y-u[w],b),k=!t.middlewareData.shift;let P=C,M=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(P=g),k&&!x){const D=ee(u.left,0),W=ee(u.right,0),L=ee(u.top,0),A=ee(u.bottom,0);p?M=y-2*(D!==0||W!==0?D+W:ee(u.left,u.right)):P=m-2*(L!==0||A!==0?L+A:ee(u.top,u.bottom))}await l({...t,availableWidth:M,availableHeight:P});const V=await a.getDimensions(c.floating);return y!==V.width||m!==V.height?{reset:{rects:!0}}:{}}}};function mt(){return typeof window<"u"}function Fe(e){return zn(e)?(e.nodeName||"").toLowerCase():"#document"}function te(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fe(e){var t;return(t=(zn(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zn(e){return mt()?e instanceof Node||e instanceof te(e).Node:!1}function se(e){return mt()?e instanceof Element||e instanceof te(e).Element:!1}function ue(e){return mt()?e instanceof HTMLElement||e instanceof te(e).HTMLElement:!1}function vn(e){return!mt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof te(e).ShadowRoot}const Ps=new Set(["inline","contents"]);function et(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ie(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Ps.has(r)}const js=new Set(["table","td","th"]);function Ts(e){return js.has(Fe(e))}const Ns=[":popover-open",":modal"];function pt(e){return Ns.some(t=>{try{return e.matches(t)}catch{return!1}})}const ks=["transform","translate","scale","rotate","perspective"],Ms=["transform","translate","scale","rotate","perspective","filter"],Rs=["paint","layout","strict","content"];function Kt(e){const t=Jt(),n=se(e)?ie(e):e;return ks.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Ms.some(o=>(n.willChange||"").includes(o))||Rs.some(o=>(n.contain||"").includes(o))}function Es(e){let t=we(e);for(;ue(t)&&!Ie(t);){if(Kt(t))return t;if(pt(t))return null;t=we(t)}return null}function Jt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _s=new Set(["html","body","#document"]);function Ie(e){return _s.has(Fe(e))}function ie(e){return te(e).getComputedStyle(e)}function gt(e){return se(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function we(e){if(Fe(e)==="html")return e;const t=e.assignedSlot||e.parentNode||vn(e)&&e.host||fe(e);return vn(t)?t.host:t}function qn(e){const t=we(e);return Ie(t)?e.ownerDocument?e.ownerDocument.body:e.body:ue(t)&&et(t)?t:qn(t)}function Ke(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=qn(e),i=r===((o=e.ownerDocument)==null?void 0:o.body),a=te(r);if(i){const c=Wt(a);return t.concat(a,a.visualViewport||[],et(r)?r:[],c&&n?Ke(c):[])}return t.concat(r,Ke(r,[],n))}function Wt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Xn(e){const t=ie(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ue(e),i=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=at(n)!==i||at(o)!==a;return c&&(n=i,o=a),{width:n,height:o,$:c}}function Zt(e){return se(e)?e:e.contextElement}function De(e){const t=Zt(e);if(!ue(t))return de(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:i}=Xn(t);let a=(i?at(n.width):n.width)/o,c=(i?at(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const Os=de(0);function Un(e){const t=te(e);return!Jt()||!t.visualViewport?Os:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function As(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==te(e)?!1:t}function Me(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=Zt(e);let a=de(1);t&&(o?se(o)&&(a=De(o)):a=De(e));const c=As(i,n,o)?Un(i):de(0);let l=(r.left+c.x)/a.x,d=(r.top+c.y)/a.y,u=r.width/a.x,h=r.height/a.y;if(i){const x=te(i),p=o&&se(o)?te(o):o;let y=x,m=Wt(y);for(;m&&o&&p!==y;){const v=De(m),w=m.getBoundingClientRect(),g=ie(m),b=w.left+(m.clientLeft+parseFloat(g.paddingLeft))*v.x,C=w.top+(m.clientTop+parseFloat(g.paddingTop))*v.y;l*=v.x,d*=v.y,u*=v.x,h*=v.y,l+=b,d+=C,y=te(m),m=Wt(y)}}return lt({width:u,height:h,x:l,y:d})}function xt(e,t){const n=gt(e).scrollLeft;return t?t.left+n:Me(fe(e)).left+n}function Gn(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-xt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function Ds(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const i=r==="fixed",a=fe(o),c=t?pt(t.floating):!1;if(o===a||c&&i)return n;let l={scrollLeft:0,scrollTop:0},d=de(1);const u=de(0),h=ue(o);if((h||!h&&!i)&&((Fe(o)!=="body"||et(a))&&(l=gt(o)),ue(o))){const p=Me(o);d=De(o),u.x=p.x+o.clientLeft,u.y=p.y+o.clientTop}const x=a&&!h&&!i?Gn(a,l):de(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-l.scrollLeft*d.x+u.x+x.x,y:n.y*d.y-l.scrollTop*d.y+u.y+x.y}}function Is(e){return Array.from(e.getClientRects())}function Ws(e){const t=fe(e),n=gt(e),o=e.ownerDocument.body,r=ee(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),i=ee(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+xt(e);const c=-n.scrollTop;return ie(o).direction==="rtl"&&(a+=ee(t.clientWidth,o.clientWidth)-r),{width:r,height:i,x:a,y:c}}const wn=25;function Ls(e,t){const n=te(e),o=fe(e),r=n.visualViewport;let i=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){i=r.width,a=r.height;const u=Jt();(!u||u&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const d=xt(o);if(d<=0){const u=o.ownerDocument,h=u.body,x=getComputedStyle(h),p=u.compatMode==="CSS1Compat"&&parseFloat(x.marginLeft)+parseFloat(x.marginRight)||0,y=Math.abs(o.clientWidth-h.clientWidth-p);y<=wn&&(i-=y)}else d<=wn&&(i+=d);return{width:i,height:a,x:c,y:l}}const $s=new Set(["absolute","fixed"]);function Fs(e,t){const n=Me(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,i=ue(e)?De(e):de(1),a=e.clientWidth*i.x,c=e.clientHeight*i.y,l=r*i.x,d=o*i.y;return{width:a,height:c,x:l,y:d}}function bn(e,t,n){let o;if(t==="viewport")o=Ls(e,n);else if(t==="document")o=Ws(fe(e));else if(se(t))o=Fs(t,n);else{const r=Un(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return lt(o)}function Qn(e,t){const n=we(e);return n===t||!se(n)||Ie(n)?!1:ie(n).position==="fixed"||Qn(n,t)}function Hs(e,t){const n=t.get(e);if(n)return n;let o=Ke(e,[],!1).filter(c=>se(c)&&Fe(c)!=="body"),r=null;const i=ie(e).position==="fixed";let a=i?we(e):e;for(;se(a)&&!Ie(a);){const c=ie(a),l=Kt(a);!l&&c.position==="fixed"&&(r=null),(i?!l&&!r:!l&&c.position==="static"&&!!r&&$s.has(r.position)||et(a)&&!l&&Qn(e,a))?o=o.filter(u=>u!==a):r=c,a=we(a)}return t.set(e,o),o}function Bs(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?pt(t)?[]:Hs(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((d,u)=>{const h=bn(t,u,r);return d.top=ee(h.top,d.top),d.right=ve(h.right,d.right),d.bottom=ve(h.bottom,d.bottom),d.left=ee(h.left,d.left),d},bn(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Vs(e){const{width:t,height:n}=Xn(e);return{width:t,height:n}}function Ys(e,t,n){const o=ue(t),r=fe(t),i=n==="fixed",a=Me(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=de(0);function d(){l.x=xt(r)}if(o||!o&&!i)if((Fe(t)!=="body"||et(r))&&(c=gt(t)),o){const p=Me(t,!0,i,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else r&&d();i&&!o&&r&&d();const u=r&&!o&&!i?Gn(r,c):de(0),h=a.left+c.scrollLeft-l.x-u.x,x=a.top+c.scrollTop-l.y-u.y;return{x:h,y:x,width:a.width,height:a.height}}function Rt(e){return ie(e).position==="static"}function Cn(e,t){if(!ue(e)||ie(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fe(e)===n&&(n=n.ownerDocument.body),n}function Kn(e,t){const n=te(e);if(pt(e))return n;if(!ue(e)){let r=we(e);for(;r&&!Ie(r);){if(se(r)&&!Rt(r))return r;r=we(r)}return n}let o=Cn(e,t);for(;o&&Ts(o)&&Rt(o);)o=Cn(o,t);return o&&Ie(o)&&Rt(o)&&!Kt(o)?n:o||Es(e)||n}const zs=async function(e){const t=this.getOffsetParent||Kn,n=this.getDimensions,o=await n(e.floating);return{reference:Ys(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function qs(e){return ie(e).direction==="rtl"}const Xs={convertOffsetParentRelativeRectToViewportRelativeRect:Ds,getDocumentElement:fe,getClippingRect:Bs,getOffsetParent:Kn,getElementRects:zs,getClientRects:Is,getDimensions:Vs,getScale:De,isElement:se,isRTL:qs};function Jn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Us(e,t){let n=null,o;const r=fe(e);function i(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),i();const d=e.getBoundingClientRect(),{left:u,top:h,width:x,height:p}=d;if(c||t(),!x||!p)return;const y=nt(h),m=nt(r.clientWidth-(u+x)),v=nt(r.clientHeight-(h+p)),w=nt(u),b={rootMargin:-y+"px "+-m+"px "+-v+"px "+-w+"px",threshold:ee(0,ve(1,l))||1};let C=!0;function S(k){const P=k[0].intersectionRatio;if(P!==l){if(!C)return a();P?a(!1,P):o=setTimeout(()=>{a(!1,1e-7)},1e3)}P===1&&!Jn(d,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),i}function Gs(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,d=Zt(e),u=r||i?[...d?Ke(d):[],...Ke(t)]:[];u.forEach(w=>{r&&w.addEventListener("scroll",n,{passive:!0}),i&&w.addEventListener("resize",n)});const h=d&&c?Us(d,n):null;let x=-1,p=null;a&&(p=new ResizeObserver(w=>{let[g]=w;g&&g.target===d&&p&&(p.unobserve(t),cancelAnimationFrame(x),x=requestAnimationFrame(()=>{var b;(b=p)==null||b.observe(t)})),n()}),d&&!l&&p.observe(d),p.observe(t));let y,m=l?Me(e):null;l&&v();function v(){const w=Me(e);m&&!Jn(m,w)&&n(),m=w,y=requestAnimationFrame(v)}return n(),()=>{var w;u.forEach(g=>{r&&g.removeEventListener("scroll",n),i&&g.removeEventListener("resize",n)}),h?.(),(w=p)==null||w.disconnect(),p=null,l&&cancelAnimationFrame(y)}}const Qs=ws,Ks=bs,Js=xs,Zs=Ss,ei=ys,Sn=gs,ti=Cs,ni=(e,t,n)=>{const o=new Map,r={platform:Xs,...n},i={...r.platform,_c:o};return ps(e,t,{...r,platform:i})};var oi=typeof document<"u",ri=function(){},ot=oi?f.useLayoutEffect:ri;function dt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!dt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&e.$$typeof)&&!dt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function Zn(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Pn(e,t){const n=Zn(e);return Math.round(t*n)/n}function Et(e){const t=f.useRef(e);return ot(()=>{t.current=e}),t}function si(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:a}={},transform:c=!0,whileElementsMounted:l,open:d}=e,[u,h]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[x,p]=f.useState(o);dt(x,o)||p(o);const[y,m]=f.useState(null),[v,w]=f.useState(null),g=f.useCallback(N=>{N!==k.current&&(k.current=N,m(N))},[]),b=f.useCallback(N=>{N!==P.current&&(P.current=N,w(N))},[]),C=i||y,S=a||v,k=f.useRef(null),P=f.useRef(null),M=f.useRef(u),V=l!=null,D=Et(l),W=Et(r),L=Et(d),A=f.useCallback(()=>{if(!k.current||!P.current)return;const N={placement:t,strategy:n,middleware:x};W.current&&(N.platform=W.current),ni(k.current,P.current,N).then($=>{const J={...$,isPositioned:L.current!==!1};E.current&&!dt(M.current,J)&&(M.current=J,qt.flushSync(()=>{h(J)}))})},[x,t,n,W,L]);ot(()=>{d===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,h(N=>({...N,isPositioned:!1})))},[d]);const E=f.useRef(!1);ot(()=>(E.current=!0,()=>{E.current=!1}),[]),ot(()=>{if(C&&(k.current=C),S&&(P.current=S),C&&S){if(D.current)return D.current(C,S,A);A()}},[C,S,A,D,V]);const Y=f.useMemo(()=>({reference:k,floating:P,setReference:g,setFloating:b}),[g,b]),R=f.useMemo(()=>({reference:C,floating:S}),[C,S]),_=f.useMemo(()=>{const N={position:n,left:0,top:0};if(!R.floating)return N;const $=Pn(R.floating,u.x),J=Pn(R.floating,u.y);return c?{...N,transform:"translate("+$+"px, "+J+"px)",...Zn(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:J}},[n,c,R.floating,u.x,u.y]);return f.useMemo(()=>({...u,update:A,refs:Y,elements:R,floatingStyles:_}),[u,A,Y,R,_])}const ii=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Sn({element:o.current,padding:r}).fn(n):{}:o?Sn({element:o,padding:r}).fn(n):{}}}},ai=(e,t)=>({...Qs(e),options:[e,t]}),ci=(e,t)=>({...Ks(e),options:[e,t]}),li=(e,t)=>({...ti(e),options:[e,t]}),di=(e,t)=>({...Js(e),options:[e,t]}),ui=(e,t)=>({...Zs(e),options:[e,t]}),fi=(e,t)=>({...ei(e),options:[e,t]}),hi=(e,t)=>({...ii(e),options:[e,t]});var mi="Arrow",eo=f.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...i}=e;return s.jsx(B.svg,{...i,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});eo.displayName=mi;var pi=eo;function to(e){const[t,n]=f.useState(void 0);return oe(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const i=r[0];let a,c;if("borderBoxSize"in i){const l=i.borderBoxSize,d=Array.isArray(l)?l[0]:l;a=d.inlineSize,c=d.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var en="Popper",[no,yt]=Le(en),[gi,oo]=no(en),ro=e=>{const{__scopePopper:t,children:n}=e,[o,r]=f.useState(null);return s.jsx(gi,{scope:t,anchor:o,onAnchorChange:r,children:n})};ro.displayName=en;var so="PopperAnchor",io=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,i=oo(so,n),a=f.useRef(null),c=X(t,a),l=f.useRef(null);return f.useEffect(()=>{const d=l.current;l.current=o?.current||a.current,d!==l.current&&i.onAnchorChange(l.current)}),o?null:s.jsx(B.div,{...r,ref:c})});io.displayName=so;var tn="PopperContent",[xi,yi]=no(tn),ao=f.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:i="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:d=[],collisionPadding:u=0,sticky:h="partial",hideWhenDetached:x=!1,updatePositionStrategy:p="optimized",onPlaced:y,...m}=e,v=oo(tn,n),[w,g]=f.useState(null),b=X(t,T=>g(T)),[C,S]=f.useState(null),k=to(C),P=k?.width??0,M=k?.height??0,V=o+(i!=="center"?"-"+i:""),D=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},W=Array.isArray(d)?d:[d],L=W.length>0,A={padding:D,boundary:W.filter(wi),altBoundary:L},{refs:E,floatingStyles:Y,placement:R,isPositioned:_,middlewareData:N}=si({strategy:"fixed",placement:V,whileElementsMounted:(...T)=>Gs(...T,{animationFrame:p==="always"}),elements:{reference:v.anchor},middleware:[ai({mainAxis:r+M,alignmentAxis:a}),l&&ci({mainAxis:!0,crossAxis:!1,limiter:h==="partial"?li():void 0,...A}),l&&di({...A}),ui({...A,apply:({elements:T,rects:z,availableWidth:G,availableHeight:F})=>{const{width:H,height:q}=z.reference,ne=T.floating.style;ne.setProperty("--radix-popper-available-width",`${G}px`),ne.setProperty("--radix-popper-available-height",`${F}px`),ne.setProperty("--radix-popper-anchor-width",`${H}px`),ne.setProperty("--radix-popper-anchor-height",`${q}px`)}}),C&&hi({element:C,padding:c}),bi({arrowWidth:P,arrowHeight:M}),x&&fi({strategy:"referenceHidden",...A})]}),[$,J]=uo(R),Pe=Wn(y);oe(()=>{_&&Pe?.()},[_,Pe]);const Be=N.arrow?.x,Ve=N.arrow?.y,ge=N.arrow?.centerOffset!==0,[Oe,je]=f.useState();return oe(()=>{w&&je(window.getComputedStyle(w).zIndex)},[w]),s.jsx("div",{ref:E.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:_?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Oe,"--radix-popper-transform-origin":[N.transformOrigin?.x,N.transformOrigin?.y].join(" "),...N.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx(xi,{scope:n,placedSide:$,onArrowChange:S,arrowX:Be,arrowY:Ve,shouldHideArrow:ge,children:s.jsx(B.div,{"data-side":$,"data-align":J,...m,ref:b,style:{...m.style,animation:_?void 0:"none"}})})})});ao.displayName=tn;var co="PopperArrow",vi={top:"bottom",right:"left",bottom:"top",left:"right"},lo=f.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,i=yi(co,o),a=vi[i.placedSide];return s.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:s.jsx(pi,{...r,ref:n,style:{...r.style,display:"block"}})})});lo.displayName=co;function wi(e){return e!==null}var bi=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[d,u]=uo(n),h={start:"0%",center:"50%",end:"100%"}[u],x=(r.arrow?.x??0)+c/2,p=(r.arrow?.y??0)+l/2;let y="",m="";return d==="bottom"?(y=a?h:`${x}px`,m=`${-l}px`):d==="top"?(y=a?h:`${x}px`,m=`${o.floating.height+l}px`):d==="right"?(y=`${-l}px`,m=a?h:`${p}px`):d==="left"&&(y=`${o.floating.width+l}px`,m=a?h:`${p}px`),{data:{x:y,y:m}}}});function uo(e){const[t,n="center"]=e.split("-");return[t,n]}var fo=ro,ho=io,mo=ao,po=lo,go=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"}),Ci="VisuallyHidden",xo=f.forwardRef((e,t)=>s.jsx(B.span,{...e,ref:t,style:{...go,...e.style}}));xo.displayName=Ci;var Si=xo,[vt]=Le("Tooltip",[yt]),wt=yt(),yo="TooltipProvider",Pi=700,Lt="tooltip.open",[ji,nn]=vt(yo),vo=e=>{const{__scopeTooltip:t,delayDuration:n=Pi,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:i}=e,a=f.useRef(!0),c=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const d=l.current;return()=>window.clearTimeout(d)},[]),s.jsx(ji,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:f.useCallback(d=>{c.current=d},[]),disableHoverableContent:r,children:i})};vo.displayName=yo;var Je="Tooltip",[Ti,tt]=vt(Je),wo=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:i,disableHoverableContent:a,delayDuration:c}=e,l=nn(Je,e.__scopeTooltip),d=wt(t),[u,h]=f.useState(null),x=Ze(),p=f.useRef(0),y=a??l.disableHoverableContent,m=c??l.delayDuration,v=f.useRef(!1),[w,g]=Ge({prop:o,defaultProp:r??!1,onChange:P=>{P?(l.onOpen(),document.dispatchEvent(new CustomEvent(Lt))):l.onClose(),i?.(P)},caller:Je}),b=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),C=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v.current=!1,g(!0)},[g]),S=f.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g(!1)},[g]),k=f.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{v.current=!0,g(!0),p.current=0},m)},[m,g]);return f.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),s.jsx(fo,{...d,children:s.jsx(Ti,{scope:t,contentId:x,open:w,stateAttribute:b,trigger:u,onTriggerChange:h,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?k():C()},[l.isOpenDelayedRef,k,C]),onTriggerLeave:f.useCallback(()=>{y?S():(window.clearTimeout(p.current),p.current=0)},[S,y]),onOpen:C,onClose:S,disableHoverableContent:y,children:n})})};wo.displayName=Je;var $t="TooltipTrigger",bo=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=tt($t,n),i=nn($t,n),a=wt(n),c=f.useRef(null),l=X(t,c,r.onTriggerChange),d=f.useRef(!1),u=f.useRef(!1),h=f.useCallback(()=>d.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",h),[h]),s.jsx(ho,{asChild:!0,...a,children:s.jsx(B.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:I(e.onPointerMove,x=>{x.pointerType!=="touch"&&!u.current&&!i.isPointerInTransitRef.current&&(r.onTriggerEnter(),u.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{r.onTriggerLeave(),u.current=!1}),onPointerDown:I(e.onPointerDown,()=>{r.open&&r.onClose(),d.current=!0,document.addEventListener("pointerup",h,{once:!0})}),onFocus:I(e.onFocus,()=>{d.current||r.onOpen()}),onBlur:I(e.onBlur,r.onClose),onClick:I(e.onClick,r.onClose)})})});bo.displayName=$t;var on="TooltipPortal",[Ni,ki]=vt(on,{forceMount:void 0}),Co=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,i=tt(on,t);return s.jsx(Ni,{scope:t,forceMount:n,children:s.jsx(ht,{present:n||i.open,children:s.jsx(Ln,{asChild:!0,container:r,children:o})})})};Co.displayName=on;var We="TooltipContent",So=f.forwardRef((e,t)=>{const n=ki(We,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...i}=e,a=tt(We,e.__scopeTooltip);return s.jsx(ht,{present:o||a.open,children:a.disableHoverableContent?s.jsx(Po,{side:r,...i,ref:t}):s.jsx(Mi,{side:r,...i,ref:t})})}),Mi=f.forwardRef((e,t)=>{const n=tt(We,e.__scopeTooltip),o=nn(We,e.__scopeTooltip),r=f.useRef(null),i=X(t,r),[a,c]=f.useState(null),{trigger:l,onClose:d}=n,u=r.current,{onPointerInTransitChange:h}=o,x=f.useCallback(()=>{c(null),h(!1)},[h]),p=f.useCallback((y,m)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},g=Oi(w,v.getBoundingClientRect()),b=Ai(w,g),C=Di(m.getBoundingClientRect()),S=Wi([...b,...C]);c(S),h(!0)},[h]);return f.useEffect(()=>()=>x(),[x]),f.useEffect(()=>{if(l&&u){const y=v=>p(v,u),m=v=>p(v,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",m),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",m)}}},[l,u,p,x]),f.useEffect(()=>{if(a){const y=m=>{const v=m.target,w={x:m.clientX,y:m.clientY},g=l?.contains(v)||u?.contains(v),b=!Ii(w,a);g?x():b&&(x(),d())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,a,d,x]),s.jsx(Po,{...e,ref:i})}),[Ri,Ei]=vt(Je,{isInside:!1}),_i=wr("TooltipContent"),Po=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:i,onPointerDownOutside:a,...c}=e,l=tt(We,n),d=wt(n),{onClose:u}=l;return f.useEffect(()=>(document.addEventListener(Lt,u),()=>document.removeEventListener(Lt,u)),[u]),f.useEffect(()=>{if(l.trigger){const h=x=>{x.target?.contains(l.trigger)&&u()};return window.addEventListener("scroll",h,{capture:!0}),()=>window.removeEventListener("scroll",h,{capture:!0})}},[l.trigger,u]),s.jsx($n,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:h=>h.preventDefault(),onDismiss:u,children:s.jsxs(mo,{"data-state":l.stateAttribute,...d,...c,ref:t,style:{...c.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:[s.jsx(_i,{children:o}),s.jsx(Ri,{scope:n,isInside:!0,children:s.jsx(Si,{id:l.contentId,role:"tooltip",children:r||o})})]})})});So.displayName=We;var jo="TooltipArrow",To=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=wt(n);return Ei(jo,n).isInside?null:s.jsx(po,{...r,...o,ref:t})});To.displayName=jo;function Oi(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,o,r,i)){case i:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function Ai(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function Di(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function Ii(e,t){const{x:n,y:o}=e;let r=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const c=t[i],l=t[a],d=c.x,u=c.y,h=l.x,x=l.y;u>o!=x>o&&n<(h-d)*(o-u)/(x-u)+d&&(r=!r)}return r}function Wi(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),Li(t)}function Li(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const i=t[t.length-1],a=t[t.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const i=n[n.length-1],a=n[n.length-2];if((i.x-a.x)*(r.y-a.y)>=(i.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}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 $i=vo,Fi=wo,Hi=bo,Bi=Co,Vi=So,Yi=To;function rn({delayDuration:e=0,...t}){return s.jsx($i,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function rt({...e}){return s.jsx(rn,{children:s.jsx(Fi,{"data-slot":"tooltip",...e})})}function st({...e}){return s.jsx(Hi,{"data-slot":"tooltip-trigger",...e})}function it({className:e,sideOffset:t=0,children:n,...o}){return s.jsx(Bi,{children:s.jsxs(Vi,{"data-slot":"tooltip-content",sideOffset:t,className:U("bg-foreground text-background 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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[n,s.jsx(Yi,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const zi={sm:"w-4 h-4",default:"w-8 h-8",lg:"w-12 h-12"},qi={sm:"text-sm",default:"text-base",lg:"text-lg"},jn=({message:e,size:t="default",fullScreen:n=!0,className:o})=>{const r=s.jsxs("div",{className:U("flex flex-col items-center justify-center gap-3",o),children:[s.jsx(br,{className:U(zi[t],"animate-spin text-primary")}),e&&s.jsx("p",{className:U(qi[t],"text-muted-foreground font-medium"),children:e})]});return n?s.jsx("div",{className:"flex items-center justify-center w-full h-full min-h-[400px]",children:r}):r};function Tn(e,[t,n]){return Math.min(n,Math.max(t,e))}function Xi(e){const t=e+"CollectionProvider",[n,o]=Le(t),[r,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=m=>{const{scope:v,children:w}=m,g=Ne.useRef(null),b=Ne.useRef(new Map).current;return s.jsx(r,{scope:v,itemMap:b,collectionRef:g,children:w})};a.displayName=t;const c=e+"CollectionSlot",l=_t(c),d=Ne.forwardRef((m,v)=>{const{scope:w,children:g}=m,b=i(c,w),C=X(v,b.collectionRef);return s.jsx(l,{ref:C,children:g})});d.displayName=c;const u=e+"CollectionItemSlot",h="data-radix-collection-item",x=_t(u),p=Ne.forwardRef((m,v)=>{const{scope:w,children:g,...b}=m,C=Ne.useRef(null),S=X(v,C),k=i(u,w);return Ne.useEffect(()=>(k.itemMap.set(C,{ref:C,...b}),()=>void k.itemMap.delete(C))),s.jsx(x,{[h]:"",ref:S,children:g})});p.displayName=u;function y(m){const v=i(e+"CollectionConsumer",m);return Ne.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const b=Array.from(g.querySelectorAll(`[${h}]`));return Array.from(v.itemMap.values()).sort((k,P)=>b.indexOf(k.ref.current)-b.indexOf(P.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:a,Slot:d,ItemSlot:p},y,o]}var Ui=f.createContext(void 0);function Gi(e){const t=f.useContext(Ui);return e||t||"ltr"}function No(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qi=[" ","Enter","ArrowUp","ArrowDown"],Ki=[" ","Enter"],Re="Select",[bt,Ct,Ji]=Xi(Re),[He]=Le(Re,[Ji,yt]),St=yt(),[Zi,Ce]=He(Re),[ea,ta]=He(Re),ko=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:i,value:a,defaultValue:c,onValueChange:l,dir:d,name:u,autoComplete:h,disabled:x,required:p,form:y}=e,m=St(t),[v,w]=f.useState(null),[g,b]=f.useState(null),[C,S]=f.useState(!1),k=Gi(d),[P,M]=Ge({prop:o,defaultProp:r??!1,onChange:i,caller:Re}),[V,D]=Ge({prop:a,defaultProp:c,onChange:l,caller:Re}),W=f.useRef(null),L=v?y||!!v.closest("form"):!0,[A,E]=f.useState(new Set),Y=Array.from(A).map(R=>R.props.value).join(";");return s.jsx(fo,{...m,children:s.jsxs(Zi,{required:p,scope:t,trigger:v,onTriggerChange:w,valueNode:g,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:Ze(),value:V,onValueChange:D,open:P,onOpenChange:M,dir:k,triggerPointerDownPosRef:W,disabled:x,children:[s.jsx(bt.Provider,{scope:t,children:s.jsx(ea,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(R=>{E(_=>new Set(_).add(R))},[]),onNativeOptionRemove:f.useCallback(R=>{E(_=>{const N=new Set(_);return N.delete(R),N})},[]),children:n})}),L?s.jsxs(Qo,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:h,value:V,onChange:R=>D(R.target.value),disabled:x,form:y,children:[V===void 0?s.jsx("option",{value:""}):null,Array.from(A)]},Y):null]})})};ko.displayName=Re;var Mo="SelectTrigger",Ro=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,i=St(n),a=Ce(Mo,n),c=a.disabled||o,l=X(t,a.onTriggerChange),d=Ct(n),u=f.useRef("touch"),[h,x,p]=Jo(m=>{const v=d().filter(b=>!b.disabled),w=v.find(b=>b.value===a.value),g=Zo(v,m,w);g!==void 0&&a.onValueChange(g.value)}),y=m=>{c||(a.onOpenChange(!0),p()),m&&(a.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})};return s.jsx(ho,{asChild:!0,...i,children:s.jsx(B.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:c,"data-disabled":c?"":void 0,"data-placeholder":Ko(a.value)?"":void 0,...r,ref:l,onClick:I(r.onClick,m=>{m.currentTarget.focus(),u.current!=="mouse"&&y(m)}),onPointerDown:I(r.onPointerDown,m=>{u.current=m.pointerType;const v=m.target;v.hasPointerCapture(m.pointerId)&&v.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(y(m),m.preventDefault())}),onKeyDown:I(r.onKeyDown,m=>{const v=h.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&x(m.key),!(v&&m.key===" ")&&Qi.includes(m.key)&&(y(),m.preventDefault())})})})});Ro.displayName=Mo;var Eo="SelectValue",_o=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:i,placeholder:a="",...c}=e,l=Ce(Eo,n),{onValueNodeHasChildrenChange:d}=l,u=i!==void 0,h=X(t,l.onValueNodeChange);return oe(()=>{d(u)},[d,u]),s.jsx(B.span,{...c,ref:h,style:{pointerEvents:"none"},children:Ko(l.value)?s.jsx(s.Fragment,{children:a}):i})});_o.displayName=Eo;var na="SelectIcon",Oo=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return s.jsx(B.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Oo.displayName=na;var oa="SelectPortal",Ao=e=>s.jsx(Ln,{asChild:!0,...e});Ao.displayName=oa;var Ee="SelectContent",Do=f.forwardRef((e,t)=>{const n=Ce(Ee,e.__scopeSelect),[o,r]=f.useState();if(oe(()=>{r(new DocumentFragment)},[]),!n.open){const i=o;return i?qt.createPortal(s.jsx(Io,{scope:e.__scopeSelect,children:s.jsx(bt.Slot,{scope:e.__scopeSelect,children:s.jsx("div",{children:e.children})})}),i):null}return s.jsx(Wo,{...e,ref:t})});Do.displayName=Ee;var re=10,[Io,Se]=He(Ee),ra="SelectContentImpl",sa=_t("SelectContent.RemoveScroll"),Wo=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:i,onPointerDownOutside:a,side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:x,collisionPadding:p,sticky:y,hideWhenDetached:m,avoidCollisions:v,...w}=e,g=Ce(Ee,n),[b,C]=f.useState(null),[S,k]=f.useState(null),P=X(t,T=>C(T)),[M,V]=f.useState(null),[D,W]=f.useState(null),L=Ct(n),[A,E]=f.useState(!1),Y=f.useRef(!1);f.useEffect(()=>{if(b)return Cr(b)},[b]),Sr();const R=f.useCallback(T=>{const[z,...G]=L().map(q=>q.ref.current),[F]=G.slice(-1),H=document.activeElement;for(const q of T)if(q===H||(q?.scrollIntoView({block:"nearest"}),q===z&&S&&(S.scrollTop=0),q===F&&S&&(S.scrollTop=S.scrollHeight),q?.focus(),document.activeElement!==H))return},[L,S]),_=f.useCallback(()=>R([M,b]),[R,M,b]);f.useEffect(()=>{A&&_()},[A,_]);const{onOpenChange:N,triggerPointerDownPosRef:$}=g;f.useEffect(()=>{if(b){let T={x:0,y:0};const z=F=>{T={x:Math.abs(Math.round(F.pageX)-($.current?.x??0)),y:Math.abs(Math.round(F.pageY)-($.current?.y??0))}},G=F=>{T.x<=10&&T.y<=10?F.preventDefault():b.contains(F.target)||N(!1),document.removeEventListener("pointermove",z),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",z),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",z),document.removeEventListener("pointerup",G,{capture:!0})}}},[b,N,$]),f.useEffect(()=>{const T=()=>N(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[N]);const[J,Pe]=Jo(T=>{const z=L().filter(H=>!H.disabled),G=z.find(H=>H.ref.current===document.activeElement),F=Zo(z,T,G);F&&setTimeout(()=>F.ref.current.focus())}),Be=f.useCallback((T,z,G)=>{const F=!Y.current&&!G;(g.value!==void 0&&g.value===z||F)&&(V(T),F&&(Y.current=!0))},[g.value]),Ve=f.useCallback(()=>b?.focus(),[b]),ge=f.useCallback((T,z,G)=>{const F=!Y.current&&!G;(g.value!==void 0&&g.value===z||F)&&W(T)},[g.value]),Oe=o==="popper"?Ft:Lo,je=Oe===Ft?{side:c,sideOffset:l,align:d,alignOffset:u,arrowPadding:h,collisionBoundary:x,collisionPadding:p,sticky:y,hideWhenDetached:m,avoidCollisions:v}:{};return s.jsx(Io,{scope:n,content:b,viewport:S,onViewportChange:k,itemRefCallback:Be,selectedItem:M,onItemLeave:Ve,itemTextRefCallback:ge,focusSelectedItem:_,selectedItemText:D,position:o,isPositioned:A,searchRef:J,children:s.jsx(Pr,{as:sa,allowPinchZoom:!0,children:s.jsx(jr,{asChild:!0,trapped:g.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:I(r,T=>{g.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:s.jsx($n,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:s.jsx(Oe,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:T=>T.preventDefault(),...w,...je,onPlaced:()=>E(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:I(w.onKeyDown,T=>{const z=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!z&&T.key.length===1&&Pe(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let F=L().filter(H=>!H.disabled).map(H=>H.ref.current);if(["ArrowUp","End"].includes(T.key)&&(F=F.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const H=T.target,q=F.indexOf(H);F=F.slice(q+1)}setTimeout(()=>R(F)),T.preventDefault()}})})})})})})});Wo.displayName=ra;var ia="SelectItemAlignedPosition",Lo=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,i=Ce(Ee,n),a=Se(Ee,n),[c,l]=f.useState(null),[d,u]=f.useState(null),h=X(t,P=>u(P)),x=Ct(n),p=f.useRef(!1),y=f.useRef(!0),{viewport:m,selectedItem:v,selectedItemText:w,focusSelectedItem:g}=a,b=f.useCallback(()=>{if(i.trigger&&i.valueNode&&c&&d&&m&&v&&w){const P=i.trigger.getBoundingClientRect(),M=d.getBoundingClientRect(),V=i.valueNode.getBoundingClientRect(),D=w.getBoundingClientRect();if(i.dir!=="rtl"){const H=D.left-M.left,q=V.left-H,ne=P.left-q,Te=P.width+ne,Nt=Math.max(Te,M.width),kt=window.innerWidth-re,Mt=Tn(q,[re,Math.max(re,kt-Nt)]);c.style.minWidth=Te+"px",c.style.left=Mt+"px"}else{const H=M.right-D.right,q=window.innerWidth-V.right-H,ne=window.innerWidth-P.right-q,Te=P.width+ne,Nt=Math.max(Te,M.width),kt=window.innerWidth-re,Mt=Tn(q,[re,Math.max(re,kt-Nt)]);c.style.minWidth=Te+"px",c.style.right=Mt+"px"}const W=x(),L=window.innerHeight-re*2,A=m.scrollHeight,E=window.getComputedStyle(d),Y=parseInt(E.borderTopWidth,10),R=parseInt(E.paddingTop,10),_=parseInt(E.borderBottomWidth,10),N=parseInt(E.paddingBottom,10),$=Y+R+A+N+_,J=Math.min(v.offsetHeight*5,$),Pe=window.getComputedStyle(m),Be=parseInt(Pe.paddingTop,10),Ve=parseInt(Pe.paddingBottom,10),ge=P.top+P.height/2-re,Oe=L-ge,je=v.offsetHeight/2,T=v.offsetTop+je,z=Y+R+T,G=$-z;if(z<=ge){const H=W.length>0&&v===W[W.length-1].ref.current;c.style.bottom="0px";const q=d.clientHeight-m.offsetTop-m.offsetHeight,ne=Math.max(Oe,je+(H?Ve:0)+q+_),Te=z+ne;c.style.height=Te+"px"}else{const H=W.length>0&&v===W[0].ref.current;c.style.top="0px";const ne=Math.max(ge,Y+m.offsetTop+(H?Be:0)+je)+G;c.style.height=ne+"px",m.scrollTop=z-ge+m.offsetTop}c.style.margin=`${re}px 0`,c.style.minHeight=J+"px",c.style.maxHeight=L+"px",o?.(),requestAnimationFrame(()=>p.current=!0)}},[x,i.trigger,i.valueNode,c,d,m,v,w,i.dir,o]);oe(()=>b(),[b]);const[C,S]=f.useState();oe(()=>{d&&S(window.getComputedStyle(d).zIndex)},[d]);const k=f.useCallback(P=>{P&&y.current===!0&&(b(),g?.(),y.current=!1)},[b,g]);return s.jsx(ca,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:p,onScrollButtonChange:k,children:s.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:s.jsx(B.div,{...r,ref:h,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Lo.displayName=ia;var aa="SelectPopperPosition",Ft=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=re,...i}=e,a=St(n);return s.jsx(mo,{...a,...i,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...i.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)"}})});Ft.displayName=aa;var[ca,sn]=He(Ee,{}),Ht="SelectViewport",$o=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,i=Se(Ht,n),a=sn(Ht,n),c=X(t,i.onViewportChange),l=f.useRef(0);return s.jsxs(s.Fragment,{children:[s.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:o}),s.jsx(bt.Slot,{scope:n,children:s.jsx(B.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,d=>{const u=d.currentTarget,{contentWrapper:h,shouldExpandOnScrollRef:x}=a;if(x?.current&&h){const p=Math.abs(l.current-u.scrollTop);if(p>0){const y=window.innerHeight-re*2,m=parseFloat(h.style.minHeight),v=parseFloat(h.style.height),w=Math.max(m,v);if(w<y){const g=w+p,b=Math.min(y,g),C=g-b;h.style.height=b+"px",h.style.bottom==="0px"&&(u.scrollTop=C>0?C:0,h.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});$o.displayName=Ht;var Fo="SelectGroup",[la,da]=He(Fo),ua=f.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ze();return s.jsx(la,{scope:n,id:r,children:s.jsx(B.div,{role:"group","aria-labelledby":r,...o,ref:t})})});ua.displayName=Fo;var Ho="SelectLabel",fa=f.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=da(Ho,n);return s.jsx(B.div,{id:r.id,...o,ref:t})});fa.displayName=Ho;var ut="SelectItem",[ha,Bo]=He(ut),Vo=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:i,...a}=e,c=Ce(ut,n),l=Se(ut,n),d=c.value===o,[u,h]=f.useState(i??""),[x,p]=f.useState(!1),y=X(t,g=>l.itemRefCallback?.(g,o,r)),m=Ze(),v=f.useRef("touch"),w=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")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 s.jsx(ha,{scope:n,value:o,disabled:r,textId:m,isSelected:d,onItemTextChange:f.useCallback(g=>{h(b=>b||(g?.textContent??"").trim())},[]),children:s.jsx(bt.ItemSlot,{scope:n,value:o,disabled:r,textValue:u,children:s.jsx(B.div,{role:"option","aria-labelledby":m,"data-highlighted":x?"":void 0,"aria-selected":d&&x,"data-state":d?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:y,onFocus:I(a.onFocus,()=>p(!0)),onBlur:I(a.onBlur,()=>p(!1)),onClick:I(a.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:I(a.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:I(a.onPointerDown,g=>{v.current=g.pointerType}),onPointerMove:I(a.onPointerMove,g=>{v.current=g.pointerType,r?l.onItemLeave?.():v.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(a.onPointerLeave,g=>{g.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:I(a.onKeyDown,g=>{l.searchRef?.current!==""&&g.key===" "||(Ki.includes(g.key)&&w(),g.key===" "&&g.preventDefault())})})})})});Vo.displayName=ut;var Ye="SelectItemText",Yo=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...i}=e,a=Ce(Ye,n),c=Se(Ye,n),l=Bo(Ye,n),d=ta(Ye,n),[u,h]=f.useState(null),x=X(t,w=>h(w),l.onItemTextChange,w=>c.itemTextRefCallback?.(w,l.value,l.disabled)),p=u?.textContent,y=f.useMemo(()=>s.jsx("option",{value:l.value,disabled:l.disabled,children:p},l.value),[l.disabled,l.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:v}=d;return oe(()=>(m(y),()=>v(y)),[m,v,y]),s.jsxs(s.Fragment,{children:[s.jsx(B.span,{id:l.textId,...i,ref:x}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?qt.createPortal(i.children,a.valueNode):null]})});Yo.displayName=Ye;var zo="SelectItemIndicator",qo=f.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return Bo(zo,n).isSelected?s.jsx(B.span,{"aria-hidden":!0,...o,ref:t}):null});qo.displayName=zo;var Bt="SelectScrollUpButton",Xo=f.forwardRef((e,t)=>{const n=Se(Bt,e.__scopeSelect),o=sn(Bt,e.__scopeSelect),[r,i]=f.useState(!1),a=X(t,o.onScrollButtonChange);return oe(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollTop>0;i(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?s.jsx(Go,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});Xo.displayName=Bt;var Vt="SelectScrollDownButton",Uo=f.forwardRef((e,t)=>{const n=Se(Vt,e.__scopeSelect),o=sn(Vt,e.__scopeSelect),[r,i]=f.useState(!1),a=X(t,o.onScrollButtonChange);return oe(()=>{if(n.viewport&&n.isPositioned){let c=function(){const d=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<d;i(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?s.jsx(Go,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Uo.displayName=Vt;var Go=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,i=Se("SelectScrollButton",n),a=f.useRef(null),c=Ct(n),l=f.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),oe(()=>{c().find(u=>u.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),s.jsx(B.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{i.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{l()})})}),ma="SelectSeparator",pa=f.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return s.jsx(B.div,{"aria-hidden":!0,...o,ref:t})});pa.displayName=ma;var Yt="SelectArrow",ga=f.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=St(n),i=Ce(Yt,n),a=Se(Yt,n);return i.open&&a.position==="popper"?s.jsx(po,{...r,...o,ref:t}):null});ga.displayName=Yt;var xa="SelectBubbleInput",Qo=f.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=f.useRef(null),i=X(o,r),a=No(t);return f.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const h=new Event("change",{bubbles:!0});u.call(c,t),c.dispatchEvent(h)}},[a,t]),s.jsx(B.select,{...n,style:{...go,...n.style},ref:i,defaultValue:t})});Qo.displayName=xa;function Ko(e){return e===""||e===void 0}function Jo(e){const t=Wn(e),n=f.useRef(""),o=f.useRef(0),r=f.useCallback(a=>{const c=n.current+a;t(c),(function l(d){n.current=d,window.clearTimeout(o.current),d!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),i=f.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,i]}function Zo(e,t,n){const r=t.length>1&&Array.from(t).every(d=>d===t[0])?t[0]:t,i=n?e.indexOf(n):-1;let a=ya(e,Math.max(i,0));r.length===1&&(a=a.filter(d=>d!==n));const l=a.find(d=>d.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function ya(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var va=ko,wa=Ro,ba=_o,Ca=Oo,Sa=Ao,Pa=Do,ja=$o,Ta=Vo,Na=Yo,ka=qo,Ma=Xo,Ra=Uo;function ze({...e}){return s.jsx(va,{...e})}function qe({...e}){return s.jsx(ba,{...e})}function Xe({className:e,children:t,...n}){return s.jsxs(wa,{className:U("flex h-10 w-full items-center justify-between rounded-md border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,s.jsx(Ca,{asChild:!0,children:s.jsx(Xt,{className:"h-4 w-4 opacity-50"})})]})}function Ea({className:e,...t}){return s.jsx(Ma,{className:U("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(zr,{className:"h-4 w-4"})})}function _a({className:e,...t}){return s.jsx(Ra,{className:U("flex cursor-default items-center justify-center py-1",e),...t,children:s.jsx(Xt,{className:"h-4 w-4"})})}function Ue({className:e,children:t,position:n="popper",...o}){return s.jsx(Sa,{children:s.jsxs(Pa,{className:U("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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 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",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...o,children:[s.jsx(Ea,{}),s.jsx(ja,{className:U("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),s.jsx(_a,{})]})})}function Z({className:e,children:t,...n}){return s.jsxs(Ta,{className:U("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[s.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:s.jsx(ka,{children:s.jsx(Bn,{className:"h-4 w-4"})})}),s.jsx(Na,{children:t})]})}const an={},Oa=Symbol((an?"production":void 0)!=="production"?"RESET":""),er=e=>typeof e?.then=="function";function Aa(e=()=>{try{return window.localStorage}catch(n){(an?"production":void 0)!=="production"&&typeof window<"u"&&console.warn(n);return}},t){var n;let o,r;const i={getItem:(l,d)=>{var u,h;const x=y=>{if(y=y||"",o!==y){try{r=JSON.parse(y,t?.reviver)}catch{return d}o=y}return r},p=(h=(u=e())==null?void 0:u.getItem(l))!=null?h:null;return er(p)?p.then(x):x(p)},setItem:(l,d)=>{var u;return(u=e())==null?void 0:u.setItem(l,JSON.stringify(d,void 0))},removeItem:l=>{var d;return(d=e())==null?void 0:d.removeItem(l)}},a=l=>(d,u,h)=>l(d,x=>{let p;try{p=JSON.parse(x||"")}catch{p=h}u(p)});let c;try{c=(n=e())==null?void 0:n.subscribe}catch{}return!c&&typeof window<"u"&&typeof window.addEventListener=="function"&&window.Storage&&(c=(l,d)=>{if(!(e()instanceof window.Storage))return()=>{};const u=h=>{h.storageArea===e()&&h.key===l&&d(h.newValue)};return window.addEventListener("storage",u),()=>{window.removeEventListener("storage",u)}}),c&&(i.subscribe=a(c)),i}const Da=Aa();function Ia(e,t,n=Da,o){const r=Ot(t);return(an?"production":void 0)!=="production"&&(r.debugPrivate=!0),r.onMount=a=>{a(n.getItem(e,t));let c;return n.subscribe&&(c=n.subscribe(e,a,t)),c},Ot(a=>a(r),(a,c,l)=>{const d=typeof l=="function"?l(a(r)):l;return d===Oa?(c(r,t),n.removeItem(e)):er(d)?d.then(u=>(c(r,u),n.setItem(e,u))):(c(r,d),n.setItem(e,d))})}const Wa={soundType:"none"},tr=Ia("claude-code-viewer-notification-settings",Wa),bd=Ot(e=>e(tr).soundType!=="none"),La={beep:{frequency:[800],duration:.15,type:"sine",volume:.3},chime:{frequency:[523,659,784],duration:.4,type:"sine",volume:.2},ping:{frequency:[1e3],duration:.1,type:"triangle",volume:.4},pop:{frequency:[400,600],duration:.08,type:"square",volume:.2}};function $a(e){if(e!=="none")try{const t=La[e];if(!t){console.warn(`Unknown sound type: ${e}`);return}const n=new(window.AudioContext||window.webkitAudioContext);t.frequency.forEach((o,r)=>{const i=n.createOscillator(),a=n.createGain();i.connect(a),a.connect(n.destination),i.frequency.setValueAtTime(o,n.currentTime),i.type=t.type;const c=n.currentTime+r*.05;a.gain.setValueAtTime(t.volume,c),a.gain.exponentialRampToValueAtTime(.01,c+t.duration),i.start(c),i.stop(c+t.duration)})}catch(t){console.warn("Failed to play notification sound:",t)}}function Fa(e){return{none:s.jsx(j,{id:"notification.none"}),beep:s.jsx(j,{id:"notification.beep"}),chime:s.jsx(j,{id:"notification.chime"}),ping:s.jsx(j,{id:"notification.ping"}),pop:s.jsx(j,{id:"notification.pop"})}[e]}function Ha(){return["none","beep","chime","ping","pop"]}const Ba=({showLabels:e=!0,showDescriptions:t=!0,className:n=""})=>{const o=f.useId(),[r,i]=Tr(tr),a=f.useCallback(d=>{i(u=>({...u,soundType:d}))},[i]),c=f.useCallback(()=>{r.soundType!=="none"&&$a(r.soundType)},[r.soundType]),l=Ha();return s.jsx("div",{className:`space-y-4 ${n}`,children:s.jsxs("div",{className:"space-y-2",children:[e&&s.jsx("label",{htmlFor:o,className:"text-sm font-medium leading-none",children:"Task completion sound"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(ze,{value:r.soundType,onValueChange:a,children:[s.jsx(Xe,{id:o,className:"w-[180px]",children:s.jsx(qe,{placeholder:"音を選択"})}),s.jsx(Ue,{children:l.map(d=>s.jsx(Z,{value:d,children:Fa(d)},d))})]}),r.soundType!=="none"&&s.jsx(Nr,{variant:"outline",size:"sm",onClick:c,className:"px-3",children:s.jsx(j,{id:"notification.test"})})]}),t&&s.jsx("p",{className:"text-xs text-muted-foreground",children:s.jsx(j,{id:"notification.description"})})]})})};var Pt="Checkbox",[Va]=Le(Pt),[Ya,cn]=Va(Pt);function za(e){const{__scopeCheckbox:t,checked:n,children:o,defaultChecked:r,disabled:i,form:a,name:c,onCheckedChange:l,required:d,value:u="on",internal_do_not_use_render:h}=e,[x,p]=Ge({prop:n,defaultProp:r??!1,onChange:l,caller:Pt}),[y,m]=f.useState(null),[v,w]=f.useState(null),g=f.useRef(!1),b=y?!!a||!!y.closest("form"):!0,C={checked:x,disabled:i,setChecked:p,control:y,setControl:m,name:c,form:a,value:u,hasConsumerStoppedPropagationRef:g,required:d,defaultChecked:ye(r)?!1:r,isFormControl:b,bubbleInput:v,setBubbleInput:w};return s.jsx(Ya,{scope:t,...C,children:qa(h)?h(C):o})}var nr="CheckboxTrigger",or=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...o},r)=>{const{control:i,value:a,disabled:c,checked:l,required:d,setControl:u,setChecked:h,hasConsumerStoppedPropagationRef:x,isFormControl:p,bubbleInput:y}=cn(nr,e),m=X(r,u),v=f.useRef(l);return f.useEffect(()=>{const w=i?.form;if(w){const g=()=>h(v.current);return w.addEventListener("reset",g),()=>w.removeEventListener("reset",g)}},[i,h]),s.jsx(B.button,{type:"button",role:"checkbox","aria-checked":ye(l)?"mixed":l,"aria-required":d,"data-state":lr(l),"data-disabled":c?"":void 0,disabled:c,value:a,...o,ref:m,onKeyDown:I(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:I(n,w=>{h(g=>ye(g)?!0:!g),y&&p&&(x.current=w.isPropagationStopped(),x.current||w.stopPropagation())})})});or.displayName=nr;var rr=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:o,checked:r,defaultChecked:i,required:a,disabled:c,value:l,onCheckedChange:d,form:u,...h}=e;return s.jsx(za,{__scopeCheckbox:n,checked:r,defaultChecked:i,disabled:c,required:a,onCheckedChange:d,name:o,form:u,value:l,internal_do_not_use_render:({isFormControl:x})=>s.jsxs(s.Fragment,{children:[s.jsx(or,{...h,ref:t,__scopeCheckbox:n}),x&&s.jsx(cr,{__scopeCheckbox:n})]})})});rr.displayName=Pt;var sr="CheckboxIndicator",ir=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:o,...r}=e,i=cn(sr,n);return s.jsx(ht,{present:o||ye(i.checked)||i.checked===!0,children:s.jsx(B.span,{"data-state":lr(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t,style:{pointerEvents:"none",...e.style}})})});ir.displayName=sr;var ar="CheckboxBubbleInput",cr=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:o,hasConsumerStoppedPropagationRef:r,checked:i,defaultChecked:a,required:c,disabled:l,name:d,value:u,form:h,bubbleInput:x,setBubbleInput:p}=cn(ar,e),y=X(n,p),m=No(i),v=to(o);f.useEffect(()=>{const g=x;if(!g)return;const b=window.HTMLInputElement.prototype,S=Object.getOwnPropertyDescriptor(b,"checked").set,k=!r.current;if(m!==i&&S){const P=new Event("click",{bubbles:k});g.indeterminate=ye(i),S.call(g,ye(i)?!1:i),g.dispatchEvent(P)}},[x,m,i,r]);const w=f.useRef(ye(i)?!1:i);return s.jsx(B.input,{type:"checkbox","aria-hidden":!0,defaultChecked:a??w.current,required:c,disabled:l,name:d,value:u,form:h,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});cr.displayName=ar;function qa(e){return typeof e=="function"}function ye(e){return e==="indeterminate"}function lr(e){return ye(e)?"indeterminate":e?"checked":"unchecked"}function Nn({className:e,...t}){return s.jsx(rr,{"data-slot":"checkbox",className:U("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:s.jsx(ir,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-current transition-none",children:s.jsx(Bn,{className:"size-3.5"})})})}const dr=()=>{const{data:e}=At({queryKey:hn.queryKey,queryFn:hn.queryFn}),t=f.useMemo(()=>new Set(e.flags.filter(o=>o.enabled).map(o=>o.name)),[e.flags]),n=f.useCallback(o=>t.has(o),[t]);return{flags:e.flags,isFlagEnabled:n}},Xa="en",Ua=e=>{},Ga=({openingProjectId:e,showLabels:t=!0,showDescriptions:n=!0,className:o=""})=>{const r=f.useId(),i=f.useId(),a=f.useId(),c=f.useId(),l=f.useId(),{config:d,updateConfig:u}=kr(),h=Mr(),{theme:x}=Rr(),{i18n:p}=Er(),{isFlagEnabled:y}=dr(),m=y("tool-approval"),v=f.useMemo(()=>Ua()??Xa,[]),w=async()=>{const P={...d,hideNoUserMessageSession:!d?.hideNoUserMessageSession};u(P,{onSuccess:async()=>{await h.refetchQueries({queryKey:_r.queryKey})}})},g=async()=>{const P={...d,unifySameTitleSession:!d?.unifySameTitleSession};u(P,{onSuccess:async()=>{await h.refetchQueries({queryKey:Or(e).queryKey})}})},b=async P=>{const M={...d,enterKeyBehavior:P};u(M)},C=async P=>{const M={...d,permissionMode:P};u(M)},S=async P=>{const M={...d,locale:P};u(M)},k=async P=>{const M={...d,theme:P};u(M)};return s.jsxs("div",{className:`space-y-4 ${o}`,children:[s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Nn,{id:r,checked:d?.hideNoUserMessageSession,onCheckedChange:w}),t&&s.jsx("label",{htmlFor:r,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.jsx(j,{id:"settings.session.hide_no_user_message"})})]}),n&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1 ml-6",children:s.jsx(j,{id:"settings.session.hide_no_user_message.description"})}),s.jsxs("div",{className:"flex items-center space-x-2",children:[s.jsx(Nn,{id:`${r}-unify`,checked:d?.unifySameTitleSession,onCheckedChange:g}),t&&s.jsx("label",{htmlFor:`${r}-unify`,className:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:s.jsx(j,{id:"settings.session.unify_same_title"})})]}),n&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1 ml-6",children:s.jsx(j,{id:"settings.session.unify_same_title.description"})}),s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("label",{htmlFor:i,className:"text-sm font-medium leading-none",children:s.jsx(j,{id:"settings.input.enter_key_behavior"})}),s.jsxs(ze,{value:d?.enterKeyBehavior||"shift-enter-send",onValueChange:b,children:[s.jsx(Xe,{id:i,className:"w-full",children:s.jsx(qe,{placeholder:p._("Select enter key behavior")})}),s.jsxs(Ue,{children:[s.jsx(Z,{value:"shift-enter-send",children:s.jsx(j,{id:"settings.input.enter_key_behavior.shift_enter"})}),s.jsx(Z,{value:"enter-send",children:s.jsx(j,{id:"settings.input.enter_key_behavior.enter"})}),s.jsx(Z,{value:"command-enter-send",children:s.jsx(j,{id:"settings.input.enter_key_behavior.command_enter"})})]})]}),n&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.jsx(j,{id:"settings.input.enter_key_behavior.description"})})]}),s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("label",{htmlFor:a,className:"text-sm font-medium leading-none",children:s.jsx(j,{id:"settings.permission.mode"})}),s.jsxs(ze,{value:d?.permissionMode||"default",onValueChange:C,disabled:!m,children:[s.jsx(Xe,{id:a,className:"w-full",children:s.jsx(qe,{placeholder:p._("Select permission mode")})}),s.jsxs(Ue,{children:[s.jsx(Z,{value:"default",children:s.jsx(j,{id:"settings.permission.mode.default"})}),s.jsx(Z,{value:"acceptEdits",children:s.jsx(j,{id:"settings.permission.mode.accept_edits"})}),s.jsx(Z,{value:"bypassPermissions",children:s.jsx(j,{id:"settings.permission.mode.bypass_permissions"})}),s.jsx(Z,{value:"plan",children:s.jsx(j,{id:"settings.permission.mode.plan"})})]})]}),n&&m&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.jsx(j,{id:"settings.permission.mode.description"})}),n&&!m&&s.jsx("p",{className:"text-xs text-destructive mt-1",children:s.jsx(j,{id:"settings.permission.mode.unavailable"})})]}),s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("label",{htmlFor:c,className:"text-sm font-medium leading-none",children:s.jsx(j,{id:"settings.locale"})}),s.jsxs(ze,{value:d?.locale||v,onValueChange:S,children:[s.jsx(Xe,{id:c,className:"w-full",children:s.jsx(qe,{placeholder:p._("Select language")})}),s.jsxs(Ue,{children:[s.jsx(Z,{value:"ja",children:s.jsx(j,{id:"settings.locale.ja"})}),s.jsx(Z,{value:"en",children:s.jsx(j,{id:"settings.locale.en"})}),s.jsx(Z,{value:"zh_CN",children:s.jsx(j,{id:"settings.locale.zh_CN"})})]})]}),n&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.jsx(j,{id:"settings.locale.description"})})]}),s.jsxs("div",{className:"space-y-2",children:[t&&s.jsx("label",{htmlFor:l,className:"text-sm font-medium leading-none",children:s.jsx(j,{id:"settings.theme"})}),s.jsxs(ze,{value:x??"system",onValueChange:k,children:[s.jsx(Xe,{id:l,className:"w-full",children:s.jsx(qe,{placeholder:p._("Select theme")})}),s.jsxs(Ue,{children:[s.jsx(Z,{value:"light",children:s.jsx(j,{id:"settings.theme.light"})}),s.jsx(Z,{value:"dark",children:s.jsx(j,{id:"settings.theme.dark"})}),s.jsx(Z,{value:"system",children:s.jsx(j,{id:"settings.theme.system"})})]})]}),n&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:s.jsx(j,{id:"settings.theme.description"})})]})]})},Qa=Dr("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function kn({className:e,variant:t,asChild:n=!1,...o}){const r=n?Ar:"span";return s.jsx(r,{"data-slot":"badge",className:U(Qa({variant:t}),e),...o})}var jt="Collapsible",[Ka]=Le(jt),[Ja,ln]=Ka(jt),ur=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:i,onOpenChange:a,...c}=e,[l,d]=Ge({prop:o,defaultProp:r??!1,onChange:a,caller:jt});return s.jsx(Ja,{scope:n,disabled:i,contentId:Ze(),open:l,onOpenToggle:f.useCallback(()=>d(u=>!u),[d]),children:s.jsx(B.div,{"data-state":un(l),"data-disabled":i?"":void 0,...c,ref:t})})});ur.displayName=jt;var fr="CollapsibleTrigger",hr=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ln(fr,n);return s.jsx(B.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":un(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:I(e.onClick,r.onOpenToggle)})});hr.displayName=fr;var dn="CollapsibleContent",mr=f.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ln(dn,e.__scopeCollapsible);return s.jsx(ht,{present:n||r.open,children:({present:i})=>s.jsx(Za,{...o,ref:t,present:i})})});mr.displayName=dn;var Za=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...i}=e,a=ln(dn,n),[c,l]=f.useState(o),d=f.useRef(null),u=X(t,d),h=f.useRef(0),x=h.current,p=f.useRef(0),y=p.current,m=a.open||c,v=f.useRef(m),w=f.useRef(void 0);return f.useEffect(()=>{const g=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(g)},[]),oe(()=>{const g=d.current;if(g){w.current=w.current||{transitionDuration:g.style.transitionDuration,animationName:g.style.animationName},g.style.transitionDuration="0s",g.style.animationName="none";const b=g.getBoundingClientRect();h.current=b.height,p.current=b.width,v.current||(g.style.transitionDuration=w.current.transitionDuration,g.style.animationName=w.current.animationName),l(o)}},[a.open,o]),s.jsx(B.div,{"data-state":un(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!m,...i,ref:u,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:m&&r})});function un(e){return e?"open":"closed"}var ec=ur;function tc({...e}){return s.jsx(ec,{"data-slot":"collapsible",...e})}function nc({...e}){return s.jsx(hr,{"data-slot":"collapsible-trigger",...e})}function oc({...e}){return s.jsx(mr,{"data-slot":"collapsible-content",...e})}const rc=e=>{switch(e){case"tool-approval":return{title:s.jsx(j,{id:"system_info.feature.tool_approval.title"}),description:s.jsx(j,{id:"system_info.feature.tool_approval.description"})};case"agent-sdk":return{title:s.jsx(j,{id:"system_info.feature.agent_sdk.title"}),description:s.jsx(j,{id:"system_info.feature.agent_sdk.description"})};default:return{title:e,description:s.jsx(j,{id:"system_info.feature.unknown.description"})}}},sc=()=>{const[e,t]=f.useState(!1),{data:n}=At({...Ir}),{data:o}=At({...Wr}),{flags:r}=dr();return s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-sidebar-border p-4",children:[s.jsx("h2",{className:"font-semibold text-lg",children:s.jsx(j,{id:"system_info.title"})}),s.jsx("p",{className:"text-xs text-sidebar-foreground/70",children:s.jsx(j,{id:"system_info.description"})})]}),s.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"font-medium text-sm text-sidebar-foreground",children:s.jsx(j,{id:"system_info.viewer_version"})}),s.jsxs("div",{className:"flex justify-between items-center pl-2",children:[s.jsx("span",{className:"text-xs text-sidebar-foreground/70",children:s.jsx(j,{id:"system_info.version_label"})}),s.jsxs(kn,{variant:"secondary",className:"text-xs font-mono",children:["v",n?.version||"Unknown"]})]})]}),s.jsxs("div",{className:"space-y-3",children:[s.jsx("h3",{className:"font-medium text-sm text-sidebar-foreground",children:s.jsx(j,{id:"system_info.claude_code"})}),s.jsxs("div",{className:"space-y-2 pl-2",children:[s.jsxs("div",{className:"space-y-1",children:[s.jsx("div",{className:"text-xs text-sidebar-foreground/70",children:s.jsx(j,{id:"system_info.executable_path"})}),s.jsx("div",{className:"text-xs text-sidebar-foreground font-mono break-all",children:o?.executablePath||s.jsx("span",{className:"text-sidebar-foreground/50",children:s.jsx(j,{id:"system_info.unknown"})})})]}),s.jsxs("div",{className:"flex justify-between items-center pt-1",children:[s.jsx("span",{className:"text-xs text-sidebar-foreground/70",children:s.jsx(j,{id:"system_info.version_label"})}),s.jsx(kn,{variant:"secondary",className:"text-xs font-mono",children:o?.version||s.jsx(j,{id:"system_info.unknown"})})]})]})]}),s.jsx("div",{className:"space-y-3",children:s.jsxs(tc,{open:e,onOpenChange:t,children:[s.jsxs(nc,{className:"flex w-full items-center justify-between group",children:[s.jsx("h3",{className:"font-medium text-sm text-sidebar-foreground",children:s.jsx(j,{id:"system_info.available_features"})}),e?s.jsx(Xt,{className:"h-4 w-4 text-sidebar-foreground/70 group-hover:text-sidebar-foreground transition-colors"}):s.jsx(Vr,{className:"h-4 w-4 text-sidebar-foreground/70 group-hover:text-sidebar-foreground transition-colors"})]}),s.jsx(oc,{className:"pt-3",children:s.jsx(rn,{children:s.jsx("ul",{className:"space-y-2 pl-2",children:r.map(({name:i,enabled:a})=>{const c=rc(i);return s.jsxs("li",{className:"flex items-start gap-2",children:[a?s.jsx(Xr,{className:"h-3.5 w-3.5 text-green-500 dark:text-green-400 mt-0.5 flex-shrink-0"}):s.jsx(Gr,{className:"h-3.5 w-3.5 text-sidebar-foreground/30 mt-0.5 flex-shrink-0"}),s.jsxs(rt,{children:[s.jsx(st,{asChild:!0,children:s.jsx("span",{className:a?"text-xs text-sidebar-foreground cursor-help":"text-xs text-sidebar-foreground/50 line-through cursor-help",children:c.title})}),s.jsx(it,{side:"right",className:"max-w-xs text-xs",children:c.description})]})]},i)})})})})]})})]})]})},Cd=({projectId:e,className:t,additionalTabs:n=[],defaultActiveTab:o,headerButton:r})=>{const{openSearch:i}=Lr(),{authEnabled:a,logout:c}=Fn(),l=Hn(),d=async()=>{await c(),l({to:"/login"})},u={id:"settings",icon:os,title:s.jsx(j,{id:"settings.tab.title"}),content:s.jsxs("div",{className:"h-full flex flex-col",children:[s.jsxs("div",{className:"border-b border-sidebar-border p-4",children:[s.jsx("h2",{className:"font-semibold text-lg",children:s.jsx(j,{id:"settings.title"})}),s.jsx("p",{className:"text-xs text-sidebar-foreground/70",children:s.jsx(j,{id:"settings.description"})})]}),s.jsx(f.Suspense,{fallback:s.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:s.jsx("div",{className:"text-sm text-sidebar-foreground/70",children:s.jsx(j,{id:"settings.loading"})})}),children:s.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-6",children:[s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"font-medium text-sm text-sidebar-foreground",children:s.jsx(j,{id:"settings.section.session_display"})}),s.jsx(Ga,{openingProjectId:e??""})]}),s.jsxs("div",{className:"space-y-4",children:[s.jsx("h3",{className:"font-medium text-sm text-sidebar-foreground",children:s.jsx(j,{id:"settings.section.notifications"})}),s.jsx(Ba,{})]})]})})]})},h={id:"system-info",icon:Jr,title:s.jsx(j,{id:"settings.section.system_info"}),content:s.jsx(f.Suspense,{fallback:s.jsx(jn,{}),children:s.jsx(sc,{})})},x=[...n,u,h],[p,y]=f.useState(o??x[x.length-1]?.id??"settings"),[m,v]=f.useState(!!o),w=b=>{p===b&&m?v(!1):(y(b),v(!0))},g=x.find(b=>b.id===p)?.content;return s.jsxs("div",{className:U("h-full border-r border-sidebar-border transition-all duration-300 ease-in-out flex bg-sidebar text-sidebar-foreground",m?"w-80 lg:w-80":"w-12",t),children:[s.jsx("div",{className:"w-12 flex flex-col border-r border-sidebar-border bg-sidebar/50",children:s.jsxs(rn,{children:[r&&s.jsx("div",{className:"border-b border-sidebar-border",children:r}),s.jsx("div",{className:"p-2 border-b border-sidebar-border",children:s.jsxs(rt,{children:[s.jsx(st,{asChild:!0,children:s.jsx("button",{type:"button",onClick:i,className:U("w-8 h-8 flex items-center justify-center rounded-md transition-colors","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground","text-sidebar-foreground/70"),"data-testid":"search-button",children:s.jsx($r,{className:"w-4 h-4"})})}),s.jsx(it,{side:"right",children:s.jsxs("p",{children:["Search ",s.jsx("kbd",{className:"ml-1 text-xs opacity-60",children:"⌘K"})]})})]})}),s.jsx("div",{className:"flex-1 flex flex-col p-2 space-y-1",children:x.map(b=>{const C=b.icon;return s.jsxs(rt,{children:[s.jsx(st,{asChild:!0,children:s.jsx("button",{type:"button",onClick:()=>w(b.id),className:U("w-8 h-8 flex items-center justify-center rounded-md transition-colors","hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",p===b.id&&m?"bg-sidebar-accent text-sidebar-accent-foreground shadow-sm":"text-sidebar-foreground/70"),"data-testid":`${b.id}-tab-button`,children:s.jsx(C,{className:"w-4 h-4"})})}),s.jsx(it,{side:"right",children:s.jsx("p",{children:b.title})})]},b.id)})}),a&&s.jsx("div",{className:"p-2 border-t border-sidebar-border",children:s.jsxs(rt,{children:[s.jsx(st,{asChild:!0,children:s.jsx("button",{type:"button",onClick:d,className:U("w-8 h-8 flex items-center justify-center rounded-md transition-colors","hover:bg-destructive/10 hover:text-destructive","text-sidebar-foreground/70"),"data-testid":"logout-button",children:s.jsx(es,{className:"w-4 h-4"})})}),s.jsx(it,{side:"right",children:s.jsx("p",{children:"Logout"})})]})})]})}),m&&s.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:s.jsx(f.Suspense,{fallback:s.jsx(jn,{}),children:g})})]})},pr=6048e5,ic=864e5,Mn=Symbol.for("constructDateFrom");function be(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Mn in e?e[Mn](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return be(t||e,e)}let ac={};function Tt(){return ac}function _e(e,t){const n=Tt(),o=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,r=ce(e,t?.in),i=r.getDay(),a=(i<o?7:0)+i-o;return r.setDate(r.getDate()-a),r.setHours(0,0,0,0),r}function ft(e,t){return _e(e,{...t,weekStartsOn:1})}function gr(e,t){const n=ce(e,t?.in),o=n.getFullYear(),r=be(n,0);r.setFullYear(o+1,0,4),r.setHours(0,0,0,0);const i=ft(r),a=be(n,0);a.setFullYear(o,0,4),a.setHours(0,0,0,0);const c=ft(a);return n.getTime()>=i.getTime()?o+1:n.getTime()>=c.getTime()?o:o-1}function Rn(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function xr(e,...t){const n=be.bind(null,e||t.find(o=>typeof o=="object"));return t.map(n)}function En(e,t){const n=ce(e,t?.in);return n.setHours(0,0,0,0),n}function cc(e,t,n){const[o,r]=xr(n?.in,e,t),i=En(o),a=En(r),c=+i-Rn(i),l=+a-Rn(a);return Math.round((c-l)/ic)}function lc(e,t){const n=gr(e,t),o=be(e,0);return o.setFullYear(n,0,4),o.setHours(0,0,0,0),ft(o)}function dc(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uc(e){return!(!dc(e)&&typeof e!="number"||isNaN(+ce(e)))}function fc(e,t){const n=ce(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const hc={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mc=(e,t,n)=>{let o;const r=hc[e];return typeof r=="string"?o=r:t===1?o=r.one:o=r.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+o:o+" ago":o};function he(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const pc={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},gc={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},xc={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yc={date:he({formats:pc,defaultWidth:"full"}),time:he({formats:gc,defaultWidth:"full"}),dateTime:he({formats:xc,defaultWidth:"full"})},vc={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},wc=(e,t,n,o)=>vc[e];function Q(e){return(t,n)=>{const o=n?.context?String(n.context):"standalone";let r;if(o==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,c=n?.width?String(n.width):a;r=e.formattingValues[c]||e.formattingValues[a]}else{const a=e.defaultWidth,c=n?.width?String(n.width):e.defaultWidth;r=e.values[c]||e.values[a]}const i=e.argumentCallback?e.argumentCallback(t):t;return r[i]}}const bc={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Cc={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sc={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Pc={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Tc={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Nc=(e,t)=>{const n=Number(e),o=n%100;if(o>20||o<10)switch(o%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kc={ordinalNumber:Nc,era:Q({values:bc,defaultWidth:"wide"}),quarter:Q({values:Cc,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Q({values:Sc,defaultWidth:"wide"}),day:Q({values:Pc,defaultWidth:"wide"}),dayPeriod:Q({values:jc,defaultWidth:"wide",formattingValues:Tc,defaultFormattingWidth:"wide"})};function K(e){return(t,n={})=>{const o=n.width,r=o&&e.matchPatterns[o]||e.matchPatterns[e.defaultMatchWidth],i=t.match(r);if(!i)return null;const a=i[0],c=o&&e.parsePatterns[o]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(c)?Rc(c,h=>h.test(a)):Mc(c,h=>h.test(a));let d;d=e.valueCallback?e.valueCallback(l):l,d=n.valueCallback?n.valueCallback(d):d;const u=t.slice(a.length);return{value:d,rest:u}}}function Mc(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Rc(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fn(e){return(t,n={})=>{const o=t.match(e.matchPattern);if(!o)return null;const r=o[0],i=t.match(e.parsePattern);if(!i)return null;let a=e.valueCallback?e.valueCallback(i[0]):i[0];a=n.valueCallback?n.valueCallback(a):a;const c=t.slice(r.length);return{value:a,rest:c}}}const Ec=/^(\d+)(th|st|nd|rd)?/i,_c=/\d+/i,Oc={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ac={any:[/^b/i,/^(a|c)/i]},Dc={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ic={any:[/1/i,/2/i,/3/i,/4/i]},Wc={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Lc={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$c={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Fc={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Hc={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Bc={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Vc={ordinalNumber:fn({matchPattern:Ec,parsePattern:_c,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:Oc,defaultMatchWidth:"wide",parsePatterns:Ac,defaultParseWidth:"any"}),quarter:K({matchPatterns:Dc,defaultMatchWidth:"wide",parsePatterns:Ic,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:Wc,defaultMatchWidth:"wide",parsePatterns:Lc,defaultParseWidth:"any"}),day:K({matchPatterns:$c,defaultMatchWidth:"wide",parsePatterns:Fc,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:Hc,defaultMatchWidth:"any",parsePatterns:Bc,defaultParseWidth:"any"})},zt={code:"en-US",formatDistance:mc,formatLong:yc,formatRelative:wc,localize:kc,match:Vc,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yc(e,t){const n=ce(e,t?.in);return cc(n,fc(n))+1}function zc(e,t){const n=ce(e,t?.in),o=+ft(n)-+lc(n);return Math.round(o/pr)+1}function yr(e,t){const n=ce(e,t?.in),o=n.getFullYear(),r=Tt(),i=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=be(t?.in||e,0);a.setFullYear(o+1,0,i),a.setHours(0,0,0,0);const c=_e(a,t),l=be(t?.in||e,0);l.setFullYear(o,0,i),l.setHours(0,0,0,0);const d=_e(l,t);return+n>=+c?o+1:+n>=+d?o:o-1}function qc(e,t){const n=Tt(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,r=yr(e,t),i=be(t?.in||e,0);return i.setFullYear(r,0,o),i.setHours(0,0,0,0),_e(i,t)}function Xc(e,t){const n=ce(e,t?.in),o=+_e(n,t)-+qc(n,t);return Math.round(o/pr)+1}function O(e,t){const n=e<0?"-":"",o=Math.abs(e).toString().padStart(t,"0");return n+o}const xe={y(e,t){const n=e.getFullYear(),o=n>0?n:1-n;return O(t==="yy"?o%100:o,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):O(n+1,2)},d(e,t){return O(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return O(e.getHours()%12||12,t.length)},H(e,t){return O(e.getHours(),t.length)},m(e,t){return O(e.getMinutes(),t.length)},s(e,t){return O(e.getSeconds(),t.length)},S(e,t){const n=t.length,o=e.getMilliseconds(),r=Math.trunc(o*Math.pow(10,n-3));return O(r,t.length)}},Ae={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_n={G:function(e,t,n){const o=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(o,{width:"abbreviated"});case"GGGGG":return n.era(o,{width:"narrow"});case"GGGG":default:return n.era(o,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const o=e.getFullYear(),r=o>0?o:1-o;return n.ordinalNumber(r,{unit:"year"})}return xe.y(e,t)},Y:function(e,t,n,o){const r=yr(e,o),i=r>0?r:1-r;if(t==="YY"){const a=i%100;return O(a,2)}return t==="Yo"?n.ordinalNumber(i,{unit:"year"}):O(i,t.length)},R:function(e,t){const n=gr(e);return O(n,t.length)},u:function(e,t){const n=e.getFullYear();return O(n,t.length)},Q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(o);case"QQ":return O(o,2);case"Qo":return n.ordinalNumber(o,{unit:"quarter"});case"QQQ":return n.quarter(o,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(o,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(o,{width:"wide",context:"formatting"})}},q:function(e,t,n){const o=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(o);case"qq":return O(o,2);case"qo":return n.ordinalNumber(o,{unit:"quarter"});case"qqq":return n.quarter(o,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(o,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(o,{width:"wide",context:"standalone"})}},M:function(e,t,n){const o=e.getMonth();switch(t){case"M":case"MM":return xe.M(e,t);case"Mo":return n.ordinalNumber(o+1,{unit:"month"});case"MMM":return n.month(o,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(o,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(o,{width:"wide",context:"formatting"})}},L:function(e,t,n){const o=e.getMonth();switch(t){case"L":return String(o+1);case"LL":return O(o+1,2);case"Lo":return n.ordinalNumber(o+1,{unit:"month"});case"LLL":return n.month(o,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(o,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(o,{width:"wide",context:"standalone"})}},w:function(e,t,n,o){const r=Xc(e,o);return t==="wo"?n.ordinalNumber(r,{unit:"week"}):O(r,t.length)},I:function(e,t,n){const o=zc(e);return t==="Io"?n.ordinalNumber(o,{unit:"week"}):O(o,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):xe.d(e,t)},D:function(e,t,n){const o=Yc(e);return t==="Do"?n.ordinalNumber(o,{unit:"dayOfYear"}):O(o,t.length)},E:function(e,t,n){const o=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(o,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(o,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(o,{width:"short",context:"formatting"});case"EEEE":default:return n.day(o,{width:"wide",context:"formatting"})}},e:function(e,t,n,o){const r=e.getDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return O(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});case"eeee":default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(e,t,n,o){const r=e.getDay(),i=(r-o.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return O(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});case"cccc":default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(e,t,n){const o=e.getDay(),r=o===0?7:o;switch(t){case"i":return String(r);case"ii":return O(r,t.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(o,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(o,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(o,{width:"short",context:"formatting"});case"iiii":default:return n.day(o,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const o=e.getHours();let r;switch(o===12?r=Ae.noon:o===0?r=Ae.midnight:r=o/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(e,t,n){const o=e.getHours();let r;switch(o>=17?r=Ae.evening:o>=12?r=Ae.afternoon:o>=4?r=Ae.morning:r=Ae.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let o=e.getHours()%12;return o===0&&(o=12),n.ordinalNumber(o,{unit:"hour"})}return xe.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):xe.H(e,t)},K:function(e,t,n){const o=e.getHours()%12;return t==="Ko"?n.ordinalNumber(o,{unit:"hour"}):O(o,t.length)},k:function(e,t,n){let o=e.getHours();return o===0&&(o=24),t==="ko"?n.ordinalNumber(o,{unit:"hour"}):O(o,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):xe.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):xe.s(e,t)},S:function(e,t){return xe.S(e,t)},X:function(e,t,n){const o=e.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return An(o);case"XXXX":case"XX":return ke(o);case"XXXXX":case"XXX":default:return ke(o,":")}},x:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"x":return An(o);case"xxxx":case"xx":return ke(o);case"xxxxx":case"xxx":default:return ke(o,":")}},O:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+On(o,":");case"OOOO":default:return"GMT"+ke(o,":")}},z:function(e,t,n){const o=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+On(o,":");case"zzzz":default:return"GMT"+ke(o,":")}},t:function(e,t,n){const o=Math.trunc(+e/1e3);return O(o,t.length)},T:function(e,t,n){return O(+e,t.length)}};function On(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),r=Math.trunc(o/60),i=o%60;return i===0?n+String(r):n+String(r)+t+O(i,2)}function An(e,t){return e%60===0?(e>0?"-":"+")+O(Math.abs(e)/60,2):ke(e,t)}function ke(e,t=""){const n=e>0?"-":"+",o=Math.abs(e),r=O(Math.trunc(o/60),2),i=O(o%60,2);return n+r+t+i}const Dn=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},vr=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Uc=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],o=n[1],r=n[2];if(!r)return Dn(e,t);let i;switch(o){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Dn(o,t)).replace("{{time}}",vr(r,t))},Gc={p:vr,P:Uc},Qc=/^D+$/,Kc=/^Y+$/,Jc=["D","DD","YY","YYYY"];function Zc(e){return Qc.test(e)}function el(e){return Kc.test(e)}function tl(e,t,n){const o=nl(e,t,n);if(console.warn(o),Jc.includes(e))throw new RangeError(o)}function nl(e,t,n){const o=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${o} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const ol=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,rl=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,sl=/^'([^]*?)'?$/,il=/''/g,al=/[a-zA-Z]/;function cl(e,t,n){const o=Tt(),r=n?.locale??o.locale??zt,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??o.firstWeekContainsDate??o.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??o.weekStartsOn??o.locale?.options?.weekStartsOn??0,c=ce(e,n?.in);if(!uc(c))throw new RangeError("Invalid time value");let l=t.match(rl).map(u=>{const h=u[0];if(h==="p"||h==="P"){const x=Gc[h];return x(u,r.formatLong)}return u}).join("").match(ol).map(u=>{if(u==="''")return{isToken:!1,value:"'"};const h=u[0];if(h==="'")return{isToken:!1,value:ll(u)};if(_n[h])return{isToken:!0,value:u};if(h.match(al))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:u}});r.localize.preprocessor&&(l=r.localize.preprocessor(c,l));const d={firstWeekContainsDate:i,weekStartsOn:a,locale:r};return l.map(u=>{if(!u.isToken)return u.value;const h=u.value;(!n?.useAdditionalWeekYearTokens&&el(h)||!n?.useAdditionalDayOfYearTokens&&Zc(h))&&tl(h,t,String(e));const x=_n[h[0]];return x(c,h,r.localize,d)}).join("")}function ll(e){const t=e.match(sl);return t?t[1].replace(il,"'"):e}function dl(e,t,n){const[o,r]=xr(n?.in,e,t);return+_e(o,n)==+_e(r,n)}const ul={lessThanXSeconds:{one:"1秒未満",other:"{{count}}秒未満",oneWithSuffix:"約1秒",otherWithSuffix:"約{{count}}秒"},xSeconds:{one:"1秒",other:"{{count}}秒"},halfAMinute:"30秒",lessThanXMinutes:{one:"1分未満",other:"{{count}}分未満",oneWithSuffix:"約1分",otherWithSuffix:"約{{count}}分"},xMinutes:{one:"1分",other:"{{count}}分"},aboutXHours:{one:"約1時間",other:"約{{count}}時間"},xHours:{one:"1時間",other:"{{count}}時間"},xDays:{one:"1日",other:"{{count}}日"},aboutXWeeks:{one:"約1週間",other:"約{{count}}週間"},xWeeks:{one:"1週間",other:"{{count}}週間"},aboutXMonths:{one:"約1か月",other:"約{{count}}か月"},xMonths:{one:"1か月",other:"{{count}}か月"},aboutXYears:{one:"約1年",other:"約{{count}}年"},xYears:{one:"1年",other:"{{count}}年"},overXYears:{one:"1年以上",other:"{{count}}年以上"},almostXYears:{one:"1年近く",other:"{{count}}年近く"}},fl=(e,t,n)=>{n=n||{};let o;const r=ul[e];return typeof r=="string"?o=r:t===1?n.addSuffix&&r.oneWithSuffix?o=r.oneWithSuffix:o=r.one:n.addSuffix&&r.otherWithSuffix?o=r.otherWithSuffix.replace("{{count}}",String(t)):o=r.other.replace("{{count}}",String(t)),n.addSuffix?n.comparison&&n.comparison>0?o+"後":o+"前":o},hl={full:"y年M月d日EEEE",long:"y年M月d日",medium:"y/MM/dd",short:"y/MM/dd"},ml={full:"H時mm分ss秒 zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},pl={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},gl={date:he({formats:hl,defaultWidth:"full"}),time:he({formats:ml,defaultWidth:"full"}),dateTime:he({formats:pl,defaultWidth:"full"})},xl={lastWeek:"先週のeeeeのp",yesterday:"昨日のp",today:"今日のp",tomorrow:"明日のp",nextWeek:"翌週のeeeeのp",other:"P"},yl=(e,t,n,o)=>xl[e],vl={narrow:["BC","AC"],abbreviated:["紀元前","西暦"],wide:["紀元前","西暦"]},wl={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["第1四半期","第2四半期","第3四半期","第4四半期"]},bl={narrow:["1","2","3","4","5","6","7","8","9","10","11","12"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"]},Cl={narrow:["日","月","火","水","木","金","土"],short:["日","月","火","水","木","金","土"],abbreviated:["日","月","火","水","木","金","土"],wide:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"]},Sl={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},Pl={narrow:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},abbreviated:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"},wide:{am:"午前",pm:"午後",midnight:"深夜",noon:"正午",morning:"朝",afternoon:"午後",evening:"夜",night:"深夜"}},jl=(e,t)=>{const n=Number(e);switch(String(t?.unit)){case"year":return`${n}年`;case"quarter":return`第${n}四半期`;case"month":return`${n}月`;case"week":return`第${n}週`;case"date":return`${n}日`;case"hour":return`${n}時`;case"minute":return`${n}分`;case"second":return`${n}秒`;default:return`${n}`}},Tl={ordinalNumber:jl,era:Q({values:vl,defaultWidth:"wide"}),quarter:Q({values:wl,defaultWidth:"wide",argumentCallback:e=>Number(e)-1}),month:Q({values:bl,defaultWidth:"wide"}),day:Q({values:Cl,defaultWidth:"wide"}),dayPeriod:Q({values:Sl,defaultWidth:"wide",formattingValues:Pl,defaultFormattingWidth:"wide"})},Nl=/^第?\d+(年|四半期|月|週|日|時|分|秒)?/i,kl=/\d+/i,Ml={narrow:/^(B\.?C\.?|A\.?D\.?)/i,abbreviated:/^(紀元[前後]|西暦)/i,wide:/^(紀元[前後]|西暦)/i},Rl={narrow:[/^B/i,/^A/i],any:[/^(紀元前)/i,/^(西暦|紀元後)/i]},El={narrow:/^[1234]/i,abbreviated:/^Q[1234]/i,wide:/^第[1234一二三四1234]四半期/i},_l={any:[/(1|一|1)/i,/(2|二|2)/i,/(3|三|3)/i,/(4|四|4)/i]},Ol={narrow:/^([123456789]|1[012])/,abbreviated:/^([123456789]|1[012])月/i,wide:/^([123456789]|1[012])月/i},Al={any:[/^1\D/,/^2/,/^3/,/^4/,/^5/,/^6/,/^7/,/^8/,/^9/,/^10/,/^11/,/^12/]},Dl={narrow:/^[日月火水木金土]/,short:/^[日月火水木金土]/,abbreviated:/^[日月火水木金土]/,wide:/^[日月火水木金土]曜日/},Il={any:[/^日/,/^月/,/^火/,/^水/,/^木/,/^金/,/^土/]},Wl={any:/^(AM|PM|午前|午後|正午|深夜|真夜中|夜|朝)/i},Ll={any:{am:/^(A|午前)/i,pm:/^(P|午後)/i,midnight:/^深夜|真夜中/i,noon:/^正午/i,morning:/^朝/i,afternoon:/^午後/i,evening:/^夜/i,night:/^深夜/i}},$l={ordinalNumber:fn({matchPattern:Nl,parsePattern:kl,valueCallback:function(e){return parseInt(e,10)}}),era:K({matchPatterns:Ml,defaultMatchWidth:"wide",parsePatterns:Rl,defaultParseWidth:"any"}),quarter:K({matchPatterns:El,defaultMatchWidth:"wide",parsePatterns:_l,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:Ol,defaultMatchWidth:"wide",parsePatterns:Al,defaultParseWidth:"any"}),day:K({matchPatterns:Dl,defaultMatchWidth:"wide",parsePatterns:Il,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:Wl,defaultMatchWidth:"any",parsePatterns:Ll,defaultParseWidth:"any"})},Fl={code:"ja",formatDistance:fl,formatLong:gl,formatRelative:yl,localize:Tl,match:$l,options:{weekStartsOn:0,firstWeekContainsDate:1}},Hl={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},Bl=(e,t,n)=>{let o;const r=Hl[e];return typeof r=="string"?o=r:t===1?o=r.one:o=r.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?o+"内":o+"前":o},Vl={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},Yl={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},zl={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},ql={date:he({formats:Vl,defaultWidth:"full"}),time:he({formats:Yl,defaultWidth:"full"}),dateTime:he({formats:zl,defaultWidth:"full"})};function In(e,t,n){const o="eeee p";return dl(e,t,n)?o:e.getTime()>t.getTime()?"'下个'"+o:"'上个'"+o}const Xl={lastWeek:In,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:In,other:"PP p"},Ul=(e,t,n,o)=>{const r=Xl[e];return typeof r=="function"?r(t,n,o):r},Gl={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},Ql={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},Kl={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},Jl={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},Zl={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},ed={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},td=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},nd={ordinalNumber:td,era:Q({values:Gl,defaultWidth:"wide"}),quarter:Q({values:Ql,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Q({values:Kl,defaultWidth:"wide"}),day:Q({values:Jl,defaultWidth:"wide"}),dayPeriod:Q({values:Zl,defaultWidth:"wide",formattingValues:ed,defaultFormattingWidth:"wide"})},od=/^(第\s*)?\d+(日|时|分|秒)?/i,rd=/\d+/i,sd={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},id={any:[/^(前)/i,/^(公元)/i]},ad={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},cd={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},ld={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},dd={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},ud={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},fd={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},hd={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},md={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},pd={ordinalNumber:fn({matchPattern:od,parsePattern:rd,valueCallback:e=>parseInt(e,10)}),era:K({matchPatterns:sd,defaultMatchWidth:"wide",parsePatterns:id,defaultParseWidth:"any"}),quarter:K({matchPatterns:ad,defaultMatchWidth:"wide",parsePatterns:cd,defaultParseWidth:"any",valueCallback:e=>e+1}),month:K({matchPatterns:ld,defaultMatchWidth:"wide",parsePatterns:dd,defaultParseWidth:"any"}),day:K({matchPatterns:ud,defaultMatchWidth:"wide",parsePatterns:fd,defaultParseWidth:"any"}),dayPeriod:K({matchPatterns:hd,defaultMatchWidth:"any",parsePatterns:md,defaultParseWidth:"any"})},gd={code:"zh-CN",formatDistance:Bl,formatLong:ql,formatRelative:Ul,localize:nd,match:pd,options:{weekStartsOn:1,firstWeekContainsDate:4}},xd=e=>{switch(e){case"ja":return Fl;case"en":return zt;case"zh_CN":return gd;default:return zt}},Sd=(e,t)=>{const{locale:n="en",target:o="time"}=t,r=typeof e=="string"?new Date(e):e,i=xd(n),c=((l,d)=>{if(l==="ja")switch(d){case"month":return"yyyy年M月";case"day":return"yyyy年M月d日";case"time":return"yyyy年M月d日 HH:mm"}else if(l==="en")switch(d){case"month":return"MM/yyyy";case"day":return"MM/dd/yyyy";case"time":return"MM/dd/yyyy HH:mm"}else if(l==="zh_CN")switch(d){case"month":return"yyyy年M月";case"day":return"yyyy年M月d日";case"time":return"yyyy年M月d日 HH:mm"}switch(d){case"month":return"yyyy-MM";case"day":return"yyyy-MM-dd";case"time":return"yyyy-MM-dd HH:mm"}})(n,o);return cl(r,c,{locale:i})};function Pd({children:e}){const{isAuthenticated:t}=Fn(),n=Hn();return f.useEffect(()=>{t||n({to:"/login"})},[t,n]),t?s.jsx(s.Fragment,{children:e}):null}export{ho as A,kn as B,Nn as C,vd as F,Cd as G,Jr as I,jn as L,Ba as N,wd as P,fo as R,ze as S,rt as T,Vr as a,Pd as b,tc as c,nc as d,Xt as e,Sd as f,oc as g,yt as h,mo as i,po as j,Gr as k,zr as l,Xe as m,tr as n,qe as o,$a as p,Ue as q,Z as r,bd as s,Bn as t,st as u,it as v,rn as w,os as x,sc as y,Ga as z};
@@ -0,0 +1,6 @@
1
+ import{c}from"./index-BGKS2Bbu.js";/**
2
+ * @license lucide-react v0.548.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const e=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r=c("eye",e);export{r as E};