1"use strict";(self.rspackChunknewapi_web=self.rspackChunknewapi_web||[]).push([[1402],{88726(e,t,a){a.d(t,{k:()=>_});var s=a(72361),i=a(70332),r=a(63876),n=a(72527),l=a(23921),o=a(85949),c=a(6702),d=a(56275);function u(e){let{dir:t,className:a,...i}=e;return(0,s.jsxs)("svg",{"data-name":`icon-dir-${t}`,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",className:(0,d.cn)("rtl"===t&&"rotate-y-180",a),...i,children:[(0,s.jsx)("path",{d:"M23.42.51h51.92c2.21 0 4 1.79 4 4v42.18c0 2.21-1.79 4-4 4H23.42s-.04-.02-.04-.04V.55s.02-.04.04-.04z",opacity:.15}),(0,s.jsx)("path",{fill:"none",opacity:.72,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 14.88L17.78 14.88"}),(0,s.jsx)("path",{fill:"none",opacity:.48,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 22.09L16.08 22.09"}),(0,s.jsx)("path",{fill:"none",opacity:.55,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 18.38L14.93 18.38"}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("circle",{cx:7.51,cy:7.4,r:2.54,opacity:.8}),(0,s.jsx)("path",{fill:"none",opacity:.8,strokeWidth:"2px",d:"M12.06 6.14L17.78 6.14"}),(0,s.jsx)("path",{fill:"none",opacity:.6,d:"M11.85 8.79L16.91 8.79"})]}),(0,s.jsx)("path",{fill:"none",opacity:.62,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"3px",d:"M29.41 7.4L34.67 7.4"}),(0,s.jsx)("rect",{x:28.76,y:11.21,width:26.03,height:2.73,rx:.64,ry:.64,opacity:.44,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:28.76,y:17.01,width:44.25,height:13.48,rx:.64,ry:.64,opacity:.3,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:28.76,y:33.57,width:44.25,height:4.67,rx:.64,ry:.64,opacity:.21,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:28.76,y:41.32,width:36.21,height:4.67,rx:.64,ry:.64,opacity:.3,strokeLinecap:"round",strokeMiterlimit:10})]})}function h(e){return(0,s.jsxs)("svg",{"data-name":"icon-layout-compact",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("rect",{x:5.84,y:5.2,width:4,height:40,rx:2,ry:2,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsxs)("g",{stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("path",{fill:"none",opacity:.66,strokeWidth:"2px",d:"M7.26 11.56L8.37 11.56"}),(0,s.jsx)("path",{fill:"none",opacity:.51,strokeWidth:"2px",d:"M7.26 14.49L8.37 14.49"}),(0,s.jsx)("path",{fill:"none",opacity:.52,strokeWidth:"2px",d:"M7.26 17.39L8.37 17.39"}),(0,s.jsx)("circle",{cx:7.81,cy:7.25,r:1.16,fill:"#fff",opacity:.8})]}),(0,s.jsx)("path",{fill:"none",opacity:.75,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"3px",d:"M15.81 14.49L22.89 14.49"}),(0,s.jsx)("rect",{x:14.93,y:18.39,width:22.19,height:2.73,rx:.64,ry:.64,opacity:.5,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:14.93,y:5.89,width:59.16,height:2.73,rx:.64,ry:.64,opacity:.9,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:14.93,y:24.22,width:32.68,height:19.95,rx:2.11,ry:2.11,opacity:.4,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("rect",{x:59.05,y:38.15,width:2.01,height:3.42,rx:.33,ry:.33,opacity:.32}),(0,s.jsx)("rect",{x:54.78,y:34.99,width:2.01,height:6.58,rx:.33,ry:.33,opacity:.44}),(0,s.jsx)("rect",{x:63.17,y:32.86,width:2.01,height:8.7,rx:.33,ry:.33,opacity:.53}),(0,s.jsx)("rect",{x:67.54,y:29.17,width:2.01,height:12.4,rx:.33,ry:.33,opacity:.66})]}),(0,s.jsxs)("g",{opacity:.5,children:[(0,s.jsx)("circle",{cx:62.16,cy:18.63,r:7.5}),(0,s.jsx)("path",{d:"M62.16 11.63c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7m0-1c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8z"})]}),(0,s.jsxs)("g",{opacity:.74,children:[(0,s.jsx)("path",{d:"M63.04 18.13l3.38-5.67c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z"}),(0,s.jsx)("path",{d:"M66.57 13.19a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95a8.007 8.007 0 00-2.86-2.92z"})]})]})}function x(e){return(0,s.jsxs)("svg",{"data-name":"con-layout-default",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("path",{d:"M39.22 15.99h-8.16c-.79 0-1.43-.67-1.43-1.5s.64-1.5 1.43-1.5h8.16c.79 0 1.43.67 1.43 1.5s-.64 1.5-1.43 1.5z",opacity:.75}),(0,s.jsx)("rect",{x:29.63,y:18.39,width:16.72,height:2.73,rx:1.36,ry:1.36,opacity:.5}),(0,s.jsx)("path",{d:"M75.1 6.68v1.45c0 .63-.49 1.14-1.09 1.14H30.72c-.6 0-1.09-.51-1.09-1.14V6.68c0-.62.49-1.14 1.09-1.14h43.29c.6 0 1.09.52 1.09 1.14z",opacity:.9}),(0,s.jsx)("rect",{x:29.63,y:24.22,width:21.8,height:19.95,rx:2.11,ry:2.11,opacity:.4}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("rect",{x:61.06,y:38.15,width:2.01,height:3.42,rx:.33,ry:.33,opacity:.32}),(0,s.jsx)("rect",{x:56.78,y:34.99,width:2.01,height:6.58,rx:.33,ry:.33,opacity:.44}),(0,s.jsx)("rect",{x:65.17,y:32.86,width:2.01,height:8.7,rx:.33,ry:.33,opacity:.53}),(0,s.jsx)("rect",{x:69.55,y:29.17,width:2.01,height:12.4,rx:.33,ry:.33,opacity:.66})]}),(0,s.jsxs)("g",{opacity:.5,children:[(0,s.jsx)("circle",{cx:63.17,cy:18.63,r:7.5}),(0,s.jsx)("path",{d:"M63.17 11.63c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7m0-1c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8z"})]}),(0,s.jsxs)("g",{opacity:.74,children:[(0,s.jsx)("path",{d:"M64.05 18.13l3.38-5.67c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z"}),(0,s.jsx)("path",{d:"M67.57 13.19a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95a8.007 8.007 0 00-2.86-2.92z"})]}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("rect",{x:5.84,y:5.02,width:19.14,height:40,rx:2,ry:2,opacity:.8}),(0,s.jsxs)("g",{stroke:"#fff",children:[(0,s.jsx)("path",{fill:"none",opacity:.72,strokeWidth:"2px",d:"M9.02 17.39L21.25 17.39"}),(0,s.jsx)("path",{fill:"none",opacity:.48,strokeWidth:"2px",d:"M9.02 24.6L19.54 24.6"}),(0,s.jsx)("path",{fill:"none",opacity:.55,strokeWidth:"2px",d:"M9.02 20.88L18.4 20.88"}),(0,s.jsx)("circle",{cx:10.98,cy:9.91,r:2.54,fill:"#fff",opacity:.8}),(0,s.jsx)("path",{fill:"none",opacity:.8,strokeWidth:"2px",d:"M15.53 8.65L21.25 8.65"}),(0,s.jsx)("path",{fill:"none",opacity:.6,d:"M15.32 11.3L20.38 11.3"})]})]})]})}function m(e){return(0,s.jsxs)("svg",{"data-name":"icon-layout-full",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("path",{fill:"none",opacity:.75,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"3px",d:"M6.85 14.49L15.02 14.49"}),(0,s.jsx)("rect",{x:5.84,y:18.39,width:25.6,height:2.73,rx:.64,ry:.64,opacity:.5,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:5.84,y:5.89,width:68.26,height:2.73,rx:.64,ry:.64,opacity:.9,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:5.84,y:24.22,width:37.71,height:19.95,rx:2.11,ry:2.11,opacity:.4,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("rect",{x:59.05,y:38.15,width:2.01,height:3.42,rx:.33,ry:.33,opacity:.32}),(0,s.jsx)("rect",{x:54.78,y:34.99,width:2.01,height:6.58,rx:.33,ry:.33,opacity:.44}),(0,s.jsx)("rect",{x:63.17,y:32.86,width:2.01,height:8.7,rx:.33,ry:.33,opacity:.53}),(0,s.jsx)("rect",{x:67.54,y:29.17,width:2.01,height:12.4,rx:.33,ry:.33,opacity:.66})]}),(0,s.jsxs)("g",{opacity:.5,children:[(0,s.jsx)("circle",{cx:62.16,cy:18.63,r:7.5}),(0,s.jsx)("path",{d:"M62.16 11.63c3.86 0 7 3.14 7 7s-3.14 7-7 7-7-3.14-7-7 3.14-7 7-7m0-1c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8z"})]}),(0,s.jsxs)("g",{opacity:.74,children:[(0,s.jsx)("path",{d:"M63.04 18.13l3.38-5.67c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z"}),(0,s.jsx)("path",{d:"M66.57 13.19a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95a8.007 8.007 0 00-2.86-2.92z"})]})]})}function p(e){return(0,s.jsxs)("svg",{"data-name":"icon-sidebar-floating",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("rect",{x:5.89,y:5.15,width:19.74,height:40,rx:2,ry:2,opacity:.8,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsxs)("g",{stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("path",{fill:"none",opacity:.72,strokeWidth:"2px",d:"M9.81 18.36L22.04 18.36"}),(0,s.jsx)("path",{fill:"none",opacity:.48,strokeWidth:"2px",d:"M9.81 25.57L20.33 25.57"}),(0,s.jsx)("path",{fill:"none",opacity:.55,strokeWidth:"2px",d:"M9.81 21.85L19.18 21.85"}),(0,s.jsx)("circle",{cx:11.76,cy:10.88,r:2.54,fill:"#fff",opacity:.8}),(0,s.jsx)("path",{fill:"none",opacity:.8,strokeWidth:"2px",d:"M16.31 9.62L22.04 9.62"}),(0,s.jsx)("path",{fill:"none",opacity:.6,d:"M16.1 12.27L21.16 12.27"})]}),(0,s.jsx)("path",{fill:"none",opacity:.62,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"3px",d:"M30.59 9.62L35.85 9.62"}),(0,s.jsx)("rect",{x:29.94,y:13.42,width:26.03,height:2.73,rx:.64,ry:.64,opacity:.44,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("rect",{x:29.94,y:19.28,width:43.11,height:25.87,rx:2,ry:2,opacity:.3,strokeLinecap:"round",strokeMiterlimit:10})]})}function f(e){return(0,s.jsxs)("svg",{"data-name":"icon-sidebar-inset",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("rect",{x:23.39,y:5.57,width:50.22,height:40,rx:2,ry:2,opacity:.2,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("path",{fill:"none",opacity:.72,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.08 17.05L17.31 17.05"}),(0,s.jsx)("path",{fill:"none",opacity:.48,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.08 24.25L15.6 24.25"}),(0,s.jsx)("path",{fill:"none",opacity:.55,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.08 20.54L14.46 20.54"}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("circle",{cx:7.04,cy:9.57,r
1:2.54,opacity:.8}),(0,s.jsx)("path",{fill:"none",opacity:.8,strokeWidth:"2px",d:"M11.59 8.3L17.31 8.3"}),(0,s.jsx)("path",{fill:"none",opacity:.6,d:"M11.38 10.95L16.44 10.95"})]})]})}function g(e){return(0,s.jsxs)("svg",{"data-name":"icon-sidebar-sidebar",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsx)("path",{d:"M23.42.51h51.99c2.21 0 4 1.79 4 4v42.18c0 2.21-1.79 4-4 4H23.42s-.04-.02-.04-.04V.55s.02-.04.04-.04z",opacity:.2,strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("path",{fill:"none",opacity:.72,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 14.88L17.78 14.88"}),(0,s.jsx)("path",{fill:"none",opacity:.48,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 22.09L16.08 22.09"}),(0,s.jsx)("path",{fill:"none",opacity:.55,strokeLinecap:"round",strokeMiterlimit:10,strokeWidth:"2px",d:"M5.56 18.38L14.93 18.38"}),(0,s.jsxs)("g",{strokeLinecap:"round",strokeMiterlimit:10,children:[(0,s.jsx)("circle",{cx:7.51,cy:7.4,r:2.54,opacity:.8}),(0,s.jsx)("path",{fill:"none",opacity:.8,strokeWidth:"2px",d:"M12.06 6.14L17.78 6.14"}),(0,s.jsx)("path",{fill:"none",opacity:.6,d:"M11.85 8.79L16.91 8.79"})]})]})}function j(e){return(0,s.jsxs)("svg",{"data-name":"icon-theme-dark",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsxs)("g",{fill:"#1d2b3f",children:[(0,s.jsx)("rect",{x:.53,y:.5,width:78.83,height:50.14,rx:3.5,ry:3.5}),(0,s.jsx)("path",{d:"M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z"})]}),(0,s.jsx)("path",{d:"M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",fill:"#0d1628"}),(0,s.jsx)("circle",{cx:6.7,cy:7.04,r:3.54,fill:"#426187"}),(0,s.jsx)("path",{d:"M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",fill:"#426187"}),(0,s.jsxs)("g",{fill:"#2a62bc",children:[(0,s.jsx)("rect",{x:33.36,y:19.73,width:2.75,height:3.42,rx:.33,ry:.33,opacity:.32}),(0,s.jsx)("rect",{x:29.64,y:16.57,width:2.75,height:6.58,rx:.33,ry:.33,opacity:.44}),(0,s.jsx)("rect",{x:37.16,y:14.44,width:2.75,height:8.7,rx:.33,ry:.33,opacity:.53}),(0,s.jsx)("rect",{x:41.19,y:10.75,width:2.75,height:12.4,rx:.33,ry:.33,opacity:.53})]}),(0,s.jsx)("circle",{cx:62.74,cy:16.32,r:8,fill:"#2f5491",opacity:.5}),(0,s.jsx)("path",{d:"M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",fill:"#2f5491",opacity:.74}),(0,s.jsx)("rect",{x:29.64,y:27.75,width:41.62,height:18.62,rx:1.69,ry:1.69,fill:"#17273f"})]})}function y(e){return(0,s.jsxs)("svg",{"data-name":"icon-theme-light",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",...e,children:[(0,s.jsxs)("g",{fill:"#d9d9d9",children:[(0,s.jsx)("rect",{x:.53,y:.5,width:78.83,height:50.14,rx:3.5,ry:3.5}),(0,s.jsx)("path",{d:"M75.86 1c1.65 0 3 1.35 3 3v43.14c0 1.65-1.35 3-3 3H4.03c-1.65 0-3-1.35-3-3V4c0-1.65 1.35-3 3-3h71.83m0-1H4.03c-2.21 0-4 1.79-4 4v43.14c0 2.21 1.79 4 4 4h71.83c2.21 0 4-1.79 4-4V4c0-2.21-1.79-4-4-4z"})]}),(0,s.jsx)("path",{d:"M22.88 0h52.97c2.21 0 4 1.79 4 4v43.14c0 2.21-1.79 4-4 4H22.88V0z",fill:"#ecedef"}),(0,s.jsx)("circle",{cx:6.7,cy:7.04,r:3.54,fill:"#fff"}),(0,s.jsx)("path",{d:"M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1zM18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05zM15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.91h11c.55 0 1 .41 1 .91s-.45.91-1 .91zM16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",fill:"#fff"}),(0,s.jsxs)("g",{fill:"#c0c4c4",children:[(0,s.jsx)("rect",{x:33.36,y:19.73,width:2.75,height:3.42,rx:.33,ry:.33,opacity:.32}),(0,s.jsx)("rect",{x:29.64,y:16.57,width:2.75,height:6.58,rx:.33,ry:.33,opacity:.44}),(0,s.jsx)("rect",{x:37.16,y:14.44,width:2.75,height:8.7,rx:.33,ry:.33,opacity:.53}),(0,s.jsx)("rect",{x:41.19,y:10.75,width:2.75,height:12.4,rx:.33,ry:.33,opacity:.53})]}),(0,s.jsx)("circle",{cx:62.74,cy:16.32,r:8,fill:"#fff"}),(0,s.jsxs)("g",{fill:"#d9d9d9",children:[(0,s.jsx)("path",{d:"M63.62 15.82L67 10.15c.93.64 1.7 1.48 2.26 2.47.56.98.89 2.08.96 3.21h-6.6z"}),(0,s.jsx)("path",{d:"M67.14 10.88a6.977 6.977 0 012.52 4.44h-5.17l2.65-4.44m-.31-1.43l-4.1 6.87h8c0-1.39-.36-2.75-1.04-3.95s-1.67-2.21-2.86-2.92z"})]}),(0,s.jsx)("rect",{x:29.64,y:27.75,width:41.62,height:18.62,rx:1.69,ry:1.69,fill:"#fff"})]})}function b(e){let{className:t,...a}=e;return(0,s.jsxs)("svg",{"data-name":"icon-theme-system",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 79.86 51.14",className:(0,d.cn)("overflow-hidden rounded-md","stroke-primary fill-primary group-data-unchecked:stroke-muted-foreground group-data-unchecked:fill-muted-foreground",t),...a,children:[(0,s.jsx)("path",{opacity:.2,d:"M0 0.03H22.88V51.17H0z"}),(0,s.jsx)("circle",{cx:6.7,cy:7.04,r:3.54,fill:"#fff",opacity:.8,stroke:"#fff",strokeLinecap:"round",strokeMiterlimit:10}),(0,s.jsx)("path",{d:"M18.12 6.39h-5.87c-.6 0-1.09-.45-1.09-1s.49-1 1.09-1h5.87c.6 0 1.09.45 1.09 1s-.49 1-1.09 1zM16.55 9.77h-4.24c-.55 0-1-.45-1-1s.45-1 1-1h4.24c.55 0 1 .45 1 1s-.45 1-1 1z",fill:"#fff",stroke:"none",opacity:.75}),(0,s.jsx)("path",{d:"M18.32 17.37H4.59c-.69 0-1.25-.47-1.25-1.05s.56-1.05 1.25-1.05h13.73c.69 0 1.25.47 1.25 1.05s-.56 1.05-1.25 1.05z",fill:"#fff",stroke:"none",opacity:.72}),(0,s.jsx)("path",{d:"M15.34 21.26h-11c-.55 0-1-.41-1-.91s.45-.91 1-.9
11h11c.55 0 1 .41 1 .91s-.45.91-1 .91z",fill:"#fff",stroke:"none",opacity:.55}),(0,s.jsx)("path",{d:"M16.46 25.57H4.43c-.6 0-1.09-.44-1.09-.98s.49-.98 1.09-.98h12.03c.6 0 1.09.44 1.09.98s-.49.98-1.09.98z",fill:"#fff",stroke:"none",opacity:.67}),(0,s.jsx)("rect",{x:33.36,y:19.73,width:2.75,height:3.42,rx:.33,ry:.33,opacity:.31,stroke:"none"}),(0,s.jsx)("rect",{x:29.64,y:16.57,width:2.75,height:6.58,rx:.33,ry:.33,opacity:.4,stroke:"none"}),(0,s.jsx)("rect",{x:37.16,y:14.44,width:2.75,height:8.7,rx:.33,ry:.33,opacity:.26,stroke:"none"}),(0,s.jsx)("rect",{x:41.19,y:10.75,width:2.75,height:12.4,rx:.33,ry:.33,opacity:.37,stroke:"none"}),(0,s.jsxs)("g",{children:[(0,s.jsx)("circle",{cx:62.74,cy:16.32,r:8,opacity:.25}),(0,s.jsx)("path",{d:"M62.74 16.32l4.1-6.87c1.19.71 2.18 1.72 2.86 2.92s1.04 2.57 1.04 3.95h-8z",opacity:.45})]}),(0,s.jsx)("rect",{x:29.64,y:27.75,width:41.62,height:18.62,rx:1.69,ry:1.69,opacity:.3,stroke:"none",strokeLinecap:"round",strokeMiterlimit:10})]})}var v=a(47029),w=a(72868),k=a(74559),N=a(89411),z=a(68954),M=a(46759),A=a(48707),L=a(86603),C=a(31782);let S=i.U;function _(){let{t:e}=(0,c.Bd)(),{setOpen:t}=(0,C.cL)(),{resetDir:a}=(0,N.j)(),{resetTheme:i}=(0,A.D)(),{resetLayout:r}=(0,z.g)(),{resetCustomization:l}=(0,M.A)();return(0,s.jsxs)(k.cj,{children:[(0,s.jsx)(k.CG,{render:(0,s.jsx)(w.$,{size:"icon",variant:"ghost","aria-label":e("Open theme settings"),"aria-describedby":"config-drawer-description",className:"max-md:hidden"}),children:(0,s.jsx)(n.A,{className:"size-[1.2rem]","aria-hidden":"true"})}),(0,s.jsxs)(k.h,{className:(0,v.jW)("sm:max-w-md"),children:[(0,s.jsxs)(k.Fm,{className:(0,v.Dt)(),children:[(0,s.jsx)(k.qp,{children:e("Theme Settings")}),(0,s.jsx)(k.Qs,{id:"config-drawer-description",children:e("Adjust the appearance and layout to suit your preferences.")})]}),(0,s.jsxs)("div",{className:(0,v.e)(),children:[(0,s.jsx)(D,{}),(0,s.jsx)(R,{}),(0,s.jsx)(E,{}),(0,s.jsx)(B,{}),(0,s.jsx)(O,{}),(0,s.jsx)(P,{}),(0,s.jsx)(U,{}),(0,s.jsx)(W,{}),(0,s.jsx)(V,{})]}),(0,s.jsx)(k.XW,{className:(0,v.Jx)("grid-cols-1"),children:(0,s.jsx)(w.$,{variant:"destructive",onClick:()=>{t(!0),a(),i(),r(),l()},"aria-label":e("Reset all settings to default values"),children:e("Reset")})})]})]})}function $(e){return(0,s.jsxs)("div",{className:(0,d.cn)("text-muted-foreground mb-2 flex items-center gap-2 text-sm font-semibold",e.className),children:[e.title,e.showReset&&e.onReset&&(0,s.jsx)(w.$,{size:"icon",variant:"secondary",className:"size-4",onClick:e.onReset,"aria-label":"Reset",children:(0,s.jsx)(l.A,{className:"size-3","aria-hidden":"true"})})]})}function I(e){let t=e.isTheme??!1;return(0,s.jsxs)(S,{value:e.item.value,className:(0,d.cn)("group outline-none","transition duration-200 ease-in"),"aria-label":`Select ${e.
1item.label.toLowerCase()}`,"aria-describedby":`${e.item.value}-description`,children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative rounded-md ring-[1px]","group-data-checked:ring-primary group-data-checked:shadow-2xl","group-focus-visible:ring-2"),role:"img","aria-hidden":"false","aria-label":`${e.item.label} option preview`,children:[(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary size-6 stroke-white","group-data-unchecked:hidden","absolute top-0 right-0 translate-x-1/2 -translate-y-1/2"),"aria-hidden":"true"}),(0,s.jsx)(e.item.icon,{className:(0,d.cn)(!t&&"stroke-primary fill-primary group-data-unchecked:stroke-muted-foreground group-data-unchecked:fill-muted-foreground"),"aria-hidden":"true"})]}),(0,s.jsx)("div",{className:"mt-1 text-xs",id:`${e.item.value}-description`,"aria-live":"polite",children:e.item.label})]})}function D(){let{t:e}=(0,c.Bd)(),{defaultTheme:t,theme:a,setTheme:i}=(0,A.D)();return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Theme"),showReset:a!==t,onReset:()=>i(t)}),(0,s.jsx)(r.z,{value:a,onValueChange:i,className:"grid w-full max-w-md grid-cols-3 gap-4","aria-label":e("Select theme preference"),"aria-describedby":"theme-description",children:[{value:"system",label:e("System"),icon:b},{value:"light",label:e("Light"),icon:y},{value:"dark",label:e("Dark"),icon:j}].map(e=>(0,s.jsx)(I,{item:e,isTheme:!0},e.value))}),(0,s.jsx)("div",{id:"theme-description",className:"sr-only",children:e("Choose between system preference, light mode, or dark mode")})]})}function R(){let{t:e}=(0,c.Bd)(),{defaults:t,customization:a,setPreset:i}=(0,M.A)();return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Color preset"),showReset:a.preset!==t.preset,onReset:()=>i(t.preset)}),(0,s.jsx)(r.z,{value:a.preset,onValueChange:e=>i(e),className:"grid w-full grid-cols-4 gap-3","aria-label":e("Select color preset"),children:L.b3.map(t=>(0,s.jsxs)(S,{value:t.value,className:"group flex flex-col items-stretch outline-none","aria-label":e(`preset.${t.value}`),children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative h-12 rounded-md ring-[1px] transition","group-data-checked:ring-primary group-data-checked:shadow-md","group-focus-visible:ring-2","group-hover:ring-primary/60"),children:[(0,s.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 rounded-md",style:{background:"default"===t.value?"linear-gradient(135deg, oklch(0.68 0.2 25) 0%, oklch(0.8 0.17 85) 25%, oklch(0.72 0.18 155) 50%, oklch(0.66 0.19 245) 75%, oklch(0.68 0.2 315) 100%)":`linear-gradient(135deg, ${t.swatches[0]} 0%, ${t.swatches[1]??t.swatches[0]} 100%)`}}),(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white","group-data-unchecked:hidden"),"aria-hidden":"true"})]}),(0,s.jsx)("div",{className:"mt-1.5 truncate text-center text-xs",children:e(`preset.${t.value}`)})]},t.value))})]})}let F=[{value:"default",label:"Auto",preview:void 0},{value:"sans",label:"Sans",preview:"var(--font-sans)"},{value:"serif",label:"Serif",preview:"var(--font-serif)"}];function E(){let{t:e}=(0,c.Bd)(),{defaults:t,customization:a,setFont:i}=(0,M.A)();return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Font"),showReset:a.font!==t.font,onReset:()=>i(t.font)}),(0,s.jsx)(r.z,{value:a.font,onValueChange:e=>i(e),className:"grid w-full grid-cols-3 gap-4","aria-label":e("Select body font"),children:F.map(t=>(0,s.jsxs)(S,{value:t.value,className:"group flex flex-col items-stretch outline-none","aria-label":"default"===t.value?e("System default"):t.label,children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative h-12 rounded-md ring-[1px] transition","group-data-checked:ring-primary group-data-checked:shadow-md","group-focus-visible:ring-2","group-hover:ring-primary/60"),children:[(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white","group-data-unchecked:hidden"),"aria-hidden":"true"}),(0,s.jsx)("span",{"aria-hidden":"true",className:"text-foreground absolute inset-0 flex items-center justify-center text-lg leading-none font-medium",style:t.preview?{fontFamily:t.preview}:{font:"inherit",fontSize:"1.125rem"},children:"Aa"})]}),(0,s.jsx)("div",{className:"mt-1.5 text-center text-xs",children:t.label})]},t.value))})]})}let T=[{value:"default",label:"Auto",preview:"1rem"},{value:"none",label:"0",preview:"0"},{value:"sm",label:"0.3",preview:"0.3rem"},{value:"md",label:"0.5",preview:"0.5rem"},{value:"lg",label:"0.75",preview:"0.75rem"},{value:"xl",label:"1.0",preview:"1rem"}];function B(){let{t:e}=(0,c.Bd)(),{defaults:t,customization:a,setRadius:i}=(0,M.A)();return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Border radius"),showReset:a.radius!==t.radius,onReset:()=>i(t.radius)}),(0,s.jsx)(r.z,{value:a.radius,onValueChange:e=>i(e),className:"grid w-full grid-cols-6 gap-2","aria-label":e("Select border radius"),children:T.map(t=>(0,s.jsxs)(S,{value:t.value,className:"group flex flex-col items-stretch outline-none","aria-label":"default"===t.value?e("System default"):t.label,children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative h-12 rounded-md ring-[1px] transition","group-data-checked:ring-primary group-data-checked:shadow-md","group-focus-visible:ring-2","group-hover:ring-primary/60"),children:[(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white","group-data-unchecked:hidden"),"aria-hidden":"true"}),(0,s.jsx)("span",{"aria-hidden":"true",className:"border-foreground
1/70 absolute top-2.5 left-2.5 size-3.5 border-t-[1.5px] border-l-[1.5px]",style:{borderTopLeftRadius:t.preview}})]}),(0,s.jsx)("div",{className:"mt-1.5 text-center text-xs",children:t.label})]},t.value))})]})}function H(e){return(0,s.jsx)("div",{"aria-hidden":"true",className:"absolute inset-2.5 flex flex-col justify-center",style:{gap:e.rowGap},children:Array.from({length:e.rows},(e,t)=>85-10*t).map(e=>(0,s.jsx)("span",{className:"bg-foreground/60 block h-[2px] rounded-full",style:{width:`${e}%`}},e))})}function O(){let{t:e}=(0,c.Bd)(),{defaults:t,customization:a,setScale:i}=(0,M.A)(),n=[{value:"sm",label:e("Compact"),rows:4,rowGap:"3px"},{value:"default",label:e("Default"),rows:3,rowGap:"6px"},{value:"lg",label:e("Comfortable"),rows:2,rowGap:"10px"},{value:"xl",label:e("Super Large"),rows:1,rowGap:"14px"}];return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Density"),showReset:a.scale!==t.scale,onReset:()=>i(t.scale)}),(0,s.jsx)(r.z,{value:a.scale,onValueChange:e=>i(e),className:"grid w-full grid-cols-4 gap-3","aria-label":e("Select interface density"),children:n.map(e=>(0,s.jsxs)(S,{value:e.value,className:"group flex flex-col items-stretch outline-none","aria-label":e.label,children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative h-12 rounded-md ring-[1px] transition","group-data-checked:ring-primary group-data-checked:shadow-md","group-focus-visible:ring-2","group-hover:ring-primary/60"),children:[(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white","group-data-unchecked:hidden"),"aria-hidden":"true"}),(0,s.jsx)(H,{rows:e.rows,rowGap:e.rowGap})]}),(0,s.jsx)("div",{className:"mt-1.5 truncate text-center text-xs",children:e.label})]},e.value))})]})}function P(){let{t:e}=(0,c.Bd)(),{defaultVariant:t,variant:a,setVariant:i}=(0,z.g)();return(0,s.jsxs)("div",{className:"max-md:hidden",children:[(0,s.jsx)($,{title:e("Sidebar"),showReset:t!==a,onReset:()=>i(t)}),(0,s.jsx)(r.z,{value:a,onValueChange:i,className:"grid w-full max-w-md grid-cols-3 gap-4","aria-label":e("Select sidebar style"),"aria-describedby":"sidebar-description",children:[{value:"inset",label:e("Inset"),icon:f},{value:"floating",label:e("Floating"),icon:p},{value:"sidebar",label:e("Sidebar"),icon:g}].map(e=>(0,s.jsx)(I,{item:e},e.value))}),(0,s.jsx)("div",{id:"sidebar-description",className:"sr-only",children:e("Choose between inset, floating, or standard sidebar layout")})]})}function U(){let{t:e}=(0,c.Bd)(),{open:t,setOpen:a}=(0,C.cL)(),{defaultCollapsible:i,collapsible:n,setCollapsible:l}=(0,z.g)(),o=t?"default":n;return(0,s.jsxs)("div",{className:"max-md:hidden",children:[(0,s.jsx)($,{title:e("Layout"),showReset:"default"!==o,onReset:()=>{a(!0),l(i)}}),(0,s.jsx)(r.z,{value:o,onValueChange:e=>{"default"===e?a(!0):(a(!1),l(e))},className:"grid w-full max-w-md grid-cols-3 gap-4","aria-label":e("Select layout style"),"aria-describedby":"layout-description",children:[{value:"default",label:e("Default"),icon:x},{value:"icon",label:e("Compact"),icon:h},{value:"offcanvas",label:e("Full layout"),icon:m}].map(e=>(0,s.jsx)(I,{item:e},e.value))}),(0,s.jsx)("div",{id:"layout-description",className:"sr-only",children:e("Choose between default expanded, compact icon-only, or full layout mode")})]})}function W(){let{t:e}=(0,c.Bd)(),{defaults:t,customization:a,setContentLayout:i}=(0,M.A)();return(0,s.jsxs)("div",{className:"max-md:hidden",children:[(0,s.jsx)($,{title:e("Content width"),showReset:a.contentLayout!==t.contentLayout,onReset:()=>i(t.contentLayout)}),(0,s.jsx)(r.z,{value:a.contentLayout,onValueChange:e=>i(e),className:"grid w-full grid-cols-2 gap-4","aria-label":e("Select content width"),children:[{value:"full",label:e("Full width")},{value:"centered",label:e("Centered")}].map(e=>(0,s.jsxs)(S,{value:e.value,className:"group flex flex-col items-stretch outline-none","aria-label":e.label,children:[(0,s.jsxs)("div",{className:(0,d.cn)("ring-border relative h-12 rounded-md ring-[1px] transition","group-data-checked:ring-primary group-data-checked:shadow-md","group-focus-visible:ring-2","group-hover:ring-primary/60"),children:[(0,s.jsx)(o.A,{className:(0,d.cn)("fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white","group-data-unchecked:hidden"),"aria-hidden":"true"}),(0,s.jsx)(G,{centered:"centered"===e.value})]}),(0,s.jsx)("div",{className:"mt-1.5 truncate text-center text-xs",children:e.label})]},e.value))})]})}function G(e){return(0,s.jsxs)("div",{"aria-hidden":"true",className:"absolute inset-2 flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"bg-foreground
1/40 block h-1.5 w-full rounded-sm"}),(0,s.jsxs)("div",{className:(0,d.cn)("flex flex-1 flex-col gap-1",e.centered?"mx-auto w-1/2":"w-full"),children:[(0,s.jsx)("span",{className:"bg-foreground/60 block h-[2px] w-full rounded-full"}),(0,s.jsx)("span",{className:"bg-foreground/60 block h-[2px] w-3/4 rounded-full"})]})]})}function V(){let{t:e}=(0,c.Bd)(),{defaultDir:t,dir:a,setDir:i}=(0,N.j)();return(0,s.jsxs)("div",{children:[(0,s.jsx)($,{title:e("Direction"),showReset:t!==a,onReset:()=>i(t)}),(0,s.jsx)(r.z,{value:a,onValueChange:i,className:"grid w-full max-w-md grid-cols-3 gap-4","aria-label":e("Select site direction"),"aria-describedby":"direction-description",children:[{value:"ltr",label:e("Left to Right"),icon:e=>(0,s.jsx)(u,{dir:"ltr",...e})},{value:"rtl",label:e("Right to Left"),icon:e=>(0,s.jsx)(u,{dir:"rtl",...e})}].map(e=>(0,s.jsx)(I,{item:e},e.value))}),(0,s.jsx)("div",{id:"direction-description",className:"sr-only",children:e("Choose between left-to-right or right-to-left site direction")})]})}},2519(e,t,a){var s=a(72361),i=a(53771),r=a(67834),n=a(68413),l=a(6702),o=a(72868),c=a(84368),d=a(52048),u=a(22990),h=a(56275),x=a(52523);function m(){let{i18n:e,t}=(0,l.Bd)(),a=(0,x.n)(e=>e.auth.user),m=(0,d.LL)(e.language),p=(0,n.useCallback)(async t=>{if(await e.changeLanguage(t),a)try{await u.FH.put("/api/user/self",{language:t})}catch{}},[e,a]);return(0,s.jsxs)(c.rI,{modal:!1,children:[(0,s.jsxs)(c.ty,{render:(0,s.jsx)(o.$,{variant:"ghost",size:"icon",className:"h-9 w-9"}),children:[(0,s.jsx)(i.A,{className:"size-[1.2rem]"}),(0,s.jsx)("span",{className:"sr-only",children:t("Change language")})]}),(0,s.jsx)(c.SQ,{align:"end",children:d.iX.map(e=>(0,s.jsxs)(c._2,{onClick:()=>p(e.code),children:[e.label,(0,s.jsx)(r.A,{size:14,className:(0,h.cn)("ms-auto",m!==e.code&&"hidden")})]},e.code))})]})}a.d(t,{c:()=>m})},61650(e,t,a){var s=a(26197),i=a(63881),r=a(97808),n=a(3729),l=a(18100),o=a(20557),c=a(13161),d=a(23281),u=a(47670),h=a(59520),x=a(46569),m=a(77231),p=a(67670),f=a(40009);a.d(t,{},{k:{id:"system-settings",pathPattern:/^\/system-settings(\/|$)/,parent:{to:"/dashboard/overview",label:"Back to Dashboard"},getNavGroups:function(e){return[{id:"system-administration",title:e("System Administration"),items:[{title:e("Site & Branding"),icon:s.A,items:(0,f.o3)(e)},{title:e("Authentication"),icon:i.A,items:(0,d.xH)(e)},{title:e("Billing & Payment"),icon:r.A,items:(0,u.Eu)(e)},{title:e("Models & Routing"),icon:n.A,items:(0,x.dj)(e)},{title:e("Security & Limits"),icon:l.A,items:(0,p.lt)(e)},{title:e("Console Content"),icon:o.A,items:(0,h.ey)(e)},{title:e("Operations"),icon:c.A,items:(0,m.bK)(e)}]}]}}})},47745(e,t,a){a.d(t,{GN:()=>ek,Y9:()=>_,gZ:()=>e$,si:()=>e_,Ni:()=>eT});var s=a(72361),i=a(88726),r=a(2519),n=a(83273),l=a(1272),o=a(6702),c=a(65201),d=a(90879),u=a(72868),h=a(12393),x=a(74501),m=a(15161),p=a(38939),f=a(56920),g=a(85468),j=a(88921),y=a(56275);function b(e){let{type:t}=e;return(0,s.jsx)("span",{className:(0,y.cn)("mt-1.5 inline-block size-2 shrink-0 rounded-full",(0,g.zv)(t))})}function v(e){let{icon:t,title:a,description:i}=e;return(0,s.jsx)(h.Sv,{className:"min-h-48 border-0 p-4",children:(0,s.jsxs)(h.FT,{children:[(0,s.jsx)(h.Kr,{variant:"icon",children:t}),(0,s.jsx)(h.cz,{children:a}),i?(0,s.jsx)(h.Ou,{children:i}):null]})})}function w(e){let{notice:t,loading:a,t:i}=e;return a?(0,s.jsx)(v,{icon:(0,s.jsx)(n.A,{}),title:i("Loading..."),description:i("Latest platform updates and notices")}):t?(0,s.jsx)(m.F,{className:"h-[min(52vh,28rem)] pr-3",children:(0,s.jsx)(c.K,{breaks:!0,content:t})}):(0,s.jsx)(v,{icon:(0,s.jsx)(n.A,{}),title:i("No announcements at this time")})}function k(e){let{announcements:t,loading:a,t:i}=e;return a?(0,s.jsx)(v,{icon:(0,s.jsx)(l.A,{}),title:i("Loading..."),description:i("Latest platform updates and notices")}):0===t.length?(0,s.jsx)(v,{icon:(0,s.jsx)(l.A,{}),title:i("No system announcements")}):(0,s.jsx)(m.F,{className:"h-[min(52vh,28rem)] pr-3",children:(0,s.jsx)("div",{className:"flex flex-col",children:t.map((e,a)=>{let r=void 0!==e.id&&null!==e.id?`id:${e.id}`:JSON.stringify({content:e.content??"",extra:e.extra??"",publishDate:e.publishDate??"",type:e.type??""}),n=e.publishDate?new Date(e.publishDate):null,l=n?function(e,t){if(!e)return"";let a=new Date,s=new Date(e);if(Number.isNaN(s.getTime()))return"string"==typeof e?e:"";let i=a.getTime()-s.getTime(),r=Math.floor(i/1e3),n=Math.floor(r/60),l=Math.floor(n/60),o=Math.floor(l/24),c=Math.floor(o/7),d=Math.floor(o/30),u=Math.floor(o/365);return i<0?(0,j.Ah)(s):r<60?t("Just now"):n<60?1===n?t("1 minute ago"):t("{{count}} minutes ago",{count:n}):l<24?1===l?t("1 hour ago"):t("{{count}} hours ago",{count:l}):o<7?1===o?t("1 day ago"):t("{{count}} days ago",{count:o}):c<4?1===c?t("1 week ago"):t("{{count}} weeks ago",{count:c}
1):d<12?1===d?t("1 month ago"):t("{{count}} months ago",{count:d}):u<2?t("1 year ago"):(0,j.Ah)(s)}(n,i):"",o=n?(0,j.Ah)(n):"";return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"py-3",children:(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.jsx)(b,{type:e.type}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-2",children:[(0,s.jsx)("div",{className:"text-sm",children:(0,s.jsx)(c.K,{breaks:!0,content:e.content||""})}),e.extra?(0,s.jsx)("div",{className:"text-muted-foreground text-xs",children:(0,s.jsx)(c.K,{breaks:!0,content:e.extra})}):null,o?(0,s.jsxs)("div",{className:"text-muted-foreground text-xs",children:[l?`${l} ⢠`:null,o]}):null]})]})}),a<t.length-1?(0,s.jsx)(p.w,{}):null]},r)})})})}function N(e){let{open:t,onOpenChange:a,unreadCount:i,activeTab:r,onTabChange:c,notice:h,announcements:m,loading:p,className:g}=e,{t:j}=(0,o.Bd)();return(0,s.jsxs)(x.AM,{open:t,onOpenChange:a,children:[(0,s.jsxs)(x.Wv,{render:(0,s.jsx)(u.$,{variant:"ghost",size:"icon",className:(0,y.cn)("relative size-9",g),"aria-label":j("Notifications")}),children:[(0,s.jsx)(n.A,{className:"size-[1.2rem]"}),i>0?(0,s.jsx)(d.E,{variant:"destructive",className:"absolute -top-1 -right-1 flex h-5 min-w-5 items-center justify-center px-1 text-[10px] font-semibold tabular-nums",children:i>99?"99+":i}):null]}),(0,s.jsxs)(x.hl,{align:"end",sideOffset:8,className:"w-[min(26rem,calc(100vw-1rem))] gap-3 p-3",children:[(0,s.jsxs)(x.DI,{className:"gap-1 px-1",children:[(0,s.jsx)(x.eO,{children:j("System Announcements")}),(0,s.jsx)("p",{className:"text-muted-foreground text-xs",children:j("Latest platform updates and notices")})]}),(0,s.jsxs)(f.tU,{value:r,onValueChange:c,children:[(0,s.jsxs)(f.j7,{className:"grid w-full grid-cols-2",children:[(0,s.jsxs)(f.Xi,{value:"notice",className:"gap-1.5",children:[(0,s.jsx)(n.A,{className:"size-3.5"}),j("Notice")]}),(0,s.jsxs)(f.Xi,{value:"announcements",className:"gap-1.5",children:[(0,s.jsx)(l.A,{className:"size-3.5"}),j("Timeline")]})]}),(0,s.jsx)(f.av,{value:"notice",className:"mt-2",children:(0,s.jsx)(w,{notice:h,loading:p,t:j})}),(0,s.jsx)(f.av,{value:"announcements",className:"mt-2",children:(0,s.jsx)(k,{announcements:m,loading:p,t:j})})]}),(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(u.$,{size:"sm",onClick:()=>a(!1),children:j("Close")})})]})]})}var z=a(54570),M=a(38393),A=a(75035),L=a(9276);let C=[];var S=a(31782);function _(e){let{className:t,children:a,...i}=e;return(0,s.jsx)("header",{className:(0,y.cn)("sticky top-0 z-40 h-[var(--app-header-height,3rem)] w-full shrink-0 bg-transparent",t),...i,children:(0,s.jsxs)("div",{className:"flex h-full items-center gap-1.5 px-2 sm:gap-2 sm:px-3",children:[(0,s.jsx)(S.x2,{variant:"ghost",className:"size-8"}),a]})})}var $=a(71114),I=a(13289),D=a(57129);function R(e){let{t}=(0,o.Bd)(),{status:a}=(0,I.s)(),{logo:i}=(0,D.R)(),r=e.variant??"sidebar",n=a?.system_name||e.defaultName||"New API",l=a?.version||e.defaultVersion||t("Unknown version");return"inline"===r?(0,s.jsxs)($.N_,{to:"/","aria-label":t("Go to home"),className:(0,y.cn)("text-foreground inline-flex h-7 items-center gap-1.5 rounded-md px-1.5 text-sm font-medium transition-colors outline-none select-none","hover:bg-accent focus-visible:ring-ring/40 focus-visible:ring-2"),children:[(0,s.jsx)("div",{className:"flex size-5 items-center justify-center overflow-hidden rounded-md",children:(0,s.jsx)("img",{src:i,alt:t("Logo"),className:"size-full rounded-md object-cover"})}),(0,s.jsx)("span",{className:"max-w-[12rem] truncate",children:n})]}):(0,s.jsx)(S.wZ,{children:(0,s.jsx)(S.FX,{children:(0,s.jsxs)(S.Uj,{size:"lg",className:"hover:text-sidebar-foreground active:text-sidebar-foreground cursor-default hover:bg-transparent active:bg-transparent",render:(0,s.jsx)("div",{}),children:[(0,s.jsx)("div",{className:"flex aspect-square size-8 items-center justify-center overflow-hidden rounded-lg",children:(0,s.jsx)("img",{src:i,alt:t("Logo"),className:"size-full rounded-lg object-cover"})}),(0,s.jsxs)("div",{className:"grid flex-1 text-start text-sm leading-tight group-data-[collapsible=icon]:hidden",children:[(0,s.jsx)("span",{className:"truncate font-semibold",children:n}),(0,s.jsx)("span",{className:"truncate text-xs",children:l})]})]})})})}var F=a(63415),E=a(68413),T=a(84368);function B(e){let{className:t,links:a,...i}=e,r=(0,E.useMemo)(()=>a.map(e=>({isActive:!1,disabled:!1,external:!1,...e})),[a]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"lg:hidden",children:(0,s.jsxs)(T.rI,{modal:!1,children:[(0,s.jsx)(T.ty,{render:(0,s.jsx)(u.$,{size:"icon",variant:"outline",className:"size-7"}),children:(0,s.jsx)(F.A,{})}),(0,s.jsx)(T.SQ,{side:"bottom",align:"start",children:r.map(e=>{let{title:t,href:a,isActive:i,disabled:r,external:n}=e;return(0,s.jsx)(T._2,{render:n?(0,s.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:i?"":"text-muted-foreground",children:t}):(0,s.jsx)($.N_,{to:a,className:i?"":"text-muted-foreground",disabled:r,children:t})},`${t}-${a}`)})})]})}),(0,s.jsx)("nav",{className:(0,y.cn)("hidden items-center space-x-4 lg:flex lg:space-x-4 xl:space-x-6",t),...i,children:r.map(e=>{let{title:t,href:a,isActive:i,disabled:r,external:n}=e;return n?(0,s.jsx)("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:`hover:text-primary text-sm font-medium transition-colors ${i?"":"text-muted-foreground"}`,children:t},`${t}-${a}`):(0,s.jsx)($.N_,{to:a,disabled:r,className:`hover:text-primary text-sm font-medium transition-colors ${i?"":"text-muted-foreground"}`,children:t},`${t}-${a}`)})})]})}function H(e){let{navLinks:t=C,showTopNav:a=!0,leftContent:n,showSearch:l=!0,rightContent:o,showNotifications:c=!0,showConfigDrawer:d=!0,showProfileDropdown:u=!0}=e,h=(0,L.v)(),x=h.length>0?h:t,m=(0,A.E)();return(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)(_,{children:[(0,s.jsx)(R,{variant:"inline"}),n?(0,s.jsx)("div",{className:"ms-2 flex items-center",children:n}):null,o??(0,s.jsxs)("div",{className:"ms-auto flex items-center gap-1 sm:gap-2",children:[a&&(0,s.jsx)("div",{className:"me-1 hidden lg:block",children:(0,s.jsx)(B,{links:x})}),l&&(0,s.jsx)(M.v,{}),c&&(0,s.jsx)(N,{open:m.popoverOpen,onOpenChange:m.setPopoverOpen,unreadCount:m.unreadCount,activeTab:m.activeTab,onTabChange:m.setActiveTab,notice:m.notice,announcements:m.announcements,loading:m.loading}),(0,s.jsx)(r.c,{}),d&&(0,s.jsx)(i.k,{}),u&&(0,s.jsx)(z.t,{})]})]})})}var O=a(98869),P=a(14078),U=a(25707),W=a(68954),G=a(99523),V=a(9676),K=a(89795),q=a(52523),Y=a(82814),X=a(83612),J=a(60770),Z=a(63162),Q=a(6242);function ee(e){return"string"==typeof e?e:e&&"object"==typeof e&&!Array.isArray(e)?("string"==typeof e.pathname?e.pathname:"")+("string"==typeof e.search?e.search:""):null}function et(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=e.split("?")[0];if(t.activeUrls?.some(e=>ee(e)===s)||"items"in t&&t.items&&t.items.some(t=>{if(!t?.url)return!1;let a=ee(t.url);if(!a)return!1;if(e===a)return!0;let i=a.split("?")[0],r=a.includes("?");return i===s&&(!r||!!r&&e===a)||!1}))return!0;
1if(!t.url)return!1;let i=ee(t.url);if(!i)return!1;if(e===i)return!0;let r=i.split("?")[0],n=i.includes("?");return s===r&&(!n||!!n&&e===i)||!!a&&!!e.split("/")[1]&&!!i&&e.split("/")[1]===i.split("/")[1]}var ea=a(55724),es=a(66552),ei=a(20598),er=a(7771),en=a(84619),el=a(83013);function eo(e){let{preset:t,active:a,loading:i,onOpen:r,onNavigate:n}=e;return"web"===t.type?(0,s.jsx)(S.Fg,{children:(0,s.jsx)(S.Cp,{isActive:a,render:(0,s.jsx)($.N_,{to:"/chat/$chatId",params:{chatId:t.id},onClick:n}),children:(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate whitespace-nowrap",children:t.name})})}):(0,s.jsx)(S.Fg,{children:(0,s.jsxs)(S.Cp,{onClick:()=>{i||r(t)},"aria-disabled":i?"true":void 0,isActive:!1,className:"justify-between",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate whitespace-nowrap",children:t.name}),i?(0,s.jsx)(ea.A,{className:"h-4 w-4 shrink-0 animate-spin"}):(0,s.jsx)(es.A,{className:"h-4 w-4 shrink-0"})]})})}function ec(e){let{preset:t,loading:a,onOpen:i}=e;return"web"===t.type?(0,s.jsx)(T._2,{render:(0,s.jsx)($.N_,{to:"/chat/$chatId",params:{chatId:t.id}}),children:t.name}):(0,s.jsxs)(T._2,{disabled:a,onClick:()=>{a||i(t)},children:[t.name,a?(0,s.jsx)(ea.A,{className:"ml-auto h-4 w-4 animate-spin opacity-70"}):(0,s.jsx)(es.A,{className:"ml-auto h-4 w-4 opacity-70"})]})}function ed(e){let t,{item:a}=e,{t:i}=(0,o.Bd)(),{chatPresets:r,serverAddress:n}=(0,en.w)(),{state:l,isMobile:c,setOpenMobile:d}=(0,S.cL)(),u=(0,G.z)({select:e=>e.href}),[h,x]=(0,E.useState)(null),m=(0,E.useRef)(null),p=(0,E.useMemo)(()=>r.filter(e=>"fluent"!==e.type),[r]),f=(0,E.useCallback)(async e=>{let t;if("web"===e.type)return;let a=(0,el.I9)(e.url);if(a&&m.current)return void ei.oR.info(i("Preparing your chat link, please try again in a moment."));if(a){m.current=e.id,x(e.id);try{t=await (0,er.G)()}catch(t){let e=t instanceof Error?t.message:i("Unable to prepare chat link. Please ensure you have an enabled API key.");ei.oR.error(e);return}finally{m.current=null,x(null)}}let s=(0,el.Kf)({template:e.url,apiKey:a?t:void 0,serverAddress:n});s?"u">typeof window&&(window.open(s,"_blank","noopener"),d(!1)):ei.oR.error(i("Invalid chat link. Please contact the administrator."))},[n,d,i]),g=(t=u.split("?")[0]).length>1?t.replace(/\/+$/,""):t;return 0===p.length?null:"collapsed"!==l||c?(0,s.jsxs)(Q.Nt,{defaultOpen:g.startsWith("/chat"),className:"group/collapsible",render:(0,s.jsx)(S.FX,{}),children:[(0,s.jsxs)(Q.R6,{className:"group/collapsible-trigger",render:(0,s.jsx)(S.Uj,{}),children:[a.icon&&(0,s.jsx)(a.icon,{className:"shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.title}),(0,s.jsx)(Z.A,{className:"ms-auto size-4 shrink-0 transition-transform duration-200 group-data-[panel-open]/collapsible-trigger:rotate-90"})]}),(0,s.jsx)(Q.Ke,{className:"CollapsibleContent",children:(0,s.jsx)(S.q9,{children:p.map(e=>(0,s.jsx)(eo,{preset:e,active:g===`/chat/${e.id}`,loading:h===e.id,onOpen:f,onNavigate:()=>d(!1)},e.id))})})]}):(0,s.jsx)(S.FX,{children:(0,s.jsxs)(T.rI,{children:[(0,s.jsxs)(T.ty,{render:(0,s.jsx)(S.Uj,{tooltip:a.title}),children:[a.icon&&(0,s.jsx)(a.icon,{className:"h-4 w-4 shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.title}),(0,s.jsx)(Z.A,{className:"ms-auto h-4 w-4 shrink-0 opacity-70"})]}),(0,s.jsx)(T.SQ,{align:"start",children:p.map(e=>(0,s.jsx)(ec,{preset:e,loading:h===e.id,onOpen:f},e.id))})]})})}function eu(e){let{title:t,items:a}=e,{state:i,isMobile:r}=(0,S.cL)(),n=(0,G.z)({select:e=>e.href});return(0,s.jsxs)(S.Cn,{className:"px-2 py-1",children:[(0,s.jsx)(S.jj,{className:"text-muted-foreground/70 px-2 text-[11px] font-medium tracking-wider uppercase",children:t}),(0,s.jsx)(S.wZ,{children:a.map(e=>{let t=`${e.title}-${e.url||e.type}`;return"chat-presets"===e.type?(0,s.jsx)(ed,{item:e},t):e.items?"collapsed"!==i||r?(0,s.jsx)(em,{item:e,href:n},t):(0,s.jsx)(ep,{item:e,href:n},t):(0,s.jsx)(ex,{item:e,href:n},t)})})]})}function eh(e){let{children:t}=e;return(0,s.jsx)(d.E,{className:"shrink-0 px-1 py-0 text-xs",children:t})}function ex(e){let{item:t,href:a}=e,{setOpenMobile:i}=(0,S.cL)();return(0,s.jsx)(S.FX,{children:(0,s.jsxs)(S.Uj,{isActive:et(a,t),tooltip:t.t
1itle,render:(0,s.jsx)($.N_,{to:t.url,onClick:()=>i(!1)}),children:[t.icon&&(0,s.jsx)(t.icon,{className:"shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:t.title}),t.badge&&(0,s.jsx)(eh,{children:t.badge})]})})}function em(e){let{item:t,href:a}=e,{setOpenMobile:i}=(0,S.cL)(),r=et(a,t),[n,l]=(0,E.useState)(()=>r);return(0,E.useEffect)(()=>{r&&l(!0)},[r]),(0,s.jsxs)(Q.Nt,{open:n,onOpenChange:l,className:"group/collapsible",render:(0,s.jsx)(S.FX,{}),children:[(0,s.jsxs)(Q.R6,{className:"group/collapsible-trigger",render:(0,s.jsx)(S.Uj,{tooltip:t.title}),children:[t.icon&&(0,s.jsx)(t.icon,{className:"shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:t.title}),t.badge&&(0,s.jsx)(eh,{children:t.badge}),(0,s.jsx)(Z.A,{className:"ms-auto size-4 shrink-0 transition-transform duration-200 group-data-[panel-open]/collapsible-trigger:rotate-90"})]}),(0,s.jsx)(Q.Ke,{className:"CollapsibleContent",children:(0,s.jsx)(S.q9,{children:t.items.map(e=>(0,s.jsx)(S.Fg,{children:(0,s.jsxs)(S.Cp,{isActive:et(a,e),render:(0,s.jsx)($.N_,{to:e.url,onClick:()=>i(!1)}),children:[e.icon&&(0,s.jsx)(e.icon,{className:"shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.title}),e.badge&&(0,s.jsx)(eh,{children:e.badge})]})},e.title))})})]})}function ep(e){let{item:t,href:a}=e;return(0,s.jsx)(S.FX,{children:(0,s.jsxs)(T.rI,{children:[(0,s.jsxs)(T.ty,{className:"group/dropdown-trigger",render:(0,s.jsx)(S.Uj,{tooltip:t.title,isActive:et(a,t)}),children:[t.icon&&(0,s.jsx)(t.icon,{className:"shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:t.title}),t.badge&&(0,s.jsx)(eh,{children:t.badge}),(0,s.jsx)(Z.A,{className:"ms-auto size-4 shrink-0 transition-transform duration-200 group-data-[popup-open]/dropdown-trigger:rotate-90"})]}),(0,s.jsx)(T.SQ,{side:"right",align:"start",sideOffset:4,children:(0,s.jsxs)(T.I,{children:[(0,s.jsxs)(T.lp,{children:[t.title," ",t.badge?`(${t.badge})`:""]}),(0,s.jsx)(T.mB,{}),t.items.map(e=>(0,s.jsxs)(T._2,{render:(0,s.jsx)($.N_,{to:e.url,className:`${et(a,e)?"bg-secondary":""}`}),children:[e.icon&&(0,s.jsx)(e.icon,{}),(0,s.jsx)("span",{className:"max-w-52 text-wrap",children:e.title}),e.badge&&(0,s.jsx)("span",{className:"ms-auto text-xs",children:e.badge})]},`${e.title}-${e.url}`))]})})]})})}var ef=a(24623);function eg(e){let{t}=(0,o.Bd)(),{setOpenMobile:a}=(0,S.cL)();return(0,s.jsx)(S.Gh,{className:"border-sidebar-border border-b px-2 py-2",children:(0,s.jsx)(S.wZ,{children:(0,s.jsx)(S.FX,{children:(0,s.jsxs)(S.Uj,{tooltip:t(e.view.parent.label),className:(0,y.cn)("text-muted-foreground hover:text-foreground","gap-1.5 font-medium"),render:(0,s.jsx)($.N_,{to:e.view.parent.to,onClick:()=>a(!1)}),children:[(0,s.jsx)(ef.A,{className:"size-4 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:t(e.view.parent.label)})]})})})})}function ej(){let{collapsible:e,variant:t}=(0,W.g)(),{key:a,view:i,navGroups:r}=function(){let{t:e}=(0,o.Bd)(),t=(0,G.z)({select:e=>e.pathname}),a=(0,q.n)(e=>e.auth.user?.role),s=(0,X.k)(),i=(0,Y.K)(s.navGroups),r=(0,E.useMemo)(()=>{let e=a??K.z7.GUEST,t=e>=K.z7.ADMIN;return i.filter(e=>"admin"!==e.id||t).map(t=>{let a=t.items.filter(t=>void 0===t.requiredRole||e>=t.requiredRole);return a.length===t.items.length?t:{...t,items:a}})},[i,a]),n=(0,V.G)(t);return n?{key:n.id,view:n,navGroups:n.getNavGroups(e)}:{key:"__root",view:null,navGroups:r}}(),n=(0,O.I)();return(0,s.jsxs)(S.Bx,{collapsible:e,variant:t,children:[i&&(0,s.jsx)(eg,{view:i}),(0,s.jsx)(S.Yv,{className:"py-2",children:(0,s.jsx)(P.N,{mode:"wait",initial:!1,children:(0,s.jsx)(U.PY1.div,{initial:!n&&J.mL.sidebarSlide.initial,animate:J.mL.sidebarSlide.animate,exit:n?void 0:J.mL.sidebarSlide.exit,transition:J.fI.fast,className:"flex flex-col",children:r.map(e=>(0,s.jsx)(eu,{...e},e.id||e.title))},a)})}),(0,s.jsx)(S.jM,{})]})}var ey=a(39130);function eb(){let{t:e}=(0,o.Bd)();return(0,s.jsx)("a",{className:"bg-primary text-primary-foreground hover:bg-primary/90 focus-visible:ring-ring fixed start-44 z-999 -translate-y-52 px-4 py-2 text-sm font-medium whitespace-nowrap opacity-95 shadow-sm transition focus:translate-y-3 focus:transform focus-visible:ring-1",href:"#content",children:e("Skip to Main")})}var ev=a(2049),ew=a(82033);function ek(e){let t="false"!==(0,ew.Ri)("sidebar_state");return(0,s.jsx)(W.U,{children:(0,s.jsx)(ev.Y,{children:(0,s.jsxs)(S.GB,{defaultOpen:t,className:"flex-col",children:[(0,s.jsx)(eb,{}),(0,s.jsx)(H,{}),(0,s.jsxs)("div",{className:"flex min-h-0 w-full flex-1",children:[(0,s.jsx)(ej,{}),(0,s.jsx)(S.sF,{className:(0,y.cn)("@container/content","h-[calc(100svh-var(--app-header-height,0px))]","min-h-0 overflow-hidden","peer-data-[variant=inset]:h-[calc(100svh-var(--app-header-height,0px)-(var(--spacing)*4))]"),children:e.children??(0,s.jsx)(ey.N8,{})})]})]})})})}var eN=a(82799),ez=a(47488),eM=a(60641),eA=a(44353),eL=a(97785);function eC(e){let{src:t,alt:a="logo",loading:i,logoLoaded:r,className:n}=e;return(0,s.jsx)("img",{src:t,alt:a,className:(0,y.cn)("h-6 w-6 rounded-full transition-opacity duration-200",!i&&r?"opacity-100":"opacity-0",n)})}function eS(e){let{navLinks:t=C,showThemeSwitch:a=!0,showLanguageSwitcher:i=!0,logo:n,siteName:l,homeUrl:c="/",showAuthButtons:d=!0,showNotifications:h=!0}=e,{t:x}=(0,o.Bd)(),m=(0,eN.Z)(),[p,f]=(0,E.useState)(!1),[g,j]=(0,E.useState)(!1),[b,v]=(0,E.useState)(null),[w,k]=(0,E.useState)(5),{auth:M}=(0,q.n)(),{systemName:S,logo:_,loading:I,logoLoaded:R}=(0,D.R)(),F=(0,L.v)(),T=(0,A.E)(),B=(0,ez.k)().location.pathname,H=!!M.user,O=F.length>0?F:t;(0,E.useEffect)(()=>{let e=()=>f(window.scrollY>20);return e(),window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]),(0,E.useEffect)(()=>(document.body.style.overflow=g?"hidden":"",()=>{document.body.style.overflow=""}),[g]),(0,E.useEffect)(()=>
1{if(!b)return;let e=window.setInterval(()=>{k(e=>Math.max(e-1,0))},1e3),t=window.setTimeout(()=>{let e=b.href;v(null),m({to:"/sign-in",search:{redirect:e}})},5e3);return()=>{window.clearInterval(e),window.clearTimeout(t)}},[b,m]);let P=(0,E.useCallback)(()=>{v(null),k(5)},[]),U=(0,E.useCallback)(()=>{let e=b?.href||"/";v(null),m({to:"/sign-in",search:{redirect:e}})},[b?.href,m]),W=(0,E.useCallback)(function(e,t){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.disabled)return void e.preventDefault();if(t.requiresAuth){e.preventDefault(),a&&j(!1),k(5),v({title:x(t.title),href:t.href});return}a&&j(!1)},[x]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("header",{className:"pointer-events-none fixed inset-x-0 top-0 z-50",children:(0,s.jsx)("div",{className:(0,y.cn)("pointer-events-auto mx-auto transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]",p?"max-w-[52rem] px-3 pt-3":"max-w-7xl px-4 pt-0 md:px-6"),children:(0,s.jsxs)("nav",{className:(0,y.cn)("flex items-center justify-between transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)]",p?"bg-background/60 ring-border/50 h-12 rounded-2xl pr-1.5 pl-4 shadow-[0_2px_16px_-6px_rgba(0,0,0,0.08),0_0_0_0.5px_rgba(0,0,0,0.02)] ring-[0.5px] backdrop-blur-2xl dark:shadow-[0_2px_16px_-6px_rgba(0,0,0,0.4)]":"h-16 px-2"),children:[(0,s.jsxs)($.N_,{to:c,className:"group flex shrink-0 items-center gap-2.5",children:[(0,s.jsx)("div",{className:"flex size-7 shrink-0 items-center justify-center transition-all duration-300 group-hover:scale-105",children:I?(0,s.jsx)(eL.E,{className:"size-full rounded-lg"}):n||(0,s.jsx)(eC,{src:_,loading:I,logoLoaded:R,className:"size-full rounded-lg object-contain"})}),(0,s.jsx)("span",{className:"text-sm font-semibold tracking-tight",children:I?(0,s.jsx)(eL.E,{className:"h-4 w-16"}):l||S})]}),(0,s.jsxs)("div",{className:"hidden items-center gap-0.5 sm:flex",children:[O.map((e,t)=>{let a=B===e.href;return e.external?(0,s.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer","aria-disabled":e.disabled,tabIndex:e.disabled?-1:void 0,onClick:t=>W(t,e),className:(0,y.cn)("text-muted-foreground hover:text-foreground rounded-lg px-3 py-1.5 text-[13px] font-medium transition-colors duration-200",e.disabled&&"pointer-events-none opacity-50"),children:x(e.title)},t):(0,s.jsx)($.N_,{to:e.href,disabled:e.disabled,onClick:t=>W(t,e),className:(0,y.cn)("rounded-lg px-3 py-1.5 text-[13px] font-medium transition-colors duration-200",a?"text-foreground":"text-muted-foreground hover:text-foreground",e.disabled&&"pointer-events-none opacity-50"),children:x(e.title)},t)}),(i||a||h)&&(0,s.jsx)("div",{className:"bg-border/40 mx-2 h-4 w-px"}),i&&(0,s.jsx)(r.c,{}),a&&(0,s.jsx)(eA.o,{}),h&&(0,s.jsx)(N,{open:T.popoverOpen,onOpenChange:T.setPopoverOpen,unreadCount:T.unreadCount,activeTab:T.activeTab,onTabChange:T.setActiveTab,notice:T.notice,announcements:T.announcements,loading:T.loading}),d&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"bg-border/40 mx-1 h-4 w-px"}),I?(0,s.jsx)(eL.E,{className:"h-8 w-20 rounded-lg"}):H?(0,s.jsx)(z.t,{}):(0,s.jsx)(u.$,{size:"sm",className:"h-8 rounded-lg px-3.5 text-xs font-medium",render:(0,s.jsx)($.N_,{to:"/sign-in"}),children:x("Sign in")})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-2 sm:hidden",children:[a&&(0,s.jsx)(eA.o,{}),d&&!I&&H&&(0,s.jsx)(z.t,{}),(0,s.jsx)(u.$,{type:"button",variant:"ghost",size:"icon",className:"size-9",onClick:()=>j(e=>!e),"aria-label":x("Toggle navigation menu"),children:(0,s.jsxs)("div",{className:"relative size-4",children:[(0,s.jsx)("span",{className:(0,y.cn)("absolute inset-x-0 block h-[1.5px] origin-center rounded-full bg-current transition-all duration-300",g?"top-[7px] rotate-45":"top-[3px]")}),(0,s.jsx)("span",{className:(0,y.cn)("absolute inset-x-0 top-[7px] block h-[1.5px] rounded-full bg-current transition-all duration-300",g?"scale-x-0 opacity-0":"opacity-100")}),(0,s.jsx)("span",{className:(0,y.cn)("absolute inset-x-0 block h-[1.5px] origin-center rounded-full bg-current transition-all duration-300",g?"top-[7px] -rotate-45":"top-[11px]")})]})})]})]})})}),(0,s.jsx)("div",{className:(0,y.cn)("bg-background/98 fixed inset-0 z-40 backdrop-blur-2xl transition-all duration-500 ease-[
1cubic-bezier(0.16,1,0.3,1)] sm:pointer-events-none sm:hidden",g?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),children:(0,s.jsxs)("div",{className:"flex h-full flex-col justify-between px-8 pt-20 pb-10",children:[(0,s.jsx)("nav",{className:"flex flex-col gap-1",children:O.map((e,t)=>{let a=B===e.href,i=(0,y.cn)("flex items-center gap-3 py-3 text-base font-medium tracking-tight transition-all duration-500 ease-[cubic-bezier(0.16,1,0.3,1)]",g?"translate-y-0 opacity-100":"translate-y-4 opacity-0",a?"text-foreground":"text-muted-foreground",e.disabled&&"pointer-events-none opacity-50"),r={transitionDelay:g?`${100+50*t}ms`:"0ms"};return e.external?(0,s.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer","aria-disabled":e.disabled,tabIndex:e.disabled?-1:void 0,onClick:t=>W(t,e,!0),className:i,style:r,children:x(e.title)},t):(0,s.jsx)($.N_,{to:e.href,disabled:e.disabled,onClick:t=>W(t,e,!0),className:i,style:r,children:x(e.title)},t)})}),(0,s.jsx)("div",{className:(0,y.cn)("flex flex-col gap-3 transition-all duration-500",g?"translate-y-0 opacity-100":"translate-y-4 opacity-0"),style:{transitionDelay:g?"250ms":"0ms"},children:d&&(0,s.jsx)($.N_,{to:H?"/dashboard":"/sign-in",onClick:()=>j(!1),className:"bg-foreground text-background inline-flex h-10 items-center justify-center rounded-lg text-sm font-medium transition-opacity hover:opacity-90 active:opacity-80",children:H?x("Go to Dashboard"):x("Sign in")})})]})}),(0,s.jsx)(eM.l,{open:!!b,onOpenChange:e=>{e||P()},title:x("Sign in required"),description:x("Please sign in to view {{module}}.",{module:b?.title||""}),contentClassName:"sm:max-w-md",contentHeight:"auto",footer:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(u.$,{variant:"outline",onClick:P,children:x("Cancel")}),(0,s.jsx)(u.$,{onClick:U,children:x("Sign in now")})]}),children:(0,s.jsx)("div",{className:"bg-muted/40 text-muted-foreground rounded-lg px-3 py-2 text-sm",children:x("Redirecting to sign in in {{seconds}} seconds.",{seconds:w})})})]})}function e_(e){return(0,s.jsxs)("div",{className:"bg-background text-foreground relative min-h-svh overflow-x-clip",children:[(0,s.jsx)(eS,{navContent:e.navContent,navLinks:e.navLinks,showThemeSwitch:e.showThemeSwitch,showAuthButtons:e.showAuthButtons,showNotifications:e.showNotifications,logo:e.logo,siteName:e.siteName,...e.headerProps}),!1!==e.showMainContainer?(0,s.jsx)("main",{className:"container px-4 py-6 pt-20 md:px-4",children:e.children}):e.children]})}function e$(e){let{className:t,fluid:a=!0,...i}=e;return(0,s.jsx)("main",{className:(0,y.cn)("flex min-h-0 flex-1 flex-col overflow-hidden",!a&&"@7xl/content:mx-auto @7xl/content:w-full @7xl/content:max-w-7xl",t),...i})}var eI=a(94150);function eD(e){return null}function eR(e){return null}function eF(e){return null}function eE(e){return null}function eT(e){let[t,a]=(0,E.useState)(null),i=null,r=null,n=null,l=null;return E.Children.forEach(e.children,e=>{(0,E.isValidElement)(e)&&(e.type===eD?i=e.props.children:e.type===eR?r=e.props.children:e.type===eF?n=e.props.children:e.type===eE&&(l=e.props.children))}),(0,s.jsx)(eI.u,{container:t,children:(0,s.jsxs)(e$,{children:[(0,s.jsxs)("div",{className:"shrink-0 px-3 pt-3 pb-2.5 sm:px-4 sm:pt-5 sm:pb-3",children:[null!=l&&(0,s.jsx)("div",{className:"mb-2 sm:mb-3",children:l}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-x-3 gap-y-2 sm:gap-x-4",children:[(0,s.jsx)("div",{className:"min-w-0 flex-1",children:(0,s.jsx)("h2",{className:"truncate text-base font-bold tracking-tight sm:text-lg",children:i})}),null!=r&&(0,s.jsx)("div",{className:"flex shrink-0 flex-wrap items-center justify-end gap-2 sm:gap-x-4",children:r})]})]}),(0,s.jsx)("div",{className:e.fixedContent?"min-h-0 flex-1 overflow-hidden px-3 pt-1 pb-3 sm:px-4 sm:pt-1.5 sm:pb-4":"min-h-0 flex-1 overflow-auto px-3 pt-1 pb-3 sm:px-4 sm:pt-1.5 sm:pb-4",children:n}),(0,s.jsx)("div",{ref:a,className:"bg-background shrink-0 border-t px-3 py-2.5 empty:hidden sm:px-4 sm:py-3"})]})})}eD.displayName="SectionPageLayout.Title",eR.displayName="SectionPageLayout.Actions",eF.displayName="SectionPageLayout.Content",eE.displayName="SectionPageLayout.Breadcrumb",eT.Title=eD,eT.Actions=eR,eT.Content=eF,eT.Breadcrumb=eE,a(95088),a(13683),a(20687),a(72443),a(61650)},9676(e,t,a){let s=[a(61650).k];function i(e){return s.find(t=>t.pathPattern.test(e))??null}function r(e,t){let a=i(e);return a?a.getNavGroups(t):null}a.d(t,{G:()=>i,U:()=>r})},39130(e,t,a){var s=a(72361),i=a(47488),r=a(64798),n=a(98869),l=a(25707),o=a(60770);function c(e){return(0,n.I)()?(0,s.jsx)("div",{className:e.className,children:e.children}):(0,s.jsx)(l.PY1.div,{initial:o.mL.pageEnter.initial,animate:o.mL.pageEnter.animate,transition:o.fI.default,className:e.className,children:e.children})}function d(){let e=(0,n.I)(),t=(0,i.k)({select:e=>e.matches.at(-1)?.routeId??e.location.pathname});return e?(0,s.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,s.jsx)(r.s,{})}):(0,s.jsx)(l.PY1.div,{initial:o.mL.pageEnter.initial,animate:o.mL.pageEnter.animate,transition:o.fI.fast,className:"flex min-h-0 flex-1 flex-col",children:(0,s.jsx)(r.s,{})},t)}function u(e){return(0,n.I)()?(0,s.jsx)("div",{className:e.className,children:e.children}):(0,s.jsx)(l.PY1.div,{variants:e.variants??o.j0,initial:"initial",animate:"animate",className:e.className,children:e.children})}function h(e){return(0,s.jsx)(l.PY1.div,{variants:e.variants??o.DX,className:e.className,children:e.children})}function x(e){return(0,n.I)()?(0,s.jsx)("div",{className:e.className,children:e.children}):(0,s.jsx)(l.PY1.div,{variants:o.AK,initial:"initial",animate:"animate",className:e.className,children:e.children})}function m(e){return(0,s.jsx)(l.PY1.div,{variants:o.mz,className:e.className,children:e.children})}function p(e){return(0,n.I)()?(0,s.jsx)("div",{className:e.className,children:e.children}):(0,s.jsx)(l.PY1.div,{initial:o.mL.fadeIn.initial,animate:o.mL.fadeIn.animate,transition:{...o.fI.default,delay:e.delay},className:e.className,children:e.children})}a.d(t,{Hd:()=>m,JX:()=>u,N8:()=>d,Tc:()=>h,Z_:()=>c,_A:()=>p,nD:()=>x})},54570(e,t,a){var s=a(72361),i=a(82799),r=a(25787),n=a(30669),l=a(26197),o=a(9671),c=a(68413),d=a(6702),u=a(95088),h=a(13683),x=a(72868),m=a(84368),p=a(20687),f=a(82814),g=a(72443),j=a(1
15585),y=a(89795),b=a(52523);let v="font-semibold text-white";function w(){let{t:e}=(0,d.Bd)(),t=(0,i.Z)(),[a,w]=(0,p.Ay)(),k=(0,b.n)(e=>e.auth.user),{displayName:N,roleLabel:z}=(0,g.F)(k),M=k?.role===y.z7.SUPER_ADMIN,A=(0,f.I)("/wallet"),L=k?.username||N,C=(0,j.f)(L),S=(0,c.useMemo)(()=>(0,j.u)(L),[L]);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(m.rI,{modal:!1,children:[(0,s.jsx)(m.ty,{render:(0,s.jsx)(x.$,{variant:"ghost",className:"relative size-6 p-0"}),children:(0,s.jsx)(h.eu,{className:"size-6",children:(0,s.jsx)(h.q5,{className:`${v} text-[11px]`,style:S,children:C})})}),(0,s.jsxs)(m.SQ,{align:"end",sideOffset:8,className:"w-56",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-1.5 py-1.5",children:[(0,s.jsx)(h.eu,{className:"size-8",children:(0,s.jsx)(h.q5,{className:`${v} text-xs`,style:S,children:C})}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 overflow-hidden",children:[(0,s.jsx)("p",{className:"text-foreground truncate text-sm font-medium",children:N}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:z}),k?.group&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-muted-foreground text-xs",children:"·"}),(0,s.jsx)("span",{className:"text-muted-foreground truncate text-xs",children:String(k.group)})]})]})]})]}),(0,s.jsx)(m.mB,{}),(0,s.jsxs)(m._2,{onClick:()=>t({to:"/profile"}),children:[(0,s.jsx)(r.A,{className:"size-4"}),e("Profile")]}),A&&(0,s.jsxs)(m._2,{onClick:()=>t({to:"/wallet"}),children:[(0,s.jsx)(n.A,{className:"size-4"}),e("Wallet")]}),M&&(0,s.jsxs)(m._2,{onClick:()=>t({to:"/system-settings/site/$section",params:{section:"system-info"}}),children:[(0,s.jsx)(l.A,{className:"size-4"}),e("System Settings")]}),(0,s.jsx)(m.mB,{}),(0,s.jsxs)(m._2,{variant:"destructive",onClick:()=>w(!0),children:[(0,s.jsx)(o.A,{className:"size-4"}),e("Sign out")]})]})]}),(0,s.jsx)(u.I,{open:!!a,onOpenChange:w})]})}a.d(t,{t:()=>w})},65201(e,t,a){a.d(t,{K:()=>x});var s=a(72361),i=a(57735),r=a(68413),n=a(56275);let l=` 2<style> 3 :host { 4 display: block; 5 width: 100%; 6 color: inherit; 7 font: inherit; 8 } 9 10 *, 11 *::before, 12 *::after { 13 box-sizing: border-box; 14 } 15 16 img, 17 video, 18 iframe { 19 max-width: 100%; 20 } 21 22 iframe { 23 border: 0; 24 } 25</style> 26`,o={ADD_ATTR:["allowfullscreen","autoplay","class","controls","default","id","kind","label","loading","loop","muted","playsinline","poster","preload","referrerpolicy","rel","srclang","style","target"],ADD_TAGS:["audio","iframe","picture","source","style","track","video"],FORBID_ATTR:["srcdoc"],FORBID_TAGS:["base","embed","link","meta","object","script"],FORCE_BODY:!0};function c(e){let t=document.documentElement.classList.contains("dark");e.classList.toggle("dark",t)}function d(e){let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let a=t.current;if(!a)return;let s=a.shadowRoot??a.attachShadow({mode:"open"}),i=[...document.head.querySelectorAll('style, link[rel="stylesheet"]')].map(e=>e.cloneNode(!0)),r=document.createElement("div");c(r),r.innerHTML=e.html;let n=document.createElement("template");n.innerHTML=l,s.replaceChildren(...i,n.content,r);let o=new MutationObserver(()=>c(r));return o.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>o.disconnect()},[e.html]),(0,s.jsx)("div",{ref:t,className:(0,n.cn)("block w-full",e.className)})}function u(e){let t=e.variant??"inline",a=(0,r.useMemo)(()=>(function(e,t){if("isolated"===t){var a=i.A.sanitize(e,o);if("u"<typeof document)return a;let t=document.createElement("template");return t.innerHTML=a,t.content.querySelectorAll('a[target="_blank"]').forEach(e=>{let t=new Set(e.getAttribute("rel")?.split(/\s+/).filter(Boolean)??[]);t.add("noopener"),t.add("noreferrer"),e.setAttribute("rel",[...t].join(" "))}),t.content.querySelectorAll("iframe").forEach(e=>{e.removeAttribute("srcdoc"),e.setAttribute("sandbox","allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation"),e.setAttribute("referrerpolicy","no-referrer"),e.hasAttribute("loading")||e.setAttribute("loading","lazy")}),t.innerHTML}return i.A.sanitize(e)})(e.content,t),[e.content,t]);return"isolated"===t?(0,s.jsx)(d,{className:e.className,html:a}):(0,s.jsx)("div",{className:(0,n.cn)("prose prose-neutral dark:prose-invert max-w-none",e.className),dangerouslySetInnerHTML:{__html:a}})}var h=a(26403);function x(e){return"html"===e.mode?(0,s.jsx)(u,{content:e.content,className:e.className,variant:e.htmlVariant}):(0,s.jsx)(h.Markdown,{breaks:e.breaks,className:e.className,children:e.content})}},38393(e,t,a){var s=a(72361),i=a(38766),r=a(6702),n=a(2049),l=a(56275
26),o=a(72868);function c(e){let{className:t="",placeholder:a}=e,{t:c}=(0,r.Bd)(),{setOpen:d}=(0,n.S)(),u=a??c("Search");return(0,s.jsxs)(o.$,{variant:"outline",className:(0,l.cn)("bg-muted/25 group text-muted-foreground hover:bg-accent relative h-8 w-full flex-1 justify-start rounded-md text-sm font-normal shadow-none sm:w-40 sm:pe-12 md:flex-none lg:w-52 xl:w-64",t),onClick:()=>d(!0),"aria-label":u,children:[(0,s.jsx)(i.A,{"aria-hidden":"true",className:"absolute start-1.5 top-1/2 -translate-y-1/2",size:16}),(0,s.jsx)("span",{className:"ms-4",children:u}),(0,s.jsxs)("kbd",{className:"bg-muted group-hover:bg-accent pointer-events-none absolute end-[0.3rem] top-[0.3rem] hidden h-5 items-center gap-1 rounded border px-1.5 font-mono text-[10px] font-medium opacity-100 select-none sm:flex",children:[(0,s.jsx)("span",{className:"text-xs",children:"â"}),c("K")]})]})}a.d(t,{v:()=>c})},95088(e,t,a){var s=a(72361),i=a(96962),r=a(82799),n=a(68413),l=a(6702),o=a(20598),c=a(73280),d=a(86023),u=a(77055);function h(e){let{open:t,onOpenChange:a}=e,{t:h}=(0,l.Bd)(),x=(0,r.Z)(),m=(0,i.jE)(),[p,f]=(0,n.useState)(!1),g=async()=>{f(!0);try{let e=await (0,d.ri)();if(!e.success)return void o.oR.error(e.message||h("Failed to sign out session"));(0,u.BR)(m),o.oR.success(h("Signed out")),x({to:"/sign-in",replace:!0})}catch(e){o.oR.error(e instanceof Error?e.message:h("Failed to sign out session"))}finally{f(!1)}};return(0,s.jsx)(c.T,{open:t,onOpenChange:a,title:h("Sign out"),desc:h("Are you sure you want to sign out? You will need to sign in again to access your account."),confirmText:h("Sign out"),handleConfirm:g,isLoading:p,className:"sm:max-w-sm"})}a.d(t,{I:()=>h})},44353(e,t,a){var s=a(72361),i=a(94992),r=a(27913),n=a(67834),l=a(68413),o=a(6702),c=a(72868),d=a(84368),u=a(48707),h=a(56275);function x(){let{t:e}=(0,o.Bd)(),{theme:t,setTheme:a}=(0,u.D)();return(0,l.useEffect)(()=>{let e=document.querySelector("meta[name='theme-color']");e&&e.setAttribute("content","dark"===t?"#020817":"#fff")},[t]),(0,s.jsxs)(d.rI,{modal:!1,children:[(0,s.jsxs)(d.ty,{render:(0,s.jsx)(c.$,{variant:"ghost",size:"icon",className:"h-9 w-9"}),children:[(0,s.jsx)(i.A,{className:"size-[1.2rem] scale-100 rotate-0 transition-all dark:scale-0 dark:-rotate-90"}),(0,s.jsx)(r.A,{className:"absolute size-[1.2rem] scale-0 rotate-90 transition-all dark:scale-100 dark:rotate-0"}),(0,s.jsx)("span",{className:"sr-only",children:e("Toggle theme")})]}),(0,s.jsxs)(d.SQ,{align:"end",children:[(0,s.jsxs)(d._2,{onClick:()=>a("light"),children:[e("Light")," ",(0,s.jsx)(n.A,{size:14,className:(0,h.cn)("ms-auto","light"!==t&&"hidden")})]}),(0,s.jsxs)(d._2,{onClick:()=>a("dark"),children:[e("Dark"),(0,s.jsx)(n.A,{size:14,className:(0,h.cn)("ms-auto","dark"!==t&&"hidden")})]}),(0,s.jsxs)(d._2,{onClick:()=>a("system"),children:[e("System"),(0,s.jsx)(n.A,{size:14,className:(0,h.cn)("ms-auto","system"!==t&&"hidden")})]})]})]})}a.d(t,{o:()=>x})},13683(e,t,a){var s=a(72361),i=a(13826),r=a(44118);a(68413);var n=a(56275);function l(e){let{className:t,size:a="default",...r}=e;return(0,s.jsx)(i.C,{"data-slot":"avatar","data-size":a,className:(0,n.cn)("group/avatar after:border-border relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten",t),...r})}function o(e){let{className:t,...a}=e;return(0,s.jsx)(r.q,{"data-slot":"avatar-fallback",className:(0,n.cn)("bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs",t),...a})}a.d(t,{eu:()=>l,q5:()=>o})},15161(e,t,a){var s=a(72361),i=a(54859),r=a(34514),n=a(27075),l=a(49815),o=a(11803),c=a(56275);function d(e){let{className:t,children:a,...l}=e;return(0,s.jsxs)(i.V,{"data-slot":"scroll-area",className:(0,c.cn)("relative",t),...l,children:[(0,s.jsx)(r.B,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:a}),(0,s.jsx)(u,{}),(0,s.jsx)(n.I,{})]})}function u(e){let{className:t,orientation:a="vertical",...i}=e;return(0,s.jsx)(l.V,{"data-slot":"scroll-area-scrollbar","data-orientation":a,orientation:a,className:(0,
26c.cn)("flex touch-none p-px transition-colors select-none data-horizontal:h-2.5 data-horizontal:flex-col data-horizontal:border-t data-horizontal:border-t-transparent data-vertical:h-full data-vertical:w-2.5 data-vertical:border-l data-vertical:border-l-transparent",t),...i,children:(0,s.jsx)(o.l,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}a.d(t,{F:()=>d})},31782(e,t,a){var s=a(72361),i=a(56722),r=a(36198),n=a(97325),l=a(74401),o=a(65291),c=a(68413),d=a(72868);a(1738),a(38939);var u=a(74559);a(97785);var h=a(47303),x=a(38009),m=a(56275);let p=c.createContext(null);function f(){let e=c.useContext(p);if(!e)throw Error("useSidebar must be used within a SidebarProvider.");return e}function g(e){let{defaultOpen:t=!0,open:a,onOpenChange:i,className:r,style:n,children:l,...o}=e,d=(0,x.a)(),[u,h]=c.useState(!1),[f,g]=c.useState(t),j=a??f,y=c.useCallback(e=>{let t="function"==typeof e?e(j):e;i?i(t):g(t),document.cookie=`sidebar_state=${t}; path=/; max-age=604800`},[i,j]),b=c.useCallback(()=>d?h(e=>!e):y(e=>!e),[d,y,h]);c.useEffect(()=>{let e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),b())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[b]);let v=j?"expanded":"collapsed",w=c.useMemo(()=>({state:v,open:j,setOpen:y,isMobile:d,openMobile:u,setOpenMobile:h,toggleSidebar:b}),[v,j,y,d,u,h,b]);return(0,s.jsx)(p.Provider,{value:w,children:(0,s.jsx)("div",{"data-slot":"sidebar-wrapper",style:{"--sidebar-width":"13rem","--sidebar-width-icon":"2.75rem",...n},className:(0,m.cn)("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex min-h-svh w-full",r),...o,children:l})})}function j(e){let{side:t="left",variant:a="sidebar",collapsible:i="offcanvas",className:r,children:n,dir:l,...o}=e,{isMobile:c,state:d,openMobile:h,setOpenMobile:x}=f();return"none"===i?(0,s.jsx)("div",{"data-slot":"sidebar",className:(0,m.cn)("bg-sidebar text-sidebar-foreground flex h-full w-(--sidebar-width) flex-col",r),...o,children:n}):c?(0,s.jsx)(u.cj,{open:h,onOpenChange:x,...o,children:(0,s.jsxs)(u.h,{dir:l,"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:{"--sidebar-width":"17rem"},side:t,children:[(0,s.jsxs)(u.Fm,{className:"sr-only",children:[(0,s.jsx)(u.qp,{children:"Sidebar"}),(0,s.jsx)(u.Qs,{children:"Displays the mobile sidebar."})]}),(0,s.jsx)("div",{className:"flex h-full w-full flex-col",children:n})]})}):(0,s.jsxs)("div",{className:"group peer text-sidebar-foreground hidden md:block","data-state":d,"data-collapsible":"collapsed"===d?i:"","data-variant":a,"data-side":t,"data-slot":"sidebar",children:[(0,s.jsx)("div",{"data-slot":"sidebar-gap",className:(0,m.cn)("relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===a||"inset"===a?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)")}),(0,s.jsx)("div",{"data-slot":"sidebar-container","data-side":t,className:(0,m.cn)("fixed top-[var(--app-header-height,0px)] bottom-0 z-10 hidden h-[calc(100svh-var(--app-header-height,0px))] w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex","floating"===a||"inset"===a?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...o,children:(0,s.jsx)("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar group-data-[variant=floating]:ring-sidebar-border flex size-full flex-col group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1",children:n})})]})}function y(e){let{className:t,onClick:a,...i}=e,{toggleSidebar:r}=f();return(0,s.jsxs)(d.$,{"data-sidebar":"trigger","data-slot":"sidebar-tr
26igger",variant:"ghost",size:"icon-sm",className:(0,m.cn)(t),onClick:e=>{a?.(e),r()},...i,children:[(0,s.jsx)(l.n,{icon:n.A,strokeWidth:2}),(0,s.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})}function b(e){let{className:t,...a}=e,{toggleSidebar:i}=f();return(0,s.jsx)("button",{"data-sidebar":"rail","data-slot":"sidebar-rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:i,title:"Toggle Sidebar",className:(0,m.cn)("hover:after:bg-sidebar-border absolute inset-y-0 z-20 hidden w-4 transition-all ease-linear group-data-[side=left]:-right-4 group-data-[side=right]:left-0 after:absolute after:inset-y-0 after:start-1/2 after:w-[2px] sm:flex ltr:-translate-x-1/2 rtl:-translate-x-1/2","in-data-[side=left]:cursor-w-resize in-data-[side=right]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","hover:group-data-[collapsible=offcanvas]:bg-sidebar group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",t),...a})}function v(e){let{className:t,...a}=e;return(0,s.jsx)("main",{"data-slot":"sidebar-inset",className:(0,m.cn)("bg-background relative flex w-full flex-1 flex-col md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),...a})}function w(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:(0,m.cn)("flex flex-col gap-2 p-2",t),...a})}function k(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:(0,m.cn)("no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden",t),...a})}function N(e){let{className:t,...a}=e;return(0,s.jsx)("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:(0,m.cn)("relative flex w-full min-w-0 flex-col p-2",t),...a})}function z(e){let{className:t,render:a,...s}=e;return(0,r.C)({defaultTagName:"div",props:(0,i.v6)({className:(0,m.cn)("flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0",t)},s),render:a,state:{slot:"sidebar-group-label",sidebar:"group-label"}})}function M(e){let{className:t,...a}=e;return(0,s.jsx)("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:(0,m.cn)("flex w-full min-w-0 flex-col gap-1",t),...a})}function A(e){let{className:t,...a}=e;return(0,s.jsx)("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:(0,m.cn)("group/menu-item relative",t),...a})}let L=(0,o.F)("peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-muted hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-muted data-open:hover:text-sidebar-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent data-active:hover:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate",{variants:{variant:{default:"hover:bg-muted hover:text-sidebar-foreground",outline:"bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-muted hover:text-sidebar-foreground hover:shadow-[0_0_0_1px_var(--muted)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:p-0!"}},defaultVariants:{variant:"default",size:"default"}});function C(e){let{render:t,isActive:a=!1,variant:n="default",size:l="default",tooltip:o,className:c,...d}=e,{isMobile:u,state:x}=f(),p=(0,r.C)({defaultTagName:"button",props:(0,i.v6)({className:(0,m.cn)(L({variant:n,size:l}
26),c)},d),render:o?(0,s.jsx)(h.k$,{render:t}):t,state:{slot:"sidebar-menu-button",sidebar:"menu-button",size:l,active:a}});return o?("string"==typeof o&&(o={children:o}),(0,s.jsx)(h.Bc,{delay:0,children:(0,s.jsxs)(h.m_,{children:[p,(0,s.jsx)(h.ZI,{side:"right",align:"center",hidden:"collapsed"!==x||u,...o})]})})):p}function S(e){let{className:t,...a}=e;return(0,s.jsx)("ul",{"data-slot":"sidebar-menu-sub","data-sidebar":"menu-sub",className:(0,m.cn)("border-sidebar-border mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 group-data-[collapsible=icon]:hidden",t),...a})}function _(e){let{className:t,...a}=e;return(0,s.jsx)("li",{"data-slot":"sidebar-menu-sub-item","data-sidebar":"menu-sub-item",className:(0,m.cn)("group/menu-sub-item relative",t),...a})}function $(e){let{render:t,size:a="md",isActive:s=!1,className:n,...l}=e;return(0,r.C)({defaultTagName:"a",props:(0,i.v6)({className:(0,m.cn)("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground ring-sidebar-ring outline-hidden group-data-[collapsible=icon]:hidden hover:bg-muted hover:text-sidebar-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[size=md]:text-sm data-[size=sm]:text-xs data-active:bg-sidebar-accent data-active:text-sidebar-accent-foreground data-active:hover:bg-sidebar-accent data-active:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground",n)},l),render:t,state:{slot:"sidebar-menu-sub-button",sidebar:"menu-sub-button",size:a,active:s}})}a.d(t,{Bx:()=>j,Cn:()=>N,Cp:()=>$,FX:()=>A,Fg:()=>_,GB:()=>g,Gh:()=>w,Uj:()=>C,Yv:()=>k,cL:()=>f,jM:()=>b,jj:()=>z,q9:()=>S,sF:()=>v,wZ:()=>M,x2:()=>y})},68954(e,t,a){var s=a(72361),i=a(68413),r=a(82033);let n="layout_collapsible",l="layout_variant",o="inset",c="icon",d=(0,i.createContext)(null);function u(e){let{children:t}=e,[a,u]=(0,i.useState)(()=>(0,r.Ri)(n)||c),[h,x]=(0,i.useState)(()=>(0,r.Ri)(l)||o),m=e=>{u(e),(0,r.TV)(n,e,604800)},p=e=>{x(e),(0,r.TV)(l,e,604800)};return(0,s.jsx)(d,{value:{resetLayout:()=>{m(c),p(o)},defaultCollapsible:c,collapsible:a,setCollapsible:m,defaultVariant:o,variant:h,setVariant:p},children:t})}function h(){let e=(0,i.useContext)(d);if(!e)throw Error("useLayout must be used within a LayoutProvider");return e}a.d(t,{U:()=>u,g:()=>h})},2049(e,t,a){a.d(t,{Y:()=>b,S:()=>v});var s=a(72361),i=a(68413),r=a(82799),n=a(99523),l=a(84e3),o=a(63162),c=a(94992),d=a(27913),u=a(66662),h=a(6702),x=a(97653),m=a(48707),p=a(83612),f=a(9676),g=a(15161);function j(){let{t:e}=(0,h.Bd)(),t=(0,r.Z)(),{setTheme:a}=(0,m.D)(),{open:j,setOpen:y}=v(),{pathname:b}=(0,n.z)(),w=(0,p.k)(),k=(0,f.U)(b,e)??w.navGroups,N=i.useCallback(e=>{y(!1),e()},[y]);return(0,s.jsx)(x.Gj,{modal:!0,open:j,onOpenChange:y,children:(0,s.jsxs)(x.uB,{children:[(0,s.jsx)(x.G7,{placeholder:e("Type a command or search...")}),(0,s.jsx)(x.oI,{children:(0,s.jsxs)(g.F,{className:"h-72 pe-1",children:[(0,s.jsx)(x.xL,{children:e("No results found.")}),k.map(e=>(0,s.jsx)(x.L$,{heading:e.title,children:e.items.map((e,a)=>e.url?(0,s.jsxs)(x.h_,{value:e.title,onSelect:()=>{N(()=>t({to:e.url}))},children:[(0,s.jsx)("div",{className:"flex size-4 items-center justify-center",children:(0,s.jsx)(l.A,{className:"text-muted-foreground/80 size-2"})}),e.title]},`${e.url}-${a}`):e.items?.map((a,i)=>(0,s.jsxs)(x.h_,{value:`${e.title}-${a.url}`,onSelect:()=>{N(()=>t({to:a.url}))},children:[(0,s.jsx)("div",{className:"flex size-4 items-center justify-center",children:(0,s.jsx)(l.A,{className:"text-muted-foreground/80 size-2"})}),e.title," ",(0,s.jsx)(o.A,{})," ",a.title]},`${e.title}-${a.url}-${i}`)))},e.id||e.title)),(0,s.jsx)(x.fx,{}),(0,s.jsxs)(x.L$,{heading:"Theme",children:[(0,s.jsxs)(x.h_,{onSelect:()=>N(()=>a("light")),children:[(0,s.jsx)(c.A,{})," ",(0,s.jsx)("span",{children:e("Light")})]}),(0,s.jsxs)(x.h_,{onSelect:()=>N(()=>a("dark")),children:[(0,s.jsx)(d.A,{className:"scale-90"}),(0,s.jsx)("span",{children:e("Dark")})]}),(0,s.jsxs)(x.h_,{onSelect:()=>N(()=>a("system")),children:[(0,s.jsx)(u.A,{}),(0,s.jsx)("span",{children:e("System")})]})]})]})})]})})}let y=(0,i.createContext)(null);function b(e){let{children:t}=e,[a,r]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=e=>
26{"k"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),r(e=>!e))};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]),(0,s.jsxs)(y.Provider,{value:{open:a,setOpen:r},children:[t,(0,s.jsx)(j,{})]})}let v=()=>{let e=(0,i.useContext)(y);if(!e)throw Error("useSearch has to be used within SearchProvider");return e}},86023(e,t,a){var s=a(25500),i=a(22990),r=a(52523),n=a(93870);async function l(e){let t=e.turnstile??"";return(await i.FH.post(`/api/user/login?turnstile=${t}`,{username:e.username,password:e.password},{skipAuthRefresh:!0})).data}async function o(e){return(await i.FH.post("/api/user/login/2fa",e,{skipAuthRefresh:!0})).data}async function c(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];try{return await e.request(e.getExpectedSID())}catch(i){let a=s.A.isAxiosError(i)?i.response?.data?.code:void 0;if(t&&s.A.isAxiosError(i)&&i.response?.status===409&&"AUTH_SESSION_MISMATCH"===a){let t=await e.refresh();if("authenticated"===t.kind)return c(e,!1);if("anonymous"===t.kind)return{success:!0,message:""}}throw i}}async function d(){return c({getExpectedSID:()=>r.n.getState().auth.session?.sid,request:async e=>(await i.FH.post("/api/user/auth/logout",void 0,{headers:e?{"X-Auth-Session":e}:void 0,skipAuthRefresh:!0,skipErrorHandler:!0})).data,refresh:i.C6})}async function u(e,t){return(await i.FH.get("/api/reset_password",{params:{email:e,turnstile:t}})).data}async function h(e,t){let a="login"===t?(0,n.L)():"",s=await i.FH.post("/api/oauth/state",{provider:e,intent:t,aff:a||void 0},{skipAuthRefresh:"login"===t});if(s.data?.success){if("string"==typeof s.data.data)return s.data.data;if("string"==typeof s.data.data?.flow_token)return s.data.data.flow_token}throw Error(s.data?.message||"Failed to initialize OAuth")}async function x(e){return(await i.FH.get("/api/oauth/wechat",{params:{code:e}})).data}async function m(e){return(await i.FH.get("/api/oauth/telegram/login",{params:e,disableDuplicate:!0,skipAuthRefresh:!0,skipBusinessError:!0,skipErrorHandler:!0})).data}async function p(e){return(await i.FH.post("/api/user/register",e,{params:{turnstile:e.turnstile??""}})).data}async function f(e,t){return(await i.FH.get("/api/verification",{params:{email:e,turnstile:t}})).data}a.d(t,{Cw:()=>x,J1:()=>u,gA:()=>f,iD:()=>l,kz:()=>p,li:()=>o,p$:()=>m,ri:()=>d,uK:()=>h})},7771(e,t,a){var s=a(53540),i=a(96713),r=a(64564),n=a(52523);async function l(){let e=await (0,i.PX)({p:1,size:50});if(!e.success)throw Error(e.message||"Failed to load API keys");let t=(e.data?.items??[]).find(e=>e.status===r.m7.ENABLED);if(!t)throw Error("No enabled API keys found. Create or enable one first.");let a=await (0,i.$8)(t.id);if(!a.success||!a.data?.key)throw Error(a.message||"Failed to load API key");return`sk-${a.data.key}`}function o(e){let t=(0,n.n)(e=>e.auth.user?.id);return(0,s.I)({queryKey:["chat-active-key",t],queryFn:l,enabled:e&&!!t,staleTime:3e5,gcTime:6e5})}a.d(t,{G:()=>l,f:()=>o})},84619(e,t,a){var s=a(68413),i=a(13289),r=a(83013);function n(){let{status:e}=(0,i.s)(),t=(0,s.useMemo)(()=>{let t;return(t=e?.server_address??e?.serverAddress??e?.data?.server_address??e?.data?.serverAddress)&&"string"==typeof t?t:"u">typeof window?window.location.origin:""},[e]);return{chatPresets:(0,s.useMemo)(()=>{let t=e?.Chats??e?.chats??e?.data?.Chats??e?.data?.chats??function(){if("u">typeof window)try{let e=window.localStorage.getItem("status");if(!e)return;let t=JSON.parse(e);return t?.chats??t?.Chats}catch{return}}();return(0,r.kJ)(t)},[e]),serverAddress:t}}a.d(t,{w:()=>n})},83013(e,t,a){a(64564);let s=/^https?:\/\//i;function i(e){if("u">typeof window&&"function"==typeof window.btoa)return window.btoa(e);let t="u">typeof globalThis?globalThis:void 0,a=t?.Buffer;return"function"==typeof a&&"function"==typeof a.from?a.from(e,"utf-8").toString("base64"):""}function r(e){return e.includes("{key}")||e.includes("{cherryConfig}")||e.includes("{aionuiConfig}")||e.includes("{deepchatConfig}")}function n(e){let t=e;if("string"==typeof e)try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?t.map((e,t)=>{if(!e||"object"!=typeof e||Array.isArray(e)||1!==Object.keys(e).length)return null;let[a,i]=Object.entries(e)[0];if("string"!=typeof i||"string"!=typeof a)return null;let r=i.trim();return r?{id:String(t),name:a,url:r,type:s.test(r)?"web":r.toLowerCase().startsWith("fluent")?"fluent":"custom-protocol"}:null}).filter(e=>null!==e):[]}function l(e,t,a){return e.split(t).join(a)}function o(e){let t,{template:a,apiKey:s,serverAddress:r}=e,n=a,o=r||"",c=(t=(s||"").trim())?t.startsWith("sk-")?t:`sk-${t}`:"";return n.includes("{cherryConfig}")?l(n,"{cherryConfig}",encodeURIComponent(i(JSON.stringify({id:"new-api",baseUrl:o,apiKey:c})))):n.includes("{aionuiConfig}")?l(n,"{aionuiConfig}",encodeURIComponent(i(JSON.stringify({platform:"new-api",baseUrl:o,apiKey:c})))):n.includes("{deepchatConfig}")?l(n,"{deepchatConfig}",encodeURIComponent(i(JSON.stringify({id:"new-api",baseUrl:o,apiKey:c})))):(o&&(n=l(n,"{address}",encodeURIComponent(o))),c&&(n=l(n,"{key}",c)),n)}a.d(t,{I9:()=>r,Kf:()=>o,kJ:()=>n})},96713(e,t,a){var s=a(22990);async function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{p:t=1,size:a=10}=e;return(await s.FH.get(`/api/token/?p=${t}&size=${a}`)).data}async function r(e){let{keyword:t="",token:a="",p:i,size:r}=e,n=new URLSearchParams;return t&&n.set("keyword",t),a&&n.set("token",a),null!=i&&n.set("p",String(i)),null!=r&&n.set("size",String(r)),(await s.FH.get(`/api/token/search?${n.toString()}`)).data}async function n(e){return(await s.FH.get(`/api/token/${e}`)).data}async function l(e){return(await s.FH.post("/api/token/",e)).data}async function o(e){return(await s.FH.put("/api/token/",e)).data}async function c(e){return(await s.FH.delete(`/api/token/${e}/`)).data}async function d(e){return(await s.FH.post("/api/token/batch",{ids:e})).data}async function u(e,t){return(await s.FH.put("/api/token/?status_only=true",{id:e,status:t})).data}async function h(e){return(await s.FH.post(`/api/token/${e}/key`)).data}async function x(e){return(await s.FH.post("/api/token/batch/keys",{ids:e})).data}a.d(t,{$8:()=>h,CG:()=>n,Dw:()=>r,Iq:()=>l,JM:()=>u,Lh:()=>c,PX:()=>i,S0:()=>d,XW:()=>o,wD:()=>x})},20687(e,t,a){var s=a(68413);
26function i(){let[e,t]=(0,s.useState)(new Set),a=(0,s.useCallback)(e=>{t(t=>{if(t.has(e))return t;let a=new Set(t);return a.add(e),a})},[]),i=(0,s.useCallback)(e=>{t(t=>{if(!t.has(e))return t;let a=new Set(t);return a.delete(e),a})},[]),r=(0,s.useCallback)(e=>{t(t=>{let a=new Set(t);return a.has(e)?a.delete(e):a.add(e),a})},[]),n=(0,s.useCallback)(()=>{t(e=>0===e.size?e:new Set)},[]),l=(0,s.useMemo)(()=>e.size>0,[e]);return(0,s.useMemo)(()=>({open:a,close:i,toggle:r,isOpen:t=>e.has(t),closeAll:n,hasAnyOpen:l}),[a,i,r,e,n,l])}t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,[t,a]=(0,s.useState)(e),i=(0,s.useCallback)(()=>a(null),[]),r=(0,s.useMemo)(()=>({reset:i,isOpen:null!==t}),[t,i]);return[t,a,r]},a.d(t,{b9:()=>i})},38009(e,t,a){var s=a(68413);function i(){let[e,t]=s.useState(void 0);return s.useEffect(()=>{let e=window.matchMedia("(max-width: 767px)"),a=()=>{t(window.innerWidth<768)};return e.addEventListener("change",a),t(window.innerWidth<768),()=>e.removeEventListener("change",a)},[]),!!e}a.d(t,{a:()=>i})},82814(e,t,a){var s=a(68413),i=a(13289),r=a(52523);let n={chat:{enabled:!0,playground:!0,chat:!0},console:{enabled:!0,detail:!0,token:!0,log:!0,midjourney:!0,task:!0},personal:{enabled:!0,topup:!0,personal:!0},admin:{enabled:!0,channel:!0,models:!0,redemption:!0,user:!0,setting:!0,subscription:!0}},l={"/playground":{section:"chat",module:"playground"},"/dashboard":{section:"console",module:"detail"},"/dashboard/overview":{section:"console",module:"detail"},"/dashboard/models":{section:"console",module:"detail"},"/dashboard/users":{section:"console",module:"detail"},"/keys":{section:"console",module:"token"},"/usage-logs":{section:"console",module:"log"},"/usage-logs/common":{section:"console",module:"log"},"/usage-logs/drawing":{section:"console",module:"midjourney"},"/usage-logs/task":{section:"console",module:"task"},"/wallet":{section:"personal",module:"topup"},"/profile":{section:"personal",module:"personal"},"/channels":{section:"admin",module:"channel"},"/models":{section:"admin",module:"models"},"/models/metadata":{section:"admin",module:"models"},"/models/deployments":{section:"admin",module:"models"},"/users":{section:"admin",module:"user"},"/redemption-codes":{section:"admin",module:"redemption"},"/subscriptions":{section:"admin",module:"subscription"},"/system-settings":{section:"admin",module:"setting"},"/system-settings/site":{section:"admin",module:"setting"}};function o(e){if(!e||""===e.trim())return n;try{let t;return t={...JSON.parse(e)},Object.entries(n).forEach(e=>{let[a,s]=e,i=t[a];if(!i){t[a]={...s};return}t[a]={...s,...i},Object.keys(s).forEach(e=>{void 0===t[a][e]&&(t[a][e]=s[e])})}),t}catch{return console.error("Failed to parse sidebar modules configuration"),n}}function c(e){if(!e||""===e.trim())return null;try{let t=JSON.parse(e);if(!t||"object"!=typeof t)return null;return t}catch{return null}}function d(e,t,a){let s=l[e];if(!s)return!0;let{section:i,module:r}=s,n=t[i];if(!(n&&n.enabled&&!0===n[r]))return!1;if(!a)return!0;let o=a[i];return!o||!1!==o.enabled&&!1!==o[r]}function u(e){let{status:t}=(0,i.s)(),{auth:a}=(0,r.n)(),n=(0,s.useMemo)(()=>o(t?.SidebarModulesAdmin),[t?.SidebarModulesAdmin]),l=(0,s.useMemo)(()=>a?.user?.permissions?.sidebar_settings===!1?null:c(a?.user?.sidebar_modules),[a?.user?.permissions?.sidebar_settings,a?.user?.sidebar_modules]);return(0,s.useMemo)(()=>e.map(e=>{var t;return{...e,items:(t=e.items,t.map(e=>{if("items"in e&&e.items){let t=e.items.filter(e=>d(e.url,n,l));return{...e,items:t}}return e}).filter(e=>(function(e,t,a){if("type"in e&&"chat-presets"===e.type){let e=t.chat;if(!(e?.enabled&&!0===e.chat))return!1;if(!a)return!0;let s=a.chat;return!s||!1!==s.enabled&&!1!==s.chat}return"url"in e&&e.url?(e.configUrls??[e.url]).some(e=>d(e,t,a)):!("items"in e)||!e.items||e.items.some(e=>d(e.url,t,a))})(e,n,l)))}}).filter(e=>e.items.length>0),[e,n,l])}function h(e){let{status:t}=(0,i.s)(),{auth:a}=(0,r.n)();return d(e,o(t?.SidebarModulesAdmin),a?.user?.permissions?.sidebar_settings===!1?null:c(a?.user?.sidebar_modules))}a.d(t,{I:()=>h,K:()=>u})},83612(e,t,a){var s=a(42059),i=a(30885),r=a(1333),n=a(97367),l=a(41167),o=a(13236),c=a(48207),d=a(30669),u=a(25787),h=a(55651),x=a(3729),m=a(42250),p=a(30086),f=a(97808),g=a(21825),j=a(26197),y=a(6702),b=a(89795);function v(){let{t:e}=(0,y.Bd)();return{navGroups:[{id:"chat",title:e("Chat"),items:[{title:e("Playground"),url:"/playground",icon:s.A},{title:e("Chat"),icon:i.A,type:"chat-presets"}]},{id:"general",title:e("General"),items:[{title:e("Overview"),url:"/dashboard/overview",icon:r.A},{title:e("Dashboard"),url:"/dashboard/models",icon:n.A},{title:e("API Keys"),url:"/keys",icon:l.A},{title:e("Usage Logs"),url:"/usage-logs/common",icon:o.A},{title:e("Task Logs"),url:"/usage-logs/task",activeUrls:["/usage-logs/drawing"],configUrls:["/usage-logs/drawing","/usage-logs/task"],icon:c.A}]},{id:"personal",title:e("Personal"),items:[{title:e("Wallet"),url:"/wallet",icon:d.A},{title:e("Profile"),url:"/profile",icon:u.A}]},{id:"admin",title:e("Admin"),items:[{title:e("Channels"),url:"/channels",icon:h.A},{title:e("Models"),url:"/models/metadata",icon:x.A},{title:e("Users"),url:"/users",icon:m.A},{title:e("Redemption Codes"),url:"/redemption-codes",icon:p.A},{title:e("Subscriptions"),url:"/subscriptions",icon:f.A},{title:e("System Info"),url:"/system-info",icon:g.A,requiredRole:b.z7.SUPER_ADMIN},{title:e("System Settings"),url:"/system-settings/site",activeUrls:["/system-settings"],icon:j.A}]}]}}a.d(t,{k:()=>v})},72443(e,t,a){var s=a(68413),i=a(6702),r=a(89795);function n(e){let{t}=(0,i.Bd)();return(0,s.useMemo)(()=>
26{if(!e)return{displayName:t("User"),secondaryText:"",initials:"U",roleLabel:""};let a=e.display_name||e.username||t("User"),s=e.email?e.email:e.github_id?`GitHub ID: ${e.github_id}`:e.oidc_id?`OIDC ID: ${e.oidc_id}`:e.wechat_id?`WeChat ID: ${e.wechat_id}`:e.telegram_id?`Telegram ID: ${e.telegram_id}`:e.linux_do_id?`LinuxDO ID: ${e.linux_do_id}`:e.username?e.username:e.display_name?e.display_name:"",i=a.split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2);return{displayName:a,secondaryText:s,initials:i,roleLabel:(0,r.d9)(e.role)}},[e,t])}a.d(t,{F:()=>n})},15585(e,t,a){function s(e){let t=function(e){let t=0;for(let a=0;a<e.length;a++)t=31*t+e.charCodeAt(a)>>>0;return t}(e);return{backgroundColor:`hsl(${t%360} ${54+t%8}% ${52+(t>>4)%8}%)`,color:"white"}}function i(e){return e.trim().charAt(0).toUpperCase()||"?"}a.d(t,{f:()=>i,u:()=>s})},60770(e,t,a){let s=[.33,1,.68,1],i={default:{duration:.25,ease:s},fast:{duration:.15,ease:s},slow:{duration:.35,ease:s},spring:{type:"spring",damping:20,stiffness:300},none:{duration:0}},r={initial:{opacity:0,y:8},animate:{opacity:1,y:0,transition:i.default}};i.fast;let n={initial:{opacity:0,y:12,scale:.98},animate:{opacity:1,y:0,scale:1,transition:i.default}};i.fast,a.d(t,{},{AK:{initial:{},animate:{transition:{staggerChildren:.05}}},DX:r,fI:i,j0:{initial:{},animate:{transition:{staggerChildren:.04}}},mL:{pageEnter:{initial:{opacity:0,y:8,filter:"blur(4px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},exit:{opacity:0,y:-4,filter:"blur(2px)"}},fadeIn:{initial:{opacity:0}
26,animate:{opacity:1},exit:{opacity:0}},scaleIn:{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96}},slideUp:{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:16}},slideDown:{initial:{opacity:0,y:-16},animate:{opacity:1,y:0},exit:{opacity:0,y:-16}},tableRow:{initial:{opacity:0,y:4},animate:{opacity:1,y:0}},cardItem:{initial:{opacity:0,y:12,scale:.98},animate:{opacity:1,y:0,scale:1}},sidebarSlide:{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0,x:-8}}},mz:n})},88921(e,t,a){var s=a(84935);function i(e){return Math.floor(e.getTime()/1e3)}function r(e){let t=new Date(1e3*e);return t.setHours(0,0,0,0),Math.floor(t.getTime()/1e3)}function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,a=new Date(t);return{start:new Date(a.getTime()-24*e*36e5),end:a}}function l(e,t,a){let s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=Math.floor(Date.now()/1e3);if(s){let s=r(n),l=a?r(i(a)):s;return{start_timestamp:t?r(i(t)):l-24*e*3600,end_timestamp:l+86400-1}}let l=a?i(a):n+3600;return{start_timestamp:t?i(t):l-24*e*3600,end_timestamp:l}}function o(e){return(0,s.A)(e).format("YYYY-MM-DD HH:mm:ss")}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"day",a=(0,s.A)(1e3*e),i=a.format("MM-DD");if("hour"===t)i+=` ${a.format("HH")}:00`;else if("week"===t){let e=a.add(6,"day");i+=` - ${e.format("MM-DD")}`}return i}function d(e,t,a){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:new Date;if(0===e&&0===t&&0===a)return;let i=new Date(s);return i.setMonth(i.getMonth()+e),i.setDate(i.getDate()+t),i.setHours(i.getHours()+a),i}a.d(t,{Ah:()=>o,GW:()=>l,Hc:()=>c,U7:()=>d,fj:()=>n})}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.