diff --git a/public/assets/admin/assets/index.js b/public/assets/admin/assets/index.js index adad236c..7c51e511 100644 --- a/public/assets/admin/assets/index.js +++ b/public/assets/admin/assets/index.js @@ -1,17 +1,14 @@ -import{r as m,j as e,t as il,c as ol,I as Na,a as Ts,S as Xt,u as os,b as ea,d as cl,O as sa,e as dl,f as $,g as ml,h as ul,i as hl,k as xl,B as pl,l as fl,Q as gl,m as jl,R as vl,n as bl,P as yl,o as _l,p as Nl,q as Ga,F as wl,C as Cl,s as Sl,v as kl,w as Pl,x as Tl,y as Dl,z as x,A as Ka,D as ce,E as ue,G as Ba,H as St,J as kt,K as ta,L as Le,T as Pt,M as Tt,N as Wa,U as Ya,V as Rl,W as El,X as Il,Y as Ml,Z as Ja,_ as aa,$ as Qa,a0 as Ol,a1 as Za,a2 as Xa,a3 as en,a4 as sn,a5 as Ds,a6 as tn,a7 as Vl,a8 as an,a9 as nn,aa as Ll,ab as Al,ac as Fl,ad as zl,ae as rn,af as Ul,ag as $l,ah as M,ai as Rs,aj as ln,ak as Hl,al as ql,am as on,an as Gl,ao as Kl,ap as wa,aq as Bl,ar as cn,as as Wl,at as dn,au as Yl,av as Jl,aw as Ql,ax as Zl,ay as Xl,az as ei,aA as mn,aB as si,aC as ti,aD as ai,aE as Se,aF as ni,aG as ri,aH as li,aI as ii,aJ as oi,aK as ci,aL as un,aM as hn,aN as xn,aO as di,aP as pn,aQ as fn,aR as gn,aS as mi,aT as ui,aU as hi,aV as jn,aW as xi,aX as na,aY as vn,aZ as pi,a_ as bn,a$ as fi,b0 as yn,b1 as gi,b2 as _n,b3 as Nn,b4 as ji,b5 as vi,b6 as wn,b7 as bi,b8 as yi,b9 as Cn,ba as _i,bb as Sn,bc as Ni,bd as wi,be as $e,bf as se,bg as Ue,bh as ot,bi as Ci,bj as Si,bk as ki,bl as Pi,bm as Ti,bn as Di,bo as Ca,bp as Sa,bq as Ri,br as Ei,bs as Ii,bt as Mi,bu as Oi,bv as Ht,bw as qt,bx as Vi,by as Li,bz as kn,bA as Ai,bB as Fi,bC as Pn,bD as zi,bE as fe,bF as Ui,bG as ka,bH as Gt,bI as Kt,bJ as $i,bK as Hi,bL as Tn,bM as qi,bN as ra,bO as Gi,bP as Ki,bQ as Bi,bR as Dn,bS as Rn,bT as En,bU as Wi,bV as Yi,bW as Ji,bX as Qi,bY as In,bZ as Zi,b_ as es,b$ as Xi,c0 as eo,c1 as so,c2 as bt,c3 as _e,c4 as Pa,c5 as to,c6 as Mn,c7 as On,c8 as Vn,c9 as Ln,ca as An,cb as Fn,cc as ao,cd as no,ce as ro,cf as Dt,cg as Es,ch as cs,ci as Ae,cj as Fe,ck as Ge,cl as Ke,cm as Be,cn as lo,co as io,cp as oo,cq as Bt,cr as la,cs as ia,ct as co,cu as ds,cv as ms,cw as ct,cx as mo,cy as yt,cz as uo,cA as Ta,cB as zn,cC as Da,cD as _t,cE as ho,cF as xo,cG as po,cH as fo,cI as Un,cJ as go,cK as jo,cL as $n,cM as Wt,cN as Hn,cO as vo,cP as qn,cQ as Gn,cR as bo,cS as yo,cT as _o,cU as No,cV as wo}from"./vendor.js";import"./index.js";var op=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function cp(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Co(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const So={theme:"system",setTheme:()=>null},Kn=m.createContext(So);function ko({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,c]=m.useState(()=>localStorage.getItem(a)||n);m.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),r==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(h);return}u.classList.add(r)},[r]);const o={theme:r,setTheme:u=>{localStorage.setItem(a,u),c(u)}};return e.jsx(Kn.Provider,{...l,value:o,children:s})}const Po=()=>{const s=m.useContext(Kn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},To=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),Do=function(s,n){return new URL(s,n).href},Ra={},ie=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const o=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");r=Promise.allSettled(a.map(i=>{if(i=Do(i,l),i in Ra)return;Ra[i]=!0;const d=i.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(!!l)for(let p=o.length-1;p>=0;p--){const N=o[p];if(N.href===i&&(!d||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${f}`))return;const I=document.createElement("link");if(I.rel=d?"stylesheet":To,d||(I.as="script"),I.crossOrigin="",I.href=i,h&&I.setAttribute("nonce",h),document.head.appendChild(I),d)return new Promise((p,N)=>{I.addEventListener("load",p),I.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${i}`)))})}))}function c(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return r.then(o=>{for(const u of o||[])u.status==="rejected"&&c(u.reason);return n().catch(c)})};function y(...s){return il(ol(s))}const Hs=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),R=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:c,loading:o=!1,leftSection:u,rightSection:h,...i},d)=>{const f=l?Xt:"button";return e.jsxs(f,{className:y(Hs({variant:n,size:a,className:s})),disabled:o||c,ref:d,...i,children:[(u&&o||!u&&!h&&o)&&e.jsx(Na,{className:"mr-2 h-4 w-4 animate-spin"}),!o&&u&&e.jsx("div",{className:"mr-2",children:u}),r,!o&&h&&e.jsx("div",{className:"ml-2",children:h}),h&&o&&e.jsx(Na,{className:"ml-2 h-4 w-4 animate-spin"})]})});R.displayName="Button";function Ls({className:s,minimal:n=!1}){const a=os();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ea(){const s=os();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Ro(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(R,{variant:"outline",children:"Learn more"})})]})})}function Eo(s){return typeof s>"u"}function Io(s){return s===null}function Mo(s){return Io(s)||Eo(s)}class Oo{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:c,time:o,expire:u}=r;return Mo(u)||u>new Date().getTime()?{value:c,time:o}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Bn({prefixKey:s="",storage:n=sessionStorage}){return new Oo({prefixKey:s,storage:n})}const Wn="Xboard_",Vo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:localStorage})},Lo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Rt=Vo({prefixKey:Wn});Lo({prefixKey:Wn});const Yn="access_token";function st(){return Rt.get(Yn)}function Jn(){Rt.remove(Yn)}const Ia=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Ao({children:s}){const n=os(),a=ea(),l=st();return m.useEffect(()=>{if(!l.value&&!Ia.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),Ia.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const Fo=()=>e.jsx(Ao,{children:e.jsx(sa,{})}),zo=cl([{path:"/sign-in",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Kc);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(Fo,{}),children:[{path:"/",lazy:async()=>({Component:(await ie(()=>Promise.resolve().then(()=>ld),void 0,import.meta.url)).default}),errorElement:e.jsx(Ls,{}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Mm);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Ls,{}),children:[{path:"system",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Am);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>$m);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Bm);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Zm);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>au);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ou);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>hu);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ju);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Nu);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Pu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>zu);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>qu);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Qu);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>rh);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Dh);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Oh);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Uh);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Ls,{}),children:[{path:"plan",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Jh);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>dx);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>vx);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Ls,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>$x);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>rp);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Ls},{path:"/404",Component:Ea},{path:"/503",Component:Ro},{path:"*",Component:Ea}]),Uo="locale";function $o(){return Rt.get(Uo)}function Qn(){Jn();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const Ho=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function qo(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const L=dl.create({baseURL:qo(),timeout:12e3,headers:{"Content-Type":"application/json"}});L.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=st();if(!Ho.includes(s.url?.split("?")[0]||"")){if(!n.value)return Qn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=$o().value||"zh-CN",s},s=>Promise.reject(s));L.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&Qn(),$.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Go(){return L.get("/user/info")}const Lt={token:st()?.value||"",userInfo:null,isLoggedIn:!!st()?.value,loading:!1,error:null},Xs=ml("user/fetchUserInfo",async()=>(await Go()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),Zn=ul({name:"user",initialState:Lt,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>Lt},extraReducers:s=>{s.addCase(Xs.pending,n=>{n.loading=!0,n.error=null}).addCase(Xs.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(Xs.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return Lt})}}),{setToken:Ko,resetUserState:Bo}=Zn.actions,Wo=s=>s.user.userInfo,Yo=Zn.reducer,Xn=hl({reducer:{user:Yo}});st()?.value&&Xn.dispatch(Xs());const Jo={loading:"Loading...",error:"Error",success:"Success",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",view:"View",toggleNavigation:"Toggle Navigation",toggleSidebar:"Toggle Sidebar",search:"Search...",theme:{light:"Light",dark:"Dark",system:"System"},user:"User",defaultEmail:"user@example.com",settings:"Settings",logout:"Logout"},Qo={title:"Dashboard",stats:{newUsers:"New Users",totalScore:"Total Score",monthlyUpload:"Monthly Upload",vsLastMonth:"vs Last Month",vsYesterday:"vs Yesterday",todayIncome:"Today's Income",monthlyIncome:"Monthly Income",totalIncome:"Total Income",totalUsers:"Total Users",activeUsers:"Active Users: {{count}}",totalOrders:"Total Orders",revenue:"Revenue",todayRegistered:"Today Registered",monthlyRegistered:"Monthly Registered",onlineUsers:"Online Users",pendingTickets:"Pending Tickets",hasPendingTickets:"There are tickets that need attention",noPendingTickets:"No pending tickets",pendingCommission:"Pending Commission",hasPendingCommission:"There are commissions that need confirmation",noPendingCommission:"No pending commission",monthlyNewUsers:"Monthly New Users",monthlyDownload:"Monthly Download",todayTraffic:"Today: {{value}}",activeUserTrend:"Active User Trend",realtimeUsers:"Realtime Users",todayPeak:"Today's Peak",vsLastWeek:"vs Last Week"},trafficRank:{nodeTrafficRank:"Node Traffic Rank",userTrafficRank:"User Traffic Rank",today:"Today",last7days:"Last 7 Days",last30days:"Last 30 Days",customRange:"Custom Range",selectTimeRange:"Select Time Range",selectDateRange:"Select Date Range",currentTraffic:"Current Traffic",previousTraffic:"Previous Traffic",changeRate:"Change Rate",recordTime:"Record Time"},overview:{title:"Revenue Overview",thisMonth:"This Month",lastMonth:"Last Month",to:"to",selectTimeRange:"Select Range",selectDate:"Select Date",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",last180Days:"Last 180 Days",lastYear:"Last Year",customRange:"Custom Range",amount:"Amount",count:"Count",transactions:"{{count}} transactions",orderAmount:"Order Amount",commissionAmount:"Commission Amount",orderCount:"Order Count",commissionCount:"Commission Count",totalIncome:"Total Income",totalCommission:"Total Commission",totalTransactions:"Total: {{count}} transactions",avgOrderAmount:"Average Order Amount:",commissionRate:"Commission Rate:"},traffic:{title:"Traffic Ranking",rank:"Rank",domain:"Domain",todayTraffic:"Today's Traffic",monthlyTraffic:"Monthly Traffic"},queue:{title:"Queue Status",jobDetails:"Job Details",status:{description:"Current queue running status",running:"Running Status",normal:"Normal",abnormal:"Abnormal",waitTime:"Current wait time: {{seconds}} seconds",pending:"Pending",processing:"Processing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"},details:{description:"Queue processing details",recentJobs:"Recent Jobs",statisticsPeriod:"Statistics Period: {{hours}} hours",jobsPerMinute:"Jobs Per Minute",maxThroughput:"Max Throughput: {{value}}",failedJobs7Days:"Failed Jobs (7 days)",retentionPeriod:"Retention Period: {{hours}} hours",longestRunningQueue:"Longest Running Queue",activeProcesses:"Active Processes",id:"Job ID",type:"Job Type",status:"Status",progress:"Progress",createdAt:"Created At",updatedAt:"Updated At",error:"Error Message",data:"Job Data",result:"Result",duration:"Duration",attempts:"Attempts",nextRetry:"Next Retry"},actions:{retry:"Retry",cancel:"Cancel",delete:"Delete",viewDetails:"View Details"},empty:"No jobs in queue",loading:"Loading queue status...",error:"Failed to load queue status"},search:{placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",loading:"Searching..."}},Zo={placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",shortcut:{label:"Search",key:"⌘K"}},Xo={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Management",nodeManagement:"Node Management",permissionGroupManagement:"Permission Group",routeManagement:"Route Management",subscriptionManagement:"Subscription",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},ec={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Base",nodeManagement:"Node Management",permissionGroupManagement:"Permission Groups",routeManagement:"Route Management",subscriptionManagement:"Subscription Management",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},sc={title:"Node Configuration",description:"Configure node communication and synchronization settings, including communication key, polling interval, load balancing and other advanced options.",server_token:{title:"Communication Key",description:"The key for communication between Xboard and nodes to prevent unauthorized data access.",placeholder:"Please enter communication key"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Please enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Please enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, multiple nodes from the same IP address count as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Please select device limit mode"},saving:"Saving...",manage:{title:"Node Management",description:"Manage all nodes, including adding, deleting, editing and other operations."},columns:{sort:"Sort",nodeId:"Node ID",show:"Show",node:"Node",address:"Address",onlineUsers:{title:"Online Users",tooltip:"Online users count based on server reporting frequency"},rate:{title:"Rate",tooltip:"Traffic billing rate"},groups:{title:"Permission Groups",tooltip:"Groups that can subscribe to this node",empty:"--"},type:"Type",actions:"Actions",copyAddress:"Copy Connection Address",internalPort:"Internal Port",status:{0:"Not Running",1:"Unused or Abnormal",2:"Running Normal"},actions_dropdown:{edit:"Edit",copy:"Copy",delete:{title:"Confirm Delete",description:"This action will permanently delete this node and cannot be undone. Are you sure you want to continue?",confirm:"Delete"},copy_success:"Copied successfully",delete_success:"Deleted successfully"}},toolbar:{search:"Search nodes...",type:"Type",reset:"Reset",sort:{tip:"Drag nodes to sort, then click save",edit:"Edit Sort",save:"Save Sort"}},form:{add_node:"Add Node",edit_node:"Edit Node",new_node:"New Node",name:{label:"Node Name",placeholder:"Please enter node name",error:"Please enter a valid name"},rate:{label:"Rate",error:"Please enter a valid rate"},code:{label:"Custom Node ID",optional:"(Optional)",placeholder:"Please enter custom node ID"},tags:{label:"Node Tags",placeholder:"Press Enter to add tags"},groups:{label:"Permission Groups",add:"Add Group",placeholder:"Please select permission groups",empty:"No results found"},host:{label:"Node Address",placeholder:"Please enter domain or IP"},port:{label:"Connection Port",placeholder:"User connection port",tooltip:"The port that users actually connect to, this is the port number that needs to be filled in the client configuration. If using transit or tunnel, this port may be different from the port that the server actually listens on.",sync:"Sync to server port"},server_port:{label:"Server Port",placeholder:"Server listening port",tooltip:"The port that the server actually listens on, this is the real port opened on the server. If using transit or tunnel, this port may be different from the user connection port."},parent:{label:"Parent Node",placeholder:"Select parent node",none:"None"},route:{label:"Route Groups",placeholder:"Select route groups",empty:"No results found"},submit:"Submit",cancel:"Cancel",success:"Submitted successfully"},dynamic_form:{shadowsocks:{cipher:{label:"Encryption Method",placeholder:"Select encryption method"},obfs:{label:"Obfuscation",placeholder:"Select obfuscation method",none:"None",http:"HTTP"},obfs_settings:{path:"Path",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"Please select security",disabled:"Disabled",enabled:"Enabled"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},trojan:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?",network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},hysteria:{version:{label:"Protocol Version",placeholder:"Protocol version"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"Obfuscation",type:{label:"Obfuscation Implementation",placeholder:"Select obfuscation implementation",salamander:"Salamander"},password:{label:"Obfuscation Password",placeholder:"Please enter obfuscation password",generate_success:"Obfuscation password generated successfully"}},tls:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?"},bandwidth:{up:{label:"Upload Bandwidth",placeholder:"Please enter upload bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"},down:{label:"Download Bandwidth",placeholder:"Please enter download bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"}}},vless:{tls:{label:"Security",placeholder:"Please select security",none:"None",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},reality_settings:{server_name:{label:"Destination Site (dest)",placeholder:"e.g., example.com"},server_port:{label:"Port",placeholder:"e.g., 443"},allow_insecure:"Allow Insecure?",private_key:{label:"Private Key"},public_key:{label:"Public Key"},short_id:{label:"Short ID",placeholder:"Optional, length must be even, max 16 characters",description:"List of shortIds available to clients, can be used to distinguish different clients, using hexadecimal characters 0-f",generate:"Generate Short ID",success:"Short ID generated successfully"},key_pair:{generate:"Generate Key Pair",success:"Key pair generated successfully",error:"Failed to generate key pair"}},network:{label:"Transport Protocol",placeholder:"Select transport protocol"},flow:{label:"Flow Control",placeholder:"Select flow control"}}},network_settings:{edit_protocol:"Edit Protocol",edit_protocol_config:"Edit Protocol Configuration",use_template:"Use {{template}} Template",json_config_placeholder:"Please enter JSON configuration",json_config_placeholder_with_template:"Please enter JSON configuration or select template above",validation:{must_be_object:"Configuration must be a JSON object",invalid_json:"Invalid JSON format"},errors:{save_failed:"Error occurred while saving"}},common:{cancel:"Cancel",confirm:"Confirm"}},tc={plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Permission Group",placeholder:"Select permission group",add:"Add Group"},transfer:{label:"Traffic",placeholder:"Enter traffic size",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base monthly price",clear:{button:"Clear Prices",tooltip:"Clear all period price settings"}},device:{label:"Device Limit",placeholder:"Leave empty for no limit",unit:"devices"},capacity:{label:"Capacity Limit",placeholder:"Leave empty for no limit",unit:"users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select traffic reset method",description:"Set how subscription traffic is reset, different methods affect how user traffic is calculated",options:{follow_system:"Follow System Settings",monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},content:{label:"Plan Description",placeholder:"Write plan description here...",description:"Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Click to use preset plan description template",content:`## Plan Features -• High-speed and stable global network access -• Support multiple devices online simultaneously -• Unlimited traffic reset +import{r as m,j as e,t as il,c as ol,I as Na,a as Ts,S as Xt,u as os,b as ea,d as cl,O as sa,e as dl,f as $,g as ml,h as ul,i as hl,k as pl,B as xl,l as fl,Q as gl,m as jl,R as bl,n as vl,P as yl,o as _l,p as Nl,q as qa,F as wl,C as Cl,s as Sl,v as kl,w as Pl,x as Tl,y as Dl,z as p,A as Ka,D as ce,E as ue,G as Ba,H as St,J as kt,K as ta,L as Ve,T as Pt,M as Tt,N as Wa,U as Ya,V as Rl,W as Il,X as El,Y as Ml,Z as Ja,_ as aa,$ as Qa,a0 as Ll,a1 as Za,a2 as Xa,a3 as en,a4 as sn,a5 as Ds,a6 as tn,a7 as Ol,a8 as an,a9 as nn,aa as Vl,ab as Al,ac as Fl,ad as zl,ae as rn,af as Ul,ag as $l,ah as M,ai as Rs,aj as ln,ak as Hl,al as Gl,am as on,an as ql,ao as Kl,ap as wa,aq as Bl,ar as cn,as as Wl,at as dn,au as Yl,av as Jl,aw as Ql,ax as Zl,ay as Xl,az as ei,aA as mn,aB as si,aC as ti,aD as ai,aE as Se,aF as ni,aG as ri,aH as li,aI as ii,aJ as oi,aK as ci,aL as di,aM as un,aN as hn,aO as pn,aP as mi,aQ as xn,aR as fn,aS as gn,aT as ui,aU as hi,aV as pi,aW as jn,aX as xi,aY as na,aZ as bn,a_ as fi,a$ as vn,b0 as gi,b1 as yn,b2 as ji,b3 as _n,b4 as Nn,b5 as bi,b6 as vi,b7 as wn,b8 as yi,b9 as _i,ba as Cn,bb as Ni,bc as Sn,bd as wi,be as Ci,bf as $e,bg as se,bh as Ue,bi as ot,bj as Si,bk as ki,bl as Pi,bm as Ti,bn as Di,bo as Ri,bp as Ca,bq as Sa,br as Ii,bs as Ei,bt as Mi,bu as Li,bv as Oi,bw as Ht,bx as Gt,by as Vi,bz as Ai,bA as kn,bB as Fi,bC as zi,bD as Pn,bE as Ui,bF as fe,bG as $i,bH as ka,bI as qt,bJ as Kt,bK as Hi,bL as Gi,bM as Tn,bN as qi,bO as ra,bP as Ki,bQ as Bi,bR as Wi,bS as Dn,bT as Rn,bU as In,bV as Yi,bW as Ji,bX as Qi,bY as Zi,bZ as En,b_ as Xi,b$ as es,c0 as eo,c1 as so,c2 as to,c3 as vt,c4 as _e,c5 as Pa,c6 as ao,c7 as Mn,c8 as Ln,c9 as On,ca as Vn,cb as An,cc as Fn,cd as no,ce as ro,cf as lo,cg as Dt,ch as Is,ci as cs,cj as Ae,ck as Fe,cl as qe,cm as Ke,cn as Be,co as io,cp as oo,cq as co,cr as Bt,cs as la,ct as ia,cu as mo,cv as ds,cw as ms,cx as ct,cy as uo,cz as yt,cA as ho,cB as Ta,cC as zn,cD as Da,cE as _t,cF as po,cG as xo,cH as fo,cI as go,cJ as Un,cK as jo,cL as bo,cM as $n,cN as Wt,cO as Hn,cP as vo,cQ as Gn,cR as qn,cS as yo,cT as _o,cU as No,cV as wo,cW as Co}from"./vendor.js";import"./index.js";var Px=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Tx(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function So(s){if(s.__esModule)return s;var n=s.default;if(typeof n=="function"){var a=function l(){return this instanceof l?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};a.prototype=n.prototype}else a={};return Object.defineProperty(a,"__esModule",{value:!0}),Object.keys(s).forEach(function(l){var r=Object.getOwnPropertyDescriptor(s,l);Object.defineProperty(a,l,r.get?r:{enumerable:!0,get:function(){return s[l]}})}),a}const ko={theme:"system",setTheme:()=>null},Kn=m.createContext(ko);function Po({children:s,defaultTheme:n="system",storageKey:a="vite-ui-theme",...l}){const[r,c]=m.useState(()=>localStorage.getItem(a)||n);m.useEffect(()=>{const u=window.document.documentElement;if(u.classList.remove("light","dark"),r==="system"){const h=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";u.classList.add(h);return}u.classList.add(r)},[r]);const o={theme:r,setTheme:u=>{localStorage.setItem(a,u),c(u)}};return e.jsx(Kn.Provider,{...l,value:o,children:s})}const To=()=>{const s=m.useContext(Kn);if(s===void 0)throw new Error("useTheme must be used within a ThemeProvider");return s},Do=function(){const n=typeof document<"u"&&document.createElement("link").relList;return n&&n.supports&&n.supports("modulepreload")?"modulepreload":"preload"}(),Ro=function(s,n){return new URL(s,n).href},Ra={},ie=function(n,a,l){let r=Promise.resolve();if(a&&a.length>0){const o=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),h=u?.nonce||u?.getAttribute("nonce");r=Promise.allSettled(a.map(i=>{if(i=Ro(i,l),i in Ra)return;Ra[i]=!0;const d=i.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(!!l)for(let x=o.length-1;x>=0;x--){const N=o[x];if(N.href===i&&(!d||N.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${f}`))return;const E=document.createElement("link");if(E.rel=d?"stylesheet":Do,d||(E.as="script"),E.crossOrigin="",E.href=i,h&&E.setAttribute("nonce",h),document.head.appendChild(E),d)return new Promise((x,N)=>{E.addEventListener("load",x),E.addEventListener("error",()=>N(new Error(`Unable to preload CSS for ${i}`)))})}))}function c(o){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=o,window.dispatchEvent(u),!u.defaultPrevented)throw o}return r.then(o=>{for(const u of o||[])u.status==="rejected"&&c(u.reason);return n().catch(c)})};function y(...s){return il(ol(s))}const Hs=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),R=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,children:r,disabled:c,loading:o=!1,leftSection:u,rightSection:h,...i},d)=>{const f=l?Xt:"button";return e.jsxs(f,{className:y(Hs({variant:n,size:a,className:s})),disabled:o||c,ref:d,...i,children:[(u&&o||!u&&!h&&o)&&e.jsx(Na,{className:"mr-2 h-4 w-4 animate-spin"}),!o&&u&&e.jsx("div",{className:"mr-2",children:u}),r,!o&&h&&e.jsx("div",{className:"ml-2",children:h}),h&&o&&e.jsx(Na,{className:"ml-2 h-4 w-4 animate-spin"})]})});R.displayName="Button";function Vs({className:s,minimal:n=!1}){const a=os();return e.jsx("div",{className:y("h-svh w-full",s),children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[!n&&e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"500"}),e.jsxs("span",{className:"font-medium",children:["Oops! Something went wrong ",":')"]}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["We apologize for the inconvenience. ",e.jsx("br",{})," Please try again later."]}),!n&&e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>a(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>a("/"),children:"Back to Home"})]})]})})}function Ia(){const s=os();return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"404"}),e.jsx("span",{className:"font-medium",children:"Oops! Page Not Found!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["It seems like the page you're looking for ",e.jsx("br",{}),"does not exist or might have been removed."]}),e.jsxs("div",{className:"mt-6 flex gap-4",children:[e.jsx(R,{variant:"outline",onClick:()=>s(-1),children:"Go Back"}),e.jsx(R,{onClick:()=>s("/"),children:"Back to Home"})]})]})})}function Io(){return e.jsx("div",{className:"h-svh",children:e.jsxs("div",{className:"m-auto flex h-full w-full flex-col items-center justify-center gap-2",children:[e.jsx("h1",{className:"text-[7rem] font-bold leading-tight",children:"503"}),e.jsx("span",{className:"font-medium",children:"Website is under maintenance!"}),e.jsxs("p",{className:"text-center text-muted-foreground",children:["The site is not available at the moment. ",e.jsx("br",{}),"We'll be back online shortly."]}),e.jsx("div",{className:"mt-6 flex gap-4",children:e.jsx(R,{variant:"outline",children:"Learn more"})})]})})}function Eo(s){return typeof s>"u"}function Mo(s){return s===null}function Lo(s){return Mo(s)||Eo(s)}class Oo{storage;prefixKey;constructor(n){this.storage=n.storage,this.prefixKey=n.prefixKey}getKey(n){return`${this.prefixKey}${n}`.toUpperCase()}set(n,a,l=null){const r=JSON.stringify({value:a,time:Date.now(),expire:l!==null?new Date().getTime()+l*1e3:null});this.storage.setItem(this.getKey(n),r)}get(n,a=null){const l=this.storage.getItem(this.getKey(n));if(!l)return{value:a,time:0};try{const r=JSON.parse(l),{value:c,time:o,expire:u}=r;return Lo(u)||u>new Date().getTime()?{value:c,time:o}:(this.remove(n),{value:a,time:0})}catch{return this.remove(n),{value:a,time:0}}}remove(n){this.storage.removeItem(this.getKey(n))}clear(){this.storage.clear()}}function Bn({prefixKey:s="",storage:n=sessionStorage}){return new Oo({prefixKey:s,storage:n})}const Wn="Xboard_",Vo=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:localStorage})},Ao=function(s={}){return Bn({prefixKey:s.prefixKey||"",storage:sessionStorage})},Rt=Vo({prefixKey:Wn});Ao({prefixKey:Wn});const Yn="access_token";function st(){return Rt.get(Yn)}function Jn(){Rt.remove(Yn)}const Ea=["/sign-in","/sign-in-2","/sign-up","/forgot-password","/otp"];function Fo({children:s}){const n=os(),a=ea(),l=st();return m.useEffect(()=>{if(!l.value&&!Ea.includes(a.pathname)){const r=encodeURIComponent(a.pathname+a.search);n(`/sign-in?redirect=${r}`)}},[l.value,a.pathname,a.search,n]),Ea.includes(a.pathname)||l.value?e.jsx(e.Fragment,{children:s}):null}const zo=()=>e.jsx(Fo,{children:e.jsx(sa,{})}),Uo=cl([{path:"/sign-in",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ud);return{default:s}},void 0,import.meta.url)).default})},{element:e.jsx(zo,{}),children:[{path:"/",lazy:async()=>({Component:(await ie(()=>Promise.resolve().then(()=>Sd),void 0,import.meta.url)).default}),errorElement:e.jsx(Vs,{}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>eu);return{default:s}},void 0,import.meta.url)).default})},{path:"config",errorElement:e.jsx(Vs,{}),children:[{path:"system",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>nu);return{default:s}},void 0,import.meta.url)).default}),children:[{index:!0,lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ou);return{default:s}},void 0,import.meta.url)).default})},{path:"safe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>hu);return{default:s}},void 0,import.meta.url)).default})},{path:"subscribe",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ju);return{default:s}},void 0,import.meta.url)).default})},{path:"invite",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Nu);return{default:s}},void 0,import.meta.url)).default})},{path:"frontend",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Pu);return{default:s}},void 0,import.meta.url)).default})},{path:"server",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Eu);return{default:s}},void 0,import.meta.url)).default})},{path:"email",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Au);return{default:s}},void 0,import.meta.url)).default})},{path:"telegram",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Hu);return{default:s}},void 0,import.meta.url)).default})},{path:"APP",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Wu);return{default:s}},void 0,import.meta.url)).default})}]},{path:"payment",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>lh);return{default:s}},void 0,import.meta.url)).default})},{path:"theme",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>dh);return{default:s}},void 0,import.meta.url)).default})},{path:"notice",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>gh);return{default:s}},void 0,import.meta.url)).default})},{path:"knowledge",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Ch);return{default:s}},void 0,import.meta.url)).default})}]},{path:"server",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Jh);return{default:s}},void 0,import.meta.url)).default})},{path:"group",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>sp);return{default:s}},void 0,import.meta.url)).default})},{path:"route",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ip);return{default:s}},void 0,import.meta.url)).default})}]},{path:"finance",errorElement:e.jsx(Vs,{}),children:[{path:"plan",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>fp);return{default:s}},void 0,import.meta.url)).default})},{path:"order",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Dp);return{default:s}},void 0,import.meta.url)).default})},{path:"coupon",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Fp);return{default:s}},void 0,import.meta.url)).default})}]},{path:"user",errorElement:e.jsx(Vs,{}),children:[{path:"manage",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>ox);return{default:s}},void 0,import.meta.url)).default})},{path:"ticket",lazy:async()=>({Component:(await ie(async()=>{const{default:s}=await Promise.resolve().then(()=>Cx);return{default:s}},void 0,import.meta.url)).default})}]}]}]},{path:"/500",Component:Vs},{path:"/404",Component:Ia},{path:"/503",Component:Io},{path:"*",Component:Ia}]),$o="locale";function Ho(){return Rt.get($o)}function Qn(){Jn();const s=window.location.pathname,n=s&&!["/404","/sign-in"].includes(s),a=new URL(window.location.href),r=`${a.pathname.split("/")[1]?`/${a.pathname.split("/")[1]}`:""}#/sign-in`;window.location.href=r+(n?`?redirect=${s}`:"")}const Go=["/passport/auth/login","/passport/auth/token2Login","/passport/auth/register","/guest/comm/config","/passport/comm/sendEmailVerify","/passport/auth/forget"];function qo(){const s=window.settings?.base_url||"/";return s.endsWith("/")?s+"api/v2":s+"/api/v2"}const V=dl.create({baseURL:qo(),timeout:12e3,headers:{"Content-Type":"application/json"}});V.interceptors.request.use(s=>{s.method?.toLowerCase()==="get"&&(s.params={...s.params,t:Date.now()});const n=st();if(!Go.includes(s.url?.split("?")[0]||"")){if(!n.value)return Qn(),Promise.reject({code:-1,message:"未登录"});s.headers.Authorization=n.value}return s.headers["Content-Language"]=Ho().value||"zh-CN",s},s=>Promise.reject(s));V.interceptors.response.use(s=>s?.data||{code:-1,message:"未知错误"},s=>{const n=s.response?.status,a=s.response?.data?.message;return(n===401||n===403)&&Qn(),$.error(a||{401:"登录已过期",403:"没有权限",404:"资源或接口不存在"}[n]||"未知异常"),Promise.reject(s.response?.data||{data:null,code:-1,message:"未知错误"})});function Ko(){return V.get("/user/info")}const Vt={token:st()?.value||"",userInfo:null,isLoggedIn:!!st()?.value,loading:!1,error:null},Xs=ml("user/fetchUserInfo",async()=>(await Ko()).data,{condition:(s,{getState:n})=>{const{user:a}=n();return!!a.token&&!a.loading}}),Zn=ul({name:"user",initialState:Vt,reducers:{setToken(s,n){s.token=n.payload,s.isLoggedIn=!!n.payload},resetUserState:()=>Vt},extraReducers:s=>{s.addCase(Xs.pending,n=>{n.loading=!0,n.error=null}).addCase(Xs.fulfilled,(n,a)=>{n.loading=!1,n.userInfo=a.payload,n.error=null}).addCase(Xs.rejected,(n,a)=>{if(n.loading=!1,n.error=a.error.message||"Failed to fetch user info",!n.token)return Vt})}}),{setToken:Bo,resetUserState:Wo}=Zn.actions,Yo=s=>s.user.userInfo,Jo=Zn.reducer,Xn=hl({reducer:{user:Jo}});st()?.value&&Xn.dispatch(Xs());const Qo={loading:"Loading...",error:"Error",success:"Success",save:"Save",cancel:"Cancel",delete:"Delete",edit:"Edit",view:"View",toggleNavigation:"Toggle Navigation",toggleSidebar:"Toggle Sidebar",search:"Search...",theme:{light:"Light",dark:"Dark",system:"System"},user:"User",defaultEmail:"user@example.com",settings:"Settings",logout:"Logout"},Zo={title:"Dashboard",stats:{newUsers:"New Users",totalScore:"Total Score",monthlyUpload:"Monthly Upload",vsLastMonth:"vs Last Month",vsYesterday:"vs Yesterday",todayIncome:"Today's Income",monthlyIncome:"Monthly Income",totalIncome:"Total Income",totalUsers:"Total Users",activeUsers:"Active Users: {{count}}",totalOrders:"Total Orders",revenue:"Revenue",todayRegistered:"Today Registered",monthlyRegistered:"Monthly Registered",onlineUsers:"Online Users",pendingTickets:"Pending Tickets",hasPendingTickets:"There are tickets that need attention",noPendingTickets:"No pending tickets",pendingCommission:"Pending Commission",hasPendingCommission:"There are commissions that need confirmation",noPendingCommission:"No pending commission",monthlyNewUsers:"Monthly New Users",monthlyDownload:"Monthly Download",todayTraffic:"Today: {{value}}",activeUserTrend:"Active User Trend",realtimeUsers:"Realtime Users",todayPeak:"Today's Peak",vsLastWeek:"vs Last Week"},trafficRank:{nodeTrafficRank:"Node Traffic Rank",userTrafficRank:"User Traffic Rank",today:"Today",last7days:"Last 7 Days",last30days:"Last 30 Days",customRange:"Custom Range",selectTimeRange:"Select Time Range",selectDateRange:"Select Date Range",currentTraffic:"Current Traffic",previousTraffic:"Previous Traffic",changeRate:"Change Rate",recordTime:"Record Time"},overview:{title:"Revenue Overview",thisMonth:"This Month",lastMonth:"Last Month",to:"to",selectTimeRange:"Select Range",selectDate:"Select Date",last7Days:"Last 7 Days",last30Days:"Last 30 Days",last90Days:"Last 90 Days",last180Days:"Last 180 Days",lastYear:"Last Year",customRange:"Custom Range",amount:"Amount",count:"Count",transactions:"{{count}} transactions",orderAmount:"Order Amount",commissionAmount:"Commission Amount",orderCount:"Order Count",commissionCount:"Commission Count",totalIncome:"Total Income",totalCommission:"Total Commission",totalTransactions:"Total: {{count}} transactions",avgOrderAmount:"Average Order Amount:",commissionRate:"Commission Rate:"},traffic:{title:"Traffic Ranking",rank:"Rank",domain:"Domain",todayTraffic:"Today's Traffic",monthlyTraffic:"Monthly Traffic"},queue:{title:"Queue Status",jobDetails:"Job Details",status:{description:"Current queue running status",running:"Running Status",normal:"Normal",abnormal:"Abnormal",waitTime:"Current wait time: {{seconds}} seconds",pending:"Pending",processing:"Processing",completed:"Completed",failed:"Failed",cancelled:"Cancelled"},details:{description:"Queue processing details",recentJobs:"Recent Jobs",statisticsPeriod:"Statistics Period: {{hours}} hours",jobsPerMinute:"Jobs Per Minute",maxThroughput:"Max Throughput: {{value}}",failedJobs7Days:"Failed Jobs (7 days)",retentionPeriod:"Retention Period: {{hours}} hours",longestRunningQueue:"Longest Running Queue",activeProcesses:"Active Processes",id:"Job ID",type:"Job Type",status:"Status",progress:"Progress",createdAt:"Created At",updatedAt:"Updated At",error:"Error Message",data:"Job Data",result:"Result",duration:"Duration",attempts:"Attempts",nextRetry:"Next Retry"},actions:{retry:"Retry",cancel:"Cancel",delete:"Delete",viewDetails:"View Details"},empty:"No jobs in queue",loading:"Loading queue status...",error:"Failed to load queue status"},search:{placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",loading:"Searching..."}},Xo={placeholder:"Search menus and functions...",title:"Menu Navigation",noResults:"No results found",shortcut:{label:"Search",key:"⌘K"}},ec={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Management",nodeManagement:"Node Management",permissionGroupManagement:"Permission Group",routeManagement:"Route Management",subscriptionManagement:"Subscription",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},sc={dashboard:"Dashboard",systemManagement:"System Management",systemConfig:"System Configuration",themeConfig:"Theme Configuration",noticeManagement:"Notice Management",paymentConfig:"Payment Configuration",knowledgeManagement:"Knowledge Base",nodeManagement:"Node Management",permissionGroupManagement:"Permission Groups",routeManagement:"Route Management",subscriptionManagement:"Subscription Management",planManagement:"Plan Management",orderManagement:"Order Management",couponManagement:"Coupon Management",userManagement:"User Management",ticketManagement:"Ticket Management"},tc={title:"Node Configuration",description:"Configure node communication and synchronization settings, including communication key, polling interval, load balancing and other advanced options.",server_token:{title:"Communication Key",description:"The key for communication between Xboard and nodes to prevent unauthorized data access.",placeholder:"Please enter communication key"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Please enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Please enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, multiple nodes from the same IP address count as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Please select device limit mode"},saving:"Saving...",manage:{title:"Node Management",description:"Manage all nodes, including adding, deleting, editing and other operations."},columns:{sort:"Sort",nodeId:"Node ID",show:"Show",node:"Node",address:"Address",onlineUsers:{title:"Online Users",tooltip:"Online users count based on server reporting frequency"},rate:{title:"Rate",tooltip:"Traffic billing rate"},groups:{title:"Permission Groups",tooltip:"Groups that can subscribe to this node",empty:"--"},type:"Type",actions:"Actions",copyAddress:"Copy Connection Address",internalPort:"Internal Port",status:{0:"Not Running",1:"Unused or Abnormal",2:"Running Normal"},actions_dropdown:{edit:"Edit",copy:"Copy",delete:{title:"Confirm Delete",description:"This action will permanently delete this node and cannot be undone. Are you sure you want to continue?",confirm:"Delete"},copy_success:"Copied successfully",delete_success:"Deleted successfully"}},toolbar:{search:"Search nodes...",type:"Type",reset:"Reset",sort:{tip:"Drag nodes to sort, then click save",edit:"Edit Sort",save:"Save Sort"}},form:{add_node:"Add Node",edit_node:"Edit Node",new_node:"New Node",name:{label:"Node Name",placeholder:"Please enter node name",error:"Please enter a valid name"},rate:{label:"Rate",error:"Please enter a valid rate"},code:{label:"Custom Node ID",optional:"(Optional)",placeholder:"Please enter custom node ID"},tags:{label:"Node Tags",placeholder:"Press Enter to add tags"},groups:{label:"Permission Groups",add:"Add Group",placeholder:"Please select permission groups",empty:"No results found"},host:{label:"Node Address",placeholder:"Please enter domain or IP"},port:{label:"Connection Port",placeholder:"User connection port",tooltip:"The port that users actually connect to, this is the port number that needs to be filled in the client configuration. If using transit or tunnel, this port may be different from the port that the server actually listens on.",sync:"Sync to server port"},server_port:{label:"Server Port",placeholder:"Server listening port",tooltip:"The port that the server actually listens on, this is the real port opened on the server. If using transit or tunnel, this port may be different from the user connection port."},parent:{label:"Parent Node",placeholder:"Select parent node",none:"None"},route:{label:"Route Groups",placeholder:"Select route groups",empty:"No results found"},submit:"Submit",cancel:"Cancel",success:"Submitted successfully"},dynamic_form:{shadowsocks:{cipher:{label:"Encryption Method",placeholder:"Select encryption method"},obfs:{label:"Obfuscation",placeholder:"Select obfuscation method",none:"None",http:"HTTP"},obfs_settings:{path:"Path",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"Please select security",disabled:"Disabled",enabled:"Enabled"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},trojan:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?",network:{label:"Transport Protocol",placeholder:"Select transport protocol"}},hysteria:{version:{label:"Protocol Version",placeholder:"Protocol version"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"Obfuscation",type:{label:"Obfuscation Implementation",placeholder:"Select obfuscation implementation",salamander:"Salamander"},password:{label:"Obfuscation Password",placeholder:"Please enter obfuscation password",generate_success:"Obfuscation password generated successfully"}},tls:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Used for certificate verification when node address differs from certificate"},allow_insecure:"Allow Insecure?"},bandwidth:{up:{label:"Upload Bandwidth",placeholder:"Please enter upload bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"},down:{label:"Download Bandwidth",placeholder:"Please enter download bandwidth",suffix:"Mbps",bbr_tip:", leave empty to use BBR"}}},vless:{tls:{label:"Security",placeholder:"Please select security",none:"None",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"Server Name Indication (SNI)",placeholder:"Leave empty if not used"},allow_insecure:"Allow Insecure?"},reality_settings:{server_name:{label:"Destination Site (dest)",placeholder:"e.g., example.com"},server_port:{label:"Port",placeholder:"e.g., 443"},allow_insecure:"Allow Insecure?",private_key:{label:"Private Key"},public_key:{label:"Public Key"},short_id:{label:"Short ID",placeholder:"Optional, length must be even, max 16 characters",description:"List of shortIds available to clients, can be used to distinguish different clients, using hexadecimal characters 0-f",generate:"Generate Short ID",success:"Short ID generated successfully"},key_pair:{generate:"Generate Key Pair",success:"Key pair generated successfully",error:"Failed to generate key pair"}},network:{label:"Transport Protocol",placeholder:"Select transport protocol"},flow:{label:"Flow Control",placeholder:"Select flow control"}}},network_settings:{edit_protocol:"Edit Protocol",edit_protocol_config:"Edit Protocol Configuration",use_template:"Use {{template}} Template",json_config_placeholder:"Please enter JSON configuration",json_config_placeholder_with_template:"Please enter JSON configuration or select template above",validation:{must_be_object:"Configuration must be a JSON object",invalid_json:"Invalid JSON format"},errors:{save_failed:"Error occurred while saving"}},common:{cancel:"Cancel",confirm:"Confirm"}},ac={plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Server Group",add:"Add Group",placeholder:"Select server group"},transfer:{label:"Traffic",placeholder:"Enter traffic limit",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base Price",clear:{button:"Clear",tooltip:"Clear all prices"},period:{monthly:"Monthly",months:"{{count}} Months"},onetime_desc:"One-time traffic package, no time limit",reset_desc:"Reset traffic package, can be used multiple times"},device:{label:"Device Limit",placeholder:"Enter device limit",unit:"Devices"},capacity:{label:"Capacity Limit",placeholder:"Enter capacity limit",unit:"Users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select reset method",description:"Traffic reset method will determine how the traffic is reset",options:{follow_system:"Follow System Settings",monthly_first:"Monthly First Day",monthly_reset:"Monthly Purchase Day",no_reset:"No Reset",yearly_first:"Yearly First Day",yearly_reset:"Yearly Purchase Day"}},content:{label:"Plan Description",placeholder:"Enter plan description",description:"Support Markdown format",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Use default template",content:`## Plan Features -## Usage Instructions -1. Supported devices: iOS, Android, Windows, macOS -2. 24/7 technical support -3. Automatic periodic traffic reset +- Traffic: {{transfer}} GB +- Speed: {{speed}} Mbps +- Devices: {{devices}} -## Notes -- No abuse allowed -- Comply with local laws and regulations -- Support plan changes anytime`}},force_update:{label:"Force Update to Users"},submit:{submitting:"Submitting...",submit:"Submit",cancel:"Cancel",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},ac={title:"Order Management",description:"Here you can view user orders, including assignment, viewing, deletion and other operations.",table:{columns:{tradeNo:"Order No.",type:"Type",plan:"Subscription Plan",period:"Period",amount:"Payment Amount",status:"Order Status",commission:"Commission Amount",commissionStatus:"Commission Status",createdAt:"Created At"}},type:{NEW:"New Purchase",RENEWAL:"Renewal",UPGRADE:"Upgrade",RESET_FLOW:"Reset Traffic"},period:{month_price:"Monthly",quarter_price:"Quarterly",half_year_price:"Semi-annually",year_price:"Annually",two_year_price:"2 Years",three_year_price:"3 Years",onetime_price:"One-time",reset_price:"Reset Package"},status:{PENDING:"Pending",PROCESSING:"Processing",CANCELLED:"Cancelled",COMPLETED:"Completed",DISCOUNTED:"Discounted",tooltip:"After marking as [Paid], the system will proceed with activation and completion"},commission:{PENDING:"Pending",PROCESSING:"Processing",VALID:"Valid",INVALID:"Invalid"},actions:{markAsPaid:"Mark as Paid",cancel:"Cancel Order",openMenu:"Open Menu",reset:"Reset"},search:{placeholder:"Search orders..."},dialog:{title:"Order Information",basicInfo:"Basic Information",amountInfo:"Amount Information",timeInfo:"Time Information",addOrder:"Add Order",assignOrder:"Assign Order",fields:{userEmail:"User Email",orderPeriod:"Order Period",subscriptionPlan:"Subscription Plan",callbackNo:"Callback No.",paymentAmount:"Payment Amount",balancePayment:"Balance Payment",discountAmount:"Discount Amount",refundAmount:"Refund Amount",deductionAmount:"Deduction Amount",createdAt:"Created At",updatedAt:"Updated At"},placeholders:{email:"Please enter user email",plan:"Please select subscription plan",period:"Please select subscription period",amount:"Please enter payment amount"},actions:{cancel:"Cancel",confirm:"Confirm"},messages:{addSuccess:"Added successfully"}}},nc={title:"System Settings",description:"Manage core system configurations, including site, security, subscription, invite commission, nodes, email, and notifications",server:{title:"Server Configuration",description:"Configure node communication and synchronization settings, including communication keys, polling intervals, load balancing and other advanced options.",server_token:{title:"Communication Token",placeholder:"Enter communication token",description:"Used for authentication between servers",generate_tooltip:"Click to generate random token"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, using multiple nodes from the same IP address counts as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Select device limit mode"}},invite:{title:"Invitation & Commission Settings",description:"Configure invitation registration and commission related settings.",invite_force:{title:"Enable Forced Invitation",description:"When enabled, only invited users can register."},invite_commission:{title:"Invitation Commission Percentage",description:"Default global commission distribution ratio, you can configure individual ratios in user management.",placeholder:"Enter commission percentage"},invite_gen_limit:{title:"Invitation Code Generation Limit",description:"Maximum number of invitation codes a user can create",placeholder:"Enter generation limit"},invite_never_expire:{title:"Never Expire Invitation Code",description:"When enabled, invitation codes will not expire after use, otherwise they will expire after being used."},commission_first_time:{title:"First-time Commission Only",description:"When enabled, commission will only be generated on the first payment of the invitee, can be configured individually in user management."},commission_auto_check:{title:"Automatic Commission Confirmation",description:"When enabled, commission will be automatically confirmed 3 days after order completion."},commission_withdraw_limit:{title:"Withdrawal Threshold (Yuan)",description:"Withdrawal requests below this threshold will not be submitted.",placeholder:"Enter withdrawal threshold"},commission_withdraw_method:{title:"Withdrawal Methods",description:"Supported withdrawal methods, separate multiple methods with commas.",placeholder:"Enter withdrawal methods, separate with commas"},withdraw_close:{title:"Disable Withdrawals",description:"When enabled, users will be prohibited from requesting withdrawals, and invitation commissions will go directly to user balance."},commission_distribution:{title:"Three-level Distribution",description:"When enabled, commission will be split according to the three set ratios, total should not exceed 100%.",l1:"Level 1 Inviter Ratio",l2:"Level 2 Inviter Ratio",l3:"Level 3 Inviter Ratio",placeholder:"Enter ratio e.g. 50"},saving:"Saving..."},site:{title:"Site Settings",description:"Configure basic site information, including site name, description, currency unit, and other core settings.",form:{siteName:{label:"Site Name",placeholder:"Please enter site name",description:"Used where site name needs to be displayed."},siteDescription:{label:"Site Description",placeholder:"Please enter site description",description:"Used where site description needs to be displayed."},siteUrl:{label:"Site URL",placeholder:"Please enter site URL, without trailing /",description:"Current website URL, will be used in emails and other places where URL is needed."},forceHttps:{label:"Force HTTPS",description:"Need to enable when the site is not using HTTPS but CDN or reverse proxy has forced HTTPS."},logo:{label:"LOGO",placeholder:"Please enter LOGO URL, without trailing /",description:"Used where LOGO needs to be displayed."},subscribeUrl:{label:"Subscribe URL",placeholder:"Used for subscription, multiple URLs separated by ','. Leave empty to use site URL.",description:"Used for subscription, leave empty to use site URL."},tosUrl:{label:"Terms of Service (TOS) URL",placeholder:"Please enter TOS URL, without trailing /",description:"Used to link to Terms of Service (TOS)"},stopRegister:{label:"Stop New User Registration",description:"When enabled, no one will be able to register."},tryOut:{label:"Registration Trial",placeholder:"Disabled",description:"Select the subscription for trial, if no options please add in subscription management first.",duration:{label:"Trial Duration",placeholder:"0",description:"Trial duration in hours."}},currency:{label:"Currency Unit",placeholder:"CNY",description:"For display only, changing this will affect all currency units in the system."},currencySymbol:{label:"Currency Symbol",placeholder:"¥",description:"For display only, changing this will affect all currency symbols in the system."}}},safe:{title:"Security Settings",description:"Configure system security options, including login verification, password policies, and API access settings.",form:{emailVerify:{label:"Email Verification",description:"When enabled, users will be required to verify their email."},gmailLimit:{label:"Disable Gmail Aliases",description:"When enabled, Gmail aliases will not be allowed to register."},safeMode:{label:"Safe Mode",description:"When enabled, accessing the site through domains other than the site URL will be blocked with 403."},securePath:{label:"Admin Path",placeholder:"admin",description:"Admin management path, changing this will modify the original admin path"},emailWhitelist:{label:"Email Suffix Whitelist",description:"When enabled, only email suffixes in the list will be allowed to register.",suffixes:{label:"Email Suffixes",placeholder:"Enter email suffixes, one per line",description:"Enter the allowed email suffixes, one per line"}},recaptcha:{enable:{label:"Enable reCAPTCHA",description:"When enabled, users will need to pass reCAPTCHA verification when registering."},key:{label:"reCAPTCHA Key",placeholder:"Enter reCAPTCHA key",description:"Enter your reCAPTCHA key"},siteKey:{label:"reCAPTCHA Site Key",placeholder:"Enter reCAPTCHA site key",description:"Enter your reCAPTCHA site key"}},registerLimit:{enable:{label:"IP Registration Limit",description:"When enabled, the number of registrations from the same IP will be limited."},count:{label:"Registration Count",placeholder:"Enter maximum registration count",description:"Maximum number of registrations allowed from the same IP"},expire:{label:"Limit Duration",placeholder:"Enter limit duration in hours",description:"Duration of the registration limit in hours"}},passwordLimit:{enable:{label:"Password Attempt Limit",description:"When enabled, the number of password attempts will be limited."},count:{label:"Attempt Count",placeholder:"Enter maximum attempt count",description:"Maximum number of password attempts allowed"},expire:{label:"Lock Duration",placeholder:"Enter lock duration in hours",description:"Duration of the account lock in hours"}}}},subscribe:{title:"Subscription Settings",description:"Manage subscription-related configurations, including subscription link format, update frequency, traffic statistics, and other settings.",plan_change_enable:{title:"Allow Subscription Changes",description:"When enabled, users will be able to change their subscription plans."},reset_traffic_method:{title:"Monthly Traffic Reset Method",description:"Global traffic reset method, defaults to the 1st of each month. Can be set individually for subscriptions in subscription management.",options:{monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},surplus_enable:{title:"Enable Deduction Plan",description:"When enabled, the system will deduct from the original subscription when users change subscriptions, refer to documentation for details."},new_order_event:{title:"Trigger Event on New Subscription",description:"This task will be triggered when a new subscription is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},renew_order_event:{title:"Trigger Event on Subscription Renewal",description:"This task will be triggered when a subscription renewal is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},change_order_event:{title:"Trigger Event on Subscription Change",description:"This task will be triggered when a subscription change is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},subscribe_path:{title:"Subscription Path",description:"Subscription path, modifying will change the original subscribe path",current_format:"Current subscription path format: {path}/xxxxxxxxxx"},show_info_to_server:{title:"Show Subscription Info in Nodes",description:"When enabled, subscription information will be output when users subscribe to nodes."},show_protocol_to_server:{title:"Show Protocol in Node Names",description:"When enabled, subscription lines will include protocol names (e.g., [Hy2]Hong Kong)"},saving:"Saving...",plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Permission Group",placeholder:"Select permission group",add:"Add Group"},transfer:{label:"Traffic",placeholder:"Enter traffic size",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base monthly price",clear:{button:"Clear Prices",tooltip:"Clear all period price settings"}},device:{label:"Device Limit",placeholder:"Leave empty for no limit",unit:"devices"},capacity:{label:"Capacity Limit",placeholder:"Leave empty for no limit",unit:"users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select traffic reset method",description:"Set how subscription traffic is reset, different methods affect how user traffic is calculated",options:{follow_system:"Follow System Settings",monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},content:{label:"Plan Description",placeholder:"Write plan description here...",description:"Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Click to use preset plan description template",content:`## Plan Features +## Usage Notes + +1. The plan is valid for {{validity}} days +2. Traffic resets {{reset_method}} +3. Maximum {{capacity}} concurrent users`}},force_update:{label:"Force Update User Plans"},submit:{cancel:"Cancel",submit:"Submit",submitting:"Submitting...",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},nc={title:"Order Management",description:"Here you can view user orders, including assignment, viewing, deletion and other operations.",table:{columns:{tradeNo:"Order No.",type:"Type",plan:"Subscription Plan",period:"Period",amount:"Payment Amount",status:"Order Status",commission:"Commission Amount",commissionStatus:"Commission Status",createdAt:"Created At"}},type:{NEW:"New Purchase",RENEWAL:"Renewal",UPGRADE:"Upgrade",RESET_FLOW:"Reset Traffic"},period:{month_price:"Monthly",quarter_price:"Quarterly",half_year_price:"Semi-annually",year_price:"Annually",two_year_price:"2 Years",three_year_price:"3 Years",onetime_price:"One-time",reset_price:"Reset Package"},status:{PENDING:"Pending",PROCESSING:"Processing",CANCELLED:"Cancelled",COMPLETED:"Completed",DISCOUNTED:"Discounted",tooltip:"After marking as [Paid], the system will proceed with activation and completion"},commission:{PENDING:"Pending",PROCESSING:"Processing",VALID:"Valid",INVALID:"Invalid"},actions:{markAsPaid:"Mark as Paid",cancel:"Cancel Order",openMenu:"Open Menu",reset:"Reset"},search:{placeholder:"Search orders..."},dialog:{title:"Order Information",basicInfo:"Basic Information",amountInfo:"Amount Information",timeInfo:"Time Information",addOrder:"Add Order",assignOrder:"Assign Order",fields:{userEmail:"User Email",orderPeriod:"Order Period",subscriptionPlan:"Subscription Plan",callbackNo:"Callback No.",paymentAmount:"Payment Amount",balancePayment:"Balance Payment",discountAmount:"Discount Amount",refundAmount:"Refund Amount",deductionAmount:"Deduction Amount",createdAt:"Created At",updatedAt:"Updated At"},placeholders:{email:"Please enter user email",plan:"Please select subscription plan",period:"Please select subscription period",amount:"Please enter payment amount"},actions:{cancel:"Cancel",confirm:"Confirm"},messages:{addSuccess:"Added successfully"}}},rc={title:"System Settings",description:"Manage core system configurations, including site, security, subscription, invite commission, nodes, email, and notifications",server:{title:"Server Configuration",description:"Configure node communication and synchronization settings, including communication keys, polling intervals, load balancing and other advanced options.",server_token:{title:"Communication Token",placeholder:"Enter communication token",description:"Used for authentication between servers",generate_tooltip:"Click to generate random token"},server_pull_interval:{title:"Node Pull Action Polling Interval",description:"The frequency at which nodes retrieve data from the panel.",placeholder:"Enter pull interval"},server_push_interval:{title:"Node Push Action Polling Interval",description:"The frequency at which nodes push data to the panel.",placeholder:"Enter push interval"},device_limit_mode:{title:"Device Limit Mode",description:"In relaxed mode, using multiple nodes from the same IP address counts as one device.",strict:"Strict Mode",relaxed:"Relaxed Mode",placeholder:"Select device limit mode"}},invite:{title:"Invitation & Commission Settings",description:"Configure invitation registration and commission related settings.",invite_force:{title:"Enable Forced Invitation",description:"When enabled, only invited users can register."},invite_commission:{title:"Invitation Commission Percentage",description:"Default global commission distribution ratio, you can configure individual ratios in user management.",placeholder:"Enter commission percentage"},invite_gen_limit:{title:"Invitation Code Generation Limit",description:"Maximum number of invitation codes a user can create",placeholder:"Enter generation limit"},invite_never_expire:{title:"Never Expire Invitation Code",description:"When enabled, invitation codes will not expire after use, otherwise they will expire after being used."},commission_first_time:{title:"First-time Commission Only",description:"When enabled, commission will only be generated on the first payment of the invitee, can be configured individually in user management."},commission_auto_check:{title:"Automatic Commission Confirmation",description:"When enabled, commission will be automatically confirmed 3 days after order completion."},commission_withdraw_limit:{title:"Withdrawal Threshold (Yuan)",description:"Withdrawal requests below this threshold will not be submitted.",placeholder:"Enter withdrawal threshold"},commission_withdraw_method:{title:"Withdrawal Methods",description:"Supported withdrawal methods, separate multiple methods with commas.",placeholder:"Enter withdrawal methods, separate with commas"},withdraw_close:{title:"Disable Withdrawals",description:"When enabled, users will be prohibited from requesting withdrawals, and invitation commissions will go directly to user balance."},commission_distribution:{title:"Three-level Distribution",description:"When enabled, commission will be split according to the three set ratios, total should not exceed 100%.",l1:"Level 1 Inviter Ratio",l2:"Level 2 Inviter Ratio",l3:"Level 3 Inviter Ratio",placeholder:"Enter ratio e.g. 50"},saving:"Saving..."},site:{title:"Site Settings",description:"Configure basic site information, including site name, description, currency unit, and other core settings.",form:{siteName:{label:"Site Name",placeholder:"Please enter site name",description:"Used where site name needs to be displayed."},siteDescription:{label:"Site Description",placeholder:"Please enter site description",description:"Used where site description needs to be displayed."},siteUrl:{label:"Site URL",placeholder:"Please enter site URL, without trailing /",description:"Current website URL, will be used in emails and other places where URL is needed."},forceHttps:{label:"Force HTTPS",description:"Need to enable when the site is not using HTTPS but CDN or reverse proxy has forced HTTPS."},logo:{label:"LOGO",placeholder:"Please enter LOGO URL, without trailing /",description:"Used where LOGO needs to be displayed."},subscribeUrl:{label:"Subscribe URL",placeholder:"Used for subscription, multiple URLs separated by ','. Leave empty to use site URL.",description:"Used for subscription, leave empty to use site URL."},tosUrl:{label:"Terms of Service (TOS) URL",placeholder:"Please enter TOS URL, without trailing /",description:"Used to link to Terms of Service (TOS)"},stopRegister:{label:"Stop New User Registration",description:"When enabled, no one will be able to register."},tryOut:{label:"Registration Trial",placeholder:"Disabled",description:"Select the subscription for trial, if no options please add in subscription management first.",duration:{label:"Trial Duration",placeholder:"0",description:"Trial duration in hours."}},currency:{label:"Currency Unit",placeholder:"CNY",description:"For display only, changing this will affect all currency units in the system."},currencySymbol:{label:"Currency Symbol",placeholder:"¥",description:"For display only, changing this will affect all currency symbols in the system."}}},safe:{title:"Security Settings",description:"Configure system security options, including login verification, password policies, and API access settings.",form:{emailVerify:{label:"Email Verification",description:"When enabled, users will be required to verify their email."},gmailLimit:{label:"Disable Gmail Aliases",description:"When enabled, Gmail aliases will not be allowed to register."},safeMode:{label:"Safe Mode",description:"When enabled, accessing the site through domains other than the site URL will be blocked with 403."},securePath:{label:"Admin Path",placeholder:"admin",description:"Admin management path, changing this will modify the original admin path"},emailWhitelist:{label:"Email Suffix Whitelist",description:"When enabled, only email suffixes in the list will be allowed to register.",suffixes:{label:"Email Suffixes",placeholder:"Enter email suffixes, one per line",description:"Enter the allowed email suffixes, one per line"}},recaptcha:{enable:{label:"Enable reCAPTCHA",description:"When enabled, users will need to pass reCAPTCHA verification when registering."},key:{label:"reCAPTCHA Key",placeholder:"Enter reCAPTCHA key",description:"Enter your reCAPTCHA key"},siteKey:{label:"reCAPTCHA Site Key",placeholder:"Enter reCAPTCHA site key",description:"Enter your reCAPTCHA site key"}},registerLimit:{enable:{label:"IP Registration Limit",description:"When enabled, the number of registrations from the same IP will be limited."},count:{label:"Registration Count",placeholder:"Enter maximum registration count",description:"Maximum number of registrations allowed from the same IP"},expire:{label:"Limit Duration",placeholder:"Enter limit duration in hours",description:"Duration of the registration limit in hours"}},passwordLimit:{enable:{label:"Password Attempt Limit",description:"When enabled, the number of password attempts will be limited."},count:{label:"Attempt Count",placeholder:"Enter maximum attempt count",description:"Maximum number of password attempts allowed"},expire:{label:"Lock Duration",placeholder:"Enter lock duration in hours",description:"Duration of the account lock in hours"}}}},subscribe:{title:"Subscription Settings",description:"Manage subscription-related configurations, including subscription link format, update frequency, traffic statistics, and other settings.",plan_change_enable:{title:"Allow Subscription Changes",description:"When enabled, users will be able to change their subscription plans."},reset_traffic_method:{title:"Monthly Traffic Reset Method",description:"Global traffic reset method, defaults to the 1st of each month. Can be set individually for subscriptions in subscription management.",options:{monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},surplus_enable:{title:"Enable Deduction Plan",description:"When enabled, the system will deduct from the original subscription when users change subscriptions, refer to documentation for details."},new_order_event:{title:"Trigger Event on New Subscription",description:"This task will be triggered when a new subscription is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},renew_order_event:{title:"Trigger Event on Subscription Renewal",description:"This task will be triggered when a subscription renewal is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},change_order_event:{title:"Trigger Event on Subscription Change",description:"This task will be triggered when a subscription change is completed.",options:{no_action:"No Action",reset_traffic:"Reset User Traffic"}},subscribe_path:{title:"Subscription Path",description:"Subscription path, modifying will change the original subscribe path",current_format:"Current subscription path format: {path}/xxxxxxxxxx"},show_info_to_server:{title:"Show Subscription Info in Nodes",description:"When enabled, subscription information will be output when users subscribe to nodes."},show_protocol_to_server:{title:"Show Protocol in Node Names",description:"When enabled, subscription lines will include protocol names (e.g., [Hy2]Hong Kong)"},saving:"Saving...",plan:{title:"Subscription Plans",add:"Add Plan",search:"Search plans...",sort:{edit:"Edit Sort",save:"Save Sort"},columns:{id:"ID",show:"Show",sell:"Sell",renew:"Renew",renew_tooltip:"Whether existing users can renew when the subscription stops selling",name:"Name",stats:"Statistics",group:"Permission Group",price:"Price",actions:"Actions",edit:"Edit",delete:"Delete",delete_confirm:{title:"Confirm Delete",description:"This action will permanently delete this subscription and cannot be undone. Are you sure you want to continue?",success:"Successfully deleted"},price_period:{monthly:"Monthly",quarterly:"Quarterly",half_yearly:"Half Yearly",yearly:"Yearly",two_yearly:"Two Years",three_yearly:"Three Years",onetime:"One Time",reset_traffic:"Reset Traffic",unit:{month:"/month",quarter:"/quarter",half_year:"/half year",year:"/year",two_year:"/2 years",three_year:"/3 years",times:"/time"}}},form:{add_title:"Add Plan",edit_title:"Edit Plan",name:{label:"Plan Name",placeholder:"Enter plan name"},group:{label:"Permission Group",placeholder:"Select permission group",add:"Add Group"},transfer:{label:"Traffic",placeholder:"Enter traffic size",unit:"GB"},speed:{label:"Speed Limit",placeholder:"Enter speed limit",unit:"Mbps"},price:{title:"Price Settings",base_price:"Base monthly price",clear:{button:"Clear Prices",tooltip:"Clear all period price settings"}},device:{label:"Device Limit",placeholder:"Leave empty for no limit",unit:"devices"},capacity:{label:"Capacity Limit",placeholder:"Leave empty for no limit",unit:"users"},reset_method:{label:"Traffic Reset Method",placeholder:"Select traffic reset method",description:"Set how subscription traffic is reset, different methods affect how user traffic is calculated",options:{follow_system:"Follow System Settings",monthly_first:"1st of Each Month",monthly_reset:"Monthly Reset",no_reset:"No Reset",yearly_first:"January 1st",yearly_reset:"Yearly Reset"}},content:{label:"Plan Description",placeholder:"Write plan description here...",description:"Supports Markdown format, you can use headings, lists, bold, italic and other styles to beautify the content",preview:"Preview",preview_button:{show:"Show Preview",hide:"Hide Preview"},template:{button:"Use Template",tooltip:"Click to use preset plan description template",content:`## Plan Features • High-speed and stable global network access • Support multiple devices online simultaneously • Unlimited traffic reset @@ -24,21 +21,18 @@ import{r as m,j as e,t as il,c as ol,I as Na,a as Ts,S as Xt,u as os,b as ea,d a ## Notes - No abuse allowed - Comply with local laws and regulations -- Support plan changes anytime`}},force_update:{label:"Force Update to Users"},submit:{submitting:"Submitting...",submit:"Submit",cancel:"Cancel",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},email:{title:"Email Settings",description:"Configure system email service for sending verification codes, password resets, and notifications, supporting various SMTP providers.",email_host:{title:"SMTP Host",description:"SMTP server address, e.g., smtp.gmail.com"},email_port:{title:"SMTP Port",description:"SMTP server port, common ports: 25, 465, 587"},email_username:{title:"SMTP Username",description:"SMTP authentication username"},email_password:{title:"SMTP Password",description:"SMTP authentication password or application-specific password"},email_encryption:{title:"Encryption Method",description:"Email encryption method",none:"None",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"From Address",description:"Sender's email address"},email_from_name:{title:"From Name",description:"Sender's display name"},email_template:{title:"Email Template",description:"You can check the documentation for how to customize email templates",placeholder:"Select email template"},remind_mail:{title:"Email Reminders",description:"When enabled, users will receive email notifications when their subscription is about to expire or when traffic is running low."},test:{title:"Send Test Email",sending:"Sending...",description:"Send a test email to verify the configuration",success:"Test email sent successfully",error:"Failed to send test email"}},telegram:{title:"Telegram Settings",description:"Configure Telegram bot functionality for user notifications, account binding, and command interactions.",bot_token:{title:"Bot Token",description:"Please enter the token provided by Botfather.",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"Set Webhook",description:"Set up webhook for the bot. Without setting it, you won't receive Telegram notifications.",button:"One-Click Setup",setting:"Setting Webhook..."},bot_enable:{title:"Enable Bot Notifications",description:"When enabled, the bot will send basic notifications to administrators and users who have bound their Telegram accounts."},discuss_link:{title:"Group Link",description:"Once filled in, it will be displayed on the user side or used where needed.",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP Settings",description:"Manage mobile application configurations, including API interfaces, version control, and push notifications.",common:{placeholder:"Please input"},windows:{version:{title:"Windows Version",description:"Current version number of Windows client"},download:{title:"Windows Download URL",description:"Download link for Windows client"}},macos:{version:{title:"macOS Version",description:"Current version number of macOS client"},download:{title:"macOS Download URL",description:"Download link for macOS client"}},android:{version:{title:"Android Version",description:"Current version number of Android client"},download:{title:"Android Download URL",description:"Download link for Android client"}}},common:{saving:"Saving...",save_success:"Saved automatically",placeholder:"Please input",autoSaved:"Saved automatically"}},rc={trafficRecord:{title:"Traffic Usage Records",time:"Time",upload:"Upload",download:"Download",rate:"Rate",total:"Total",noRecords:"No records found",perPage:"Show per page",records:"records",page:"Page {{current}} / {{total}}",multiplier:"{{value}}x"}},lc={title:"Ticket Management",description:"Here you can view user tickets, including viewing, replying, and closing operations.",columns:{id:"Ticket ID",subject:"Subject",level:"Priority",status:"Status",updated_at:"Last Updated",created_at:"Created At",actions:"Actions"},status:{closed:"Closed",replied:"Replied",pending:"Pending",processing:"Processing"},level:{low:"Low",medium:"Medium",high:"High"},filter:{placeholder:"Search {field}...",no_results:"No results found.",selected:"{count} selected",clear:"Clear filters"},actions:{view_details:"View Details",close_ticket:"Close Ticket",close_confirm_title:"Confirm Close Ticket",close_confirm_description:"After closing, you will not be able to reply. Are you sure you want to close this ticket?",close_confirm_button:"Close Ticket",close_success:"Ticket closed successfully",view_ticket:"View Ticket"},detail:{no_messages:"No messages yet",created_at:"Created at",user_info:"User Info",traffic_records:"Traffic Records",order_records:"Order Records",input:{closed_placeholder:"Ticket is closed",reply_placeholder:"Type your reply...",sending:"Sending...",send:"Send"}}},ic={manage:{title:"User Management",description:"Here you can manage users, including adding, deleting, editing, and querying operations."},columns:{is_admin:"Admin",is_staff:"Staff",id:"ID",email:"Email",online_count:"Online Devices",status:"Status",subscription:"Subscription",group:"Group",used_traffic:"Used Traffic",total_traffic:"Total Traffic",expire_time:"Expire Time",balance:"Balance",commission:"Commission",register_time:"Register Time",actions:"Actions",device_limit:{unlimited:"No device limit",limited:"Maximum {{count}} devices allowed"},status_text:{normal:"Normal",banned:"Banned"},online_status:{online:"Currently Online",never:"Never Online",last_online:"Last Online: {{time}}",offline_duration:{days:"Offline Duration: {{count}}d",hours:"Offline Duration: {{count}}h",minutes:"Offline Duration: {{count}}m",seconds:"Offline Duration: {{count}}s"}},expire_status:{permanent:"Permanent",expired:"Expired {{days}} days ago",remaining:"{{days}} days remaining"},actions_menu:{edit:"Edit",assign_order:"Assign Order",copy_url:"Copy Subscribe URL",reset_secret:"Reset UUID & URL",orders:"Orders",invites:"Invites",traffic_records:"Traffic Records"}},filter:{selected:"{{count}} selected",no_results:"No results found.",clear:"Clear filters",search_placeholder:"Search...",email_search:"Search user email...",advanced:"Advanced Filter",reset:"Reset Filter",sheet:{title:"Advanced Filter",description:"Add one or more filter conditions to find users precisely",conditions:"Filter Conditions",add:"Add Condition",condition:"Condition {{number}}",field:"Select Field",operator:"Select Operator",value:"Enter Value",value_number:"Enter Value ({{unit}})",reset:"Reset",apply:"Apply Filter"},fields:{email:"Email",id:"User ID",plan_id:"Subscription",transfer_enable:"Traffic",total_used:"Used Traffic",online_count:"Online Devices",expired_at:"Expire Time",uuid:"UUID",token:"Token",banned:"Account Status",remark:"Remark",inviter_email:"Inviter Email",invite_user_id:"Inviter ID",is_admin:"Admin",is_staff:"Staff"},operators:{contains:"Contains",eq:"Equals",gt:"Greater Than",lt:"Less Than"},status:{normal:"Normal",banned:"Banned"},boolean:{true:"Yes",false:"No"}},generate:{button:"Create User",title:"Create User",form:{email:"Email",email_prefix:"Account (leave empty for batch generation)",email_domain:"Domain",password:"Password",password_placeholder:"Leave empty to use email as password",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",permanent:"Permanent",subscription:"Subscription Plan",subscription_none:"None",generate_count:"Generate Count",generate_count_placeholder:"Enter count for batch generation",cancel:"Cancel",submit:"Generate",success:"Generated successfully"}},edit:{button:"Edit User Info",title:"User Management",form:{email:"Email",email_placeholder:"Please enter email",inviter_email:"Inviter Email",inviter_email_placeholder:"Please enter email",password:"Password",password_placeholder:"Enter new password if you want to change it",balance:"Balance",balance_placeholder:"Please enter balance",commission_balance:"Commission Balance",commission_balance_placeholder:"Please enter commission balance",upload:"Upload Traffic",upload_placeholder:"Upload traffic",download:"Download Traffic",download_placeholder:"Download traffic",total_traffic:"Total Traffic",total_traffic_placeholder:"Please enter traffic",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",expire_time_specific:"Specific Time",expire_time_today:"Set to end of today",expire_time_permanent:"Permanent",expire_time_1month:"One Month",expire_time_3months:"Three Months",expire_time_confirm:"Confirm",subscription:"Subscription Plan",subscription_none:"None",account_status:"Account Status",commission_type:"Commission Type",commission_type_system:"Follow System Settings",commission_type_cycle:"Cycle Commission",commission_type_onetime:"One-time Commission",commission_rate:"Commission Rate",commission_rate_placeholder:"Leave empty to follow site commission rate",discount:"Exclusive Discount",discount_placeholder:"Leave empty for no exclusive discount",speed_limit:"Speed Limit",speed_limit_placeholder:"Leave empty for no speed limit",device_limit:"Device Limit",device_limit_placeholder:"Leave empty for no device limit",is_admin:"Is Admin",is_staff:"Is Staff",remarks:"Remarks",remarks_placeholder:"Please enter remarks here",cancel:"Cancel",submit:"Submit",success:"Modified successfully"}}},oc={title:"Route Management",description:"Manage all route groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",remarks:"Remarks",action:"Action",actions:"Actions",matchRules:"Match {{count}} rules"},actions:{dns:"Resolve using specified DNS server",block:"Block access"},form:{add:"Add Route",edit:"Edit Route",create:"Create Route",remarks:"Remarks",remarksPlaceholder:"Please enter remarks",match:"Match Rules",matchPlaceholder:`example.com -*.example.com`,action:"Action",actionPlaceholder:"Please select action",dns:"DNS Server",dnsPlaceholder:"Please enter DNS server",cancel:"Cancel",submit:"Submit",validation:{remarks:"Please enter valid remarks"}},toolbar:{searchPlaceholder:"Search routes...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this route group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",deleteSuccess:"Deleted Successfully",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully"}},cc={title:"Payment Configuration",description:"Configure payment methods including Alipay, WeChat Pay, etc.",table:{columns:{id:"ID",enable:"Enable",name:"Display Name",payment:"Payment Gateway",notify_url:"Notify URL",notify_url_tooltip:"The payment gateway will send notifications to this address. Please ensure it's accessible through your firewall.",actions:"Actions"},actions:{edit:"Edit",delete:{title:"Confirm Delete",description:"Are you sure you want to delete this payment method? This action cannot be undone.",success:"Successfully deleted"}},toolbar:{search:"Search payment methods...",reset:"Reset",sort:{hint:"Drag payment methods to sort, click save when finished",save:"Save Order",edit:"Edit Order"}}},form:{add:{button:"Add Payment Method",title:"Add Payment Method"},edit:{title:"Edit Payment Method"},fields:{name:{label:"Display Name",placeholder:"Enter payment name",description:"Used for frontend display"},icon:{label:"Icon URL",placeholder:"https://example.com/icon.svg",description:"Icon URL for frontend display"},notify_domain:{label:"Notify Domain",placeholder:"https://example.com",description:"Domain for gateway notifications"},handling_fee_percent:{label:"Percentage Fee (%)",placeholder:"0-100"},handling_fee_fixed:{label:"Fixed Fee",placeholder:"0"},payment:{label:"Payment Gateway",placeholder:"Select payment gateway",description:"Choose the payment gateway to use"}},validation:{name:{min:"Name must be at least 2 characters",max:"Name cannot exceed 30 characters"},notify_domain:{url:"Please enter a valid URL"},payment:{required:"Please select a payment gateway"}},buttons:{cancel:"Cancel",submit:"Submit"},messages:{success:"Saved successfully"}}},dc={title:"Notice Management",description:"Here you can configure notices, including adding, deleting, editing and other operations.",table:{columns:{id:"ID",show:"Display Status",title:"Title",actions:"Actions"},toolbar:{search:"Search notice title...",reset:"Reset",sort:{edit:"Edit Order",save:"Save Order"}},actions:{edit:"Edit",delete:{title:"Delete Confirmation",description:"Are you sure you want to delete this notice? This action cannot be undone.",success:"Successfully deleted"}}},form:{add:{title:"Add Notice",button:"Add Notice"},edit:{title:"Edit Notice"},fields:{title:{label:"Title",placeholder:"Please enter notice title"},content:{label:"Content"},img_url:{label:"Background Image",placeholder:"Please enter notice background image URL"},show:{label:"Display"},tags:{label:"Tags",placeholder:"Press Enter to add tags"}},buttons:{cancel:"Cancel",submit:"Submit",success:"Successfully submitted"}}},mc={title:"Theme Configuration",description:"Theme configuration, including theme colors, font sizes, etc. If you deploy V2board in a front-end and back-end separated way, theme configuration will not take effect.",upload:{button:"Upload Theme",title:"Upload Theme",description:"Please upload a valid theme package (.zip format). The theme package should contain a complete theme file structure.",dragText:"Drag and drop theme file here, or",clickText:"click to select",supportText:"Supports .zip format theme packages",uploading:"Uploading...",error:{format:"Only ZIP format theme files are supported"}},preview:{title:"Theme Preview",imageCount:"{{current}} / {{total}}"},card:{version:"Version: {{version}}",currentTheme:"Current Theme",activateTheme:"Activate Theme",configureTheme:"Theme Settings",preview:"Preview",delete:{title:"Delete Theme",description:"Are you sure you want to delete this theme? This action cannot be undone.",button:"Delete",error:{active:"Cannot delete the currently active theme"}}},config:{title:"Configure {{name}} Theme",description:"Modify theme styles, layouts, and other display options.",cancel:"Cancel",save:"Save",success:"Settings saved successfully"}},uc={title:"Coupon Management",description:"Here you can manage coupons, including adding, viewing, and deleting operations.",table:{columns:{id:"ID",show:"Enable",name:"Coupon Name",type:"Type",code:"Code",limitUse:"Remaining Uses",limitUseWithUser:"Uses Per User",validity:"Validity Period",actions:"Actions"},validity:{expired:"Expired {{days}} days ago",notStarted:"Starts in {{days}} days",remaining:"{{days}} days remaining",startTime:"Start Time",endTime:"End Time",unlimited:"Unlimited",noLimit:"No Limit"},actions:{edit:"Edit",delete:"Delete",deleteConfirm:{title:"Confirm Delete",description:"This action will permanently delete this coupon and cannot be undone. Are you sure you want to continue?",confirmText:"Delete"}},toolbar:{search:"Search coupons...",type:"Type",reset:"Reset",types:{1:"Fixed Amount",2:"Percentage"}}},form:{add:"Add Coupon",edit:"Edit Coupon",name:{label:"Coupon Name",placeholder:"Enter coupon name",required:"Please enter coupon name"},type:{label:"Coupon Type and Value",placeholder:"Select coupon type"},value:{placeholder:"Enter value"},validity:{label:"Validity Period",to:"to",endTimeError:"End time must be later than start time"},limitUse:{label:"Maximum Uses",placeholder:"Set maximum uses, leave empty for unlimited",description:"Set the total number of times this coupon can be used, leave empty for unlimited uses"},limitUseWithUser:{label:"Uses Per User",placeholder:"Set uses per user, leave empty for unlimited",description:"Limit how many times each user can use this coupon, leave empty for unlimited uses per user"},limitPeriod:{label:"Subscription Periods",placeholder:"Limit to specific subscription periods, leave empty for no restrictions",description:"Select which subscription periods can use this coupon, leave empty for no period restrictions",empty:"No matching periods found"},limitPlan:{label:"Subscription Plans",placeholder:"Limit to specific subscription plans, leave empty for no restrictions",empty:"No matching plans found"},code:{label:"Custom Coupon Code",placeholder:"Enter custom code, leave empty for auto-generation",description:"Customize the coupon code, leave empty for auto-generation"},generateCount:{label:"Batch Generation Count",placeholder:"Number of coupons to generate, leave empty for single coupon",description:"Generate multiple coupon codes at once, leave empty to generate a single code"},submit:{saving:"Saving...",save:"Save"},error:{saveFailed:"Failed to save coupon"}}},hc={title:"Permission Groups",description:"Manage all permission groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",name:"Group Name",usersCount:"Users Count",serverCount:"Nodes Count",actions:"Actions"},form:{add:"Add Group",edit:"Edit Group",create:"Create Group",update:"Update",name:"Group Name",namePlaceholder:"Please enter group name",nameDescription:"Group name is used to identify different user groups, it's recommended to use meaningful names.",cancel:"Cancel",editDescription:"Modify group information, changes will take effect immediately.",createDescription:"Create a new permission group to assign different permissions to different users."},toolbar:{searchPlaceholder:"Search groups...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this permission group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully",nameValidation:{min:"Group name must be at least 2 characters",max:"Group name cannot exceed 50 characters",pattern:"Group name can only contain letters, numbers, Chinese characters, underscores and hyphens"}}},xc={title:"Knowledge Base",description:"Here you can configure the knowledge base, including adding, deleting, and editing operations.",columns:{id:"ID",status:"Status",title:"Title",category:"Category",actions:"Actions"},form:{add:"Add Knowledge",edit:"Edit Knowledge",title:"Title",titlePlaceholder:"Please enter knowledge title",category:"Category",categoryPlaceholder:"Please enter category, it will be automatically classified",language:"Language",languagePlaceholder:"Please select language",content:"Content",show:"Show",cancel:"Cancel",submit:"Submit"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this knowledge base record and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",operationSuccess:"Operation Successful"},toolbar:{searchPlaceholder:"Search knowledge...",reset:"Reset",sortModeHint:"Drag knowledge items to sort, click save when done",editSort:"Edit Sort",saveSort:"Save Sort"}},pc={loading:"加载中...",error:"错误",success:"成功",save:"保存",cancel:"取消",delete:"删除",edit:"编辑",view:"查看",toggleNavigation:"切换导航",toggleSidebar:"切换侧边栏",search:"搜索...",theme:{light:"浅色",dark:"深色",system:"跟随系统"},user:"用户",defaultEmail:"user@example.com",settings:"设置",logout:"退出登录"},fc={title:"仪表盘",stats:{newUsers:"新用户",totalScore:"总积分",monthlyUpload:"月上传",vsLastMonth:"对比上月",vsYesterday:"对比昨日",todayIncome:"今日收入",monthlyIncome:"月收入",totalIncome:"总收入",totalUsers:"总用户",activeUsers:"活跃用户: {{count}}",totalOrders:"总订单",revenue:"收入",todayRegistered:"今日注册",monthlyRegistered:"月注册",onlineUsers:"在线用户",pendingTickets:"待处理工单",hasPendingTickets:"有工单需要处理",noPendingTickets:"无待处理工单",pendingCommission:"待处理佣金",hasPendingCommission:"有佣金需要确认",noPendingCommission:"无待处理佣金",monthlyNewUsers:"月新增用户",monthlyDownload:"月下载",todayTraffic:"今日: {{value}}",activeUserTrend:"活跃用户趋势",realtimeUsers:"实时用户",todayPeak:"今日峰值",vsLastWeek:"对比上周"},trafficRank:{nodeTrafficRank:"节点流量排行",userTrafficRank:"用户流量排行",today:"今天",last7days:"最近7天",last30days:"最近30天",customRange:"自定义范围",selectTimeRange:"选择时间范围",selectDateRange:"选择日期范围",currentTraffic:"当前流量",previousTraffic:"上期流量",changeRate:"变化率",recordTime:"记录时间"},overview:{title:"收入概览",thisMonth:"本月",lastMonth:"上月",to:"至",selectTimeRange:"选择范围",selectDate:"选择日期",last7Days:"最近7天",last30Days:"最近30天",last90Days:"最近90天",last180Days:"最近180天",lastYear:"最近一年",customRange:"自定义范围",amount:"金额",count:"数量",transactions:"{{count}} 笔交易",orderAmount:"订单金额",commissionAmount:"佣金金额",orderCount:"订单数量",commissionCount:"佣金数量",totalIncome:"总收入",totalCommission:"总佣金",totalTransactions:"共 {{count}} 笔交易",avgOrderAmount:"平均订单金额:",commissionRate:"佣金比例:"},queue:{title:"队列状态",jobDetails:"作业详情",status:{description:"当前队列运行状态",running:"运行状态",normal:"正常",abnormal:"异常",waitTime:"当前等待时间:{{seconds}} 秒",pending:"等待中",processing:"处理中",completed:"已完成",failed:"失败",cancelled:"已取消"},details:{description:"队列处理详细信息",recentJobs:"近期任务数",statisticsPeriod:"统计时间范围:{{hours}} 小时",jobsPerMinute:"每分钟处理量",maxThroughput:"最高吞吐量:{{value}}",failedJobs7Days:"7日报错数量",retentionPeriod:"保留 {{hours}} 小时",longestRunningQueue:"最长运行队列",activeProcesses:"活跃进程",id:"作业ID",type:"作业类型",status:"状态",progress:"进度",createdAt:"创建时间",updatedAt:"更新时间",error:"错误信息",data:"作业数据",result:"结果",duration:"耗时",attempts:"重试次数",nextRetry:"下次重试"},actions:{retry:"重试",cancel:"取消",delete:"删除",viewDetails:"查看详情"},empty:"队列中暂无作业",loading:"正在加载队列状态...",error:"加载队列状态失败"}},gc={placeholder:"搜索菜单和功能...",title:"菜单导航",noResults:"未找到结果",shortcut:{label:"搜索",key:"⌘K"}},jc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},vc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},bc={manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"},columns:{sort:"排序",nodeId:"节点ID",show:"显隐",node:"节点",address:"地址",onlineUsers:{title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"},rate:{title:"倍率",tooltip:"流量扣费倍率"},groups:{title:"权限组",tooltip:"可订阅到该节点的权限组",empty:"--"},type:"类型",actions:"操作",copyAddress:"复制连接地址",internalPort:"内部端口",status:{0:"未运行",1:"无人使用或异常",2:"运行正常"},actions_dropdown:{edit:"编辑",copy:"复制",delete:{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirm:"删除"},copy_success:"复制成功",delete_success:"删除成功"}},toolbar:{search:"搜索节点...",type:"类型",reset:"重置",sort:{tip:"拖拽节点进行排序,完成后点击保存",edit:"编辑排序",save:"保存排序"}},form:{add_node:"添加节点",edit_node:"编辑节点",new_node:"新建节点",name:{label:"节点名称",placeholder:"请输入节点名称",error:"请输入有效的节点名称"},rate:{label:"倍率",error:"请输入有效的倍率"},code:{label:"自定义节点ID",optional:"(选填)",placeholder:"请输入自定义节点ID"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"},groups:{label:"权限组",add:"添加权限组",placeholder:"请选择权限组",empty:"未找到结果"},host:{label:"节点地址",placeholder:"请输入节点域名或者IP"},port:{label:"连接端口",placeholder:"用户连接端口",tooltip:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。",sync:"同步到服务端口"},server_port:{label:"服务端口",placeholder:"服务端开放端口",tooltip:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"},parent:{label:"父节点",placeholder:"选择父节点",none:"无"},route:{label:"路由组",placeholder:"选择路由组",empty:"未找到结果"},submit:"提交",cancel:"取消",success:"提交成功"},dynamic_form:{shadowsocks:{cipher:{label:"加密算法",placeholder:"选择加密算法"},obfs:{label:"混淆",placeholder:"选择混淆方式",none:"无",http:"HTTP"},obfs_settings:{path:"路径",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"请选择安全性",disabled:"不支持",enabled:"支持"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},network:{label:"传输协议",placeholder:"选择传输协议"}},trojan:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?",network:{label:"传输协议",placeholder:"选择传输协议"}},hysteria:{version:{label:"协议版本",placeholder:"协议版本"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"混淆",type:{label:"混淆实现",placeholder:"选择混淆实现",salamander:"Salamander"},password:{label:"混淆密码",placeholder:"请输入混淆密码",generate_success:"混淆密码生成成功"}},tls:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?"},bandwidth:{up:{label:"上行宽带",placeholder:"请输入上行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"},down:{label:"下行宽带",placeholder:"请输入下行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"}}},vless:{tls:{label:"安全性",placeholder:"请选择安全性",none:"无",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},reality_settings:{server_name:{label:"伪装站点(dest)",placeholder:"例如:example.com"},server_port:{label:"端口(port)",placeholder:"例如:443"},allow_insecure:"允许不安全?",private_key:{label:"私钥(Private key)"},public_key:{label:"公钥(Public key)"},short_id:{label:"Short ID",placeholder:"可留空,长度为2的倍数,最长16位",description:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符",generate:"生成 Short ID",success:"Short ID 生成成功"},key_pair:{generate:"生成密钥对",success:"密钥对生成成功",error:"生成密钥对失败"}},network:{label:"传输协议",placeholder:"选择传输协议"},flow:{label:"流控",placeholder:"选择流控"}}},network_settings:{edit_protocol:"编辑协议",edit_protocol_config:"编辑协议配置",use_template:"使用{{template}}模板",json_config_placeholder:"请输入JSON配置",json_config_placeholder_with_template:"请输入JSON配置或选择上方模板",validation:{must_be_object:"配置必须是一个JSON对象",invalid_json:"无效的JSON格式"},errors:{save_failed:"保存时发生错误"}},common:{cancel:"取消",confirm:"确定"}},yc={plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"权限组",placeholder:"选择权限组",add:"添加权限组"},transfer:{label:"流量",placeholder:"请输入流量大小",unit:"GB"},speed:{label:"限速",placeholder:"请输入限速",unit:"Mbps"},price:{title:"售价设置",base_price:"基础月付价格",clear:{button:"清空价格",tooltip:"清空所有周期的价格设置"}},device:{label:"设备限制",placeholder:"留空则不限制",unit:"台"},capacity:{label:"容量限制",placeholder:"留空则不限制",unit:"人"},reset_method:{label:"流量重置方式",placeholder:"选择流量重置方式",description:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式",options:{follow_system:"跟随系统设置",monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1日",yearly_reset:"按年重置"}},content:{label:"套餐描述",placeholder:"在这里编写套餐描述...",description:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"点击使用预设的套餐描述模板",content:`## 套餐特点 -• 高速稳定的全球网络接入 -• 支持多设备同时在线 -• 无限制的流量重置 +- Support plan changes anytime`}},force_update:{label:"Force Update to Users"},submit:{submitting:"Submitting...",submit:"Submit",cancel:"Cancel",success:{add:"Plan added successfully",update:"Plan updated successfully"}}},page:{description:"Here you can configure subscription plans, including adding, deleting, and editing operations."}}},email:{title:"Email Settings",description:"Configure system email service for sending verification codes, password resets, and notifications, supporting various SMTP providers.",email_host:{title:"SMTP Host",description:"SMTP server address, e.g., smtp.gmail.com"},email_port:{title:"SMTP Port",description:"SMTP server port, common ports: 25, 465, 587"},email_username:{title:"SMTP Username",description:"SMTP authentication username"},email_password:{title:"SMTP Password",description:"SMTP authentication password or application-specific password"},email_encryption:{title:"Encryption Method",description:"Email encryption method",none:"None",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"From Address",description:"Sender's email address"},email_from_name:{title:"From Name",description:"Sender's display name"},email_template:{title:"Email Template",description:"You can check the documentation for how to customize email templates",placeholder:"Select email template"},remind_mail:{title:"Email Reminders",description:"When enabled, users will receive email notifications when their subscription is about to expire or when traffic is running low."},test:{title:"Send Test Email",sending:"Sending...",description:"Send a test email to verify the configuration",success:"Test email sent successfully",error:"Failed to send test email"}},telegram:{title:"Telegram Settings",description:"Configure Telegram bot functionality for user notifications, account binding, and command interactions.",bot_token:{title:"Bot Token",description:"Please enter the token provided by Botfather.",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"Set Webhook",description:"Set up webhook for the bot. Without setting it, you won't receive Telegram notifications.",button:"One-Click Setup",setting:"Setting Webhook..."},bot_enable:{title:"Enable Bot Notifications",description:"When enabled, the bot will send basic notifications to administrators and users who have bound their Telegram accounts."},discuss_link:{title:"Group Link",description:"Once filled in, it will be displayed on the user side or used where needed.",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP Settings",description:"Manage mobile application configurations, including API interfaces, version control, and push notifications.",common:{placeholder:"Please input"},windows:{version:{title:"Windows Version",description:"Current version number of Windows client"},download:{title:"Windows Download URL",description:"Download link for Windows client"}},macos:{version:{title:"macOS Version",description:"Current version number of macOS client"},download:{title:"macOS Download URL",description:"Download link for macOS client"}},android:{version:{title:"Android Version",description:"Current version number of Android client"},download:{title:"Android Download URL",description:"Download link for Android client"}}},common:{saving:"Saving...",save_success:"Saved automatically",placeholder:"Please input",autoSaved:"Saved automatically"}},lc={trafficRecord:{title:"Traffic Usage Records",time:"Time",upload:"Upload",download:"Download",rate:"Rate",total:"Total",noRecords:"No records found",perPage:"Show per page",records:"records",page:"Page {{current}} / {{total}}",multiplier:"{{value}}x"}},ic={title:"Ticket Management",description:"Here you can view user tickets, including viewing, replying, and closing operations.",columns:{id:"Ticket ID",subject:"Subject",level:"Priority",status:"Status",updated_at:"Last Updated",created_at:"Created At",actions:"Actions"},status:{closed:"Closed",replied:"Replied",pending:"Pending",processing:"Processing"},level:{low:"Low",medium:"Medium",high:"High"},filter:{placeholder:"Search {field}...",no_results:"No results found.",selected:"{count} selected",clear:"Clear filters"},actions:{view_details:"View Details",close_ticket:"Close Ticket",close_confirm_title:"Confirm Close Ticket",close_confirm_description:"After closing, you will not be able to reply. Are you sure you want to close this ticket?",close_confirm_button:"Close Ticket",close_success:"Ticket closed successfully",view_ticket:"View Ticket"},detail:{no_messages:"No messages yet",created_at:"Created at",user_info:"User Info",traffic_records:"Traffic Records",order_records:"Order Records",input:{closed_placeholder:"Ticket is closed",reply_placeholder:"Type your reply...",sending:"Sending...",send:"Send"}}},oc={manage:{title:"User Management",description:"Here you can manage users, including adding, deleting, editing, and querying operations."},columns:{is_admin:"Admin",is_staff:"Staff",id:"ID",email:"Email",online_count:"Online Devices",status:"Status",subscription:"Subscription",group:"Group",used_traffic:"Used Traffic",total_traffic:"Total Traffic",expire_time:"Expire Time",balance:"Balance",commission:"Commission",register_time:"Register Time",actions:"Actions",device_limit:{unlimited:"No device limit",limited:"Maximum {{count}} devices allowed"},status_text:{normal:"Normal",banned:"Banned"},online_status:{online:"Currently Online",never:"Never Online",last_online:"Last Online: {{time}}",offline_duration:{days:"Offline Duration: {{count}}d",hours:"Offline Duration: {{count}}h",minutes:"Offline Duration: {{count}}m",seconds:"Offline Duration: {{count}}s"}},expire_status:{permanent:"Permanent",expired:"Expired {{days}} days ago",remaining:"{{days}} days remaining"},actions_menu:{edit:"Edit",assign_order:"Assign Order",copy_url:"Copy Subscribe URL",reset_secret:"Reset UUID & URL",orders:"Orders",invites:"Invites",traffic_records:"Traffic Records"}},filter:{selected:"{{count}} selected",no_results:"No results found.",clear:"Clear filters",search_placeholder:"Search...",email_search:"Search user email...",advanced:"Advanced Filter",reset:"Reset Filter",sheet:{title:"Advanced Filter",description:"Add one or more filter conditions to find users precisely",conditions:"Filter Conditions",add:"Add Condition",condition:"Condition {{number}}",field:"Select Field",operator:"Select Operator",value:"Enter Value",value_number:"Enter Value ({{unit}})",reset:"Reset",apply:"Apply Filter"},fields:{email:"Email",id:"User ID",plan_id:"Subscription",transfer_enable:"Traffic",total_used:"Used Traffic",online_count:"Online Devices",expired_at:"Expire Time",uuid:"UUID",token:"Token",banned:"Account Status",remark:"Remark",inviter_email:"Inviter Email",invite_user_id:"Inviter ID",is_admin:"Admin",is_staff:"Staff"},operators:{contains:"Contains",eq:"Equals",gt:"Greater Than",lt:"Less Than"},status:{normal:"Normal",banned:"Banned"},boolean:{true:"Yes",false:"No"}},generate:{button:"Create User",title:"Create User",form:{email:"Email",email_prefix:"Account (leave empty for batch generation)",email_domain:"Domain",password:"Password",password_placeholder:"Leave empty to use email as password",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",permanent:"Permanent",subscription:"Subscription Plan",subscription_none:"None",generate_count:"Generate Count",generate_count_placeholder:"Enter count for batch generation",cancel:"Cancel",submit:"Generate",success:"Generated successfully"}},edit:{button:"Edit User Info",title:"User Management",form:{email:"Email",email_placeholder:"Please enter email",inviter_email:"Inviter Email",inviter_email_placeholder:"Please enter email",password:"Password",password_placeholder:"Enter new password if you want to change it",balance:"Balance",balance_placeholder:"Please enter balance",commission_balance:"Commission Balance",commission_balance_placeholder:"Please enter commission balance",upload:"Upload Traffic",upload_placeholder:"Upload traffic",download:"Download Traffic",download_placeholder:"Download traffic",total_traffic:"Total Traffic",total_traffic_placeholder:"Please enter traffic",expire_time:"Expire Time",expire_time_placeholder:"Select user expire date, leave empty for permanent",expire_time_specific:"Specific Time",expire_time_today:"Set to end of today",expire_time_permanent:"Permanent",expire_time_1month:"One Month",expire_time_3months:"Three Months",expire_time_confirm:"Confirm",subscription:"Subscription Plan",subscription_none:"None",account_status:"Account Status",commission_type:"Commission Type",commission_type_system:"Follow System Settings",commission_type_cycle:"Cycle Commission",commission_type_onetime:"One-time Commission",commission_rate:"Commission Rate",commission_rate_placeholder:"Leave empty to follow site commission rate",discount:"Exclusive Discount",discount_placeholder:"Leave empty for no exclusive discount",speed_limit:"Speed Limit",speed_limit_placeholder:"Leave empty for no speed limit",device_limit:"Device Limit",device_limit_placeholder:"Leave empty for no device limit",is_admin:"Is Admin",is_staff:"Is Staff",remarks:"Remarks",remarks_placeholder:"Please enter remarks here",cancel:"Cancel",submit:"Submit",success:"Modified successfully"}}},cc={title:"Route Management",description:"Manage all route groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",remarks:"Remarks",action:"Action",actions:"Actions",matchRules:"Match {{count}} rules"},actions:{dns:"Resolve using specified DNS server",block:"Block access"},form:{add:"Add Route",edit:"Edit Route",create:"Create Route",remarks:"Remarks",remarksPlaceholder:"Please enter remarks",match:"Match Rules",matchPlaceholder:`example.com +*.example.com`,action:"Action",actionPlaceholder:"Please select action",dns:"DNS Server",dnsPlaceholder:"Please enter DNS server",cancel:"Cancel",submit:"Submit",validation:{remarks:"Please enter valid remarks"}},toolbar:{searchPlaceholder:"Search routes...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this route group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",deleteSuccess:"Deleted Successfully",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully"}},dc={title:"Payment Configuration",description:"Configure payment methods including Alipay, WeChat Pay, etc.",table:{columns:{id:"ID",enable:"Enable",name:"Display Name",payment:"Payment Gateway",notify_url:"Notify URL",notify_url_tooltip:"The payment gateway will send notifications to this address. Please ensure it's accessible through your firewall.",actions:"Actions"},actions:{edit:"Edit",delete:{title:"Confirm Delete",description:"Are you sure you want to delete this payment method? This action cannot be undone.",success:"Successfully deleted"}},toolbar:{search:"Search payment methods...",reset:"Reset",sort:{hint:"Drag payment methods to sort, click save when finished",save:"Save Order",edit:"Edit Order"}}},form:{add:{button:"Add Payment Method",title:"Add Payment Method"},edit:{title:"Edit Payment Method"},fields:{name:{label:"Display Name",placeholder:"Enter payment name",description:"Used for frontend display"},icon:{label:"Icon URL",placeholder:"https://example.com/icon.svg",description:"Icon URL for frontend display"},notify_domain:{label:"Notify Domain",placeholder:"https://example.com",description:"Domain for gateway notifications"},handling_fee_percent:{label:"Percentage Fee (%)",placeholder:"0-100"},handling_fee_fixed:{label:"Fixed Fee",placeholder:"0"},payment:{label:"Payment Gateway",placeholder:"Select payment gateway",description:"Choose the payment gateway to use"}},validation:{name:{min:"Name must be at least 2 characters",max:"Name cannot exceed 30 characters"},notify_domain:{url:"Please enter a valid URL"},payment:{required:"Please select a payment gateway"}},buttons:{cancel:"Cancel",submit:"Submit"},messages:{success:"Saved successfully"}}},mc={title:"Notice Management",description:"Here you can configure notices, including adding, deleting, editing and other operations.",table:{columns:{id:"ID",show:"Display Status",title:"Title",actions:"Actions"},toolbar:{search:"Search notice title...",reset:"Reset",sort:{edit:"Edit Order",save:"Save Order"}},actions:{edit:"Edit",delete:{title:"Delete Confirmation",description:"Are you sure you want to delete this notice? This action cannot be undone.",success:"Successfully deleted"}}},form:{add:{title:"Add Notice",button:"Add Notice"},edit:{title:"Edit Notice"},fields:{title:{label:"Title",placeholder:"Please enter notice title"},content:{label:"Content"},img_url:{label:"Background Image",placeholder:"Please enter notice background image URL"},show:{label:"Display"},tags:{label:"Tags",placeholder:"Press Enter to add tags"}},buttons:{cancel:"Cancel",submit:"Submit",success:"Successfully submitted"}}},uc={title:"Theme Configuration",description:"Theme configuration, including theme colors, font sizes, etc. If you deploy V2board in a front-end and back-end separated way, theme configuration will not take effect.",upload:{button:"Upload Theme",title:"Upload Theme",description:"Please upload a valid theme package (.zip format). The theme package should contain a complete theme file structure.",dragText:"Drag and drop theme file here, or",clickText:"click to select",supportText:"Supports .zip format theme packages",uploading:"Uploading...",error:{format:"Only ZIP format theme files are supported"}},preview:{title:"Theme Preview",imageCount:"{{current}} / {{total}}"},card:{version:"Version: {{version}}",currentTheme:"Current Theme",activateTheme:"Activate Theme",configureTheme:"Theme Settings",preview:"Preview",delete:{title:"Delete Theme",description:"Are you sure you want to delete this theme? This action cannot be undone.",button:"Delete",error:{active:"Cannot delete the currently active theme"}}},config:{title:"Configure {{name}} Theme",description:"Modify theme styles, layouts, and other display options.",cancel:"Cancel",save:"Save",success:"Settings saved successfully"}},hc={title:"Coupon Management",description:"Here you can manage coupons, including adding, viewing, and deleting operations.",table:{columns:{id:"ID",show:"Enable",name:"Coupon Name",type:"Type",code:"Code",limitUse:"Remaining Uses",limitUseWithUser:"Uses Per User",validity:"Validity Period",actions:"Actions"},validity:{expired:"Expired {{days}} days ago",notStarted:"Starts in {{days}} days",remaining:"{{days}} days remaining",startTime:"Start Time",endTime:"End Time",unlimited:"Unlimited",noLimit:"No Limit"},actions:{edit:"Edit",delete:"Delete",deleteConfirm:{title:"Confirm Delete",description:"This action will permanently delete this coupon and cannot be undone. Are you sure you want to continue?",confirmText:"Delete"}},toolbar:{search:"Search coupons...",type:"Type",reset:"Reset",types:{1:"Fixed Amount",2:"Percentage"}}},form:{add:"Add Coupon",edit:"Edit Coupon",name:{label:"Coupon Name",placeholder:"Enter coupon name",required:"Please enter coupon name"},type:{label:"Coupon Type and Value",placeholder:"Select coupon type"},value:{placeholder:"Enter value"},validity:{label:"Validity Period",to:"to",endTimeError:"End time must be later than start time"},limitUse:{label:"Maximum Uses",placeholder:"Set maximum uses, leave empty for unlimited",description:"Set the total number of times this coupon can be used, leave empty for unlimited uses"},limitUseWithUser:{label:"Uses Per User",placeholder:"Set uses per user, leave empty for unlimited",description:"Limit how many times each user can use this coupon, leave empty for unlimited uses per user"},limitPeriod:{label:"Subscription Periods",placeholder:"Limit to specific subscription periods, leave empty for no restrictions",description:"Select which subscription periods can use this coupon, leave empty for no period restrictions",empty:"No matching periods found"},limitPlan:{label:"Subscription Plans",placeholder:"Limit to specific subscription plans, leave empty for no restrictions",empty:"No matching plans found"},code:{label:"Custom Coupon Code",placeholder:"Enter custom code, leave empty for auto-generation",description:"Customize the coupon code, leave empty for auto-generation"},generateCount:{label:"Batch Generation Count",placeholder:"Number of coupons to generate, leave empty for single coupon",description:"Generate multiple coupon codes at once, leave empty to generate a single code"},submit:{saving:"Saving...",save:"Save"},error:{saveFailed:"Failed to save coupon"}}},pc={title:"Permission Groups",description:"Manage all permission groups, including adding, deleting, and editing operations.",columns:{id:"Group ID",name:"Group Name",usersCount:"Users Count",serverCount:"Nodes Count",actions:"Actions"},form:{add:"Add Group",edit:"Edit Group",create:"Create Group",update:"Update",name:"Group Name",namePlaceholder:"Please enter group name",nameDescription:"Group name is used to identify different user groups, it's recommended to use meaningful names.",cancel:"Cancel",editDescription:"Modify group information, changes will take effect immediately.",createDescription:"Create a new permission group to assign different permissions to different users."},toolbar:{searchPlaceholder:"Search groups...",reset:"Reset"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this permission group and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",createSuccess:"Created Successfully",updateSuccess:"Updated Successfully",nameValidation:{min:"Group name must be at least 2 characters",max:"Group name cannot exceed 50 characters",pattern:"Group name can only contain letters, numbers, Chinese characters, underscores and hyphens"}}},xc={title:"Knowledge Base",description:"Here you can configure the knowledge base, including adding, deleting, and editing operations.",columns:{id:"ID",status:"Status",title:"Title",category:"Category",actions:"Actions"},form:{add:"Add Knowledge",edit:"Edit Knowledge",title:"Title",titlePlaceholder:"Please enter knowledge title",category:"Category",categoryPlaceholder:"Please enter category, it will be automatically classified",language:"Language",languagePlaceholder:"Please select language",content:"Content",show:"Show",cancel:"Cancel",submit:"Submit"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"Confirm Delete",deleteDescription:"This action will permanently delete this knowledge base record and cannot be recovered. Are you sure you want to continue?",deleteButton:"Delete",operationSuccess:"Operation Successful"},toolbar:{searchPlaceholder:"Search knowledge...",reset:"Reset",sortModeHint:"Drag knowledge items to sort, click save when done",editSort:"Edit Sort",saveSort:"Save Sort"}},fc={loading:"加载中...",error:"错误",success:"成功",save:"保存",cancel:"取消",delete:"删除",edit:"编辑",view:"查看",toggleNavigation:"切换导航",toggleSidebar:"切换侧边栏",search:"搜索...",theme:{light:"浅色",dark:"深色",system:"跟随系统"},user:"用户",defaultEmail:"user@example.com",settings:"设置",logout:"退出登录"},gc={title:"仪表盘",stats:{newUsers:"新用户",totalScore:"总积分",monthlyUpload:"月上传",vsLastMonth:"对比上月",vsYesterday:"对比昨日",todayIncome:"今日收入",monthlyIncome:"月收入",totalIncome:"总收入",totalUsers:"总用户",activeUsers:"活跃用户: {{count}}",totalOrders:"总订单",revenue:"收入",todayRegistered:"今日注册",monthlyRegistered:"月注册",onlineUsers:"在线用户",pendingTickets:"待处理工单",hasPendingTickets:"有工单需要处理",noPendingTickets:"无待处理工单",pendingCommission:"待处理佣金",hasPendingCommission:"有佣金需要确认",noPendingCommission:"无待处理佣金",monthlyNewUsers:"月新增用户",monthlyDownload:"月下载",todayTraffic:"今日: {{value}}",activeUserTrend:"活跃用户趋势",realtimeUsers:"实时用户",todayPeak:"今日峰值",vsLastWeek:"对比上周"},trafficRank:{nodeTrafficRank:"节点流量排行",userTrafficRank:"用户流量排行",today:"今天",last7days:"最近7天",last30days:"最近30天",customRange:"自定义范围",selectTimeRange:"选择时间范围",selectDateRange:"选择日期范围",currentTraffic:"当前流量",previousTraffic:"上期流量",changeRate:"变化率",recordTime:"记录时间"},overview:{title:"收入概览",thisMonth:"本月",lastMonth:"上月",to:"至",selectTimeRange:"选择范围",selectDate:"选择日期",last7Days:"最近7天",last30Days:"最近30天",last90Days:"最近90天",last180Days:"最近180天",lastYear:"最近一年",customRange:"自定义范围",amount:"金额",count:"数量",transactions:"{{count}} 笔交易",orderAmount:"订单金额",commissionAmount:"佣金金额",orderCount:"订单数量",commissionCount:"佣金数量",totalIncome:"总收入",totalCommission:"总佣金",totalTransactions:"共 {{count}} 笔交易",avgOrderAmount:"平均订单金额:",commissionRate:"佣金比例:"},queue:{title:"队列状态",jobDetails:"作业详情",status:{description:"当前队列运行状态",running:"运行状态",normal:"正常",abnormal:"异常",waitTime:"当前等待时间:{{seconds}} 秒",pending:"等待中",processing:"处理中",completed:"已完成",failed:"失败",cancelled:"已取消"},details:{description:"队列处理详细信息",recentJobs:"近期任务数",statisticsPeriod:"统计时间范围:{{hours}} 小时",jobsPerMinute:"每分钟处理量",maxThroughput:"最高吞吐量:{{value}}",failedJobs7Days:"7日报错数量",retentionPeriod:"保留 {{hours}} 小时",longestRunningQueue:"最长运行队列",activeProcesses:"活跃进程",id:"作业ID",type:"作业类型",status:"状态",progress:"进度",createdAt:"创建时间",updatedAt:"更新时间",error:"错误信息",data:"作业数据",result:"结果",duration:"耗时",attempts:"重试次数",nextRetry:"下次重试"},actions:{retry:"重试",cancel:"取消",delete:"删除",viewDetails:"查看详情"},empty:"队列中暂无作业",loading:"正在加载队列状态...",error:"加载队列状态失败"}},jc={placeholder:"搜索菜单和功能...",title:"菜单导航",noResults:"未找到结果",shortcut:{label:"搜索",key:"⌘K"}},bc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},vc={dashboard:"仪表盘",systemManagement:"系统管理",systemConfig:"系统配置",themeConfig:"主题配置",noticeManagement:"公告管理",paymentConfig:"支付配置",knowledgeManagement:"知识库管理",nodeManagement:"节点管理",permissionGroupManagement:"权限组管理",routeManagement:"路由管理",subscriptionManagement:"订阅管理",planManagement:"套餐管理",orderManagement:"订单管理",couponManagement:"优惠券管理",userManagement:"用户管理",ticketManagement:"工单管理"},yc={manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"},columns:{sort:"排序",nodeId:"节点ID",show:"显隐",node:"节点",address:"地址",onlineUsers:{title:"在线人数",tooltip:"在线人数根据服务端上报频率而定"},rate:{title:"倍率",tooltip:"流量扣费倍率"},groups:{title:"权限组",tooltip:"可订阅到该节点的权限组",empty:"--"},type:"类型",actions:"操作",copyAddress:"复制连接地址",internalPort:"内部端口",status:{0:"未运行",1:"无人使用或异常",2:"运行正常"},actions_dropdown:{edit:"编辑",copy:"复制",delete:{title:"确认删除",description:"此操作将永久删除该节点,删除后无法恢复。确定要继续吗?",confirm:"删除"},copy_success:"复制成功",delete_success:"删除成功"}},toolbar:{search:"搜索节点...",type:"类型",reset:"重置",sort:{tip:"拖拽节点进行排序,完成后点击保存",edit:"编辑排序",save:"保存排序"}},form:{add_node:"添加节点",edit_node:"编辑节点",new_node:"新建节点",name:{label:"节点名称",placeholder:"请输入节点名称",error:"请输入有效的节点名称"},rate:{label:"倍率",error:"请输入有效的倍率"},code:{label:"自定义节点ID",optional:"(选填)",placeholder:"请输入自定义节点ID"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"},groups:{label:"权限组",add:"添加权限组",placeholder:"请选择权限组",empty:"未找到结果"},host:{label:"节点地址",placeholder:"请输入节点域名或者IP"},port:{label:"连接端口",placeholder:"用户连接端口",tooltip:"用户实际连接使用的端口,这是客户端配置中需要填写的端口号。如果使用了中转或隧道,这个端口可能与服务器实际监听的端口不同。",sync:"同步到服务端口"},server_port:{label:"服务端口",placeholder:"服务端开放端口",tooltip:"服务器实际监听的端口,这是在服务器上开放的真实端口。如果使用了中转或隧道,这个端口可能与用户连接端口不同。"},parent:{label:"父节点",placeholder:"选择父节点",none:"无"},route:{label:"路由组",placeholder:"选择路由组",empty:"未找到结果"},submit:"提交",cancel:"取消",success:"提交成功"},dynamic_form:{shadowsocks:{cipher:{label:"加密算法",placeholder:"选择加密算法"},obfs:{label:"混淆",placeholder:"选择混淆方式",none:"无",http:"HTTP"},obfs_settings:{path:"路径",host:"Host"}},vmess:{tls:{label:"TLS",placeholder:"请选择安全性",disabled:"不支持",enabled:"支持"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},network:{label:"传输协议",placeholder:"选择传输协议"}},trojan:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?",network:{label:"传输协议",placeholder:"选择传输协议"}},hysteria:{version:{label:"协议版本",placeholder:"协议版本"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"混淆",type:{label:"混淆实现",placeholder:"选择混淆实现",salamander:"Salamander"},password:{label:"混淆密码",placeholder:"请输入混淆密码",generate_success:"混淆密码生成成功"}},tls:{server_name:{label:"服务器名称指示(SNI)",placeholder:"当节点地址于证书不一致时用于证书验证"},allow_insecure:"允许不安全?"},bandwidth:{up:{label:"上行宽带",placeholder:"请输入上行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"},down:{label:"下行宽带",placeholder:"请输入下行宽带",suffix:"Mbps",bbr_tip:",留空则使用BBR"}}},vless:{tls:{label:"安全性",placeholder:"请选择安全性",none:"无",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"服务器名称指示(SNI)",placeholder:"不使用请留空"},allow_insecure:"允许不安全?"},reality_settings:{server_name:{label:"伪装站点(dest)",placeholder:"例如:example.com"},server_port:{label:"端口(port)",placeholder:"例如:443"},allow_insecure:"允许不安全?",private_key:{label:"私钥(Private key)"},public_key:{label:"公钥(Public key)"},short_id:{label:"Short ID",placeholder:"可留空,长度为2的倍数,最长16位",description:"客户端可用的 shortId 列表,可用于区分不同的客户端,使用0-f的十六进制字符",generate:"生成 Short ID",success:"Short ID 生成成功"},key_pair:{generate:"生成密钥对",success:"密钥对生成成功",error:"生成密钥对失败"}},network:{label:"传输协议",placeholder:"选择传输协议"},flow:{label:"流控",placeholder:"选择流控"}}},network_settings:{edit_protocol:"编辑协议",edit_protocol_config:"编辑协议配置",use_template:"使用{{template}}模板",json_config_placeholder:"请输入JSON配置",json_config_placeholder_with_template:"请输入JSON配置或选择上方模板",validation:{must_be_object:"配置必须是一个JSON对象",invalid_json:"无效的JSON格式"},errors:{save_failed:"保存时发生错误"}},common:{cancel:"取消",confirm:"确定"}},_c={plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"服务器分组",add:"添加分组",placeholder:"请选择服务器分组"},transfer:{label:"流量",placeholder:"请输入流量限制",unit:"GB"},speed:{label:"速度限制",placeholder:"请输入速度限制",unit:"Mbps"},price:{title:"价格设置",base_price:"基础价格",clear:{button:"清空",tooltip:"清空所有价格"},period:{monthly:"每月",months:"{{count}}个月"},onetime_desc:"一次性流量包,无时间限制",reset_desc:"重置流量包,可多次使用"},device:{label:"设备限制",placeholder:"请输入设备限制",unit:"台设备"},capacity:{label:"容量限制",placeholder:"请输入容量限制",unit:"个用户"},reset_method:{label:"流量重置方式",placeholder:"请选择重置方式",description:"流量重置方式将决定如何重置流量",options:{follow_system:"跟随系统设置",monthly_first:"每月首日",monthly_reset:"每月购买日",no_reset:"不重置",yearly_first:"每年首日",yearly_reset:"每年购买日"}},content:{label:"套餐说明",placeholder:"请输入套餐说明",description:"支持 Markdown 格式",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"使用默认模板",content:`## 套餐特点 + +- 流量:{{transfer}} GB +- 速度:{{speed}} Mbps +- 设备数:{{devices}} ## 使用说明 -1. 支持设备:iOS、Android、Windows、macOS -2. 24/7 技术支持 -3. 自动定期流量重置 -## 注意事项 -- 禁止滥用 -- 遵守当地法律法规 -- 支持随时更换套餐`}},force_update:{label:"强制更新到用户"},submit:{submitting:"提交中...",submit:"提交",cancel:"取消",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},_c={title:"订单管理",description:"在这里可以查看用户订单,包括分配、查看、删除等操作。",table:{columns:{tradeNo:"订单号",type:"类型",plan:"订阅计划",period:"周期",amount:"支付金额",status:"订单状态",commission:"佣金金额",commissionStatus:"佣金状态",createdAt:"创建时间"}},type:{NEW:"新购",RENEWAL:"续费",UPGRADE:"升级",RESET_FLOW:"流量重置"},period:{month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"},status:{PENDING:"待支付",PROCESSING:"开通中",CANCELLED:"已取消",COMPLETED:"已完成",DISCOUNTED:"已折抵",tooltip:"标记为[已支付]后将会由系统进行开通后并完成"},commission:{PENDING:"待确认",PROCESSING:"发放中",VALID:"有效",INVALID:"无效"},actions:{markAsPaid:"标记为已支付",cancel:"取消订单",openMenu:"打开菜单",reset:"重置"},search:{placeholder:"搜索订单..."},dialog:{title:"订单信息",basicInfo:"基本信息",amountInfo:"金额信息",timeInfo:"时间信息",addOrder:"添加订单",assignOrder:"订单分配",fields:{userEmail:"用户邮箱",orderPeriod:"订单周期",subscriptionPlan:"订阅计划",callbackNo:"回调单号",paymentAmount:"支付金额",balancePayment:"余额支付",discountAmount:"优惠金额",refundAmount:"退回金额",deductionAmount:"折抵金额",createdAt:"创建时间",updatedAt:"更新时间"},placeholders:{email:"请输入用户邮箱",plan:"请选择订阅计划",period:"请选择购买时长",amount:"请输入需要支付的金额"},actions:{cancel:"取消",confirm:"确定"},messages:{addSuccess:"添加成功"}}},Nc={title:"系统设置",description:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置",site:{title:"站点设置",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。",form:{siteName:{label:"站点名称",placeholder:"请输入站点名称",description:"用于显示需要站点名称的地方。"},siteDescription:{label:"站点描述",placeholder:"请输入站点描述",description:"用于显示需要站点描述的地方。"},siteUrl:{label:"站点网址",placeholder:"请输入站点URL,末尾不要/",description:"当前网站最新网址,将会在邮件等需要用于网址处体现。"},forceHttps:{label:"强制HTTPS",description:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"},logo:{label:"LOGO",placeholder:"请输入LOGO URL,末尾不要/",description:"用于显示需要LOGO的地方。"},subscribeUrl:{label:"订阅URL",placeholder:"用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。",description:"用于订阅所使用,留空则为站点URL。"},tosUrl:{label:"用户条款(TOS)URL",placeholder:"请输入用户条款URL,末尾不要/",description:"用于跳转到用户条款(TOS)"},stopRegister:{label:"停止新用户注册",description:"开启后任何人都将无法进行注册。"},tryOut:{label:"注册试用",placeholder:"关闭",description:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。",duration:{label:"注册试用时长",placeholder:"0",description:"注册试用时长,单位为小时。"}},currency:{label:"货币单位",placeholder:"CNY",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"},currencySymbol:{label:"货币符号",placeholder:"¥",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}}},safe:{title:"安全设置",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。",form:{emailVerify:{label:"邮箱验证",description:"开启后将会强制要求用户进行邮箱验证。"},gmailLimit:{label:"禁止使用Gmail多别名",description:"开启后Gmail多别名将无法注册。"},safeMode:{label:"安全模式",description:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"},securePath:{label:"后台路径",placeholder:"admin",description:"后台管理路径,修改后将会改变原有的admin路径"},emailWhitelist:{label:"邮箱后缀白名单",description:"开启后在名单中的邮箱后缀才允许进行注册。",suffixes:{label:"邮箱后缀",placeholder:"输入邮箱后缀,每行一个",description:"输入允许的邮箱后缀,每行一个"}},recaptcha:{enable:{label:"启用reCAPTCHA",description:"开启后用户注册时需要通过reCAPTCHA验证。"},key:{label:"reCAPTCHA密钥",placeholder:"输入reCAPTCHA密钥",description:"输入您的reCAPTCHA密钥"},siteKey:{label:"reCAPTCHA站点密钥",placeholder:"输入reCAPTCHA站点密钥",description:"输入您的reCAPTCHA站点密钥"}},registerLimit:{enable:{label:"IP注册限制",description:"开启后将限制同一IP的注册次数。"},count:{label:"注册次数",placeholder:"输入最大注册次数",description:"同一IP允许的最大注册次数"},expire:{label:"限制时长",placeholder:"输入限制时长(小时)",description:"注册限制的持续时间(小时)"}},passwordLimit:{enable:{label:"密码尝试限制",description:"开启后将限制密码尝试次数。"},count:{label:"尝试次数",placeholder:"输入最大尝试次数",description:"允许的最大密码尝试次数"},expire:{label:"锁定时长",placeholder:"输入锁定时长(小时)",description:"账户锁定的持续时间(小时)"}}}},subscribe:{title:"订阅设置",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。",plan_change_enable:{title:"允许用户更改订阅",description:"开启后用户将会可以对订阅计划进行变更。"},reset_traffic_method:{title:"月流量重置方式",description:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。",options:{monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1号",yearly_reset:"按年重置"}},surplus_enable:{title:"开启折抵方案",description:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"},new_order_event:{title:"当订阅新购时触发事件",description:"新购订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},renew_order_event:{title:"当订阅续费时触发事件",description:"续费订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},change_order_event:{title:"当订阅变更时触发事件",description:"变更订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},subscribe_path:{title:"订阅路径",description:"订阅路径,修改后将会改变原有的subscribe路径",current_format:"当前订阅路径格式:{path}/xxxxxxxxxx"},show_info_to_server:{title:"在订阅中展示订阅信息",description:"开启后将会在用户订阅节点时输出订阅信息。"},show_protocol_to_server:{title:"在订阅中线路名称中显示协议名称",description:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"},saving:"保存中...",plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"权限组",placeholder:"选择权限组",add:"添加权限组"},transfer:{label:"流量",placeholder:"请输入流量大小",unit:"GB"},speed:{label:"限速",placeholder:"请输入限速",unit:"Mbps"},price:{title:"售价设置",base_price:"基础月付价格",clear:{button:"清空价格",tooltip:"清空所有周期的价格设置"}},device:{label:"设备限制",placeholder:"留空则不限制",unit:"台"},capacity:{label:"容量限制",placeholder:"留空则不限制",unit:"人"},reset_method:{label:"流量重置方式",placeholder:"选择流量重置方式",description:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式",options:{follow_system:"跟随系统设置",monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1日",yearly_reset:"按年重置"}},content:{label:"套餐描述",placeholder:"在这里编写套餐描述...",description:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"点击使用预设的套餐描述模板",content:`## 套餐特点 +1. 套餐有效期 {{validity}} 天 +2. 流量{{reset_method}}重置 +3. 最多支持 {{capacity}} 个用户同时在线`}},force_update:{label:"强制更新用户套餐"},submit:{cancel:"取消",submit:"提交",submitting:"提交中...",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},Nc={title:"订单管理",description:"在这里可以查看用户订单,包括分配、查看、删除等操作。",table:{columns:{tradeNo:"订单号",type:"类型",plan:"订阅计划",period:"周期",amount:"支付金额",status:"订单状态",commission:"佣金金额",commissionStatus:"佣金状态",createdAt:"创建时间"}},type:{NEW:"新购",RENEWAL:"续费",UPGRADE:"升级",RESET_FLOW:"流量重置"},period:{month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"},status:{PENDING:"待支付",PROCESSING:"开通中",CANCELLED:"已取消",COMPLETED:"已完成",DISCOUNTED:"已折抵",tooltip:"标记为[已支付]后将会由系统进行开通后并完成"},commission:{PENDING:"待确认",PROCESSING:"发放中",VALID:"有效",INVALID:"无效"},actions:{markAsPaid:"标记为已支付",cancel:"取消订单",openMenu:"打开菜单",reset:"重置"},search:{placeholder:"搜索订单..."},dialog:{title:"订单信息",basicInfo:"基本信息",amountInfo:"金额信息",timeInfo:"时间信息",addOrder:"添加订单",assignOrder:"订单分配",fields:{userEmail:"用户邮箱",orderPeriod:"订单周期",subscriptionPlan:"订阅计划",callbackNo:"回调单号",paymentAmount:"支付金额",balancePayment:"余额支付",discountAmount:"优惠金额",refundAmount:"退回金额",deductionAmount:"折抵金额",createdAt:"创建时间",updatedAt:"更新时间"},placeholders:{email:"请输入用户邮箱",plan:"请选择订阅计划",period:"请选择购买时长",amount:"请输入需要支付的金额"},actions:{cancel:"取消",confirm:"确定"},messages:{addSuccess:"添加成功"}}},wc={title:"系统设置",description:"管理系统核心配置,包括站点、安全、订阅、邀请佣金、节点、邮件和通知等设置",site:{title:"站点设置",description:"配置站点基本信息,包括站点名称、描述、货币单位等核心设置。",form:{siteName:{label:"站点名称",placeholder:"请输入站点名称",description:"用于显示需要站点名称的地方。"},siteDescription:{label:"站点描述",placeholder:"请输入站点描述",description:"用于显示需要站点描述的地方。"},siteUrl:{label:"站点网址",placeholder:"请输入站点URL,末尾不要/",description:"当前网站最新网址,将会在邮件等需要用于网址处体现。"},forceHttps:{label:"强制HTTPS",description:"当站点没有使用HTTPS,CDN或反代开启强制HTTPS时需要开启。"},logo:{label:"LOGO",placeholder:"请输入LOGO URL,末尾不要/",description:"用于显示需要LOGO的地方。"},subscribeUrl:{label:"订阅URL",placeholder:"用于订阅所使用,多个订阅地址用','隔开.留空则为站点URL。",description:"用于订阅所使用,留空则为站点URL。"},tosUrl:{label:"用户条款(TOS)URL",placeholder:"请输入用户条款URL,末尾不要/",description:"用于跳转到用户条款(TOS)"},stopRegister:{label:"停止新用户注册",description:"开启后任何人都将无法进行注册。"},tryOut:{label:"注册试用",placeholder:"关闭",description:"选择需要试用的订阅,如果没有选项请先前往订阅管理添加。",duration:{label:"注册试用时长",placeholder:"0",description:"注册试用时长,单位为小时。"}},currency:{label:"货币单位",placeholder:"CNY",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"},currencySymbol:{label:"货币符号",placeholder:"¥",description:"仅用于展示使用,更改后系统中所有的货币单位都将发生变更。"}}},safe:{title:"安全设置",description:"配置系统安全相关选项,包括登录验证、密码策略、API访问等安全设置。",form:{emailVerify:{label:"邮箱验证",description:"开启后将会强制要求用户进行邮箱验证。"},gmailLimit:{label:"禁止使用Gmail多别名",description:"开启后Gmail多别名将无法注册。"},safeMode:{label:"安全模式",description:"开启后除了站点URL以外的绑定本站点的域名访问都将会被403。"},securePath:{label:"后台路径",placeholder:"admin",description:"后台管理路径,修改后将会改变原有的admin路径"},emailWhitelist:{label:"邮箱后缀白名单",description:"开启后在名单中的邮箱后缀才允许进行注册。",suffixes:{label:"邮箱后缀",placeholder:"输入邮箱后缀,每行一个",description:"输入允许的邮箱后缀,每行一个"}},recaptcha:{enable:{label:"启用reCAPTCHA",description:"开启后用户注册时需要通过reCAPTCHA验证。"},key:{label:"reCAPTCHA密钥",placeholder:"输入reCAPTCHA密钥",description:"输入您的reCAPTCHA密钥"},siteKey:{label:"reCAPTCHA站点密钥",placeholder:"输入reCAPTCHA站点密钥",description:"输入您的reCAPTCHA站点密钥"}},registerLimit:{enable:{label:"IP注册限制",description:"开启后将限制同一IP的注册次数。"},count:{label:"注册次数",placeholder:"输入最大注册次数",description:"同一IP允许的最大注册次数"},expire:{label:"限制时长",placeholder:"输入限制时长(小时)",description:"注册限制的持续时间(小时)"}},passwordLimit:{enable:{label:"密码尝试限制",description:"开启后将限制密码尝试次数。"},count:{label:"尝试次数",placeholder:"输入最大尝试次数",description:"允许的最大密码尝试次数"},expire:{label:"锁定时长",placeholder:"输入锁定时长(小时)",description:"账户锁定的持续时间(小时)"}}}},subscribe:{title:"订阅设置",description:"管理用户订阅相关配置,包括订阅链接格式、更新频率、流量统计等设置。",plan_change_enable:{title:"允许用户更改订阅",description:"开启后用户将会可以对订阅计划进行变更。"},reset_traffic_method:{title:"月流量重置方式",description:"全局流量重置方式,默认每月1号。可以在订阅管理为订阅单独设置。",options:{monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1号",yearly_reset:"按年重置"}},surplus_enable:{title:"开启折抵方案",description:"开启后用户更换订阅将会由系统对原有订阅进行折抵,方案参考文档。"},new_order_event:{title:"当订阅新购时触发事件",description:"新购订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},renew_order_event:{title:"当订阅续费时触发事件",description:"续费订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},change_order_event:{title:"当订阅变更时触发事件",description:"变更订阅完成时将触发该任务。",options:{no_action:"不执行任何动作",reset_traffic:"重置用户流量"}},subscribe_path:{title:"订阅路径",description:"订阅路径,修改后将会改变原有的subscribe路径",current_format:"当前订阅路径格式:{path}/xxxxxxxxxx"},show_info_to_server:{title:"在订阅中展示订阅信息",description:"开启后将会在用户订阅节点时输出订阅信息。"},show_protocol_to_server:{title:"在订阅中线路名称中显示协议名称",description:"开启后订阅线路会附带协议名称(例如: [Hy2]香港)"},saving:"保存中...",plan:{title:"订阅套餐",add:"添加套餐",search:"搜索套餐...",sort:{edit:"编辑排序",save:"保存排序"},columns:{id:"ID",show:"显示",sell:"新购",renew:"续费",renew_tooltip:"在订阅停止销售时,已购用户是否可以续费",name:"名称",stats:"统计",group:"权限组",price:"价格",actions:"操作",edit:"编辑",delete:"删除",delete_confirm:{title:"确认删除",description:"此操作将永久删除该订阅,删除后无法恢复。确定要继续吗?",success:"删除成功"},price_period:{monthly:"月付",quarterly:"季付",half_yearly:"半年付",yearly:"年付",two_yearly:"两年付",three_yearly:"三年付",onetime:"流量包",reset_traffic:"重置包",unit:{month:"元/月",quarter:"元/季",half_year:"元/半年",year:"元/年",two_year:"元/两年",three_year:"元/三年",times:"元/次"}}},form:{add_title:"添加套餐",edit_title:"编辑套餐",name:{label:"套餐名称",placeholder:"请输入套餐名称"},group:{label:"权限组",placeholder:"选择权限组",add:"添加权限组"},transfer:{label:"流量",placeholder:"请输入流量大小",unit:"GB"},speed:{label:"限速",placeholder:"请输入限速",unit:"Mbps"},price:{title:"售价设置",base_price:"基础月付价格",clear:{button:"清空价格",tooltip:"清空所有周期的价格设置"}},device:{label:"设备限制",placeholder:"留空则不限制",unit:"台"},capacity:{label:"容量限制",placeholder:"留空则不限制",unit:"人"},reset_method:{label:"流量重置方式",placeholder:"选择流量重置方式",description:"设置订阅流量的重置方式,不同的重置方式会影响用户的流量计算方式",options:{follow_system:"跟随系统设置",monthly_first:"每月1号",monthly_reset:"按月重置",no_reset:"不重置",yearly_first:"每年1月1日",yearly_reset:"按年重置"}},content:{label:"套餐描述",placeholder:"在这里编写套餐描述...",description:"支持 Markdown 格式,可以使用标题、列表、粗体、斜体等样式来美化描述内容",preview:"预览",preview_button:{show:"显示预览",hide:"隐藏预览"},template:{button:"使用模板",tooltip:"点击使用预设的套餐描述模板",content:`## 套餐特点 • 高速稳定的全球网络接入 • 支持多设备同时在线 • 无限制的流量重置 @@ -51,13 +45,24 @@ import{r as m,j as e,t as il,c as ol,I as Na,a as Ts,S as Xt,u as os,b as ea,d a ## 注意事项 - 禁止滥用 - 遵守当地法律法规 -- 支持随时更换套餐`}},force_update:{label:"强制更新到用户"},submit:{submitting:"提交中...",submit:"提交",cancel:"取消",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},email:{title:"邮件设置",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。",email_host:{title:"SMTP主机",description:"SMTP服务器地址,例如:smtp.gmail.com"},email_port:{title:"SMTP端口",description:"SMTP服务器端口,常用端口:25, 465, 587"},email_username:{title:"SMTP用户名",description:"SMTP认证用户名"},email_password:{title:"SMTP密码",description:"SMTP认证密码或应用专用密码"},email_encryption:{title:"加密方式",description:"邮件加密方式",none:"无",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"发件人地址",description:"发件人邮箱地址"},email_from_name:{title:"发件人名称",description:"发件人显示名称"},email_template:{title:"邮件模板",description:"自定义邮件模板方式请查看文档",placeholder:"选择邮件模板"},remind_mail:{title:"邮件提醒",description:"开启后用户订阅即将到期或流量不足时会收到邮件通知。"},test:{title:"发送测试邮件",sending:"发送中...",description:"发送测试邮件以验证配置",success:"测试邮件发送成功",error:"测试邮件发送失败"}},telegram:{title:"Telegram设置",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。",bot_token:{title:"机器人令牌",description:"请输入从Botfather获取的令牌。",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"设置Webhook",description:"设置机器人的webhook,不设置将无法收到Telegram通知。",button:"一键设置",setting:"设置中..."},bot_enable:{title:"启用机器人通知",description:"开启后机器人将向管理员和已绑定Telegram的用户发送基础通知。"},discuss_link:{title:"群组链接",description:"填写后将在用户端显示或在需要的地方使用。",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP设置",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。",common:{placeholder:"请输入"},windows:{version:{title:"Windows版本",description:"Windows客户端当前版本号"},download:{title:"Windows下载地址",description:"Windows客户端下载链接"}},macos:{version:{title:"macOS版本",description:"macOS客户端当前版本号"},download:{title:"macOS下载地址",description:"macOS客户端下载链接"}},android:{version:{title:"Android版本",description:"Android客户端当前版本号"},download:{title:"Android下载地址",description:"Android客户端下载链接"}}},common:{saving:"保存中...",save_success:"已自动保存",placeholder:"请输入"},invite:{title:"邀请&佣金设置",description:"邀请注册、佣金相关设置。",invite_force:{title:"开启强制邀请",description:"开启后只有被邀请的用户才可以进行注册。"},invite_commission:{title:"邀请佣金百分比",description:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。",placeholder:"请输入佣金百分比"},invite_gen_limit:{title:"用户可创建邀请码上限",description:"用户可创建邀请码上限",placeholder:"请输入创建上限"},invite_never_expire:{title:"邀请码永不失效",description:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"},commission_first_time:{title:"佣金仅首次发放",description:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"},commission_auto_check:{title:"佣金自动确认",description:"开启后佣金将会在订单完成3日后自动进行确认。"},commission_withdraw_limit:{title:"提现单申请门槛(元)",description:"小于门槛金额的提现单将不会被提交。",placeholder:"请输入提现门槛"},commission_withdraw_method:{title:"提现方式",description:"可以支持的提现方式,多个用逗号分隔。",placeholder:"请输入提现方式,多个用逗号分隔"},withdraw_close:{title:"关闭提现",description:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"},commission_distribution:{title:"三级分销",description:"开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。",l1:"一级邀请人比例",l2:"二级邀请人比例",l3:"三级邀请人比例",placeholder:"请输入比例,如:50"},saving:"保存中..."},server:{title:"节点配置",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。",server_token:{title:"通讯密钥",description:"Xboard与节点通讯的密钥,以便数据不会被他人获取。",placeholder:"请输入通讯密钥",generate_tooltip:"点击生成随机通信密钥"},server_pull_interval:{title:"节点拉取动作轮询间隔",description:"节点从面板获取数据的间隔频率。",placeholder:"请输入拉取间隔"},server_push_interval:{title:"节点推送动作轮询间隔",description:"节点推送数据到面板的间隔频率。",placeholder:"请输入推送间隔"},device_limit_mode:{title:"设备限制模式",description:"宽松模式下,同一IP地址使用多个节点只统计为一个设备。",strict:"严格模式",relaxed:"宽松模式",placeholder:"请选择设备限制模式"},saving:"保存中...",manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"}}},wc={trafficRecord:{title:"流量使用记录",time:"时间",upload:"上行流量",download:"下行流量",rate:"倍率",total:"总计",noRecords:"暂无记录",perPage:"每页显示",records:"条记录",page:"第 {{current}} / {{total}} 页",multiplier:"{{value}}x"}},Cc={title:"工单管理",description:"在这里可以查看用户工单,包括查看、回复、关闭等操作。",columns:{id:"工单号",subject:"主题",level:"优先级",status:"状态",updated_at:"最后更新",created_at:"创建时间",actions:"操作"},status:{closed:"已关闭",replied:"已回复",pending:"待回复",processing:"处理中"},level:{low:"低",medium:"中",high:"高"},filter:{placeholder:"搜索{field}...",no_results:"未找到结果",selected:"已选择 {count} 项",clear:"清除筛选"},actions:{view_details:"查看详情",close_ticket:"关闭工单",close_confirm_title:"确认关闭工单",close_confirm_description:"关闭后将无法继续回复,是否确认关闭该工单?",close_confirm_button:"关闭工单",close_success:"工单已关闭",view_ticket:"查看工单"},detail:{no_messages:"暂无消息记录",created_at:"创建于",user_info:"用户信息",traffic_records:"流量记录",order_records:"订单记录",input:{closed_placeholder:"工单已关闭",reply_placeholder:"请输入回复内容...",sending:"发送中...",send:"发送"}}},Sc={manage:{title:"用户管理",description:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"},columns:{is_admin:"管理员",is_staff:"员工",id:"ID",email:"邮箱",online_count:"在线设备",status:"状态",subscription:"订阅",group:"权限组",used_traffic:"已用流量",total_traffic:"总流量",expire_time:"到期时间",balance:"余额",commission:"佣金",register_time:"注册时间",actions:"操作",device_limit:{unlimited:"无设备数限制",limited:"最多可同时在线 {{count}} 台设备"},status_text:{normal:"正常",banned:"封禁"},online_status:{online:"当前在线",never:"从未在线",last_online:"最后在线时间: {{time}}",offline_duration:{days:"离线时长: {{count}}天",hours:"离线时长: {{count}}小时",minutes:"离线时长: {{count}}分钟",seconds:"离线时长: {{count}}秒"}},expire_status:{permanent:"长期有效",expired:"已过期 {{days}} 天",remaining:"剩余 {{days}} 天"},actions_menu:{edit:"编辑",assign_order:"分配订单",copy_url:"复制订阅URL",reset_secret:"重置UUID及订阅URL",orders:"TA的订单",invites:"TA的邀请",traffic_records:"TA的流量记录"}},filter:{selected:"已选择 {{count}} 项",no_results:"未找到结果",clear:"清除筛选",search_placeholder:"搜索...",email_search:"搜索用户邮箱...",advanced:"高级筛选",reset:"重置筛选",sheet:{title:"高级筛选",description:"添加一个或多个筛选条件来精确查找用户",conditions:"筛选条件",add:"添加条件",condition:"条件 {{number}}",field:"选择字段",operator:"选择操作符",value:"输入值",value_number:"输入数值({{unit}})",reset:"重置",apply:"应用筛选"},fields:{email:"邮箱",id:"用户ID",plan_id:"订阅",transfer_enable:"流量",total_used:"已用流量",online_count:"在线设备",expired_at:"到期时间",uuid:"UUID",token:"Token",banned:"账号状态",remark:"备注",inviter_email:"邀请人邮箱",invite_user_id:"邀请人ID",is_admin:"管理员",is_staff:"员工"},operators:{contains:"包含",eq:"等于",gt:"大于",lt:"小于"},status:{normal:"正常",banned:"禁用"},boolean:{true:"是",false:"否"}},generate:{button:"创建用户",title:"创建用户",form:{email:"邮箱",email_prefix:"帐号(批量生成请留空)",email_domain:"域",password:"密码",password_placeholder:"留空则密码与邮件相同",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",permanent:"长期有效",subscription:"订阅计划",subscription_none:"无",generate_count:"生成数量",generate_count_placeholder:"如果为批量生产请输入生成数量",cancel:"取消",submit:"生成",success:"生成成功"}},edit:{button:"编辑用户信息",title:"用户管理",form:{email:"邮箱",email_placeholder:"请输入邮箱",inviter_email:"邀请人邮箱",inviter_email_placeholder:"请输入邮箱",password:"密码",password_placeholder:"如需修改密码请输入",balance:"余额",balance_placeholder:"请输入余额",commission_balance:"佣金余额",commission_balance_placeholder:"请输入佣金余额",upload:"已用上行",upload_placeholder:"已用上行",download:"已用下行",download_placeholder:"已用下行",total_traffic:"流量",total_traffic_placeholder:"请输入流量",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",expire_time_specific:"具体时间",expire_time_today:"设为当天结束",expire_time_permanent:"长期有效",expire_time_1month:"一个月",expire_time_3months:"三个月",expire_time_confirm:"确定",subscription:"订阅计划",subscription_none:"无",account_status:"账户状态",commission_type:"佣金类型",commission_type_system:"跟随系统设置",commission_type_cycle:"循环返利",commission_type_onetime:"首次返利",commission_rate:"推荐返利比例",commission_rate_placeholder:"为空则跟随站点设置返利比例",discount:"专享折扣比例",discount_placeholder:"为空则不享受专享折扣",speed_limit:"限速",speed_limit_placeholder:"留空则不限速",device_limit:"设备限制",device_limit_placeholder:"留空则不限制",is_admin:"是否管理员",is_staff:"是否员工",remarks:"备注",remarks_placeholder:"请在这里记录",cancel:"取消",submit:"提交",success:"修改成功"}}},kc={title:"路由管理",description:"管理所有路由组,包括添加、删除、编辑等操作。",columns:{id:"组ID",remarks:"备注",action:"动作",actions:"操作",matchRules:"匹配{{count}}条规则"},actions:{dns:"指定DNS服务器进行解析",block:"禁止访问"},form:{add:"添加路由",edit:"编辑路由",create:"创建路由",remarks:"备注",remarksPlaceholder:"请输入备注",match:"匹配规则",matchPlaceholder:`example.com -*.example.com`,action:"动作",actionPlaceholder:"请选择动作",dns:"DNS服务器",dnsPlaceholder:"请输入DNS服务器",cancel:"取消",submit:"提交",validation:{remarks:"请输入有效的备注"}},toolbar:{searchPlaceholder:"搜索路由...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该路由组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",deleteSuccess:"删除成功",createSuccess:"创建成功",updateSuccess:"更新成功"}},Pc={title:"支付配置",description:"在这里可以配置支付方式,包括支付宝、微信等。",table:{columns:{id:"ID",enable:"启用",name:"显示名称",payment:"支付接口",notify_url:"通知地址",notify_url_tooltip:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。",actions:"操作"},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",success:"删除成功"}},toolbar:{search:"搜索支付方式...",reset:"重置",sort:{hint:"拖拽支付方式进行排序,完成后点击保存",save:"保存排序",edit:"编辑排序"}}},form:{add:{button:"添加支付方式",title:"添加支付方式"},edit:{title:"编辑支付方式"},fields:{name:{label:"显示名称",placeholder:"请输入支付名称",description:"用于前端显示"},icon:{label:"图标URL",placeholder:"https://example.com/icon.svg",description:"用于前端显示的图标地址"},notify_domain:{label:"通知域名",placeholder:"https://example.com",description:"网关通知将发送到该域名"},handling_fee_percent:{label:"百分比手续费(%)",placeholder:"0-100"},handling_fee_fixed:{label:"固定手续费",placeholder:"0"},payment:{label:"支付接口",placeholder:"请选择支付接口",description:"选择要使用的支付接口"}},validation:{name:{min:"名称至少需要2个字符",max:"名称不能超过30个字符"},notify_domain:{url:"请输入有效的URL"},payment:{required:"请选择支付接口"}},buttons:{cancel:"取消",submit:"提交"},messages:{success:"保存成功"}}},Tc={title:"公告管理",description:"在这里可以配置公告,包括添加、删除、编辑等操作。",table:{columns:{id:"ID",show:"显示状态",title:"标题",actions:"操作"},toolbar:{search:"搜索公告标题...",reset:"重置",sort:{edit:"编辑排序",save:"保存排序"}},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",success:"删除成功"}}},form:{add:{title:"添加公告",button:"添加公告"},edit:{title:"编辑公告"},fields:{title:{label:"标题",placeholder:"请输入公告标题"},content:{label:"公告内容"},img_url:{label:"公告背景",placeholder:"请输入公告背景图片URL"},show:{label:"显示"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"}},buttons:{cancel:"取消",submit:"提交",success:"提交成功"}}},Dc={title:"主题配置",description:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。",upload:{button:"上传主题",title:"上传主题",description:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。",dragText:"将主题文件拖放到此处,或者",clickText:"点击选择",supportText:"支持 .zip 格式的主题包",uploading:"正在上传...",error:{format:"只支持上传 ZIP 格式的主题文件"}},preview:{title:"主题预览",imageCount:"{{current}} / {{total}}"},card:{version:"版本: {{version}}",currentTheme:"当前主题",activateTheme:"激活主题",configureTheme:"主题设置",preview:"预览",delete:{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",button:"删除",error:{active:"不能删除当前使用的主题"}}},config:{title:"配置{{name}}主题",description:"修改主题的样式、布局和其他显示选项。",cancel:"取消",save:"保存",success:"保存成功"}},Rc={title:"优惠券管理",description:"在这里可以查看优惠券,包括增加、查看、删除等操作。",table:{columns:{id:"ID",show:"启用",name:"卷名称",type:"类型",code:"卷码",limitUse:"剩余次数",limitUseWithUser:"可用次数/用户",validity:"有效期",actions:"操作"},validity:{expired:"已过期{{days}}天",notStarted:"{{days}}天后开始",remaining:"剩余{{days}}天",startTime:"开始时间",endTime:"结束时间",unlimited:"无限次",noLimit:"无限制"},actions:{edit:"编辑",delete:"删除",deleteConfirm:{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除"}},toolbar:{search:"搜索优惠券...",type:"类型",reset:"重置",types:{1:"按金额优惠",2:"按比例优惠"}}},form:{add:"添加优惠券",edit:"编辑优惠券",name:{label:"优惠券名称",placeholder:"请输入优惠券名称",required:"请输入优惠券名称"},type:{label:"优惠券类型和值",placeholder:"优惠券类型"},value:{placeholder:"请输入值"},validity:{label:"优惠券有效期",to:"至",endTimeError:"结束时间必须晚于开始时间"},limitUse:{label:"最大使用次数",placeholder:"限制最大使用次数,留空则不限制",description:"设置优惠券的总使用次数限制,留空表示不限制使用次数"},limitUseWithUser:{label:"每个用户可使用次数",placeholder:"限制每个用户可使用次数,留空则不限制",description:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"},limitPeriod:{label:"指定周期",placeholder:"限制指定周期可以使用优惠,留空则不限制",description:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期",empty:"没有找到匹配的周期"},limitPlan:{label:"指定订阅",placeholder:"限制指定订阅可以使用优惠,留空则不限制",empty:"没有找到匹配的订阅"},code:{label:"自定义优惠码",placeholder:"自定义优惠码,留空则自动生成",description:"可以自定义优惠码,留空则系统自动生成"},generateCount:{label:"批量生成数量",placeholder:"批量生成优惠码数量,留空则生成单个",description:"批量生成多个优惠码,留空则只生成单个优惠码"},submit:{saving:"保存中...",save:"保存"},error:{saveFailed:"保存优惠券失败"}}},Ec={title:"权限组管理",description:"管理所有权限组,包括添加、删除、编辑等操作。",columns:{id:"组ID",name:"组名称",usersCount:"用户数量",serverCount:"节点数量",actions:"操作"},form:{add:"添加权限组",edit:"编辑权限组",create:"创建权限组",update:"更新",name:"组名称",namePlaceholder:"请输入权限组名称",nameDescription:"权限组名称用于标识不同的用户组,建议使用有意义的名称。",cancel:"取消",editDescription:"修改权限组信息,更新后会立即生效。",createDescription:"创建新的权限组,可以为不同的用户分配不同的权限。"},toolbar:{searchPlaceholder:"搜索权限组...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",createSuccess:"创建成功",updateSuccess:"更新成功",nameValidation:{min:"组名至少需要2个字符",max:"组名不能超过50个字符",pattern:"组名只能包含字母、数字、中文、下划线和连字符"}}},Ic={title:"知识库管理",description:"在这里可以配置知识库,包括添加、删除、编辑等操作。",columns:{id:"ID",status:"状态",title:"标题",category:"分类",actions:"操作"},form:{add:"添加知识",edit:"编辑知识",title:"标题",titlePlaceholder:"请输入知识标题",category:"分类",categoryPlaceholder:"请输入分类,分类将会自动归类",language:"语言",languagePlaceholder:"请选择语言",content:"内容",show:"显示",cancel:"取消",submit:"提交"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",deleteButton:"删除",operationSuccess:"操作成功"},toolbar:{searchPlaceholder:"搜索知识...",reset:"重置",sortModeHint:"拖拽知识条目进行排序,完成后点击保存",editSort:"编辑排序",saveSort:"保存排序"}},Mc={en:{common:Jo,dashboard:Qo,search:Zo,nav:Xo,sidebar:ec,server:sc,subscribe:tc,order:ac,settings:nc,traffic:rc,ticket:lc,user:ic,route:oc,payment:cc,notice:dc,theme:mc,coupon:uc,group:hc,knowledge:xc},zh:{common:pc,dashboard:fc,search:gc,nav:jc,sidebar:vc,server:bc,subscribe:yc,order:_c,settings:Nc,traffic:wc,ticket:Cc,user:Sc,route:kc,payment:Pc,notice:Tc,theme:Dc,coupon:Rc,group:Ec,knowledge:Ic}};xl.use(pl).use(fl).init({resources:Mc,fallbackLng:"en",supportedLngs:["en","zh"],ns:["common","dashboard","search","nav","sidebar","server","subscribe","order","settings","traffic","ticket","user","route","payment","notice","theme","coupon","group","knowledge"],defaultNS:"common",fallbackNS:"common",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const Oc=new gl;jl.createRoot(document.getElementById("root")).render(e.jsx(vl.StrictMode,{children:e.jsx(bl,{client:Oc,children:e.jsx(yl,{store:Xn,children:e.jsxs(ko,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(_l,{router:zo}),e.jsx(Nl,{richColors:!0,position:"top-right"})]})})})}));const qe=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...n}));qe.displayName="Card";const ss=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...n}));ss.displayName="CardHeader";const bs=m.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...n}));bs.displayName="CardTitle";const tt=m.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...n}));tt.displayName="CardDescription";const ts=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...n}));ts.displayName="CardContent";const Vc=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...n}));Vc.displayName="CardFooter";const Lc=Ts("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nt=m.forwardRef(({className:s,...n},a)=>e.jsx(Ga,{ref:a,className:y(Lc(),s),...n}));Nt.displayName=Ga.displayName;const he=wl,er=m.createContext({}),j=({...s})=>e.jsx(er.Provider,{value:{name:s.name},children:e.jsx(Cl,{...s})}),Et=()=>{const s=m.useContext(er),n=m.useContext(sr),{getFieldState:a,formState:l}=Sl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:c}=n;return{id:c,name:s.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...r}},sr=m.createContext({}),g=m.forwardRef(({className:s,...n},a)=>{const l=m.useId();return e.jsx(sr.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...n})})});g.displayName="FormItem";const v=m.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=Et();return e.jsx(Nt,{ref:a,className:y(l&&"text-destructive",s),htmlFor:r,...n})});v.displayName="FormLabel";const _=m.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:c}=Et();return e.jsx(Xt,{ref:n,id:l,"aria-describedby":a?`${r} ${c}`:`${r}`,"aria-invalid":!!a,...s})});_.displayName="FormControl";const O=m.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=Et();return e.jsx("p",{ref:a,id:l,className:y("text-[0.8rem] text-muted-foreground",s),...n})});O.displayName="FormDescription";const D=m.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:c}=Et(),o=r?String(r?.message):n;return o?e.jsx("p",{ref:l,id:c,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:o}):null});D.displayName="FormMessage";const T=m.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));T.displayName="Input";const tr=m.forwardRef(({className:s,...n},a)=>{const[l,r]=m.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(R,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(c=>!c),children:l?e.jsx(kl,{size:18}):e.jsx(Pl,{size:18})})]})});tr.displayName="PasswordInput";const Ac=s=>L({url:"/passport/auth/login",method:"post",data:s}),Yt=s=>s;function me(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Dl(s).format(n))}function Fc(s=void 0,n="YYYY-MM-DD"){return me(s,n)}function zs(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function ks(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,c=>c.includes(".")?".00":c);return n?`¥${r}`:r}function wt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{$.success(Yt("复制成功"))}).catch(n=>{console.error("复制到剪贴板时出错:",n),Ma(s)}):Ma(s)}function Ma(s){const n=document.createElement("button"),a=new Tl(n,{text:()=>s});a.on("success",()=>{$.success(Yt("复制成功")),a.destroy()}),a.on("error",()=>{$.error(Yt("复制失败")),a.destroy()}),n.click()}function Ze(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?zs(r)+" TB":l>=1?zs(l)+" GB":a>=1?zs(a)+" MB":zs(n)+" KB"}const zc="access_token";function Uc(s){Rt.set(zc,s)}const $c=x.object({email:x.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:x.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function Hc({className:s,onForgotPassword:n,...a}){const l=os(),r=Ka(),c=ce({resolver:ue($c),defaultValues:{email:"",password:""}});async function o(u){Ac(u).then(({data:h})=>{Uc(h.auth_data),r(Ko(h.auth_data)),r(Xs()).unwrap(),l("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(he,{...c,children:e.jsx("form",{onSubmit:c.handleSubmit(o),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{control:c.control,name:"email",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"邮箱地址"}),e.jsx(_,{children:e.jsx(T,{placeholder:"name@example.com",...u})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"password",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(v,{children:"密码"}),e.jsx(_,{children:e.jsx(tr,{placeholder:"请输入密码",...u})}),e.jsx(D,{})]})}),e.jsx(R,{className:"mt-2",loading:c.formState.isSubmitting,children:"登录"}),e.jsx(R,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:n,children:"忘记密码?"})]})})})})}const ge=Ba,Oe=Wa,qc=Ya,dt=ta,ar=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n}));ar.displayName=St.displayName;const xe=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(qc,{children:[e.jsx(ar,{}),e.jsxs(kt,{ref:l,className:y("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[n,e.jsxs(ta,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));xe.displayName=kt.displayName;const ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});ve.displayName="DialogHeader";const Ve=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Ve.displayName="DialogFooter";const je=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...n}));je.displayName=Pt.displayName;const Te=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Te.displayName=Tt.displayName;const $s=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),J=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},c)=>{const o=l?Xt:"button";return e.jsx(o,{className:y($s({variant:n,size:a,className:s})),ref:c,...r})});J.displayName="Button";function Gc(){const[s,n]=m.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(qe,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(Hc,{onForgotPassword:()=>n(!0)})]})]})}),e.jsx(ge,{open:s,onOpenChange:n,children:e.jsx(xe,{children:e.jsxs(ve,{children:[e.jsx(je,{children:"忘记密码"}),e.jsx(Te,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>wt(a),children:e.jsx(Rl,{className:"h-4 w-4"})})]})})]})})})]})}const Kc=Object.freeze(Object.defineProperty({__proto__:null,default:Gc},Symbol.toStringTag,{value:"Module"})),we=m.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:y("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const ke=m.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));ke.displayName="LayoutBody";const nr=El,rr=Il,lr=Ml,ys=Ll,_s=Al,Bc=Fl,Wc=m.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(Ja,{ref:r,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(aa,{className:"ml-auto h-4 w-4"})]}));Wc.displayName=Ja.displayName;const Yc=m.forwardRef(({className:s,...n},a)=>e.jsx(Qa,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n}));Yc.displayName=Qa.displayName;const is=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Ol,{children:e.jsx(Za,{ref:l,sideOffset:n,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));is.displayName=Za.displayName;const pe=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(Xa,{ref:l,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));pe.displayName=Xa.displayName;const Jc=m.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(en,{ref:r,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),n]}));Jc.displayName=en.displayName;const Qc=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(tn,{ref:l,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Vl,{className:"h-4 w-4 fill-current"})})}),n]}));Qc.displayName=tn.displayName;const oa=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(an,{ref:l,className:y("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));oa.displayName=an.displayName;const at=m.forwardRef(({className:s,...n},a)=>e.jsx(nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));at.displayName=nn.displayName;const Jt=({className:s,...n})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...n});Jt.displayName="DropdownMenuShortcut";const oe=zl,re=Ul,le=$l,te=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(rn,{ref:l,sideOffset:n,className:y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));te.displayName=rn.displayName;function It(){const{pathname:s}=ea();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function ir({key:s,defaultValue:n}){const[a,l]=m.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return m.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function Zc(){const[s,n]=ir({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(c=>c!==r))}}}function Xc({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=M(),c=({sub:o,...u})=>{const h=`${r(u.title)}-${u.href}`;return n&&o?m.createElement(td,{...u,sub:o,key:h,closeNav:l}):n?m.createElement(sd,{...u,key:h,closeNav:l}):o?m.createElement(ed,{...u,sub:o,key:h,closeNav:l}):m.createElement(or,{...u,key:h,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(oe,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(c)})})})}function or({title:s,icon:n,label:a,href:l,closeNav:r,subLink:c=!1}){const{checkActiveNav:o}=It(),{t:u}=M();return e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:o(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",c&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":o(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),u(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:u(a)})]})}function ed({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=It(),{isExpanded:o,toggleItem:u}=Zc(),{t:h}=M(),i=!!l?.find(P=>c(P.href)),d=h(s),f=o(d)||i;return e.jsxs(nr,{open:f,onOpenChange:()=>u(d),children:[e.jsxs(rr,{className:y(Hs({variant:i?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),h(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:h(a)}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(ln,{stroke:1})})]}),e.jsx(lr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(P=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(or,{...P,subLink:!0,closeNav:r})},h(P.title)))})})]})}function sd({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:c}=It(),{t:o}=M();return e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:c(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:o(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)})]})]})}function td({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=It(),{t:o}=M(),u=!!l?.find(h=>c(h.href));return e.jsxs(ys,{children:[e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:u?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)}),e.jsx(ln,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(is,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(oa,{children:[o(s)," ",a?`(${o(a)})`:""]}),e.jsx(at,{}),l.map(({title:h,icon:i,label:d,href:f})=>e.jsx(pe,{asChild:!0,children:e.jsxs(Rs,{to:f,onClick:r,className:`${c(f)?"bg-secondary":""}`,children:[i," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:o(h)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:o(d)})]})},`${o(h)}-${f}`))]})]})}const cr=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Hl,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(ql,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(on,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(Gl,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(Kl,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(wa,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(Bl,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(cn,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(Wl,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(dn,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(Yl,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(Jl,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(Ql,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(wa,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(Zl,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(Xl,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(ei,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(mn,{size:18})}]}];function ad({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=m.useState(!1),{t:c}=M();return m.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":c("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(o=>!o),children:l?e.jsx(si,{}):e.jsx(ti,{})})]}),e.jsx(Xc,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:cr}),e.jsx("div",{className:y("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:y("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(R,{onClick:()=>a(o=>!o),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":c("common:toggleSidebar"),children:e.jsx(ai,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function nd(){const[s,n]=ir({key:"collapsed-sidebar",defaultValue:!1});return m.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function rd(){const[s,n]=nd();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(ad,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(sa,{})})]})}const ld=Object.freeze(Object.defineProperty({__proto__:null,default:rd},Symbol.toStringTag,{value:"Module"})),Ns=m.forwardRef(({className:s,...n},a)=>e.jsx(Se,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));Ns.displayName=Se.displayName;const id=({children:s,...n})=>e.jsx(ge,{...n,children:e.jsx(xe,{className:"overflow-hidden p-0",children:e.jsx(Ns,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Is=m.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ni,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Se.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Is.displayName=Se.Input.displayName;const ws=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));ws.displayName=Se.List.displayName;const Ms=m.forwardRef((s,n)=>e.jsx(Se.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Ms.displayName=Se.Empty.displayName;const Me=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Me.displayName=Se.Group.displayName;const qs=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...n}));qs.displayName=Se.Separator.displayName;const Ne=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));Ne.displayName=Se.Item.displayName;function od(){const s=[];for(const n of cr)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function De(){const[s,n]=m.useState(!1),a=os(),l=od(),{t:r}=M("search"),{t:c}=M("nav");m.useEffect(()=>{const u=h=>{h.key==="k"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),n(i=>!i))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const o=m.useCallback(u=>{n(!1),a(u)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(ri,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(id,{open:s,onOpenChange:n,children:[e.jsx(Is,{placeholder:r("placeholder")}),e.jsxs(ws,{children:[e.jsx(Ms,{children:r("noResults")}),e.jsx(Me,{heading:r("title"),children:l.map(u=>e.jsxs(Ne,{value:`${u.parent?u.parent+" ":""}${u.title}`,onSelect:()=>o(u.href),children:[e.jsx("div",{className:"mr-2",children:u.icon}),e.jsx("span",{children:c(u.title)}),u.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:c(u.parent)})]},u.href))})]})]})]})}const At=[{code:"en",name:"English",flag:li,shortName:"EN"},{code:"zh",name:"中文",flag:ii,shortName:"CN"}];function cd(){const{i18n:s}=M(),n=r=>{s.changeLanguage(r)},a=At.find(r=>r.code===s.language)||At[0],l=a.flag;return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(is,{align:"end",className:"w-[120px]",children:At.map(r=>{const c=r.flag,o=r.code===s.language;return e.jsxs(pe,{onClick:()=>n(r.code),className:y("flex items-center gap-2 px-2 py-1.5 cursor-pointer",o&&"bg-accent"),children:[e.jsx(c,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:y("text-sm",o&&"font-medium"),children:r.name})]},r.code)})})]})}function Re(){const{theme:s,setTheme:n}=Po();return m.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(R,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(oi,{size:20}):e.jsx(ci,{size:20})}),e.jsx(cd,{})]})}const dr=m.forwardRef(({className:s,...n},a)=>e.jsx(un,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));dr.displayName=un.displayName;const mr=m.forwardRef(({className:s,...n},a)=>e.jsx(hn,{ref:a,className:y("aspect-square h-full w-full",s),...n}));mr.displayName=hn.displayName;const ur=m.forwardRef(({className:s,...n},a)=>e.jsx(xn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));ur.displayName=xn.displayName;function Ee(){const s=os(),n=Ka(),a=di(Wo),{t:l}=M(["common"]),r=()=>{Jn(),n(Bo()),s("/sign-in")},c=a?.email?.split("@")[0]||l("common:user"),o=c.substring(0,2).toUpperCase();return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(dr,{className:"h-8 w-8",children:[e.jsx(mr,{src:a?.avatar_url,alt:c}),e.jsx(ur,{children:o})]})})}),e.jsxs(is,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(oa,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:c}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(at,{}),e.jsx(pe,{asChild:!0,children:e.jsxs(Rs,{to:"/config/system",children:[l("common:settings"),e.jsx(Jt,{children:"⌘S"})]})}),e.jsx(at,{}),e.jsxs(pe,{onClick:r,children:[l("common:logout"),e.jsx(Jt,{children:"⇧⌘Q"})]})]})]})}const Qe=window?.settings?.secure_path,hr=5*60*1e3,Qt=new Map,dd=s=>{const n=Qt.get(s);return n?Date.now()-n.timestamp>hr?(Qt.delete(s),null):n.data:null},md=(s,n)=>{Qt.set(s,{data:n,timestamp:Date.now()})},ud=async(s,n=hr)=>{const a=dd(s);if(a)return a;const l=await L.get(s);return md(s,l),l},hd={getList:()=>ud(`${Qe}/notice/fetch`),save:s=>L.post(`${Qe}/notice/save`,s),drop:s=>L.post(`${Qe}/notice/drop`,{id:s}),updateStatus:s=>L.post(`${Qe}/notice/show`,{id:s}),sort:s=>L.post(`${Qe}/notice/sort`,{ids:s})},Oa={getSystemStatus:()=>L.get(`${Qe}/system/getSystemStatus`),getQueueStats:()=>L.get(`${Qe}/system/getQueueStats`),getQueueWorkload:()=>L.get(`${Qe}/system/getQueueWorkload`),getQueueMasters:()=>L.get(`${Qe}/system/getQueueMasters`),getSystemLog:s=>L.get(`${Qe}/system/getSystemLog`,{params:s})},F=window?.settings?.secure_path,xd=s=>L.get(F+"/stat/getOrder",{params:s}),pd=()=>L.get(F+"/stat/getStats"),Va=s=>L.get(F+"/stat/getTrafficRank",{params:s}),fd=()=>L.get(F+"/theme/getThemes"),gd=s=>L.post(F+"/theme/getThemeConfig",{name:s}),jd=(s,n)=>L.post(F+"/theme/saveThemeConfig",{name:s,config:n}),vd=s=>{const n=new FormData;return n.append("file",s),L.post(F+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},bd=s=>L.post(F+"/theme/delete",{name:s}),yd=s=>L.post(F+"/config/save",s),xr=()=>L.get(F+"/server/manage/getNodes"),_d=s=>L.post(F+"/server/manage/save",s),Nd=s=>L.post(F+"/server/manage/drop",s),wd=s=>L.post(F+"/server/manage/copy",s),Cd=s=>L.post(F+"/server/manage/update",s),Sd=s=>L.post(F+"/server/manage/sort",s),Mt=()=>L.get(F+"/server/group/fetch"),kd=s=>L.post(F+"/server/group/save",s),Pd=s=>L.post(F+"/server/group/drop",s),pr=()=>L.get(F+"/server/route/fetch"),Td=s=>L.post(F+"/server/route/save",s),Dd=s=>L.post(F+"/server/route/drop",s),Rd=()=>L.get(F+"/payment/fetch"),Ed=()=>L.get(F+"/payment/getPaymentMethods"),Id=s=>L.post(F+"/payment/getPaymentForm",s),Md=s=>L.post(F+"/payment/save",s),Od=s=>L.post(F+"/payment/drop",s),Vd=s=>L.post(F+"/payment/show",s),Ld=s=>L.post(F+"/payment/sort",s),Ad=()=>L.get(F+"/notice/fetch"),Fd=s=>L.post(F+"/notice/save",s),zd=s=>L.post(F+"/notice/drop",s),Ud=s=>L.post(F+"/notice/show",s),$d=()=>L.get(F+"/knowledge/fetch"),Hd=s=>L.get(F+"/knowledge/fetch?id="+s),qd=s=>L.post(F+"/knowledge/save",s),Gd=s=>L.post(F+"/knowledge/drop",s),Kd=s=>L.post(F+"/knowledge/show",s),Bd=s=>L.post(F+"/knowledge/sort",s),Os=()=>L.get(F+"/plan/fetch"),Wd=s=>L.post(F+"/plan/save",s),Ft=s=>L.post(F+"/plan/update",s),Yd=s=>L.post(F+"/plan/drop",s),Jd=s=>L.post(F+"/plan/sort",{ids:s}),Qd=async s=>L.post(F+"/order/fetch",s),Zd=s=>L.post(F+"/order/detail",s),Xd=s=>L.post(F+"/order/paid",s),em=s=>L.post(F+"/order/cancel",s),La=s=>L.post(F+"/order/update",s),sm=s=>L.post(F+"/order/assign",s),tm=s=>L.post(F+"/coupon/fetch",s),am=s=>L.post(F+"/coupon/generate",s),nm=s=>L.post(F+"/coupon/drop",s),rm=s=>L.post(F+"/coupon/update",s),lm=s=>L.post(F+"/user/fetch",s),im=s=>L.post(F+"/user/update",s),om=s=>L.post(F+"/user/resetSecret",s),cm=s=>L.post(F+"/user/generate",s),dm=s=>L.post(F+"/stat/getStatUser",s),mm=s=>L.post(F+"/ticket/fetch",s),um=s=>L.get(F+"/ticket/fetch?id= "+s),hm=s=>L.post(F+"/ticket/reply",s),fr=s=>L.post(F+"/ticket/close",{id:s}),us=(s="")=>L.get(F+"/config/fetch?key="+s),hs=s=>L.post(F+"/config/save",s),xm=()=>L.get(F+"/config/getEmailTemplate"),pm=()=>L.post(F+"/config/testSendMail"),fm=()=>L.post(F+"/config/setTelegramWebhook"),gm=hd.sort,gr=mi,ca=m.forwardRef(({className:s,...n},a)=>e.jsx(pn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));ca.displayName=pn.displayName;const nt=m.forwardRef(({className:s,...n},a)=>e.jsx(fn,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...n}));nt.displayName=fn.displayName;const jm=m.forwardRef(({className:s,...n},a)=>e.jsx(gn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));jm.displayName=gn.displayName;const W=ui,ps=bi,Y=hi,K=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(jn,{ref:l,className:y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[n,e.jsx(xi,{asChild:!0,children:e.jsx(na,{className:"h-4 w-4 opacity-50"})})]}));K.displayName=jn.displayName;const jr=m.forwardRef(({className:s,...n},a)=>e.jsx(vn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(pi,{className:"h-4 w-4"})}));jr.displayName=vn.displayName;const vr=m.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(na,{className:"h-4 w-4"})}));vr.displayName=bn.displayName;const B=m.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(fi,{children:e.jsxs(yn,{ref:r,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...l,children:[e.jsx(jr,{}),e.jsx(gi,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(vr,{})]})}));B.displayName=yn.displayName;const vm=m.forwardRef(({className:s,...n},a)=>e.jsx(_n,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...n}));vm.displayName=_n.displayName;const U=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Nn,{ref:l,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(ji,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),e.jsx(vi,{children:n})]}));U.displayName=Nn.displayName;const bm=m.forwardRef(({className:s,...n},a)=>e.jsx(wn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));bm.displayName=wn.displayName;function Vs({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(yi,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y($s({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y($s({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...c})=>e.jsx(Cn,{className:y("h-4 w-4",r),...c}),IconRight:({className:r,...c})=>e.jsx(aa,{className:y("h-4 w-4",r),...c})},...l})}Vs.displayName="Calendar";const as=Ni,ns=wi,We=m.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(_i,{children:e.jsx(Sn,{ref:r,align:n,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})}));We.displayName=Sn.displayName;const fs={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Qs=s=>(s/100).toFixed(2),ym=({active:s,payload:n,label:a})=>{const{t:l}=M();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,c)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${Qs(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},c))]}):null},_m=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Nm=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=$e(a,7);break;case"30d":l=$e(a,30);break;case"90d":l=$e(a,90);break;case"180d":l=$e(a,180);break;case"365d":l=$e(a,365);break;default:l=$e(a,30)}return{startDate:l,endDate:a}};function wm(){const[s,n]=m.useState("amount"),[a,l]=m.useState("30d"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),{t:o}=M(),{startDate:u,endDate:h}=Nm(a,r),{data:i}=se({queryKey:["orderStat",{start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await xd({start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(qe,{children:[e.jsx(ss,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(bs,{children:o("dashboard:overview.title")}),e.jsxs(tt,{children:[i?.summary.start_date," ",o("dashboard:overview.to")," ",i?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(W,{value:a,onValueChange:d=>l(d),children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:o("dashboard:overview.selectTimeRange")})}),e.jsx(B,{children:_m.map(d=>e.jsx(U,{value:d.value,children:o(d.label)},d.value))})]}),a==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[Ue(r.from,"yyyy-MM-dd")," -"," ",Ue(r.to,"yyyy-MM-dd")]}):Ue(r.from,"yyyy-MM-dd"):o("dashboard:overview.selectDate")})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Vs,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&c({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(gr,{value:s,onValueChange:d=>n(d),children:e.jsxs(ca,{children:[e.jsx(nt,{value:"amount",children:o("dashboard:overview.amount")}),e.jsx(nt,{value:"count",children:o("dashboard:overview.count")})]})})]})]})}),e.jsxs(ts,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.avgOrderAmount")," ¥",Qs(i?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.commissionRate")," ",i?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Ci,{width:"100%",height:"100%",children:e.jsxs(Si,{data:i?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(ki,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>Ue(new Date(d),"MM-dd",{locale:Ri})}),e.jsx(Pi,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${Qs(d)}`:o("dashboard:overview.transactions",{count:d})}),e.jsx(Ti,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Di,{content:e.jsx(ym,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Ca,{type:"monotone",dataKey:"paid_total",name:o("dashboard:overview.orderAmount"),stroke:fs.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Ca,{type:"monotone",dataKey:"commission_total",name:o("dashboard:overview.commissionAmount"),stroke:fs.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{dataKey:"paid_count",name:o("dashboard:overview.orderCount"),fill:fs.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Sa,{dataKey:"commission_count",name:o("dashboard:overview.commissionCount"),fill:fs.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function Ie({className:s,...n}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...n})}function Cm(){return e.jsxs(qe,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ie,{className:"h-4 w-[120px]"}),e.jsx(Ie,{className:"h-4 w-4"})]}),e.jsxs(ts,{children:[e.jsx(Ie,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ie,{className:"h-4 w-4"}),e.jsx(Ie,{className:"h-4 w-[100px]"})]})]})]})}function Sm(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(Cm,{},n))})}var Q=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Q||{});const Ys={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Js={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var He=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(He||{}),ne=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(ne||{});const ut={0:"待确认",1:"发放中",2:"有效",3:"无效"},ht={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var de=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(de||{});const km={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var ye=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(ye||{});const Ps=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ls={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var js=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(js||{});const Pm={1:"按金额优惠",2:"按比例优惠"};var et=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(et||{}),Xe=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(Xe||{});function gs({title:s,value:n,icon:a,trend:l,description:r,onClick:c,highlight:o,className:u}){return e.jsxs(qe,{className:y("transition-colors",c&&"cursor-pointer hover:bg-muted/50",o&&"border-primary/50",u),onClick:c,children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(bs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(ts,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Li,{className:y("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function Tm({className:s}){const n=os(),{t:a}=M(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await pd()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(Sm,{});const c=()=>{const o=new URLSearchParams;o.set("commission_status",ne.PENDING.toString()),o.set("status",Q.COMPLETED.toString()),o.set("commission_balance","gt:0"),n(`/finance/order?${o.toString()}`)};return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(gs,{title:a("dashboard:stats.todayIncome"),value:ks(l.todayIncome),icon:e.jsx(Ei,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.monthlyIncome"),value:ks(l.currentMonthIncome),icon:e.jsx(Ii,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Mi,{className:y("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx(Oi,{className:y("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:c,highlight:l.commissionPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(gs,{title:a("dashboard:stats.monthlyUpload"),value:Ze(l.monthTraffic.upload),icon:e.jsx(qt,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.upload)})}),e.jsx(gs,{title:a("dashboard:stats.monthlyDownload"),value:Ze(l.monthTraffic.download),icon:e.jsx(Vi,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.download)})})]})}const rt=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(kn,{ref:l,className:y("relative overflow-hidden",s),...a,children:[e.jsx(Ai,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(Ct,{}),e.jsx(Fi,{})]}));rt.displayName=kn.displayName;const Ct=m.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(Pn,{ref:l,orientation:n,className:y("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(zi,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=Pn.displayName;const Zt={today:{getValue:()=>{const s=$i();return{start:s,end:Hi(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:$e(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:$e(s,30),end:s}}},custom:{getValue:()=>null}};function Aa({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=M(),c={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(W,{value:s,onValueChange:a,children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(Zt).map(([o])=>e.jsx(U,{value:o,children:c[o]},o))})]}),s==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[Ue(n.from,"yyyy-MM-dd")," -"," ",Ue(n.to,"yyyy-MM-dd")]}):Ue(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Vs,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:o=>{o?.from&&o?.to&&l({from:o.from,to:o.to})},numberOfMonths:2})})]})]})}const As=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Dm({className:s}){const{t:n}=M(),[a,l]=m.useState("today"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),[o,u]=m.useState("today"),[h,i]=m.useState({from:$e(new Date,7),to:new Date}),d=m.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:Zt[a].getValue(),[a,r]),f=m.useMemo(()=>o==="custom"?{start:h.from,end:h.to}:Zt[o].getValue(),[o,h]),{data:P}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>Va({type:"node",start_time:fe.round(d.start.getTime()/1e3),end_time:fe.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:I}=se({queryKey:["userTrafficRank",f.start,f.end],queryFn:()=>Va({type:"user",start_time:fe.round(f.start.getTime()/1e3),end_time:fe.round(f.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(qe,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ui,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:c}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:P?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:P.data.map(p=>e.jsx(oe,{delayDuration:200,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:p.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?e.jsx(Gt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(p.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${p.value/P.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(p.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?"+":"",p.change,"%"]})]})})]})},p.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(qe,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(bs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ht,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:o,customDateRange:h,onRangeChange:u,onCustomRangeChange:i}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:I?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:I.data.map(p=>e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:p.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?e.jsx(Gt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(p.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${p.value/I.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(p.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(p.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",p.change>=0?"text-green-600":"text-red-600"),children:[p.change>=0?"+":"",p.change,"%"]})]})})]})},p.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Rm=Ts("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function H({className:s,variant:n,...a}){return e.jsx("div",{className:y(Rm({variant:n}),s),...a})}const vt=m.forwardRef(({className:s,value:n,...a},l)=>e.jsx(Tn,{ref:l,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(qi,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));vt.displayName=Tn.displayName;function Em(){const{t:s}=M(),[n,a]=m.useState(null),[l,r]=m.useState(null),[c,o]=m.useState(!0),[u,h]=m.useState(!1),i=async()=>{try{h(!0);const[P,I]=await Promise.all([Oa.getSystemStatus(),Oa.getQueueStats()]);a(P.data),r(I.data)}catch(P){console.error("Error fetching system data:",P)}finally{o(!1),h(!1)}};m.useEffect(()=>{i();const P=setInterval(i,3e4);return()=>clearInterval(P)},[]);const d=()=>{i()};if(c)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})});const f=P=>P?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(qe,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Gi,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(tt,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:u,children:e.jsx(Ki,{className:y("h-4 w-4",u&&"animate-spin")})})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[f(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(H,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(vt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(vt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(qe,{children:[e.jsxs(ss,{children:[e.jsxs(bs,{className:"flex items-center gap-2",children:[e.jsx(Bi,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(tt,{children:s("dashboard:queue.details.description")})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(vt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Im(){const{t:s}=M();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsx(ke,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Tm,{}),e.jsx(wm,{}),e.jsx(Dm,{}),e.jsx(Em,{})]})})})]})}const Mm=Object.freeze(Object.defineProperty({__proto__:null,default:Im},Symbol.toStringTag,{value:"Module"})),be=m.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(En,{ref:r,decorative:a,orientation:n,className:y("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));be.displayName=En.displayName;function Om({className:s,items:n,...a}){const{pathname:l}=ea(),r=os(),[c,o]=m.useState(l??"/settings"),u=i=>{o(i),r(i)},{t:h}=M("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(W,{value:c,onValueChange:u,children:[e.jsx(K,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(B,{children:n.map(i=>e.jsx(U,{value:i.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:i.icon}),e.jsx("span",{className:"text-md",children:h(i.title)})]})},i.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(i=>e.jsxs(Rs,{to:i.href,className:y(Hs({variant:"ghost"}),l===i.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:i.icon}),h(i.title)]},i.href))})})]})}const Vm=[{title:"site.title",key:"site",icon:e.jsx(Wi,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(dn,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(mn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(Yi,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(cn,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(Ji,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(Qi,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(on,{size:18}),href:"/config/system/app",description:"app.description"}];function Lm(){const{t:s}=M("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(be,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(Om,{items:Vm})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(sa,{})})})]})]})]})}const Am=Object.freeze(Object.defineProperty({__proto__:null,default:Lm},Symbol.toStringTag,{value:"Module"})),q=m.forwardRef(({className:s,...n},a)=>e.jsx(In,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(Zi,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));q.displayName=In.displayName;const Cs=m.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}));Cs.displayName="Textarea";const Fm=x.object({logo:x.string().nullable().default(""),force_https:x.number().nullable().default(0),stop_register:x.number().nullable().default(0),app_name:x.string().nullable().default(""),app_description:x.string().nullable().default(""),app_url:x.string().nullable().default(""),subscribe_url:x.string().nullable().default(""),try_out_plan_id:x.number().nullable().default(0),try_out_hour:x.coerce.number().nullable().default(0),tos_url:x.string().nullable().default(""),currency:x.string().nullable().default(""),currency_symbol:x.string().nullable().default("")});function zm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>us("site")}),{data:c}=se({queryKey:["plans"],queryFn:()=>Os()}),o=ce({resolver:ue(Fm),defaultValues:{},mode:"onBlur"}),{mutateAsync:u}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([f,P])=>{o.setValue(f,P)}),l.current=d}},[r]);const h=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{const f=Object.entries(d).reduce((P,[I,p])=>(P[I]=p===null?"":p,P),{});await u(f),l.current=d}finally{a(!1)}}},1e3),[u]),i=m.useCallback(d=>{h(d)},[h]);return m.useEffect(()=>{const d=o.watch(f=>{i(f)});return()=>d.unsubscribe()},[o.watch,i]),e.jsx(he,{...o,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:o.control,name:"app_name",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteName.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_description",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteDescription.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.siteUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"force_https",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(O,{children:s("site.form.forceHttps.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"logo",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.logo.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"subscribe_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.subscribeUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"tos_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.tosUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"stop_register",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(O,{children:s("site.form.stopRegister.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(_,{children:e.jsxs(W,{value:d.value?.toString(),onValueChange:f=>{d.onChange(Number(f)),i(o.getValues())},children:[e.jsx(K,{children:e.jsx(Y,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("site.form.tryOut.placeholder")}),c?.data?.map(f=>e.jsx(U,{value:f.id.toString(),children:f.name},f.id.toString()))]})]})}),e.jsx(O,{children:s("site.form.tryOut.description")}),e.jsx(D,{})]})}),!!o.watch("try_out_plan_id")&&e.jsx(j,{control:o.control,name:"try_out_hour",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.tryOut.duration.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.currency.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency_symbol",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(O,{children:s("site.form.currencySymbol.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function Um(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(be,{}),e.jsx(zm,{})]})}const $m=Object.freeze(Object.defineProperty({__proto__:null,default:Um},Symbol.toStringTag,{value:"Module"})),Hm=x.object({email_verify:x.boolean().nullable(),safe_mode_enable:x.boolean().nullable(),secure_path:x.string().nullable(),email_whitelist_enable:x.boolean().nullable(),email_whitelist_suffix:x.array(x.string().nullable()).nullable(),email_gmail_limit_enable:x.boolean().nullable(),recaptcha_enable:x.boolean().nullable(),recaptcha_key:x.string().nullable(),recaptcha_site_key:x.string().nullable(),register_limit_by_ip_enable:x.boolean().nullable(),register_limit_count:x.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:x.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:x.boolean().nullable(),password_limit_count:x.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:x.coerce.string().transform(s=>s===""?null:s).nullable()}),qm={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function Gm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Hm),defaultValues:qm,mode:"onBlur"}),{data:c}=se({queryKey:["settings","safe"],queryFn:()=>us("safe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data.safe){const i=c.data.safe;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"email_verify",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(O,{children:s("safe.form.emailVerify.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"email_gmail_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(O,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"safe_mode_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(O,{children:s("safe.form.safeMode.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"secure_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.securePath.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.securePath.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"email_whitelist_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(O,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(j,{control:r.control,name:"email_whitelist_suffix",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...i,value:(i.value||[]).join(` +- 支持随时更换套餐`}},force_update:{label:"强制更新到用户"},submit:{submitting:"提交中...",submit:"提交",cancel:"取消",success:{add:"套餐添加成功",update:"套餐更新成功"}}},page:{description:"在这里可以配置订阅计划,包括添加、删除、编辑等操作。"}}},email:{title:"邮件设置",description:"配置系统邮件服务,用于发送验证码、密码重置、通知等邮件,支持多种SMTP服务商。",email_host:{title:"SMTP主机",description:"SMTP服务器地址,例如:smtp.gmail.com"},email_port:{title:"SMTP端口",description:"SMTP服务器端口,常用端口:25, 465, 587"},email_username:{title:"SMTP用户名",description:"SMTP认证用户名"},email_password:{title:"SMTP密码",description:"SMTP认证密码或应用专用密码"},email_encryption:{title:"加密方式",description:"邮件加密方式",none:"无",ssl:"SSL/TLS",tls:"STARTTLS"},email_from:{title:"发件人地址",description:"发件人邮箱地址"},email_from_name:{title:"发件人名称",description:"发件人显示名称"},email_template:{title:"邮件模板",description:"自定义邮件模板方式请查看文档",placeholder:"选择邮件模板"},remind_mail:{title:"邮件提醒",description:"开启后用户订阅即将到期或流量不足时会收到邮件通知。"},test:{title:"发送测试邮件",sending:"发送中...",description:"发送测试邮件以验证配置",success:"测试邮件发送成功",error:"测试邮件发送失败"}},telegram:{title:"Telegram设置",description:"配置Telegram机器人功能,实现用户通知、账户绑定、指令交互等自动化服务。",bot_token:{title:"机器人令牌",description:"请输入从Botfather获取的令牌。",placeholder:"0000000000:xxxxxxxxx_xxxxxxxxxxxxxxx"},webhook:{title:"设置Webhook",description:"设置机器人的webhook,不设置将无法收到Telegram通知。",button:"一键设置",setting:"设置中..."},bot_enable:{title:"启用机器人通知",description:"开启后机器人将向管理员和已绑定Telegram的用户发送基础通知。"},discuss_link:{title:"群组链接",description:"填写后将在用户端显示或在需要的地方使用。",placeholder:"https://t.me/xxxxxx"}},app:{title:"APP设置",description:"管理移动应用程序相关配置,包括API接口、版本控制、推送通知等功能设置。",common:{placeholder:"请输入"},windows:{version:{title:"Windows版本",description:"Windows客户端当前版本号"},download:{title:"Windows下载地址",description:"Windows客户端下载链接"}},macos:{version:{title:"macOS版本",description:"macOS客户端当前版本号"},download:{title:"macOS下载地址",description:"macOS客户端下载链接"}},android:{version:{title:"Android版本",description:"Android客户端当前版本号"},download:{title:"Android下载地址",description:"Android客户端下载链接"}}},common:{saving:"保存中...",save_success:"已自动保存",placeholder:"请输入"},invite:{title:"邀请&佣金设置",description:"邀请注册、佣金相关设置。",invite_force:{title:"开启强制邀请",description:"开启后只有被邀请的用户才可以进行注册。"},invite_commission:{title:"邀请佣金百分比",description:"默认全局的佣金分配比例,你可以在用户管理单独配置单个比例。",placeholder:"请输入佣金百分比"},invite_gen_limit:{title:"用户可创建邀请码上限",description:"用户可创建邀请码上限",placeholder:"请输入创建上限"},invite_never_expire:{title:"邀请码永不失效",description:"开启后邀请码被使用后将不会失效,否则使用过后即失效。"},commission_first_time:{title:"佣金仅首次发放",description:"开启后被邀请人首次支付时才会产生佣金,可以在用户管理对用户进行单独配置。"},commission_auto_check:{title:"佣金自动确认",description:"开启后佣金将会在订单完成3日后自动进行确认。"},commission_withdraw_limit:{title:"提现单申请门槛(元)",description:"小于门槛金额的提现单将不会被提交。",placeholder:"请输入提现门槛"},commission_withdraw_method:{title:"提现方式",description:"可以支持的提现方式,多个用逗号分隔。",placeholder:"请输入提现方式,多个用逗号分隔"},withdraw_close:{title:"关闭提现",description:"关闭后将禁止用户申请提现,且邀请佣金将会直接进入用户余额。"},commission_distribution:{title:"三级分销",description:"开启后将佣金将按照设置的3成比例进行分成,三成比例合计请不要大于100%。",l1:"一级邀请人比例",l2:"二级邀请人比例",l3:"三级邀请人比例",placeholder:"请输入比例,如:50"},saving:"保存中..."},server:{title:"节点配置",description:"配置节点通信和同步设置,包括通信密钥、轮询间隔、负载均衡等高级选项。",server_token:{title:"通讯密钥",description:"Xboard与节点通讯的密钥,以便数据不会被他人获取。",placeholder:"请输入通讯密钥",generate_tooltip:"点击生成随机通信密钥"},server_pull_interval:{title:"节点拉取动作轮询间隔",description:"节点从面板获取数据的间隔频率。",placeholder:"请输入拉取间隔"},server_push_interval:{title:"节点推送动作轮询间隔",description:"节点推送数据到面板的间隔频率。",placeholder:"请输入推送间隔"},device_limit_mode:{title:"设备限制模式",description:"宽松模式下,同一IP地址使用多个节点只统计为一个设备。",strict:"严格模式",relaxed:"宽松模式",placeholder:"请选择设备限制模式"},saving:"保存中...",manage:{title:"节点管理",description:"管理所有节点,包括添加、删除、编辑等操作。"}}},Cc={trafficRecord:{title:"流量使用记录",time:"时间",upload:"上行流量",download:"下行流量",rate:"倍率",total:"总计",noRecords:"暂无记录",perPage:"每页显示",records:"条记录",page:"第 {{current}} / {{total}} 页",multiplier:"{{value}}x"}},Sc={title:"工单管理",description:"在这里可以查看用户工单,包括查看、回复、关闭等操作。",columns:{id:"工单号",subject:"主题",level:"优先级",status:"状态",updated_at:"最后更新",created_at:"创建时间",actions:"操作"},status:{closed:"已关闭",replied:"已回复",pending:"待回复",processing:"处理中"},level:{low:"低",medium:"中",high:"高"},filter:{placeholder:"搜索{field}...",no_results:"未找到结果",selected:"已选择 {count} 项",clear:"清除筛选"},actions:{view_details:"查看详情",close_ticket:"关闭工单",close_confirm_title:"确认关闭工单",close_confirm_description:"关闭后将无法继续回复,是否确认关闭该工单?",close_confirm_button:"关闭工单",close_success:"工单已关闭",view_ticket:"查看工单"},detail:{no_messages:"暂无消息记录",created_at:"创建于",user_info:"用户信息",traffic_records:"流量记录",order_records:"订单记录",input:{closed_placeholder:"工单已关闭",reply_placeholder:"请输入回复内容...",sending:"发送中...",send:"发送"}}},kc={manage:{title:"用户管理",description:"在这里可以管理用户,包括增加、删除、编辑、查询等操作。"},columns:{is_admin:"管理员",is_staff:"员工",id:"ID",email:"邮箱",online_count:"在线设备",status:"状态",subscription:"订阅",group:"权限组",used_traffic:"已用流量",total_traffic:"总流量",expire_time:"到期时间",balance:"余额",commission:"佣金",register_time:"注册时间",actions:"操作",device_limit:{unlimited:"无设备数限制",limited:"最多可同时在线 {{count}} 台设备"},status_text:{normal:"正常",banned:"封禁"},online_status:{online:"当前在线",never:"从未在线",last_online:"最后在线时间: {{time}}",offline_duration:{days:"离线时长: {{count}}天",hours:"离线时长: {{count}}小时",minutes:"离线时长: {{count}}分钟",seconds:"离线时长: {{count}}秒"}},expire_status:{permanent:"长期有效",expired:"已过期 {{days}} 天",remaining:"剩余 {{days}} 天"},actions_menu:{edit:"编辑",assign_order:"分配订单",copy_url:"复制订阅URL",reset_secret:"重置UUID及订阅URL",orders:"TA的订单",invites:"TA的邀请",traffic_records:"TA的流量记录"}},filter:{selected:"已选择 {{count}} 项",no_results:"未找到结果",clear:"清除筛选",search_placeholder:"搜索...",email_search:"搜索用户邮箱...",advanced:"高级筛选",reset:"重置筛选",sheet:{title:"高级筛选",description:"添加一个或多个筛选条件来精确查找用户",conditions:"筛选条件",add:"添加条件",condition:"条件 {{number}}",field:"选择字段",operator:"选择操作符",value:"输入值",value_number:"输入数值({{unit}})",reset:"重置",apply:"应用筛选"},fields:{email:"邮箱",id:"用户ID",plan_id:"订阅",transfer_enable:"流量",total_used:"已用流量",online_count:"在线设备",expired_at:"到期时间",uuid:"UUID",token:"Token",banned:"账号状态",remark:"备注",inviter_email:"邀请人邮箱",invite_user_id:"邀请人ID",is_admin:"管理员",is_staff:"员工"},operators:{contains:"包含",eq:"等于",gt:"大于",lt:"小于"},status:{normal:"正常",banned:"禁用"},boolean:{true:"是",false:"否"}},generate:{button:"创建用户",title:"创建用户",form:{email:"邮箱",email_prefix:"帐号(批量生成请留空)",email_domain:"域",password:"密码",password_placeholder:"留空则密码与邮件相同",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",permanent:"长期有效",subscription:"订阅计划",subscription_none:"无",generate_count:"生成数量",generate_count_placeholder:"如果为批量生产请输入生成数量",cancel:"取消",submit:"生成",success:"生成成功"}},edit:{button:"编辑用户信息",title:"用户管理",form:{email:"邮箱",email_placeholder:"请输入邮箱",inviter_email:"邀请人邮箱",inviter_email_placeholder:"请输入邮箱",password:"密码",password_placeholder:"如需修改密码请输入",balance:"余额",balance_placeholder:"请输入余额",commission_balance:"佣金余额",commission_balance_placeholder:"请输入佣金余额",upload:"已用上行",upload_placeholder:"已用上行",download:"已用下行",download_placeholder:"已用下行",total_traffic:"流量",total_traffic_placeholder:"请输入流量",expire_time:"到期时间",expire_time_placeholder:"请选择用户到期日期,留空为长期有效",expire_time_specific:"具体时间",expire_time_today:"设为当天结束",expire_time_permanent:"长期有效",expire_time_1month:"一个月",expire_time_3months:"三个月",expire_time_confirm:"确定",subscription:"订阅计划",subscription_none:"无",account_status:"账户状态",commission_type:"佣金类型",commission_type_system:"跟随系统设置",commission_type_cycle:"循环返利",commission_type_onetime:"首次返利",commission_rate:"推荐返利比例",commission_rate_placeholder:"为空则跟随站点设置返利比例",discount:"专享折扣比例",discount_placeholder:"为空则不享受专享折扣",speed_limit:"限速",speed_limit_placeholder:"留空则不限速",device_limit:"设备限制",device_limit_placeholder:"留空则不限制",is_admin:"是否管理员",is_staff:"是否员工",remarks:"备注",remarks_placeholder:"请在这里记录",cancel:"取消",submit:"提交",success:"修改成功"}}},Pc={title:"路由管理",description:"管理所有路由组,包括添加、删除、编辑等操作。",columns:{id:"组ID",remarks:"备注",action:"动作",actions:"操作",matchRules:"匹配{{count}}条规则"},actions:{dns:"指定DNS服务器进行解析",block:"禁止访问"},form:{add:"添加路由",edit:"编辑路由",create:"创建路由",remarks:"备注",remarksPlaceholder:"请输入备注",match:"匹配规则",matchPlaceholder:`example.com +*.example.com`,action:"动作",actionPlaceholder:"请选择动作",dns:"DNS服务器",dnsPlaceholder:"请输入DNS服务器",cancel:"取消",submit:"提交",validation:{remarks:"请输入有效的备注"}},toolbar:{searchPlaceholder:"搜索路由...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该路由组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",deleteSuccess:"删除成功",createSuccess:"创建成功",updateSuccess:"更新成功"}},Tc={title:"支付配置",description:"在这里可以配置支付方式,包括支付宝、微信等。",table:{columns:{id:"ID",enable:"启用",name:"显示名称",payment:"支付接口",notify_url:"通知地址",notify_url_tooltip:"支付网关将会把数据通知到本地址,请通过防火墙放行本地址。",actions:"操作"},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该支付方式吗?此操作无法撤销。",success:"删除成功"}},toolbar:{search:"搜索支付方式...",reset:"重置",sort:{hint:"拖拽支付方式进行排序,完成后点击保存",save:"保存排序",edit:"编辑排序"}}},form:{add:{button:"添加支付方式",title:"添加支付方式"},edit:{title:"编辑支付方式"},fields:{name:{label:"显示名称",placeholder:"请输入支付名称",description:"用于前端显示"},icon:{label:"图标URL",placeholder:"https://example.com/icon.svg",description:"用于前端显示的图标地址"},notify_domain:{label:"通知域名",placeholder:"https://example.com",description:"网关通知将发送到该域名"},handling_fee_percent:{label:"百分比手续费(%)",placeholder:"0-100"},handling_fee_fixed:{label:"固定手续费",placeholder:"0"},payment:{label:"支付接口",placeholder:"请选择支付接口",description:"选择要使用的支付接口"}},validation:{name:{min:"名称至少需要2个字符",max:"名称不能超过30个字符"},notify_domain:{url:"请输入有效的URL"},payment:{required:"请选择支付接口"}},buttons:{cancel:"取消",submit:"提交"},messages:{success:"保存成功"}}},Dc={title:"公告管理",description:"在这里可以配置公告,包括添加、删除、编辑等操作。",table:{columns:{id:"ID",show:"显示状态",title:"标题",actions:"操作"},toolbar:{search:"搜索公告标题...",reset:"重置",sort:{edit:"编辑排序",save:"保存排序"}},actions:{edit:"编辑",delete:{title:"删除确认",description:"确定要删除该条公告吗?此操作无法撤销。",success:"删除成功"}}},form:{add:{title:"添加公告",button:"添加公告"},edit:{title:"编辑公告"},fields:{title:{label:"标题",placeholder:"请输入公告标题"},content:{label:"公告内容"},img_url:{label:"公告背景",placeholder:"请输入公告背景图片URL"},show:{label:"显示"},tags:{label:"节点标签",placeholder:"输入后回车添加标签"}},buttons:{cancel:"取消",submit:"提交",success:"提交成功"}}},Rc={title:"主题配置",description:"主题配置,包括主题色、字体大小等。如果你采用前后分离的方式部署V2board,那么主题配置将不会生效。",upload:{button:"上传主题",title:"上传主题",description:"请上传一个有效的主题压缩包(.zip 格式)。主题包应包含完整的主题文件结构。",dragText:"将主题文件拖放到此处,或者",clickText:"点击选择",supportText:"支持 .zip 格式的主题包",uploading:"正在上传...",error:{format:"只支持上传 ZIP 格式的主题文件"}},preview:{title:"主题预览",imageCount:"{{current}} / {{total}}"},card:{version:"版本: {{version}}",currentTheme:"当前主题",activateTheme:"激活主题",configureTheme:"主题设置",preview:"预览",delete:{title:"删除主题",description:"确定要删除该主题吗?删除后无法恢复。",button:"删除",error:{active:"不能删除当前使用的主题"}}},config:{title:"配置{{name}}主题",description:"修改主题的样式、布局和其他显示选项。",cancel:"取消",save:"保存",success:"保存成功"}},Ic={title:"优惠券管理",description:"在这里可以查看优惠券,包括增加、查看、删除等操作。",table:{columns:{id:"ID",show:"启用",name:"卷名称",type:"类型",code:"卷码",limitUse:"剩余次数",limitUseWithUser:"可用次数/用户",validity:"有效期",actions:"操作"},validity:{expired:"已过期{{days}}天",notStarted:"{{days}}天后开始",remaining:"剩余{{days}}天",startTime:"开始时间",endTime:"结束时间",unlimited:"无限次",noLimit:"无限制"},actions:{edit:"编辑",delete:"删除",deleteConfirm:{title:"确认删除",description:"此操作将永久删除该优惠券,删除后无法恢复。确定要继续吗?",confirmText:"删除"}},toolbar:{search:"搜索优惠券...",type:"类型",reset:"重置",types:{1:"按金额优惠",2:"按比例优惠"}}},form:{add:"添加优惠券",edit:"编辑优惠券",name:{label:"优惠券名称",placeholder:"请输入优惠券名称",required:"请输入优惠券名称"},type:{label:"优惠券类型和值",placeholder:"优惠券类型"},value:{placeholder:"请输入值"},validity:{label:"优惠券有效期",to:"至",endTimeError:"结束时间必须晚于开始时间"},limitUse:{label:"最大使用次数",placeholder:"限制最大使用次数,留空则不限制",description:"设置优惠券的总使用次数限制,留空表示不限制使用次数"},limitUseWithUser:{label:"每个用户可使用次数",placeholder:"限制每个用户可使用次数,留空则不限制",description:"限制每个用户可使用该优惠券的次数,留空表示不限制单用户使用次数"},limitPeriod:{label:"指定周期",placeholder:"限制指定周期可以使用优惠,留空则不限制",description:"选择可以使用优惠券的订阅周期,留空表示不限制使用周期",empty:"没有找到匹配的周期"},limitPlan:{label:"指定订阅",placeholder:"限制指定订阅可以使用优惠,留空则不限制",empty:"没有找到匹配的订阅"},code:{label:"自定义优惠码",placeholder:"自定义优惠码,留空则自动生成",description:"可以自定义优惠码,留空则系统自动生成"},generateCount:{label:"批量生成数量",placeholder:"批量生成优惠码数量,留空则生成单个",description:"批量生成多个优惠码,留空则只生成单个优惠码"},submit:{saving:"保存中...",save:"保存"},error:{saveFailed:"保存优惠券失败"}}},Ec={title:"权限组管理",description:"管理所有权限组,包括添加、删除、编辑等操作。",columns:{id:"组ID",name:"组名称",usersCount:"用户数量",serverCount:"节点数量",actions:"操作"},form:{add:"添加权限组",edit:"编辑权限组",create:"创建权限组",update:"更新",name:"组名称",namePlaceholder:"请输入权限组名称",nameDescription:"权限组名称用于标识不同的用户组,建议使用有意义的名称。",cancel:"取消",editDescription:"修改权限组信息,更新后会立即生效。",createDescription:"创建新的权限组,可以为不同的用户分配不同的权限。"},toolbar:{searchPlaceholder:"搜索权限组...",reset:"重置"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该权限组,删除后无法恢复。确定要继续吗?",deleteButton:"删除",createSuccess:"创建成功",updateSuccess:"更新成功",nameValidation:{min:"组名至少需要2个字符",max:"组名不能超过50个字符",pattern:"组名只能包含字母、数字、中文、下划线和连字符"}}},Mc={title:"知识库管理",description:"在这里可以配置知识库,包括添加、删除、编辑等操作。",columns:{id:"ID",status:"状态",title:"标题",category:"分类",actions:"操作"},form:{add:"添加知识",edit:"编辑知识",title:"标题",titlePlaceholder:"请输入知识标题",category:"分类",categoryPlaceholder:"请输入分类,分类将会自动归类",language:"语言",languagePlaceholder:"请选择语言",content:"内容",show:"显示",cancel:"取消",submit:"提交"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"确认删除",deleteDescription:"此操作将永久删除该知识库记录,删除后无法恢复。确定要继续吗?",deleteButton:"删除",operationSuccess:"操作成功"},toolbar:{searchPlaceholder:"搜索知识...",reset:"重置",sortModeHint:"拖拽知识条目进行排序,完成后点击保存",editSort:"编辑排序",saveSort:"保存排序"}},Lc={loading:"로딩 중...",error:"오류",success:"성공",save:"저장",cancel:"취소",delete:"삭제",edit:"편집",view:"보기",toggleNavigation:"내비게이션 전환",toggleSidebar:"사이드바 전환",search:"검색...",theme:{light:"라이트",dark:"다크",system:"시스템"},user:"사용자",defaultEmail:"user@example.com",settings:"설정",logout:"로그아웃"},Oc={title:"대시보드",stats:{newUsers:"신규 사용자",totalScore:"총 점수",monthlyUpload:"월간 업로드",vsLastMonth:"전월 대비",vsYesterday:"전일 대비",todayIncome:"오늘의 수입",monthlyIncome:"월간 수입",totalIncome:"총 수입",totalUsers:"총 사용자",activeUsers:"활성 사용자: {{count}}",totalOrders:"총 주문",revenue:"매출",todayRegistered:"오늘 등록",monthlyRegistered:"월간 등록",onlineUsers:"온라인 사용자",pendingTickets:"대기 중인 티켓",hasPendingTickets:"주의가 필요한 티켓이 있습니다",noPendingTickets:"대기 중인 티켓 없음",pendingCommission:"대기 중인 수수료",hasPendingCommission:"확인이 필요한 수수료가 있습니다",noPendingCommission:"대기 중인 수수료 없음",monthlyNewUsers:"월간 신규 사용자",monthlyDownload:"월간 다운로드",todayTraffic:"오늘: {{value}}",activeUserTrend:"활성 사용자 추세",realtimeUsers:"실시간 사용자",todayPeak:"오늘의 최고치",vsLastWeek:"전주 대비"},trafficRank:{nodeTrafficRank:"노드 트래픽 순위",userTrafficRank:"사용자 트래픽 순위",today:"오늘",last7days:"최근 7일",last30days:"최근 30일",customRange:"사용자 지정 기간",selectTimeRange:"기간 선택",selectDateRange:"날짜 범위 선택",currentTraffic:"현재 트래픽",previousTraffic:"이전 트래픽",changeRate:"변화율",recordTime:"기록 시간"},overview:{title:"매출 개요",thisMonth:"이번 달",lastMonth:"지난 달",to:"부터",selectTimeRange:"기간 선택",selectDate:"날짜 선택",last7Days:"최근 7일",last30Days:"최근 30일",last90Days:"최근 90일",last180Days:"최근 180일",lastYear:"작년",customRange:"사용자 지정 기간",amount:"금액",count:"건수",transactions:"{{count}}건의 거래",orderAmount:"주문 금액",commissionAmount:"수수료 금액",orderCount:"주문 건수",commissionCount:"수수료 건수",totalIncome:"총 수입",totalCommission:"총 수수료",totalTransactions:"총: {{count}}건의 거래",avgOrderAmount:"평균 주문 금액:",commissionRate:"수수료율:"},traffic:{title:"트래픽 순위",rank:"순위",domain:"도메인",todayTraffic:"오늘의 트래픽",monthlyTraffic:"월간 트래픽"},queue:{title:"대기열 상태",jobDetails:"작업 상세",status:{description:"현재 대기열 실행 상태",running:"실행 상태",normal:"정상",abnormal:"비정상",waitTime:"현재 대기 시간: {{seconds}}초",pending:"대기 중",processing:"처리 중",completed:"완료됨",failed:"실패",cancelled:"취소됨"},details:{description:"대기열 처리 상세",recentJobs:"최근 작업",statisticsPeriod:"통계 기간: {{hours}}시간",jobsPerMinute:"분당 작업 수",maxThroughput:"최대 처리량: {{value}}",failedJobs7Days:"실패한 작업 (7일)",retentionPeriod:"보존 기간: {{hours}}시간",longestRunningQueue:"가장 오래 실행 중인 대기열",activeProcesses:"활성 프로세스",id:"작업 ID",type:"작업 유형",status:"상태",progress:"진행률",createdAt:"생성 시간",updatedAt:"업데이트 시간",error:"오류 메시지",data:"작업 데이터",result:"결과",duration:"소요 시간",attempts:"시도 횟수",nextRetry:"다음 재시도"},actions:{retry:"재시도",cancel:"취소",delete:"삭제",viewDetails:"상세 보기"},empty:"대기열에 작업 없음",loading:"대기열 상태 로딩 중...",error:"대기열 상태 로드 실패"},search:{placeholder:"메뉴 및 기능 검색...",title:"메뉴 네비게이션",noResults:"검색 결과 없음",loading:"검색 중..."}},Vc={placeholder:"메뉴 및 기능 검색...",title:"메뉴 네비게이션",noResults:"검색 결과가 없습니다",shortcut:{label:"검색",key:"⌘K"}},Ac={dashboard:"대시보드",systemManagement:"시스템 관리",systemConfig:"시스템 설정",themeConfig:"테마 설정",noticeManagement:"공지사항 관리",paymentConfig:"결제 설정",knowledgeManagement:"지식 관리",nodeManagement:"노드 관리",permissionGroupManagement:"권한 그룹",routeManagement:"경로 관리",subscriptionManagement:"구독",planManagement:"플랜 관리",orderManagement:"주문 관리",couponManagement:"쿠폰 관리",userManagement:"사용자 관리",ticketManagement:"티켓 관리"},Fc={dashboard:"대시보드",systemManagement:"시스템 관리",systemConfig:"시스템 설정",themeConfig:"테마 설정",noticeManagement:"공지사항 관리",paymentConfig:"결제 설정",knowledgeManagement:"지식 베이스",nodeManagement:"노드 관리",permissionGroupManagement:"권한 그룹",routeManagement:"경로 관리",subscriptionManagement:"구독 관리",planManagement:"플랜 관리",orderManagement:"주문 관리",couponManagement:"쿠폰 관리",userManagement:"사용자 관리",ticketManagement:"티켓 관리"},zc={title:"노드 설정",description:"통신 키, 폴링 간격, 로드 밸런싱 및 기타 고급 옵션을 포함한 노드 통신 및 동기화 설정을 구성합니다.",server_token:{title:"통신 키",description:"Xboard와 노드 간의 통신을 위한 키로, 무단 데이터 접근을 방지합니다.",placeholder:"통신 키를 입력해주세요"},server_pull_interval:{title:"노드 풀 작업 폴링 간격",description:"노드가 패널에서 데이터를 가져오는 빈도입니다.",placeholder:"풀 간격을 입력해주세요"},server_push_interval:{title:"노드 푸시 작업 폴링 간격",description:"노드가 패널로 데이터를 푸시하는 빈도입니다.",placeholder:"푸시 간격을 입력해주세요"},device_limit_mode:{title:"기기 제한 모드",description:"완화 모드에서는 동일한 IP 주소의 여러 노드가 하나의 기기로 계산됩니다.",strict:"엄격 모드",relaxed:"완화 모드",placeholder:"기기 제한 모드를 선택해주세요"},saving:"저장 중...",manage:{title:"노드 관리",description:"모든 노드를 관리하며, 추가, 삭제, 편집 등의 작업을 수행할 수 있습니다."},columns:{sort:"정렬",nodeId:"노드 ID",show:"표시",node:"노드",address:"주소",onlineUsers:{title:"온라인 사용자",tooltip:"서버 보고 빈도에 따른 온라인 사용자 수"},rate:{title:"요금",tooltip:"트래픽 과금 요율"},groups:{title:"권한 그룹",tooltip:"이 노드를 구독할 수 있는 그룹",empty:"--"},type:"유형",actions:"작업",copyAddress:"연결 주소 복사",internalPort:"내부 포트",status:{0:"실행되지 않음",1:"미사용 또는 비정상",2:"정상 실행 중"},actions_dropdown:{edit:"편집",copy:"복사",delete:{title:"삭제 확인",description:"이 작업은 이 노드를 영구적으로 삭제하며 취소할 수 없습니다. 계속하시겠습니까?",confirm:"삭제"},copy_success:"복사 완료",delete_success:"삭제 완료"}},toolbar:{search:"노드 검색...",type:"유형",reset:"초기화",sort:{tip:"노드를 드래그하여 정렬한 후 저장을 클릭하세요",edit:"정렬 편집",save:"정렬 저장"}},form:{add_node:"노드 추가",edit_node:"노드 편집",new_node:"새 노드",name:{label:"노드 이름",placeholder:"노드 이름을 입력해주세요",error:"올바른 이름을 입력해주세요"},rate:{label:"요금",error:"올바른 요금을 입력해주세요"},code:{label:"사용자 지정 노드 ID",optional:"(선택사항)",placeholder:"사용자 지정 노드 ID를 입력해주세요"},tags:{label:"노드 태그",placeholder:"Enter를 눌러 태그 추가"},groups:{label:"권한 그룹",add:"그룹 추가",placeholder:"권한 그룹을 선택해주세요",empty:"검색 결과가 없습니다"},host:{label:"노드 주소",placeholder:"도메인 또는 IP를 입력해주세요"},port:{label:"연결 포트",placeholder:"사용자 연결 포트",tooltip:"사용자가 실제로 연결하는 포트로, 클라이언트 설정에 입력해야 하는 포트 번호입니다. 중계 또는 터널을 사용하는 경우 서버가 실제로 수신하는 포트와 다를 수 있습니다.",sync:"서버 포트와 동기화"},server_port:{label:"서버 포트",placeholder:"서버 수신 포트",tooltip:"서버가 실제로 수신하는 포트로, 서버에서 실제로 열린 포트입니다. 중계 또는 터널을 사용하는 경우 사용자 연결 포트와 다를 수 있습니다."},parent:{label:"상위 노드",placeholder:"상위 노드 선택",none:"없음"},route:{label:"라우트 그룹",placeholder:"라우트 그룹 선택",empty:"검색 결과가 없습니다"},submit:"제출",cancel:"취소",success:"제출 완료"},dynamic_form:{shadowsocks:{cipher:{label:"암호화 방식",placeholder:"암호화 방식 선택"},obfs:{label:"난독화",placeholder:"난독화 방식 선택",none:"없음",http:"HTTP"},obfs_settings:{path:"경로",host:"호스트"}},vmess:{tls:{label:"TLS",placeholder:"보안을 선택해주세요",disabled:"비활성화",enabled:"활성화"},tls_settings:{server_name:{label:"서버 이름 표시(SNI)",placeholder:"사용하지 않는 경우 비워두세요"},allow_insecure:"안전하지 않은 연결 허용?"},network:{label:"전송 프로토콜",placeholder:"전송 프로토콜 선택"}},trojan:{server_name:{label:"서버 이름 표시(SNI)",placeholder:"노드 주소가 인증서와 다른 경우 인증서 확인에 사용"},allow_insecure:"안전하지 않은 연결 허용?",network:{label:"전송 프로토콜",placeholder:"전송 프로토콜 선택"}},hysteria:{version:{label:"프로토콜 버전",placeholder:"프로토콜 버전"},alpn:{label:"ALPN",placeholder:"ALPN"},obfs:{label:"난독화",type:{label:"난독화 구현",placeholder:"난독화 구현 선택",salamander:"Salamander"},password:{label:"난독화 비밀번호",placeholder:"난독화 비밀번호를 입력해주세요",generate_success:"난독화 비밀번호 생성 완료"}},tls:{server_name:{label:"서버 이름 표시(SNI)",placeholder:"노드 주소가 인증서와 다른 경우 인증서 확인에 사용"},allow_insecure:"안전하지 않은 연결 허용?"},bandwidth:{up:{label:"업로드 대역폭",placeholder:"업로드 대역폭을 입력해주세요",suffix:"Mbps",bbr_tip:", BBR 사용시 비워두세요"},down:{label:"다운로드 대역폭",placeholder:"다운로드 대역폭을 입력해주세요",suffix:"Mbps",bbr_tip:", BBR 사용시 비워두세요"}}},vless:{tls:{label:"보안",placeholder:"보안을 선택해주세요",none:"없음",tls:"TLS",reality:"Reality"},tls_settings:{server_name:{label:"서버 이름 표시(SNI)",placeholder:"사용하지 않는 경우 비워두세요"},allow_insecure:"안전하지 않은 연결 허용?"},reality_settings:{server_name:{label:"대상 사이트(dest)",placeholder:"예: example.com"},server_port:{label:"포트"}}}}},Uc={plan:{title:"구독 플랜",add:"플랜 추가",search:"플랜 검색...",sort:{edit:"정렬 편집",save:"정렬 저장"},columns:{id:"ID",show:"표시",sell:"판매",renew:"갱신",renew_tooltip:"구독 판매가 중단된 후 기존 사용자의 갱신 가능 여부",name:"이름",stats:"통계",group:"권한 그룹",price:"가격",actions:"작업",edit:"편집",delete:"삭제",delete_confirm:{title:"삭제 확인",description:"이 작업은 이 구독을 영구적으로 삭제하며 취소할 수 없습니다. 계속하시겠습니까?",success:"삭제 완료"},price_period:{monthly:"월간",quarterly:"분기",half_yearly:"반기",yearly:"연간",two_yearly:"2년",three_yearly:"3년",onetime:"일회성",reset_traffic:"트래픽 초기화",unit:{month:"/월",quarter:"/분기",half_year:"/반기",year:"/년",two_year:"/2년",three_year:"/3년",times:"/회"}}},form:{add_title:"플랜 추가",edit_title:"플랜 편집",name:{label:"플랜 이름",placeholder:"플랜 이름 입력"},group:{label:"서버 그룹",add:"그룹 추가",placeholder:"서버 그룹 선택"},transfer:{label:"트래픽",placeholder:"트래픽 제한 입력",unit:"GB"},speed:{label:"속도 제한",placeholder:"속도 제한 입력",unit:"Mbps"},price:{title:"가격 설정",base_price:"기본 가격",clear:{button:"초기화",tooltip:"모든 가격 초기화"},period:{monthly:"월간",months:"{{count}}개월"},onetime_desc:"일회성 트래픽 패키지, 시간 제한 없음",reset_desc:"트래픽 초기화 패키지, 여러 번 사용 가능"},device:{label:"기기 제한",placeholder:"기기 제한 입력",unit:"대"},capacity:{label:"용량 제한",placeholder:"용량 제한 입력",unit:"사용자"},reset_method:{label:"트래픽 초기화 방식",placeholder:"초기화 방식 선택",description:"트래픽 초기화 방식에 따라 트래픽이 초기화되는 방법이 결정됩니다",options:{follow_system:"시스템 설정 따르기",monthly_first:"매월 1일",monthly_reset:"매월 구매일",no_reset:"초기화 없음",yearly_first:"매년 1일",yearly_reset:"매년 구매일"}},content:{label:"플랜 설명",placeholder:"플랜 설명 입력",description:"마크다운 형식 지원",preview:"미리보기",preview_button:{show:"미리보기 표시",hide:"미리보기 숨기기"},template:{button:"템플릿 사용",tooltip:"기본 템플릿 사용",content:`## 플랜 특징 + +- 트래픽: {{transfer}} GB +- 속도: {{speed}} Mbps +- 기기: {{devices}}대 + +## 사용 안내 + +1. 플랜 유효 기간: {{validity}}일 +2. 트래픽 초기화: {{reset_method}} +3. 최대 동시 접속자: {{capacity}}명`}},force_update:{label:"사용자 플랜 강제 업데이트"},submit:{cancel:"취소",submit:"제출",submitting:"제출 중...",success:{add:"플랜이 성공적으로 추가되었습니다",update:"플랜이 성공적으로 업데이트되었습니다"}}},page:{description:"여기에서 구독 플랜을 구성할 수 있으며, 추가, 삭제 및 편집 작업을 수행할 수 있습니다."}}},$c={title:"주문 관리",description:"여기에서 사용자 주문을 확인할 수 있으며, 할당, 조회, 삭제 등의 작업을 수행할 수 있습니다.",table:{columns:{tradeNo:"주문 번호",type:"유형",plan:"구독 플랜",period:"기간",amount:"결제 금액",status:"주문 상태",commission:"수수료 금액",commissionStatus:"수수료 상태",createdAt:"생성 시간"}},type:{NEW:"신규 구매",RENEWAL:"갱신",UPGRADE:"업그레이드",RESET_FLOW:"트래픽 초기화"},period:{month_price:"월간",quarter_price:"분기",half_year_price:"반기",year_price:"연간",two_year_price:"2년",three_year_price:"3년",onetime_price:"일회성",reset_price:"초기화 패키지"},status:{PENDING:"대기 중",PROCESSING:"처리 중",CANCELLED:"취소됨",COMPLETED:"완료됨",DISCOUNTED:"할인 적용됨",tooltip:"[결제 완료] 표시 후 시스템이 활성화 및 완료 처리를 진행합니다"},commission:{PENDING:"대기 중",PROCESSING:"처리 중",VALID:"유효",INVALID:"무효"},actions:{markAsPaid:"결제 완료 표시",cancel:"주문 취소",openMenu:"메뉴 열기",reset:"초기화"},search:{placeholder:"주문 검색..."},dialog:{title:"주문 정보",basicInfo:"기본 정보",amountInfo:"금액 정보",timeInfo:"시간 정보",addOrder:"주문 추가",assignOrder:"주문 할당",fields:{userEmail:"사용자 이메일",orderPeriod:"주문 기간",subscriptionPlan:"구독 플랜",callbackNo:"콜백 번호",paymentAmount:"결제 금액",balancePayment:"잔액 결제",discountAmount:"할인 금액",refundAmount:"환불 금액",deductionAmount:"차감 금액",createdAt:"생성 시간",updatedAt:"업데이트 시간"},placeholders:{email:"사용자 이메일을 입력해주세요",plan:"구독 플랜을 선택해주세요",period:"구독 기간을 선택해주세요",amount:"결제 금액을 입력해주세요"},actions:{cancel:"취소",confirm:"확인"},messages:{addSuccess:"추가 완료"}}},Hc={title:"시스템 설정",description:"사이트, 보안, 구독, 초대 수수료, 노드, 이메일 및 알림을 포함한 핵심 시스템 구성을 관리합니다",server:{title:"서버 설정",description:"통신 키, 폴링 간격, 로드 밸런싱 및 기타 고급 옵션을 포함한 노드 통신 및 동기화 설정을 구성합니다.",server_token:{title:"통신 토큰",placeholder:"통신 토큰 입력",description:"서버 간 인증에 사용됩니다",generate_tooltip:"클릭하여 무작위 토큰 생성"},server_pull_interval:{title:"노드 풀 작업 폴링 간격",description:"노드가 패널에서 데이터를 가져오는 빈도입니다.",placeholder:"풀 간격 입력"},server_push_interval:{title:"노드 푸시 작업 폴링 간격",description:"노드가 패널로 데이터를 푸시하는 빈도입니다.",placeholder:"푸시 간격 입력"},device_limit_mode:{title:"기기 제한 모드",description:"완화 모드에서는 동일한 IP 주소의 여러 노드가 하나의 기기로 계산됩니다.",strict:"엄격 모드",relaxed:"완화 모드",placeholder:"기기 제한 모드 선택"}},invite:{title:"초대 및 수수료 설정",description:"초대 등록 및 수수료 관련 설정을 구성합니다.",invite_force:{title:"강제 초대 활성화",description:"활성화하면 초대받은 사용자만 등록할 수 있습니다."},invite_commission:{title:"초대 수수료 비율",description:"기본 전역 수수료 분배 비율입니다. 사용자 관리에서 개별 비율을 구성할 수 있습니다.",placeholder:"수수료 비율 입력"},invite_gen_limit:{title:"초대 코드 생성 제한",description:"사용자가 생성할 수 있는 최대 초대 코드 수",placeholder:"생성 제한 입력"},invite_never_expire:{title:"초대 코드 만료 없음",description:"활성화하면 초대 코드가 사용 후에도 만료되지 않으며, 그렇지 않으면 사용 후 만료됩니다."},commission_first_time:{title:"첫 결제 수수료만",description:"활성화하면 초대받은 사용자의 첫 결제에서만 수수료가 생성되며, 사용자 관리에서 개별적으로 구성할 수 있습니다."},commission_auto_check:{title:"자동 수수료 확인",description:"활성화하면 주문 완료 3일 후 수수료가 자동으로 확인됩니다."},commission_withdraw_limit:{title:"출금 임계값 (위안)",description:"이 임계값 미만의 출금 요청은 제출되지 않습니다.",placeholder:"출금 임계값 입력"},commission_withdraw_method:{title:"출금 방법",description:"지원되는 출금 방법, 여러 방법은 쉼표로 구분합니다.",placeholder:"출금 방법 입력, 쉼표로 구분"},withdraw_close:{title:"출금 비활성화",description:"활성화하면 사용자가 출금을 요청할 수 없으며, 초대 수수료는 사용자 잔액으로 직접 이동합니다."},commission_distribution:{title:"3단계 분배",description:"활성화하면 수수료가 설정된 세 비율에 따라 분할되며, 총합은 100%를 초과할 수 없습니다.",l1:"1단계 초대자 비율",l2:"2단계 초대자 비율",l3:"3단계 초대자 비율",placeholder:"비율 입력 예: 50"},saving:"저장 중..."},site:{title:"사이트 설정",description:"사이트 이름, 설명, 통화 단위 및 기타 핵심 설정을 포함한 기본 사이트 정보를 구성합니다.",form:{siteName:{label:"사이트 이름",placeholder:"사이트 이름을 입력해주세요",description:"사이트 이름이 표시되어야 하는 곳에 사용됩니다."},siteDescription:{label:"사이트 설명",placeholder:"사이트 설명을 입력해주세요",description:"사이트 설명이 표시되어야 하는 곳에 사용됩니다."},siteUrl:{label:"사이트 URL",placeholder:"사이트 URL을 입력해주세요, 끝에 /를 제외",description:"현재 웹사이트 URL, 이메일 및 URL이 필요한 다른 곳에서 사용됩니다."},forceHttps:{label:"HTTPS 강제",description:"사이트가 HTTPS를 사용하지 않지만 CDN 또는 리버스 프록시가 HTTPS를 강제할 때 활성화해야 합니다."},logo:{label:"LOGO",placeholder:"LOGO URL을 입력해주세요, 끝에 /를 제외",description:"LOGO가 표시되어야 하는 곳에 사용됩니다."},subscribeUrl:{label:"구독 URL",placeholder:"구독에 사용됩니다. 여러 URL은 ','로 구분. 비워두면 사이트 URL을 사용합니다.",description:"구독에 사용되며, 비워두면 사이트 URL을 사용합니다."},tosUrl:{label:"이용약관(TOS) URL",placeholder:"이용약관 URL을 입력해주세요, 끝에 /를 제외",description:"이용약관(TOS) 링크에 사용됩니다"},stopRegister:{label:"신규 사용자 등록 중지",description:"활성화하면 누구도 등록할 수 없습니다."},tryOut:{label:"등록 체험",placeholder:"비활성화",description:"체험용 구독을 선택하세요. 옵션이 없다면 먼저 구독 관리에서 추가하세요.",duration:{label:"체험 기간",placeholder:"0",description:"체험 기간(시간)."}},currency:{label:"통화 단위",placeholder:"CNY",description:"표시용으로만 사용되며, 변경하면 시스템의 모든 통화 단위에 영향을 미칩니다."},currencySymbol:{label:"통화 기호",placeholder:"¥",description:"표시용으로만 사용되며, 변경하면 시스템의 모든 통화 기호에 영향을 미칩니다."}}},safe:{title:"보안 설정",description:"로그인 인증, 비밀번호 정책 및 API 접근 설정을 포함한 시스템 보안 옵션을 구성합니다.",form:{emailVerify:{label:"이메일 인증",description:"활성화하면 사용자는 이메일을 인증해야 합니다."},gmailLimit:{label:"Gmail 별칭 비활성화",description:"활성화하면 Gmail 별칭으로 등록할 수 없습니다."},safeMode:{label:"안전 모드",description:"활성화하면 사이트 URL 이외의 도메인을 통한 접근이 403으로 차단됩니다."},securePath:{label:"관리자 경로",placeholder:"admin",description:"관리자 관리 경로, 변경하면 기존 관리자 경로가 수정됩니다"},emailWhitelist:{label:"이메일 접미사 화이트리스트",description:"활성화하면 목록의 이메일 접미사만 등록할 수 있습니다.",suffixes:{label:"이메일 접미사",placeholder:"이메일 접미사를 한 줄에 하나씩 입력",description:"허용된 이메일 접미사를 한 줄에 하나씩 입력하세요"}},recaptcha:{enable:{label:"reCAPTCHA 활성화",description:"활성화하면 사용자는 등록 시 reCAPTCHA 인증을 통과해야 합니다."},key:{label:"reCAPTCHA 키",placeholder:"reCAPTCHA 키 입력",description:"reCAPTCHA 키를 입력하세요"},siteKey:{label:"reCAPTCHA 사이트 키",placeholder:"reCAPTCHA 사이트 키 입력",description:"reCAPTCHA 사이트 키를 입력하세요"}},registerLimit:{enable:{label:"IP 등록 제한",description:"활성화하면 동일 IP에서의 등록 수가 제한됩니다."},count:{label:"등록 횟수",placeholder:"최대 등록 횟수 입력",description:"동일 IP에서 허용되는 최대 등록 횟수"},expire:{label:"제한 기간",placeholder:"제한 기간을 시간 단위로 입력",description:"등록 제한 기간(시간)"}},passwordLimit:{enable:{label:"비밀번호 시도 제한",description:"활성화하면 비밀번호 시도 횟수가 제한됩니다."},count:{label:"시도 횟수",placeholder:"최대 시도 횟수 입력",description:"허용되는 최대 비밀번호 시도 횟수"},expire:{label:"잠금 기간",placeholder:"잠금 기간을 시간 단위로 입력",description:"계정 잠금 기간(시간)"}}}},subscribe:{title:"구독 설정",description:"구독 링크 형식, 업데이트 빈도, 트래픽 통계 및 기타 설정을 포함한 구독 관련 구성을 관리합니다.",plan_change_enable:{title:"구독 변경 허용",description:"활성화하면 사용자가 구독 플랜을 변경할 수 있습니다."},reset_traffic_method:{title:"월간 트래픽 초기화 방식",description:"전역 트래픽 초기화 방식으로, 기본값은 매월 1일입니다. 구독 관리에서 구독별로 개별 설정할 수 있습니다.",options:{monthly_first:"매월 1일",monthly_reset:"월간 초기화",no_reset:"초기화 없음",yearly_first:"1월 1일",yearly_reset:"연간 초기화"}},surplus_enable:{title:"공제 플랜 활성화",description:"활성화하면 사용자가 구독을 변경할 때 시스템이 기존 구독에서 공제합니다. 자세한 내용은 문서를 참조하세요."},new_order_event:{title:"새 주문 이벤트",description:"새 주문이 생성될 때 실행할 작업을 선택합니다."}}},Gc={trafficRecord:{title:"트래픽 사용 기록",time:"시간",upload:"업로드",download:"다운로드",rate:"요금",total:"총계",noRecords:"기록이 없습니다",perPage:"페이지당 표시",records:"기록",page:"페이지 {{current}} / {{total}}",multiplier:"{{value}}배"}},qc={title:"티켓 관리",description:"여기에서 사용자 티켓을 확인할 수 있으며, 조회, 답변 및 종료 작업을 수행할 수 있습니다.",columns:{id:"티켓 ID",subject:"제목",level:"우선순위",status:"상태",updated_at:"최근 업데이트",created_at:"생성 시간",actions:"작업"},status:{closed:"종료됨",replied:"답변됨",pending:"대기 중",processing:"처리 중"},level:{low:"낮음",medium:"중간",high:"높음"},filter:{placeholder:"{field} 검색...",no_results:"검색 결과가 없습니다.",selected:"{count}개 선택됨",clear:"필터 초기화"},actions:{view_details:"상세 보기",close_ticket:"티켓 종료",close_confirm_title:"티켓 종료 확인",close_confirm_description:"종료 후에는 답변할 수 없습니다. 이 티켓을 종료하시겠습니까?",close_confirm_button:"티켓 종료",close_success:"티켓이 성공적으로 종료되었습니다",view_ticket:"티켓 보기"},detail:{no_messages:"메시지가 아직 없습니다",created_at:"생성 시간",user_info:"사용자 정보",traffic_records:"트래픽 기록",order_records:"주문 기록",input:{closed_placeholder:"티켓이 종료되었습니다",reply_placeholder:"답변을 입력하세요...",sending:"전송 중...",send:"전송"}}},Kc={manage:{title:"사용자 관리",description:"여기에서 사용자 추가, 삭제, 편집 및 조회 작업을 수행할 수 있습니다."},columns:{is_admin:"관리자",is_staff:"스태프",id:"ID",email:"이메일",online_count:"온라인 기기",status:"상태",subscription:"구독",group:"그룹",used_traffic:"사용된 트래픽",total_traffic:"총 트래픽",expire_time:"만료 시간",balance:"잔액",commission:"수수료",register_time:"등록 시간",actions:"작업",device_limit:{unlimited:"기기 제한 없음",limited:"최대 {{count}}대의 기기 허용"},status_text:{normal:"정상",banned:"차단됨"},online_status:{online:"현재 온라인",never:"접속 기록 없음",last_online:"마지막 접속: {{time}}",offline_duration:{days:"오프라인 기간: {{count}}일",hours:"오프라인 기간: {{count}}시간",minutes:"오프라인 기간: {{count}}분",seconds:"오프라인 기간: {{count}}초"}},expire_status:{permanent:"영구",expired:"{{days}}일 전 만료됨",remaining:"{{days}}일 남음"},actions_menu:{edit:"편집",assign_order:"주문 할당",copy_url:"구독 URL 복사",reset_secret:"UUID 및 URL 재설정",orders:"주문",invites:"초대",traffic_records:"트래픽 기록"}},filter:{selected:"{{count}}개 선택됨",no_results:"검색 결과가 없습니다.",clear:"필터 초기화",search_placeholder:"검색...",email_search:"사용자 이메일 검색...",advanced:"고급 필터",reset:"필터 초기화",sheet:{title:"고급 필터",description:"하나 이상의 필터 조건을 추가하여 사용자를 정확하게 찾기",conditions:"필터 조건",add:"조건 추가",condition:"조건 {{number}}",field:"필드 선택",operator:"연산자 선택",value:"값 입력",value_number:"값 입력 ({{unit}})",reset:"초기화",apply:"필터 적용"},fields:{email:"이메일",id:"사용자 ID",plan_id:"구독",transfer_enable:"트래픽",total_used:"사용된 트래픽",online_count:"온라인 기기",expired_at:"만료 시간",uuid:"UUID",token:"토큰",banned:"계정 상태",remark:"비고",inviter_email:"초대자 이메일",invite_user_id:"초대자 ID",is_admin:"관리자",is_staff:"스태프"},operators:{contains:"포함",eq:"일치",gt:"초과",lt:"미만"},status:{normal:"정상",banned:"차단됨"},boolean:{true:"예",false:"아니오"}},generate:{button:"사용자 생성",title:"사용자 생성",form:{email:"이메일",email_prefix:"계정 (일괄 생성시 비워두기)",email_domain:"도메인",password:"비밀번호",password_placeholder:"비워두면 이메일을 비밀번호로 사용",expire_time:"만료 시간",expire_time_placeholder:"사용자 만료 날짜 선택, 영구는 비워두기",permanent:"영구",subscription:"구독 플랜",subscription_none:"없음",generate_count:"생성 수량",generate_count_placeholder:"일괄 생성할 수량 입력",cancel:"취소",submit:"생성",success:"생성 완료"}},edit:{button:"사용자 정보 편집",title:"사용자 관리",form:{email:"이메일",email_placeholder:"이메일을 입력해주세요",inviter_email:"초대자 이메일",inviter_email_placeholder:"이메일을 입력해주세요",password:"비밀번호",password_placeholder:"변경하려면 새 비밀번호 입력",balance:"잔액",balance_placeholder:"잔액을 입력해주세요",commission_balance:"수수료 잔액",commission_balance_placeholder:"수수료 잔액을 입력해주세요",upload:"업로드 트래픽",upload_placeholder:"업로드 트래픽",download:"다운로드 트래픽",download_placeholder:"다운로드 트래픽",total_traffic:"총 트래픽",total_traffic_placeholder:"트래픽을 입력해주세요",expire_time:"만료 시간",expire_time_placeholder:"사용자 만료 날짜 선택, 영구는 비워두기",expire_time_specific:"특정 시간",expire_time_today:"오늘 종료로 설정",expire_time_permanent:"영구",expire_time_1month:"1개월",expire_time_3months:"3개월",expire_time_confirm:"확인",subscription:"구독 플랜",subscription_none:"없음",account_status:"계정 상태",commission_type:"수수료 유형",commission_type_system:"시스템 설정 따르기",commission_type_cycle:"주기별 수수료",commission_type_onetime:"일회성 수수료",commission_rate:"수수료율",commission_rate_placeholder:"사이트 수수료율을 따르려면 비워두기",discount:"전용 할인",discount_placeholder:"전용 할인이 없으면 비워두기",speed_limit:"속도 제한",speed_limit_placeholder:"속도 제한이 없으면 비워두기",device_limit:"기기 제한",device_limit_placeholder:"기기 제한이 없으면 비워두기",is_admin:"관리자 여부",is_staff:"스태프 여부",remarks:"비고",remarks_placeholder:"비고를 입력해주세요",cancel:"취소",submit:"제출",success:"수정 완료"}}},Bc={title:"라우트 관리",description:"모든 라우트 그룹을 관리하며, 추가, 삭제 및 편집 작업을 수행할 수 있습니다.",columns:{id:"그룹 ID",remarks:"비고",action:"동작",actions:"작업",matchRules:"{{count}}개 규칙 일치"},actions:{dns:"지정된 DNS 서버로 해석",block:"접근 차단"},form:{add:"라우트 추가",edit:"라우트 편집",create:"라우트 생성",remarks:"비고",remarksPlaceholder:"비고를 입력해주세요",match:"일치 규칙",matchPlaceholder:`example.com +*.example.com`,action:"동작",actionPlaceholder:"동작을 선택해주세요",dns:"DNS 서버",dnsPlaceholder:"DNS 서버를 입력해주세요",cancel:"취소",submit:"제출",validation:{remarks:"올바른 비고를 입력해주세요"}},toolbar:{searchPlaceholder:"라우트 검색...",reset:"초기화"},messages:{deleteConfirm:"삭제 확인",deleteDescription:"이 작업은 이 라우트 그룹을 영구적으로 삭제하며 복구할 수 없습니다. 계속하시겠습니까?",deleteButton:"삭제",deleteSuccess:"삭제 완료",createSuccess:"생성 완료",updateSuccess:"업데이트 완료"}},Wc={title:"결제 설정",description:"알리페이, 위챗페이 등의 결제 수단을 설정합니다.",table:{columns:{id:"ID",enable:"활성화",name:"표시 이름",payment:"결제 게이트웨이",notify_url:"알림 URL",notify_url_tooltip:"결제 게이트웨이가 이 주소로 알림을 보냅니다. 방화벽을 통해 접근 가능한지 확인해주세요.",actions:"작업"},actions:{edit:"편집",delete:{title:"삭제 확인",description:"이 결제 수단을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",success:"삭제 완료"}},toolbar:{search:"결제 수단 검색...",reset:"초기화",sort:{hint:"결제 수단을 드래그하여 정렬하고, 완료 후 저장을 클릭하세요",save:"순서 저장",edit:"순서 편집"}}},form:{add:{button:"결제 수단 추가",title:"결제 수단 추가"},edit:{title:"결제 수단 편집"},fields:{name:{label:"표시 이름",placeholder:"결제 이름 입력",description:"프론트엔드 표시용"},icon:{label:"아이콘 URL",placeholder:"https://example.com/icon.svg",description:"프론트엔드 표시용 아이콘 URL"},notify_domain:{label:"알림 도메인",placeholder:"https://example.com",description:"게이트웨이 알림용 도메인"},handling_fee_percent:{label:"수수료 비율 (%)",placeholder:"0-100"},handling_fee_fixed:{label:"고정 수수료",placeholder:"0"},payment:{label:"결제 게이트웨이",placeholder:"결제 게이트웨이 선택",description:"사용할 결제 게이트웨이 선택"}},validation:{name:{min:"이름은 최소 2자 이상이어야 합니다",max:"이름은 30자를 초과할 수 없습니다"},notify_domain:{url:"올바른 URL을 입력해주세요"},payment:{required:"결제 게이트웨이를 선택해주세요"}},buttons:{cancel:"취소",submit:"제출"},messages:{success:"저장 완료"}}},Yc={title:"공지사항 관리",description:"여기에서 공지사항을 구성할 수 있으며, 추가, 삭제, 편집 등의 작업을 수행할 수 있습니다.",table:{columns:{id:"ID",show:"표시 상태",title:"제목",actions:"작업"},toolbar:{search:"공지사항 제목 검색...",reset:"초기화",sort:{edit:"순서 편집",save:"순서 저장"}},actions:{edit:"편집",delete:{title:"삭제 확인",description:"이 공지사항을 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",success:"삭제 완료"}}},form:{add:{title:"공지사항 추가",button:"공지사항 추가"},edit:{title:"공지사항 편집"},fields:{title:{label:"제목",placeholder:"공지사항 제목을 입력해주세요"},content:{label:"내용"},img_url:{label:"배경 이미지",placeholder:"공지사항 배경 이미지 URL을 입력해주세요"},show:{label:"표시"},tags:{label:"태그",placeholder:"Enter를 눌러 태그 추가"}},buttons:{cancel:"취소",submit:"제출",success:"제출 완료"}}},Jc={title:"테마 설정",description:"테마 색상, 글꼴 크기 등을 포함한 테마 설정입니다. V2board를 프론트엔드와 백엔드로 분리하여 배포하는 경우 테마 설정이 적용되지 않습니다.",upload:{button:"테마 업로드",title:"테마 업로드",description:"유효한 테마 패키지(.zip 형식)를 업로드해주세요. 테마 패키지는 완전한 테마 파일 구조를 포함해야 합니다.",dragText:"테마 파일을 여기에 끌어다 놓거나",clickText:"클릭하여 선택",supportText:".zip 형식의 테마 패키지 지원",uploading:"업로드 중...",error:{format:"ZIP 형식의 테마 파일만 지원됩니다"}},preview:{title:"테마 미리보기",imageCount:"{{current}} / {{total}}"},card:{version:"버전: {{version}}",currentTheme:"현재 테마",activateTheme:"테마 활성화",configureTheme:"테마 설정",preview:"미리보기",delete:{title:"테마 삭제",description:"이 테마를 삭제하시겠습니까? 이 작업은 취소할 수 없습니다.",button:"삭제",error:{active:"현재 활성화된 테마는 삭제할 수 없습니다"}}},config:{title:"{{name}} 테마 구성",description:"테마 스타일, 레이아웃 및 기타 표시 옵션을 수정합니다.",cancel:"취소",save:"저장",success:"설정이 성공적으로 저장되었습니다"}},Qc={title:"쿠폰 관리",description:"여기에서 쿠폰을 관리할 수 있으며, 추가, 조회 및 삭제 작업을 수행할 수 있습니다.",table:{columns:{id:"ID",show:"활성화",name:"쿠폰 이름",type:"유형",code:"코드",limitUse:"남은 사용 횟수",limitUseWithUser:"사용자당 사용 횟수",validity:"유효 기간",actions:"작업"},validity:{expired:"{{days}}일 전 만료됨",notStarted:"{{days}}일 후 시작",remaining:"{{days}}일 남음",startTime:"시작 시간",endTime:"종료 시간",unlimited:"무제한",noLimit:"제한 없음"},actions:{edit:"편집",delete:"삭제",deleteConfirm:{title:"삭제 확인",description:"이 작업은 이 쿠폰을 영구적으로 삭제하며 취소할 수 없습니다. 계속하시겠습니까?",confirmText:"삭제"}},toolbar:{search:"쿠폰 검색...",type:"유형",reset:"초기화",types:{1:"고정 금액",2:"비율"}}},form:{add:"쿠폰 추가",edit:"쿠폰 편집",name:{label:"쿠폰 이름",placeholder:"쿠폰 이름 입력",required:"쿠폰 이름을 입력해주세요"},type:{label:"쿠폰 유형 및 값",placeholder:"쿠폰 유형 선택"},value:{placeholder:"값 입력"},validity:{label:"유효 기간",to:"부터",endTimeError:"종료 시간은 시작 시간보다 늦어야 합니다"},limitUse:{label:"최대 사용 횟수",placeholder:"최대 사용 횟수 설정, 무제한은 비워두기",description:"이 쿠폰의 총 사용 가능 횟수를 설정합니다. 무제한은 비워두세요"},limitUseWithUser:{label:"사용자당 사용 횟수",placeholder:"사용자당 사용 횟수 설정, 무제한은 비워두기",description:"각 사용자가 이 쿠폰을 사용할 수 있는 횟수를 제한합니다. 무제한은 비워두세요"},limitPeriod:{label:"구독 기간",placeholder:"특정 구독 기간으로 제한, 제한 없음은 비워두기",description:"이 쿠폰을 사용할 수 있는 구독 기간을 선택합니다. 제한이 없으면 비워두세요",empty:"일치하는 기간이 없습니다"},limitPlan:{label:"구독 플랜",placeholder:"특정 구독 플랜으로 제한, 제한 없음은 비워두기",empty:"일치하는 플랜이 없습니다"},code:{label:"사용자 지정 쿠폰 코드",placeholder:"사용자 지정 코드 입력, 자동 생성은 비워두기",description:"쿠폰 코드를 사용자 지정합니다. 자동 생성하려면 비워두세요"},generateCount:{label:"일괄 생성 수량",placeholder:"생성할 쿠폰 수량, 단일 쿠폰은 비워두기",description:"여러 쿠폰 코드를 한 번에 생성합니다. 단일 코드 생성은 비워두세요"},submit:{saving:"저장 중...",save:"저장"},error:{saveFailed:"쿠폰 저장 실패"}}},Zc={title:"권한 그룹",description:"모든 권한 그룹을 관리하며, 추가, 삭제 및 편집 작업을 수행할 수 있습니다.",columns:{id:"그룹 ID",name:"그룹 이름",usersCount:"사용자 수",serverCount:"노드 수",actions:"작업"},form:{add:"그룹 추가",edit:"그룹 편집",create:"그룹 생성",update:"업데이트",name:"그룹 이름",namePlaceholder:"그룹 이름을 입력해주세요",nameDescription:"그룹 이름은 서로 다른 사용자 그룹을 구분하는 데 사용되며, 의미 있는 이름을 사용하는 것이 좋습니다.",cancel:"취소",editDescription:"그룹 정보를 수정하면 즉시 적용됩니다.",createDescription:"새로운 권한 그룹을 생성하여 서로 다른 사용자에게 다른 권한을 할당합니다."},toolbar:{searchPlaceholder:"그룹 검색...",reset:"초기화"},messages:{deleteConfirm:"삭제 확인",deleteDescription:"이 작업은 이 권한 그룹을 영구적으로 삭제하며 복구할 수 없습니다. 계속하시겠습니까?",deleteButton:"삭제",createSuccess:"생성 완료",updateSuccess:"업데이트 완료",nameValidation:{min:"그룹 이름은 최소 2자 이상이어야 합니다",max:"그룹 이름은 50자를 초과할 수 없습니다",pattern:"그룹 이름은 문자, 숫자, 한자, 밑줄 및 하이픈만 포함할 수 있습니다"}}},Xc={title:"지식 베이스",description:"여기에서 지식 베이스를 구성할 수 있으며, 추가, 삭제 및 편집 작업을 수행할 수 있습니다.",columns:{id:"ID",status:"상태",title:"제목",category:"카테고리",actions:"작업"},form:{add:"지식 추가",edit:"지식 편집",title:"제목",titlePlaceholder:"지식 제목을 입력해주세요",category:"카테고리",categoryPlaceholder:"카테고리를 입력하면 자동으로 분류됩니다",language:"언어",languagePlaceholder:"언어를 선택해주세요",content:"내용",show:"표시",cancel:"취소",submit:"제출"},languages:{"en-US":"English","ja-JP":"日本語","ko-KR":"한국어","vi-VN":"Tiếng Việt","zh-CN":"简体中文","zh-TW":"繁體中文"},messages:{deleteConfirm:"삭제 확인",deleteDescription:"이 작업은 이 지식 베이스 기록을 영구적으로 삭제하며 복구할 수 없습니다. 계속하시겠습니까?",deleteButton:"삭제",operationSuccess:"작업 성공"},toolbar:{searchPlaceholder:"지식 검색...",reset:"초기화",sortModeHint:"지식 항목을 드래그하여 정렬하고, 완료 후 저장을 클릭하세요",editSort:"정렬 편집",saveSort:"정렬 저장"}},ed={en:{common:Qo,dashboard:Zo,search:Xo,nav:ec,sidebar:sc,server:tc,subscribe:ac,order:nc,settings:rc,traffic:lc,ticket:ic,user:oc,route:cc,payment:dc,notice:mc,theme:uc,coupon:hc,group:pc,knowledge:xc},zh:{common:fc,dashboard:gc,search:jc,nav:bc,sidebar:vc,server:yc,subscribe:_c,order:Nc,settings:wc,traffic:Cc,ticket:Sc,user:kc,route:Pc,payment:Tc,notice:Dc,theme:Rc,coupon:Ic,group:Ec,knowledge:Mc},ko:{common:Lc,dashboard:Oc,search:Vc,nav:Ac,sidebar:Fc,server:zc,subscribe:Uc,order:$c,settings:Hc,traffic:Gc,ticket:qc,user:Kc,route:Bc,payment:Wc,notice:Yc,theme:Jc,coupon:Qc,group:Zc,knowledge:Xc}};pl.use(xl).use(fl).init({resources:ed,fallbackLng:"en",supportedLngs:["en","zh","ko"],ns:["common","dashboard","search","nav","sidebar","server","subscribe","order","settings","traffic","ticket","user","route","payment","notice","theme","coupon","group","knowledge"],defaultNS:"common",fallbackNS:"common",detection:{order:["localStorage","navigator"],caches:["localStorage"]},interpolation:{escapeValue:!1},react:{useSuspense:!1}});const sd=new gl;jl.createRoot(document.getElementById("root")).render(e.jsx(bl.StrictMode,{children:e.jsx(vl,{client:sd,children:e.jsx(yl,{store:Xn,children:e.jsxs(Po,{defaultTheme:"light",storageKey:"vite-ui-theme",children:[e.jsx(_l,{router:Uo}),e.jsx(Nl,{richColors:!0,position:"top-right"})]})})})}));const Ge=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",s),...n}));Ge.displayName="Card";const ss=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",s),...n}));ss.displayName="CardHeader";const vs=m.forwardRef(({className:s,...n},a)=>e.jsx("h3",{ref:a,className:y("font-semibold leading-none tracking-tight",s),...n}));vs.displayName="CardTitle";const tt=m.forwardRef(({className:s,...n},a)=>e.jsx("p",{ref:a,className:y("text-sm text-muted-foreground",s),...n}));tt.displayName="CardDescription";const ts=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("p-6 pt-0",s),...n}));ts.displayName="CardContent";const td=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex items-center p-6 pt-0",s),...n}));td.displayName="CardFooter";const ad=Ts("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Nt=m.forwardRef(({className:s,...n},a)=>e.jsx(qa,{ref:a,className:y(ad(),s),...n}));Nt.displayName=qa.displayName;const he=wl,er=m.createContext({}),j=({...s})=>e.jsx(er.Provider,{value:{name:s.name},children:e.jsx(Cl,{...s})}),It=()=>{const s=m.useContext(er),n=m.useContext(sr),{getFieldState:a,formState:l}=Sl(),r=a(s.name,l);if(!s)throw new Error("useFormField should be used within ");const{id:c}=n;return{id:c,name:s.name,formItemId:`${c}-form-item`,formDescriptionId:`${c}-form-item-description`,formMessageId:`${c}-form-item-message`,...r}},sr=m.createContext({}),g=m.forwardRef(({className:s,...n},a)=>{const l=m.useId();return e.jsx(sr.Provider,{value:{id:l},children:e.jsx("div",{ref:a,className:y("space-y-2",s),...n})})});g.displayName="FormItem";const b=m.forwardRef(({className:s,...n},a)=>{const{error:l,formItemId:r}=It();return e.jsx(Nt,{ref:a,className:y(l&&"text-destructive",s),htmlFor:r,...n})});b.displayName="FormLabel";const _=m.forwardRef(({...s},n)=>{const{error:a,formItemId:l,formDescriptionId:r,formMessageId:c}=It();return e.jsx(Xt,{ref:n,id:l,"aria-describedby":a?`${r} ${c}`:`${r}`,"aria-invalid":!!a,...s})});_.displayName="FormControl";const L=m.forwardRef(({className:s,...n},a)=>{const{formDescriptionId:l}=It();return e.jsx("p",{ref:a,id:l,className:y("text-[0.8rem] text-muted-foreground",s),...n})});L.displayName="FormDescription";const D=m.forwardRef(({className:s,children:n,...a},l)=>{const{error:r,formMessageId:c}=It(),o=r?String(r?.message):n;return o?e.jsx("p",{ref:l,id:c,className:y("text-[0.8rem] font-medium text-destructive",s),...a,children:o}):null});D.displayName="FormMessage";const T=m.forwardRef(({className:s,type:n,...a},l)=>e.jsx("input",{type:n,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:l,...a}));T.displayName="Input";const tr=m.forwardRef(({className:s,...n},a)=>{const[l,r]=m.useState(!1);return e.jsxs("div",{className:"relative rounded-md",children:[e.jsx("input",{type:l?"text":"password",className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}),e.jsx(R,{type:"button",size:"icon",variant:"ghost",className:"absolute right-1 top-1/2 h-6 w-6 -translate-y-1/2 rounded-md text-muted-foreground",onClick:()=>r(c=>!c),children:l?e.jsx(kl,{size:18}):e.jsx(Pl,{size:18})})]})});tr.displayName="PasswordInput";const nd=s=>V({url:"/passport/auth/login",method:"post",data:s}),Yt=s=>s;function me(s=void 0,n="YYYY-MM-DD HH:mm:ss"){return s==null?"":(Math.floor(s).toString().length===10&&(s=s*1e3),Dl(s).format(n))}function rd(s=void 0,n="YYYY-MM-DD"){return me(s,n)}function zs(s){const n=typeof s=="string"?parseFloat(s):s;return isNaN(n)?"0.00":n.toFixed(2)}function ks(s,n=!0){if(s==null)return n?"¥0.00":"0.00";const a=typeof s=="string"?parseFloat(s):s;if(isNaN(a))return n?"¥0.00":"0.00";const r=(a/100).toFixed(2).replace(/\.?0+$/,c=>c.includes(".")?".00":c);return n?`¥${r}`:r}function wt(s){navigator.clipboard?navigator.clipboard.writeText(s).then(()=>{$.success(Yt("复制成功"))}).catch(n=>{console.error("复制到剪贴板时出错:",n),Ma(s)}):Ma(s)}function Ma(s){const n=document.createElement("button"),a=new Tl(n,{text:()=>s});a.on("success",()=>{$.success(Yt("复制成功")),a.destroy()}),a.on("error",()=>{$.error(Yt("复制失败")),a.destroy()}),n.click()}function Ze(s){const n=s/1024,a=n/1024,l=a/1024,r=l/1024;return r>=1?zs(r)+" TB":l>=1?zs(l)+" GB":a>=1?zs(a)+" MB":zs(n)+" KB"}const ld="access_token";function id(s){Rt.set(ld,s)}const od=p.object({email:p.string().min(1,{message:"请输入邮箱地址"}).email({message:"邮箱地址格式不正确"}),password:p.string().min(1,{message:"请输入密码"}).min(7,{message:"密码长度至少为7个字符"})});function cd({className:s,onForgotPassword:n,...a}){const l=os(),r=Ka(),c=ce({resolver:ue(od),defaultValues:{email:"",password:""}});async function o(u){nd(u).then(({data:h})=>{id(h.auth_data),r(Bo(h.auth_data)),r(Xs()).unwrap(),l("/")})}return e.jsx("div",{className:y("grid gap-6",s),...a,children:e.jsx(he,{...c,children:e.jsx("form",{onSubmit:c.handleSubmit(o),children:e.jsxs("div",{className:"grid gap-2",children:[e.jsx(j,{control:c.control,name:"email",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(b,{children:"邮箱地址"}),e.jsx(_,{children:e.jsx(T,{placeholder:"name@example.com",...u})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"password",render:({field:u})=>e.jsxs(g,{className:"space-y-1",children:[e.jsx(b,{children:"密码"}),e.jsx(_,{children:e.jsx(tr,{placeholder:"请输入密码",...u})}),e.jsx(D,{})]})}),e.jsx(R,{className:"mt-2",loading:c.formState.isSubmitting,children:"登录"}),e.jsx(R,{variant:"link",type:"button",className:"mt-1 text-sm text-muted-foreground hover:text-primary",onClick:n,children:"忘记密码?"})]})})})})}const ge=Ba,Le=Wa,dd=Ya,dt=ta,ar=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n}));ar.displayName=St.displayName;const pe=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(dd,{children:[e.jsx(ar,{}),e.jsxs(kt,{ref:l,className:y("max-h-[95%] overflow-auto fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...a,children:[n,e.jsxs(ta,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[e.jsx(Ve,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));pe.displayName=kt.displayName;const be=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",s),...n});be.displayName="DialogHeader";const Oe=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Oe.displayName="DialogFooter";const je=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",s),...n}));je.displayName=Pt.displayName;const Te=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Te.displayName=Tt.displayName;const $s=Ts("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),J=m.forwardRef(({className:s,variant:n,size:a,asChild:l=!1,...r},c)=>{const o=l?Xt:"button";return e.jsx(o,{className:y($s({variant:n,size:a,className:s})),ref:c,...r})});J.displayName="Button";function md(){const[s,n]=m.useState(!1),a="php artisan reset:password 管理员邮箱";return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"container grid h-svh flex-col items-center justify-center bg-primary-foreground lg:max-w-none lg:px-0",children:e.jsxs("div",{className:"mx-auto flex w-full flex-col justify-center space-y-2 sm:w-[480px] lg:p-8",children:[e.jsx("div",{className:"mb-4 flex items-center justify-center",children:e.jsx("h1",{className:"text-3xl font-medium",children:window?.settings?.title})}),e.jsxs(Ge,{className:"p-6",children:[e.jsxs("div",{className:"flex flex-col space-y-2 text-left",children:[e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:"登录"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"请输入您的邮箱和密码登录系统"})]}),e.jsx(cd,{onForgotPassword:()=>n(!0)})]})]})}),e.jsx(ge,{open:s,onOpenChange:n,children:e.jsx(pe,{children:e.jsxs(be,{children:[e.jsx(je,{children:"忘记密码"}),e.jsx(Te,{children:"在站点目录下执行以下命令找回密码"}),e.jsx("div",{className:"mt-2",children:e.jsxs("div",{className:"relative",children:[e.jsx("pre",{className:"rounded-md bg-secondary p-4 pr-12",children:a}),e.jsx(J,{variant:"ghost",size:"icon",className:"absolute right-2 top-2 h-8 w-8 hover:bg-secondary-foreground/10",onClick:()=>wt(a),children:e.jsx(Rl,{className:"h-4 w-4"})})]})})]})})})]})}const ud=Object.freeze(Object.defineProperty({__proto__:null,default:md},Symbol.toStringTag,{value:"Module"})),we=m.forwardRef(({className:s,fadedBelow:n=!1,fixedHeight:a=!1,...l},r)=>e.jsx("div",{ref:r,className:y("relative flex h-full w-full flex-col",n&&"after:pointer-events-none after:absolute after:bottom-0 after:left-0 after:hidden after:h-32 after:w-full after:bg-[linear-gradient(180deg,_transparent_10%,_hsl(var(--background))_70%)] after:md:block",a&&"md:h-svh",s),...l}));we.displayName="Layout";const Ce=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{ref:a,className:y("flex h-[var(--header-height)] flex-none items-center gap-4 bg-background p-4 md:px-8",s),...n}));Ce.displayName="LayoutHeader";const ke=m.forwardRef(({className:s,fixedHeight:n,...a},l)=>e.jsx("div",{ref:l,className:y("flex-1 overflow-hidden px-4 py-6 md:px-8",n&&"h-[calc(100%-var(--header-height))]",s),...a}));ke.displayName="LayoutBody";const nr=Il,rr=El,lr=Ml,ys=Vl,_s=Al,hd=Fl,pd=m.forwardRef(({className:s,inset:n,children:a,...l},r)=>e.jsxs(Ja,{ref:r,className:y("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",n&&"pl-8",s),...l,children:[a,e.jsx(aa,{className:"ml-auto h-4 w-4"})]}));pd.displayName=Ja.displayName;const xd=m.forwardRef(({className:s,...n},a)=>e.jsx(Qa,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...n}));xd.displayName=Qa.displayName;const is=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(Ll,{children:e.jsx(Za,{ref:l,sideOffset:n,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a})}));is.displayName=Za.displayName;const xe=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(Xa,{ref:l,className:y("relative flex cursor-default cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n&&"pl-8",s),...a}));xe.displayName=Xa.displayName;const fd=m.forwardRef(({className:s,children:n,checked:a,...l},r)=>e.jsxs(en,{ref:r,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:a,...l,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),n]}));fd.displayName=en.displayName;const gd=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(tn,{ref:l,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(sn,{children:e.jsx(Ol,{className:"h-4 w-4 fill-current"})})}),n]}));gd.displayName=tn.displayName;const oa=m.forwardRef(({className:s,inset:n,...a},l)=>e.jsx(an,{ref:l,className:y("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",s),...a}));oa.displayName=an.displayName;const at=m.forwardRef(({className:s,...n},a)=>e.jsx(nn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));at.displayName=nn.displayName;const Jt=({className:s,...n})=>e.jsx("span",{className:y("ml-auto text-xs tracking-widest opacity-60",s),...n});Jt.displayName="DropdownMenuShortcut";const oe=zl,re=Ul,le=$l,te=m.forwardRef(({className:s,sideOffset:n=4,...a},l)=>e.jsx(rn,{ref:l,sideOffset:n,className:y("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...a}));te.displayName=rn.displayName;function Et(){const{pathname:s}=ea();return{checkActiveNav:a=>{if(a==="/"&&s==="/")return!0;const l=a.replace(/^\//,""),r=s.replace(/^\//,"");return l?r.startsWith(l):!1}}}function ir({key:s,defaultValue:n}){const[a,l]=m.useState(()=>{const r=localStorage.getItem(s);return r!==null?JSON.parse(r):n});return m.useEffect(()=>{localStorage.setItem(s,JSON.stringify(a))},[a,s]),[a,l]}function jd(){const[s,n]=ir({key:"collapsed-sidebar-items",defaultValue:[]}),a=r=>!s.includes(r);return{isExpanded:a,toggleItem:r=>{a(r)?n([...s,r]):n(s.filter(c=>c!==r))}}}function bd({links:s,isCollapsed:n,className:a,closeNav:l}){const{t:r}=M(),c=({sub:o,...u})=>{const h=`${r(u.title)}-${u.href}`;return n&&o?m.createElement(_d,{...u,sub:o,key:h,closeNav:l}):n?m.createElement(yd,{...u,key:h,closeNav:l}):o?m.createElement(vd,{...u,sub:o,key:h,closeNav:l}):m.createElement(or,{...u,key:h,closeNav:l})};return e.jsx("div",{"data-collapsed":n,className:y("group border-b bg-background py-2 transition-[max-height,padding] duration-500 data-[collapsed=true]:py-2 md:border-none",a),children:e.jsx(oe,{delayDuration:0,children:e.jsx("nav",{className:"grid gap-1 group-[[data-collapsed=true]]:justify-center group-[[data-collapsed=true]]:px-2",children:s.map(c)})})})}function or({title:s,icon:n,label:a,href:l,closeNav:r,subLink:c=!1}){const{checkActiveNav:o}=Et(),{t:u}=M();return e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:o(l)?"secondary":"ghost",size:"sm"}),"h-12 justify-start text-wrap rounded-none px-6",c&&"h-10 w-full border-l border-l-slate-500 px-2"),"aria-current":o(l)?"page":void 0,children:[e.jsx("div",{className:"mr-2",children:n}),u(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:u(a)})]})}function vd({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Et(),{isExpanded:o,toggleItem:u}=jd(),{t:h}=M(),i=!!l?.find(P=>c(P.href)),d=h(s),f=o(d)||i;return e.jsxs(nr,{open:f,onOpenChange:()=>u(d),children:[e.jsxs(rr,{className:y(Hs({variant:i?"secondary":"ghost",size:"sm"}),"group h-12 w-full justify-start rounded-none px-6"),children:[e.jsx("div",{className:"mr-2",children:n}),h(s),a&&e.jsx("div",{className:"ml-2 rounded-lg bg-primary px-1 text-[0.625rem] text-primary-foreground",children:h(a)}),e.jsx("span",{className:y('ml-auto transition-all group-data-[state="open"]:-rotate-180'),children:e.jsx(ln,{stroke:1})})]}),e.jsx(lr,{className:"collapsibleDropdown",asChild:!0,children:e.jsx("ul",{children:l.map(P=>e.jsx("li",{className:"my-1 ml-8",children:e.jsx(or,{...P,subLink:!0,closeNav:r})},h(P.title)))})})]})}function yd({title:s,icon:n,label:a,href:l,closeNav:r}){const{checkActiveNav:c}=Et(),{t:o}=M();return e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsxs(Rs,{to:l,onClick:r,className:y(Hs({variant:c(l)?"secondary":"ghost",size:"icon"}),"h-12 w-12"),children:[n,e.jsx("span",{className:"sr-only",children:o(s)})]})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s),a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)})]})]})}function _d({title:s,icon:n,label:a,sub:l,closeNav:r}){const{checkActiveNav:c}=Et(),{t:o}=M(),u=!!l?.find(h=>c(h.href));return e.jsxs(ys,{children:[e.jsxs(re,{delayDuration:0,children:[e.jsx(le,{asChild:!0,children:e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:u?"secondary":"ghost",size:"icon",className:"h-12 w-12",children:n})})}),e.jsxs(te,{side:"right",className:"flex items-center gap-4",children:[o(s)," ",a&&e.jsx("span",{className:"ml-auto text-muted-foreground",children:o(a)}),e.jsx(ln,{size:18,className:"-rotate-90 text-muted-foreground"})]})]}),e.jsxs(is,{side:"right",align:"start",sideOffset:4,children:[e.jsxs(oa,{children:[o(s)," ",a?`(${o(a)})`:""]}),e.jsx(at,{}),l.map(({title:h,icon:i,label:d,href:f})=>e.jsx(xe,{asChild:!0,children:e.jsxs(Rs,{to:f,onClick:r,className:`${c(f)?"bg-secondary":""}`,children:[i," ",e.jsx("span",{className:"ml-2 max-w-52 text-wrap",children:o(h)}),d&&e.jsx("span",{className:"ml-auto text-xs",children:o(d)})]})},`${o(h)}-${f}`))]})]})}const cr=[{title:"nav:dashboard",label:"",href:"/",icon:e.jsx(Hl,{size:18})},{title:"nav:systemManagement",label:"",href:"",icon:e.jsx(Gl,{size:18}),sub:[{title:"nav:systemConfig",label:"",href:"/config/system",icon:e.jsx(on,{size:18})},{title:"nav:themeConfig",label:"",href:"/config/theme",icon:e.jsx(ql,{size:18})},{title:"nav:noticeManagement",label:"",href:"/config/notice",icon:e.jsx(Kl,{size:18})},{title:"nav:paymentConfig",label:"",href:"/config/payment",icon:e.jsx(wa,{size:18})},{title:"nav:knowledgeManagement",label:"",href:"/config/knowledge",icon:e.jsx(Bl,{size:18})}]},{title:"nav:nodeManagement",label:"",href:"",icon:e.jsx(cn,{size:18}),sub:[{title:"nav:nodeManagement",label:"",href:"/server/manage",icon:e.jsx(Wl,{size:18})},{title:"nav:permissionGroupManagement",label:"",href:"/server/group",icon:e.jsx(dn,{size:18})},{title:"nav:routeManagement",label:"",href:"/server/route",icon:e.jsx(Yl,{size:18})}]},{title:"nav:subscriptionManagement",label:"",href:"",icon:e.jsx(Jl,{size:18}),sub:[{title:"nav:planManagement",label:"",href:"/finance/plan",icon:e.jsx(Ql,{size:18})},{title:"nav:orderManagement",label:"",href:"/finance/order",icon:e.jsx(wa,{size:18})},{title:"nav:couponManagement",label:"",href:"/finance/coupon",icon:e.jsx(Zl,{size:18})}]},{title:"nav:userManagement",label:"",href:"",icon:e.jsx(Xl,{size:18}),sub:[{title:"nav:userManagement",label:"",href:"/user/manage",icon:e.jsx(ei,{size:18})},{title:"nav:ticketManagement",label:"",href:"/user/ticket",icon:e.jsx(mn,{size:18})}]}];function Nd({className:s,isCollapsed:n,setIsCollapsed:a}){const[l,r]=m.useState(!1),{t:c}=M();return m.useEffect(()=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")},[l]),e.jsxs("aside",{className:y(`fixed left-0 right-0 top-0 z-50 w-full border-r-2 border-r-muted transition-[width] md:bottom-0 md:right-auto md:h-svh ${n?"md:w-14":"md:w-64"}`,s),children:[e.jsx("div",{onClick:()=>r(!1),className:`absolute inset-0 transition-[opacity] delay-100 duration-700 ${l?"h-svh opacity-50":"h-0 opacity-0"} w-full bg-black md:hidden`}),e.jsxs(we,{children:[e.jsxs(Ce,{className:"sticky top-0 justify-between px-4 py-3 shadow md:px-4",children:[e.jsxs("div",{className:`flex items-center ${n?"":"gap-2"}`,children:[e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 256 256",className:`transition-all ${n?"h-6 w-6":"h-8 w-8"}`,children:[e.jsx("rect",{width:"256",height:"256",fill:"none"}),e.jsx("line",{x1:"208",y1:"128",x2:"128",y2:"208",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("line",{x1:"192",y1:"40",x2:"40",y2:"192",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"16"}),e.jsx("span",{className:"sr-only",children:"Website Name"})]}),e.jsx("div",{className:`flex flex-col justify-end truncate ${n?"invisible w-0":"visible w-auto"}`,children:e.jsx("span",{className:"font-medium",children:window?.settings?.title})})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":c("common:toggleNavigation"),"aria-controls":"sidebar-menu","aria-expanded":l,onClick:()=>r(o=>!o),children:l?e.jsx(si,{}):e.jsx(ti,{})})]}),e.jsx(bd,{id:"sidebar-menu",className:`h-full flex-1 overflow-auto ${l?"max-h-screen":"max-h-0 py-0 md:max-h-screen md:py-2"}`,closeNav:()=>r(!1),isCollapsed:n,links:cr}),e.jsx("div",{className:y("px-4 py-3 text-xs text-muted-foreground/70 border-t border-border/50 bg-muted/20","transition-all duration-200 ease-in-out",n?"text-center":"text-left"),children:e.jsxs("div",{className:y("flex items-center gap-1.5",n?"justify-center":"justify-start"),children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-green-500/70"}),e.jsxs("span",{className:"tracking-wide",children:["v",window?.settings?.version]})]})}),e.jsx(R,{onClick:()=>a(o=>!o),size:"icon",variant:"outline",className:"absolute -right-5 top-1/2 hidden rounded-full md:inline-flex","aria-label":c("common:toggleSidebar"),children:e.jsx(ai,{stroke:1.5,className:`h-5 w-5 ${n?"rotate-180":""}`})})]})]})}function wd(){const[s,n]=ir({key:"collapsed-sidebar",defaultValue:!1});return m.useEffect(()=>{const a=()=>{n(window.innerWidth<768?!1:s)};return a(),window.addEventListener("resize",a),()=>{window.removeEventListener("resize",a)}},[s,n]),[s,n]}function Cd(){const[s,n]=wd();return e.jsxs("div",{className:"relative h-full overflow-hidden bg-background",children:[e.jsx(Nd,{isCollapsed:s,setIsCollapsed:n}),e.jsx("main",{id:"content",className:`overflow-x-hidden pt-16 transition-[margin] md:overflow-y-hidden md:pt-0 ${s?"md:ml-14":"md:ml-64"} h-full`,children:e.jsx(sa,{})})]})}const Sd=Object.freeze(Object.defineProperty({__proto__:null,default:Cd},Symbol.toStringTag,{value:"Module"})),Ns=m.forwardRef(({className:s,...n},a)=>e.jsx(Se,{ref:a,className:y("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",s),...n}));Ns.displayName=Se.displayName;const kd=({children:s,...n})=>e.jsx(ge,{...n,children:e.jsx(pe,{className:"overflow-hidden p-0",children:e.jsx(Ns,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:s})})}),Es=m.forwardRef(({className:s,...n},a)=>e.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[e.jsx(ni,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),e.jsx(Se.Input,{ref:a,className:y("flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",s),...n})]}));Es.displayName=Se.Input.displayName;const ws=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.List,{ref:a,className:y("max-h-[300px] overflow-y-auto overflow-x-hidden",s),...n}));ws.displayName=Se.List.displayName;const Ms=m.forwardRef((s,n)=>e.jsx(Se.Empty,{ref:n,className:"py-6 text-center text-sm",...s}));Ms.displayName=Se.Empty.displayName;const Me=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Group,{ref:a,className:y("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",s),...n}));Me.displayName=Se.Group.displayName;const Gs=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Separator,{ref:a,className:y("-mx-1 h-px bg-border",s),...n}));Gs.displayName=Se.Separator.displayName;const Ne=m.forwardRef(({className:s,...n},a)=>e.jsx(Se.Item,{ref:a,className:y("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...n}));Ne.displayName=Se.Item.displayName;function Pd(){const s=[];for(const n of cr)if(n.href&&s.push(n),n.sub)for(const a of n.sub)s.push({...a,parent:n.title});return s}function De(){const[s,n]=m.useState(!1),a=os(),l=Pd(),{t:r}=M("search"),{t:c}=M("nav");m.useEffect(()=>{const u=h=>{h.key==="k"&&(h.metaKey||h.ctrlKey)&&(h.preventDefault(),n(i=>!i))};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[]);const o=m.useCallback(u=>{n(!1),a(u)},[a]);return e.jsxs(e.Fragment,{children:[e.jsxs(J,{variant:"outline",className:"relative h-9 w-9 p-0 xl:h-10 xl:w-60 xl:justify-start xl:px-3 xl:py-2",onClick:()=>n(!0),children:[e.jsx(ri,{className:"h-4 w-4 xl:mr-2"}),e.jsx("span",{className:"hidden xl:inline-flex",children:r("placeholder")}),e.jsx("span",{className:"sr-only",children:r("shortcut.label")}),e.jsx("kbd",{className:"pointer-events-none absolute right-1.5 top-2 hidden h-6 select-none items-center gap-1 rounded border bg-muted px-1.5 font-mono text-[10px] font-medium opacity-100 xl:flex",children:r("shortcut.key")})]}),e.jsxs(kd,{open:s,onOpenChange:n,children:[e.jsx(Es,{placeholder:r("placeholder")}),e.jsxs(ws,{children:[e.jsx(Ms,{children:r("noResults")}),e.jsx(Me,{heading:r("title"),children:l.map(u=>e.jsxs(Ne,{value:`${u.parent?u.parent+" ":""}${u.title}`,onSelect:()=>o(u.href),children:[e.jsx("div",{className:"mr-2",children:u.icon}),e.jsx("span",{children:c(u.title)}),u.parent&&e.jsx("span",{className:"ml-2 text-xs text-muted-foreground",children:c(u.parent)})]},u.href))})]})]})]})}const At=[{code:"en",name:"English",flag:li,shortName:"EN"},{code:"zh",name:"中文",flag:ii,shortName:"CN"},{code:"ko",name:"조선말",flag:oi,shortName:"KP"}];function Td(){const{i18n:s}=M(),n=r=>{s.changeLanguage(r)},a=At.find(r=>r.code===s.language)||At[0],l=a.flag;return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 px-2 gap-1",children:[e.jsx(l,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:"text-sm font-medium",children:a.shortName})]})}),e.jsx(is,{align:"end",className:"w-[120px]",children:At.map(r=>{const c=r.flag,o=r.code===s.language;return e.jsxs(xe,{onClick:()=>n(r.code),className:y("flex items-center gap-2 px-2 py-1.5 cursor-pointer",o&&"bg-accent"),children:[e.jsx(c,{className:"h-4 w-5 rounded-sm shadow-sm"}),e.jsx("span",{className:y("text-sm",o&&"font-medium"),children:r.name})]},r.code)})})]})}function Re(){const{theme:s,setTheme:n}=To();return m.useEffect(()=>{const a=s==="dark"?"#020817":"#fff",l=document.querySelector("meta[name='theme-color']");l&&l.setAttribute("content",a)},[s]),e.jsxs(e.Fragment,{children:[e.jsx(R,{size:"icon",variant:"ghost",className:"rounded-full",onClick:()=>n(s==="light"?"dark":"light"),children:s==="light"?e.jsx(ci,{size:20}):e.jsx(di,{size:20})}),e.jsx(Td,{})]})}const dr=m.forwardRef(({className:s,...n},a)=>e.jsx(un,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",s),...n}));dr.displayName=un.displayName;const mr=m.forwardRef(({className:s,...n},a)=>e.jsx(hn,{ref:a,className:y("aspect-square h-full w-full",s),...n}));mr.displayName=hn.displayName;const ur=m.forwardRef(({className:s,...n},a)=>e.jsx(pn,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",s),...n}));ur.displayName=pn.displayName;function Ie(){const s=os(),n=Ka(),a=mi(Yo),{t:l}=M(["common"]),r=()=>{Jn(),n(Wo()),s("/sign-in")},c=a?.email?.split("@")[0]||l("common:user"),o=c.substring(0,2).toUpperCase();return e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"relative h-8 w-8 rounded-full",children:e.jsxs(dr,{className:"h-8 w-8",children:[e.jsx(mr,{src:a?.avatar_url,alt:c}),e.jsx(ur,{children:o})]})})}),e.jsxs(is,{className:"w-56",align:"end",forceMount:!0,children:[e.jsx(oa,{className:"font-normal",children:e.jsxs("div",{className:"flex flex-col space-y-1",children:[e.jsx("p",{className:"text-sm font-medium leading-none",children:c}),e.jsx("p",{className:"text-xs leading-none text-muted-foreground",children:a?.email||l("common:defaultEmail")})]})}),e.jsx(at,{}),e.jsx(xe,{asChild:!0,children:e.jsxs(Rs,{to:"/config/system",children:[l("common:settings"),e.jsx(Jt,{children:"⌘S"})]})}),e.jsx(at,{}),e.jsxs(xe,{onClick:r,children:[l("common:logout"),e.jsx(Jt,{children:"⇧⌘Q"})]})]})]})}const Qe=window?.settings?.secure_path,hr=5*60*1e3,Qt=new Map,Dd=s=>{const n=Qt.get(s);return n?Date.now()-n.timestamp>hr?(Qt.delete(s),null):n.data:null},Rd=(s,n)=>{Qt.set(s,{data:n,timestamp:Date.now()})},Id=async(s,n=hr)=>{const a=Dd(s);if(a)return a;const l=await V.get(s);return Rd(s,l),l},Ed={getList:()=>Id(`${Qe}/notice/fetch`),save:s=>V.post(`${Qe}/notice/save`,s),drop:s=>V.post(`${Qe}/notice/drop`,{id:s}),updateStatus:s=>V.post(`${Qe}/notice/show`,{id:s}),sort:s=>V.post(`${Qe}/notice/sort`,{ids:s})},La={getSystemStatus:()=>V.get(`${Qe}/system/getSystemStatus`),getQueueStats:()=>V.get(`${Qe}/system/getQueueStats`),getQueueWorkload:()=>V.get(`${Qe}/system/getQueueWorkload`),getQueueMasters:()=>V.get(`${Qe}/system/getQueueMasters`),getSystemLog:s=>V.get(`${Qe}/system/getSystemLog`,{params:s})},F=window?.settings?.secure_path,Md=s=>V.get(F+"/stat/getOrder",{params:s}),Ld=()=>V.get(F+"/stat/getStats"),Oa=s=>V.get(F+"/stat/getTrafficRank",{params:s}),Od=()=>V.get(F+"/theme/getThemes"),Vd=s=>V.post(F+"/theme/getThemeConfig",{name:s}),Ad=(s,n)=>V.post(F+"/theme/saveThemeConfig",{name:s,config:n}),Fd=s=>{const n=new FormData;return n.append("file",s),V.post(F+"/theme/upload",n,{headers:{"Content-Type":"multipart/form-data"}})},zd=s=>V.post(F+"/theme/delete",{name:s}),Ud=s=>V.post(F+"/config/save",s),pr=()=>V.get(F+"/server/manage/getNodes"),$d=s=>V.post(F+"/server/manage/save",s),Hd=s=>V.post(F+"/server/manage/drop",s),Gd=s=>V.post(F+"/server/manage/copy",s),qd=s=>V.post(F+"/server/manage/update",s),Kd=s=>V.post(F+"/server/manage/sort",s),Mt=()=>V.get(F+"/server/group/fetch"),Bd=s=>V.post(F+"/server/group/save",s),Wd=s=>V.post(F+"/server/group/drop",s),xr=()=>V.get(F+"/server/route/fetch"),Yd=s=>V.post(F+"/server/route/save",s),Jd=s=>V.post(F+"/server/route/drop",s),Qd=()=>V.get(F+"/payment/fetch"),Zd=()=>V.get(F+"/payment/getPaymentMethods"),Xd=s=>V.post(F+"/payment/getPaymentForm",s),em=s=>V.post(F+"/payment/save",s),sm=s=>V.post(F+"/payment/drop",s),tm=s=>V.post(F+"/payment/show",s),am=s=>V.post(F+"/payment/sort",s),nm=()=>V.get(F+"/notice/fetch"),rm=s=>V.post(F+"/notice/save",s),lm=s=>V.post(F+"/notice/drop",s),im=s=>V.post(F+"/notice/show",s),om=()=>V.get(F+"/knowledge/fetch"),cm=s=>V.get(F+"/knowledge/fetch?id="+s),dm=s=>V.post(F+"/knowledge/save",s),mm=s=>V.post(F+"/knowledge/drop",s),um=s=>V.post(F+"/knowledge/show",s),hm=s=>V.post(F+"/knowledge/sort",s),Ls=()=>V.get(F+"/plan/fetch"),pm=s=>V.post(F+"/plan/save",s),Ft=s=>V.post(F+"/plan/update",s),xm=s=>V.post(F+"/plan/drop",s),fm=s=>V.post(F+"/plan/sort",{ids:s}),gm=async s=>V.post(F+"/order/fetch",s),jm=s=>V.post(F+"/order/detail",s),bm=s=>V.post(F+"/order/paid",s),vm=s=>V.post(F+"/order/cancel",s),Va=s=>V.post(F+"/order/update",s),ym=s=>V.post(F+"/order/assign",s),_m=s=>V.post(F+"/coupon/fetch",s),Nm=s=>V.post(F+"/coupon/generate",s),wm=s=>V.post(F+"/coupon/drop",s),Cm=s=>V.post(F+"/coupon/update",s),Sm=s=>V.post(F+"/user/fetch",s),km=s=>V.post(F+"/user/update",s),Pm=s=>V.post(F+"/user/resetSecret",s),Tm=s=>V.post(F+"/user/generate",s),Dm=s=>V.post(F+"/stat/getStatUser",s),Rm=s=>V.post(F+"/ticket/fetch",s),Im=s=>V.get(F+"/ticket/fetch?id= "+s),Em=s=>V.post(F+"/ticket/reply",s),fr=s=>V.post(F+"/ticket/close",{id:s}),us=(s="")=>V.get(F+"/config/fetch?key="+s),hs=s=>V.post(F+"/config/save",s),Mm=()=>V.get(F+"/config/getEmailTemplate"),Lm=()=>V.post(F+"/config/testSendMail"),Om=()=>V.post(F+"/config/setTelegramWebhook"),Vm=Ed.sort,gr=ui,ca=m.forwardRef(({className:s,...n},a)=>e.jsx(xn,{ref:a,className:y("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",s),...n}));ca.displayName=xn.displayName;const nt=m.forwardRef(({className:s,...n},a)=>e.jsx(fn,{ref:a,className:y("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",s),...n}));nt.displayName=fn.displayName;const Am=m.forwardRef(({className:s,...n},a)=>e.jsx(gn,{ref:a,className:y("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",s),...n}));Am.displayName=gn.displayName;const W=hi,xs=yi,Y=pi,K=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(jn,{ref:l,className:y("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[n,e.jsx(xi,{asChild:!0,children:e.jsx(na,{className:"h-4 w-4 opacity-50"})})]}));K.displayName=jn.displayName;const jr=m.forwardRef(({className:s,...n},a)=>e.jsx(bn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(fi,{className:"h-4 w-4"})}));jr.displayName=bn.displayName;const br=m.forwardRef(({className:s,...n},a)=>e.jsx(vn,{ref:a,className:y("flex cursor-default items-center justify-center py-1",s),...n,children:e.jsx(na,{className:"h-4 w-4"})}));br.displayName=vn.displayName;const B=m.forwardRef(({className:s,children:n,position:a="popper",...l},r)=>e.jsx(gi,{children:e.jsxs(yn,{ref:r,className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...l,children:[e.jsx(jr,{}),e.jsx(ji,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:n}),e.jsx(br,{})]})}));B.displayName=yn.displayName;const Fm=m.forwardRef(({className:s,...n},a)=>e.jsx(_n,{ref:a,className:y("px-2 py-1.5 text-sm font-semibold",s),...n}));Fm.displayName=_n.displayName;const U=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(Nn,{ref:l,className:y("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...a,children:[e.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(bi,{children:e.jsx(Ds,{className:"h-4 w-4"})})}),e.jsx(vi,{children:n})]}));U.displayName=Nn.displayName;const zm=m.forwardRef(({className:s,...n},a)=>e.jsx(wn,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",s),...n}));zm.displayName=wn.displayName;function Os({className:s,classNames:n,showOutsideDays:a=!0,...l}){return e.jsx(_i,{showOutsideDays:a,className:y("p-3",s),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y($s({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",l.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y($s({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...n},components:{IconLeft:({className:r,...c})=>e.jsx(Cn,{className:y("h-4 w-4",r),...c}),IconRight:({className:r,...c})=>e.jsx(aa,{className:y("h-4 w-4",r),...c})},...l})}Os.displayName="Calendar";const as=wi,ns=Ci,We=m.forwardRef(({className:s,align:n="center",sideOffset:a=4,...l},r)=>e.jsx(Ni,{children:e.jsx(Sn,{ref:r,align:n,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",s),...l})}));We.displayName=Sn.displayName;const fs={income:{main:"hsl(var(--primary))",gradient:{start:"hsl(var(--primary))",end:"transparent"}},commission:{main:"hsl(var(--secondary))",gradient:{start:"hsl(var(--secondary))",end:"transparent"}}},Qs=s=>(s/100).toFixed(2),Um=({active:s,payload:n,label:a})=>{const{t:l}=M();return s&&n&&n.length?e.jsxs("div",{className:"rounded-lg border bg-background p-3 shadow-sm",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:a}),n.map((r,c)=>e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("div",{className:"h-2 w-2 rounded-full",style:{backgroundColor:r.color}}),e.jsxs("span",{className:"text-muted-foreground",children:[l(r.name),":"]}),e.jsx("span",{className:"font-medium",children:r.name.includes(l("dashboard:overview.amount"))?`¥${Qs(r.value)}`:l("dashboard:overview.transactions",{count:r.value})})]},c))]}):null},$m=[{value:"7d",label:"dashboard:overview.last7Days"},{value:"30d",label:"dashboard:overview.last30Days"},{value:"90d",label:"dashboard:overview.last90Days"},{value:"180d",label:"dashboard:overview.last180Days"},{value:"365d",label:"dashboard:overview.lastYear"},{value:"custom",label:"dashboard:overview.customRange"}],Hm=(s,n)=>{const a=new Date;if(s==="custom"&&n)return{startDate:n.from,endDate:n.to};let l;switch(s){case"7d":l=$e(a,7);break;case"30d":l=$e(a,30);break;case"90d":l=$e(a,90);break;case"180d":l=$e(a,180);break;case"365d":l=$e(a,365);break;default:l=$e(a,30)}return{startDate:l,endDate:a}};function Gm(){const[s,n]=m.useState("amount"),[a,l]=m.useState("30d"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),{t:o}=M(),{startDate:u,endDate:h}=Hm(a,r),{data:i}=se({queryKey:["orderStat",{start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")}],queryFn:async()=>{const{data:d}=await Md({start_date:Ue(u,"yyyy-MM-dd"),end_date:Ue(h,"yyyy-MM-dd")});return d},refetchInterval:3e4});return e.jsxs(Ge,{children:[e.jsx(ss,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(vs,{children:o("dashboard:overview.title")}),e.jsxs(tt,{children:[i?.summary.start_date," ",o("dashboard:overview.to")," ",i?.summary.end_date]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsxs(W,{value:a,onValueChange:d=>l(d),children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:o("dashboard:overview.selectTimeRange")})}),e.jsx(B,{children:$m.map(d=>e.jsx(U,{value:d.value,children:o(d.label)},d.value))})]}),a==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!r&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:r?.from?r.to?e.jsxs(e.Fragment,{children:[Ue(r.from,"yyyy-MM-dd")," -"," ",Ue(r.to,"yyyy-MM-dd")]}):Ue(r.from,"yyyy-MM-dd"):o("dashboard:overview.selectDate")})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Os,{mode:"range",defaultMonth:r?.from,selected:{from:r?.from,to:r?.to},onSelect:d=>{d?.from&&d?.to&&c({from:d.from,to:d.to})},numberOfMonths:2})})]})]}),e.jsx(gr,{value:s,onValueChange:d=>n(d),children:e.jsxs(ca,{children:[e.jsx(nt,{value:"amount",children:o("dashboard:overview.amount")}),e.jsx(nt,{value:"count",children:o("dashboard:overview.count")})]})})]})]})}),e.jsxs(ts,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalIncome")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.paid_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.paid_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.avgOrderAmount")," ¥",Qs(i?.summary?.avg_paid_amount||0)]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:o("dashboard:overview.totalCommission")}),e.jsxs("div",{className:"text-2xl font-bold",children:["¥",Qs(i?.summary?.commission_total||0)]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:o("dashboard:overview.totalTransactions",{count:i?.summary?.commission_count||0})}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:[o("dashboard:overview.commissionRate")," ",i?.summary?.commission_rate.toFixed(2)||0,"%"]})]})]}),e.jsx("div",{className:"h-[400px] w-full",children:e.jsx(Si,{width:"100%",height:"100%",children:e.jsxs(ki,{data:i?.list||[],margin:{top:20,right:20,left:0,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"incomeGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.income.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.income.gradient.end,stopOpacity:.1})]}),e.jsxs("linearGradient",{id:"commissionGradient",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"0%",stopColor:fs.commission.gradient.start,stopOpacity:.2}),e.jsx("stop",{offset:"100%",stopColor:fs.commission.gradient.end,stopOpacity:.1})]})]}),e.jsx(Pi,{dataKey:"date",axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>Ue(new Date(d),"MM-dd",{locale:Ii})}),e.jsx(Ti,{axisLine:!1,tickLine:!1,tick:{fill:"hsl(var(--muted-foreground))",fontSize:12},tickFormatter:d=>s==="amount"?`¥${Qs(d)}`:o("dashboard:overview.transactions",{count:d})}),e.jsx(Di,{strokeDasharray:"3 3",vertical:!1,stroke:"hsl(var(--border))",opacity:.3}),e.jsx(Ri,{content:e.jsx(Um,{})}),s==="amount"?e.jsxs(e.Fragment,{children:[e.jsx(Ca,{type:"monotone",dataKey:"paid_total",name:o("dashboard:overview.orderAmount"),stroke:fs.income.main,fill:"url(#incomeGradient)",strokeWidth:2}),e.jsx(Ca,{type:"monotone",dataKey:"commission_total",name:o("dashboard:overview.commissionAmount"),stroke:fs.commission.main,fill:"url(#commissionGradient)",strokeWidth:2})]}):e.jsxs(e.Fragment,{children:[e.jsx(Sa,{dataKey:"paid_count",name:o("dashboard:overview.orderCount"),fill:fs.income.main,radius:[4,4,0,0],maxBarSize:40}),e.jsx(Sa,{dataKey:"commission_count",name:o("dashboard:overview.commissionCount"),fill:fs.commission.main,radius:[4,4,0,0],maxBarSize:40})]})]})})})]})]})}function Ee({className:s,...n}){return e.jsx("div",{className:y("animate-pulse rounded-md bg-primary/10",s),...n})}function qm(){return e.jsxs(Ge,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(Ee,{className:"h-4 w-[120px]"}),e.jsx(Ee,{className:"h-4 w-4"})]}),e.jsxs(ts,{children:[e.jsx(Ee,{className:"h-8 w-[140px] mb-2"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"h-4 w-4"}),e.jsx(Ee,{className:"h-4 w-[100px]"})]})]})]})}function Km(){return e.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:Array.from({length:8}).map((s,n)=>e.jsx(qm,{},n))})}var Q=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.CANCELLED=2]="CANCELLED",s[s.COMPLETED=3]="COMPLETED",s[s.DISCOUNTED=4]="DISCOUNTED",s))(Q||{});const Ys={0:"待支付",1:"开通中",2:"已取消",3:"已完成",4:"已折抵"},Js={0:"yellow-500",1:"blue-500",2:"red-500",3:"green-500",4:"green-500"};var He=(s=>(s[s.NEW=1]="NEW",s[s.RENEWAL=2]="RENEWAL",s[s.UPGRADE=3]="UPGRADE",s[s.RESET_FLOW=4]="RESET_FLOW",s))(He||{}),ne=(s=>(s[s.PENDING=0]="PENDING",s[s.PROCESSING=1]="PROCESSING",s[s.VALID=2]="VALID",s[s.INVALID=3]="INVALID",s))(ne||{});const ut={0:"待确认",1:"发放中",2:"有效",3:"无效"},ht={0:"yellow-500",1:"blue-500",2:"green-500",3:"red-500"};var de=(s=>(s.MONTH_PRICE="month_price",s.QUARTER_PRICE="quarter_price",s.HALF_YEAR_PRICE="half_year_price",s.YEAR_PRICE="year_price",s.TWO_YEAR_PRICE="two_year_price",s.THREE_YEAR_PRICE="three_year_price",s.ONETIME_PRICE="onetime_price",s.RESET_PRICE="reset_price",s))(de||{});const Bm={month_price:"月付",quarter_price:"季付",half_year_price:"半年付",year_price:"年付",two_year_price:"两年付",three_year_price:"三年付",onetime_price:"一次性",reset_price:"流量重置包"};var ye=(s=>(s.Shadowsocks="shadowsocks",s.Vmess="vmess",s.Trojan="trojan",s.Hysteria="hysteria",s.Vless="vless",s))(ye||{});const Ps=[{type:"shadowsocks",label:"Shadowsocks"},{type:"vmess",label:"VMess"},{type:"trojan",label:"Trojan"},{type:"hysteria",label:"Hysteria"},{type:"vless",label:"VLess"}],ls={shadowsocks:"#489851",vmess:"#CB3180",trojan:"#EBB749",hysteria:"#5684e6",vless:"#1a1a1a"};var js=(s=>(s[s.AMOUNT=1]="AMOUNT",s[s.PERCENTAGE=2]="PERCENTAGE",s))(js||{});const Wm={1:"按金额优惠",2:"按比例优惠"};var et=(s=>(s[s.OPENING=0]="OPENING",s[s.CLOSED=1]="CLOSED",s))(et||{}),Xe=(s=>(s[s.LOW=0]="LOW",s[s.MIDDLE=1]="MIDDLE",s[s.HIGH=2]="HIGH",s))(Xe||{});function gs({title:s,value:n,icon:a,trend:l,description:r,onClick:c,highlight:o,className:u}){return e.jsxs(Ge,{className:y("transition-colors",c&&"cursor-pointer hover:bg-muted/50",o&&"border-primary/50",u),onClick:c,children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsx(vs,{className:"text-sm font-medium",children:s}),a]}),e.jsxs(ts,{children:[e.jsx("div",{className:"text-2xl font-bold",children:n}),l?e.jsxs("div",{className:"flex items-center pt-1",children:[e.jsx(Ai,{className:y("h-4 w-4",l.isPositive?"text-emerald-500":"text-red-500")}),e.jsxs("span",{className:y("ml-1 text-xs",l.isPositive?"text-emerald-500":"text-red-500"),children:[l.isPositive?"+":"-",Math.abs(l.value),"%"]}),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:l.label})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:r})]})]})}function Ym({className:s}){const n=os(),{t:a}=M(),{data:l,isLoading:r}=se({queryKey:["dashboardStats"],queryFn:async()=>(await Ld()).data,refetchInterval:1e3*60*5});if(r||!l)return e.jsx(Km,{});const c=()=>{const o=new URLSearchParams;o.set("commission_status",ne.PENDING.toString()),o.set("status",Q.COMPLETED.toString()),o.set("commission_balance","gt:0"),n(`/finance/order?${o.toString()}`)};return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2 lg:grid-cols-4",s),children:[e.jsx(gs,{title:a("dashboard:stats.todayIncome"),value:ks(l.todayIncome),icon:e.jsx(Ei,{className:"h-4 w-4 text-emerald-500"}),trend:{value:l.dayIncomeGrowth,label:a("dashboard:stats.vsYesterday"),isPositive:l.dayIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.monthlyIncome"),value:ks(l.currentMonthIncome),icon:e.jsx(Mi,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.monthIncomeGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.monthIncomeGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.pendingTickets"),value:l.ticketPendingTotal,icon:e.jsx(Li,{className:y("h-4 w-4",l.ticketPendingTotal>0?"text-orange-500":"text-muted-foreground")}),description:l.ticketPendingTotal>0?a("dashboard:stats.hasPendingTickets"):a("dashboard:stats.noPendingTickets"),onClick:()=>n("/user/ticket"),highlight:l.ticketPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.pendingCommission"),value:l.commissionPendingTotal,icon:e.jsx(Oi,{className:y("h-4 w-4",l.commissionPendingTotal>0?"text-blue-500":"text-muted-foreground")}),description:l.commissionPendingTotal>0?a("dashboard:stats.hasPendingCommission"):a("dashboard:stats.noPendingCommission"),onClick:c,highlight:l.commissionPendingTotal>0}),e.jsx(gs,{title:a("dashboard:stats.monthlyNewUsers"),value:l.currentMonthNewUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-blue-500"}),trend:{value:l.userGrowth,label:a("dashboard:stats.vsLastMonth"),isPositive:l.userGrowth>0}}),e.jsx(gs,{title:a("dashboard:stats.totalUsers"),value:l.totalUsers,icon:e.jsx(Ht,{className:"h-4 w-4 text-muted-foreground"}),description:a("dashboard:stats.activeUsers",{count:l.activeUsers})}),e.jsx(gs,{title:a("dashboard:stats.monthlyUpload"),value:Ze(l.monthTraffic.upload),icon:e.jsx(Gt,{className:"h-4 w-4 text-emerald-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.upload)})}),e.jsx(gs,{title:a("dashboard:stats.monthlyDownload"),value:Ze(l.monthTraffic.download),icon:e.jsx(Vi,{className:"h-4 w-4 text-blue-500"}),description:a("dashboard:stats.todayTraffic",{value:Ze(l.todayTraffic.download)})})]})}const rt=m.forwardRef(({className:s,children:n,...a},l)=>e.jsxs(kn,{ref:l,className:y("relative overflow-hidden",s),...a,children:[e.jsx(Fi,{className:"h-full w-full rounded-[inherit]",children:n}),e.jsx(Ct,{}),e.jsx(zi,{})]}));rt.displayName=kn.displayName;const Ct=m.forwardRef(({className:s,orientation:n="vertical",...a},l)=>e.jsx(Pn,{ref:l,orientation:n,className:y("flex touch-none select-none transition-colors",n==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",n==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",s),...a,children:e.jsx(Ui,{className:"relative flex-1 rounded-full bg-border"})}));Ct.displayName=Pn.displayName;const Zt={today:{getValue:()=>{const s=Hi();return{start:s,end:Gi(s,1)}}},last7days:{getValue:()=>{const s=new Date;return{start:$e(s,7),end:s}}},last30days:{getValue:()=>{const s=new Date;return{start:$e(s,30),end:s}}},custom:{getValue:()=>null}};function Aa({selectedRange:s,customDateRange:n,onRangeChange:a,onCustomRangeChange:l}){const{t:r}=M(),c={today:r("dashboard:trafficRank.today"),last7days:r("dashboard:trafficRank.last7days"),last30days:r("dashboard:trafficRank.last30days"),custom:r("dashboard:trafficRank.customRange")};return e.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1",children:[e.jsxs(W,{value:s,onValueChange:a,children:[e.jsx(K,{className:"w-[120px]",children:e.jsx(Y,{placeholder:r("dashboard:trafficRank.selectTimeRange")})}),e.jsx(B,{position:"popper",className:"z-50",children:Object.entries(Zt).map(([o])=>e.jsx(U,{value:o,children:c[o]},o))})]}),s==="custom"&&e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",className:y("min-w-0 justify-start text-left font-normal",!n&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:n?.from?n.to?e.jsxs(e.Fragment,{children:[Ue(n.from,"yyyy-MM-dd")," -"," ",Ue(n.to,"yyyy-MM-dd")]}):Ue(n.from,"yyyy-MM-dd"):e.jsx("span",{children:r("dashboard:trafficRank.selectDateRange")})})]})}),e.jsx(We,{className:"w-auto p-0",align:"end",children:e.jsx(Os,{mode:"range",defaultMonth:n?.from,selected:{from:n?.from,to:n?.to},onSelect:o=>{o?.from&&o?.to&&l({from:o.from,to:o.to})},numberOfMonths:2})})]})]})}const As=s=>`${(s/1024/1024/1024).toFixed(2)} GB`;function Jm({className:s}){const{t:n}=M(),[a,l]=m.useState("today"),[r,c]=m.useState({from:$e(new Date,7),to:new Date}),[o,u]=m.useState("today"),[h,i]=m.useState({from:$e(new Date,7),to:new Date}),d=m.useMemo(()=>a==="custom"?{start:r.from,end:r.to}:Zt[a].getValue(),[a,r]),f=m.useMemo(()=>o==="custom"?{start:h.from,end:h.to}:Zt[o].getValue(),[o,h]),{data:P}=se({queryKey:["nodeTrafficRank",d.start,d.end],queryFn:()=>Oa({type:"node",start_time:fe.round(d.start.getTime()/1e3),end_time:fe.round(d.end.getTime()/1e3)}),refetchInterval:3e4}),{data:E}=se({queryKey:["userTrafficRank",f.start,f.end],queryFn:()=>Oa({type:"user",start_time:fe.round(f.start.getTime()/1e3),end_time:fe.round(f.end.getTime()/1e3)}),refetchInterval:3e4});return e.jsxs("div",{className:y("grid gap-4 md:grid-cols-2",s),children:[e.jsxs(Ge,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(vs,{className:"flex items-center text-base font-medium",children:[e.jsx($i,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.nodeTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:a,customDateRange:r,onRangeChange:l,onCustomRangeChange:c}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:P?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:P.data.map(x=>e.jsx(oe,{delayDuration:200,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:x.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",x.change>=0?"text-green-600":"text-red-600"),children:[x.change>=0?e.jsx(qt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(x.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${x.value/P.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(x.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(x.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(x.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",x.change>=0?"text-green-600":"text-red-600"),children:[x.change>=0?"+":"",x.change,"%"]})]})})]})},x.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]}),e.jsxs(Ge,{children:[e.jsx(ss,{className:"flex-none pb-2",children:e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs(vs,{className:"flex items-center text-base font-medium",children:[e.jsx(Ht,{className:"mr-2 h-4 w-4"}),n("dashboard:trafficRank.userTrafficRank")]}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1",children:[e.jsx(Aa,{selectedRange:o,customDateRange:h,onRangeChange:u,onCustomRangeChange:i}),e.jsx(ka,{className:"h-4 w-4 flex-shrink-0 text-muted-foreground"})]})]})}),e.jsx(ts,{className:"flex-1",children:E?.data?e.jsxs(rt,{className:"h-[400px] pr-4",children:[e.jsx("div",{className:"space-y-3",children:E.data.map(x=>e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx("div",{className:"flex cursor-pointer items-center justify-between space-x-2 rounded-lg bg-muted/50 p-2 transition-colors hover:bg-muted/70",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"truncate text-sm font-medium",children:x.name}),e.jsxs("span",{className:y("ml-2 flex items-center text-xs font-medium",x.change>=0?"text-green-600":"text-red-600"),children:[x.change>=0?e.jsx(qt,{className:"mr-1 h-3 w-3"}):e.jsx(Kt,{className:"mr-1 h-3 w-3"}),Math.abs(x.change),"%"]})]}),e.jsxs("div",{className:"mt-1 flex items-center gap-2",children:[e.jsx("div",{className:"h-2 flex-1 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full bg-primary transition-all",style:{width:`${x.value/E.data[0].value*100}%`}})}),e.jsx("span",{className:"text-xs text-muted-foreground",children:As(x.value)})]})]})})}),e.jsx(te,{side:"right",className:"space-y-2 p-4",children:e.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-2 text-sm",children:[e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.currentTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(x.value)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.previousTraffic"),":"]}),e.jsx("span",{className:"font-medium",children:As(x.previousValue)}),e.jsxs("span",{className:"text-muted-foreground",children:[n("dashboard:trafficRank.changeRate"),":"]}),e.jsxs("span",{className:y("font-medium",x.change>=0?"text-green-600":"text-red-600"),children:[x.change>=0?"+":"",x.change,"%"]})]})})]})},x.id))}),e.jsx(Ct,{orientation:"vertical"})]}):e.jsx("div",{className:"flex h-[400px] items-center justify-center",children:e.jsx("div",{className:"animate-pulse",children:n("common:loading")})})})]})]})}const Qm=Ts("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/10",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function H({className:s,variant:n,...a}){return e.jsx("div",{className:y(Qm({variant:n}),s),...a})}const bt=m.forwardRef(({className:s,value:n,...a},l)=>e.jsx(Tn,{ref:l,className:y("relative h-2 w-full overflow-hidden rounded-full bg-primary/20",s),...a,children:e.jsx(qi,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(n||0)}%)`}})}));bt.displayName=Tn.displayName;function Zm(){const{t:s}=M(),[n,a]=m.useState(null),[l,r]=m.useState(null),[c,o]=m.useState(!0),[u,h]=m.useState(!1),i=async()=>{try{h(!0);const[P,E]=await Promise.all([La.getSystemStatus(),La.getQueueStats()]);a(P.data),r(E.data)}catch(P){console.error("Error fetching system data:",P)}finally{o(!1),h(!1)}};m.useEffect(()=>{i();const P=setInterval(i,3e4);return()=>clearInterval(P)},[]);const d=()=>{i()};if(c)return e.jsx("div",{className:"flex items-center justify-center p-6",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})});const f=P=>P?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-red-500"});return e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs(Ge,{children:[e.jsxs(ss,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs(vs,{className:"flex items-center gap-2",children:[e.jsx(Ki,{className:"h-5 w-5"}),s("dashboard:queue.title")]}),e.jsx(tt,{children:s("dashboard:queue.status.description")})]}),e.jsx(J,{variant:"outline",size:"icon",onClick:d,disabled:u,children:e.jsx(Bi,{className:y("h-4 w-4",u&&"animate-spin")})})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[f(l?.status||!1),e.jsx("span",{className:"font-medium",children:s("dashboard:queue.status.running")})]}),e.jsx(H,{variant:l?.status?"secondary":"destructive",children:l?.status?s("dashboard:queue.status.normal"):s("dashboard:queue.status.abnormal")})]}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.status.waitTime",{seconds:l?.wait?.default||0})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.recentJobs")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.recentJobs||0}),e.jsx(bt,{value:(l?.recentJobs||0)/(l?.periods?.recentJobs||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.statisticsPeriod",{hours:l?.periods?.recentJobs||0})})})]})}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.jobsPerMinute")}),e.jsx("p",{className:"text-2xl font-bold",children:l?.jobsPerMinute||0}),e.jsx(bt,{value:(l?.jobsPerMinute||0)/(l?.queueWithMaxThroughput?.throughput||1)*100,className:"h-1"})]})}),e.jsx(te,{children:e.jsx("p",{children:s("dashboard:queue.details.maxThroughput",{value:l?.queueWithMaxThroughput?.throughput||0})})})]})})]})]})})]}),e.jsxs(Ge,{children:[e.jsxs(ss,{children:[e.jsxs(vs,{className:"flex items-center gap-2",children:[e.jsx(Wi,{className:"h-5 w-5"}),s("dashboard:queue.jobDetails")]}),e.jsx(tt,{children:s("dashboard:queue.details.description")})]}),e.jsx(ts,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.failedJobs7Days")}),e.jsx("p",{className:"text-2xl font-bold text-destructive",children:l?.failedJobs||0}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("dashboard:queue.details.retentionPeriod",{hours:l?.periods?.failedJobs||0})})]}),e.jsxs("div",{className:"space-y-2 rounded-lg bg-muted/50 p-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.longestRunningQueue")}),e.jsxs("p",{className:"text-2xl font-bold",children:[l?.queueWithMaxRuntime?.runtime||0,"s"]}),e.jsx("div",{className:"truncate text-xs text-muted-foreground",children:l?.queueWithMaxRuntime?.name||"N/A"})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/50 p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("dashboard:queue.details.activeProcesses")}),e.jsxs("span",{className:"font-medium",children:[l?.processes||0," /"," ",(l?.processes||0)+(l?.pausedMasters||0)]})]}),e.jsx(bt,{value:(l?.processes||0)/((l?.processes||0)+(l?.pausedMasters||0))*100,className:"mt-2 h-1"})]})]})})]})]})}function Xm(){const{t:s}=M();return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx("div",{className:"flex items-center",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("dashboard:title")})}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(De,{}),e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsx(ke,{children:e.jsx("div",{className:"space-y-6",children:e.jsxs("div",{className:"grid gap-6",children:[e.jsx(Ym,{}),e.jsx(Gm,{}),e.jsx(Jm,{}),e.jsx(Zm,{})]})})})]})}const eu=Object.freeze(Object.defineProperty({__proto__:null,default:Xm},Symbol.toStringTag,{value:"Module"})),ve=m.forwardRef(({className:s,orientation:n="horizontal",decorative:a=!0,...l},r)=>e.jsx(In,{ref:r,decorative:a,orientation:n,className:y("shrink-0 bg-border",n==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",s),...l}));ve.displayName=In.displayName;function su({className:s,items:n,...a}){const{pathname:l}=ea(),r=os(),[c,o]=m.useState(l??"/settings"),u=i=>{o(i),r(i)},{t:h}=M("settings");return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-1 md:hidden",children:e.jsxs(W,{value:c,onValueChange:u,children:[e.jsx(K,{className:"h-12 sm:w-48",children:e.jsx(Y,{placeholder:"Theme"})}),e.jsx(B,{children:n.map(i=>e.jsx(U,{value:i.href,children:e.jsxs("div",{className:"flex gap-x-4 px-2 py-1",children:[e.jsx("span",{className:"scale-125",children:i.icon}),e.jsx("span",{className:"text-md",children:h(i.title)})]})},i.href))})]})}),e.jsx("div",{className:"hidden w-full overflow-x-auto bg-background px-1 py-2 md:block",children:e.jsx("nav",{className:y("flex space-x-2 lg:flex-col lg:space-x-0 lg:space-y-1",s),...a,children:n.map(i=>e.jsxs(Rs,{to:i.href,className:y(Hs({variant:"ghost"}),l===i.href?"bg-muted hover:bg-muted":"hover:bg-transparent hover:underline","justify-start"),children:[e.jsx("span",{className:"mr-2",children:i.icon}),h(i.title)]},i.href))})})]})}const tu=[{title:"site.title",key:"site",icon:e.jsx(Yi,{size:18}),href:"/config/system",description:"site.description"},{title:"safe.title",key:"safe",icon:e.jsx(dn,{size:18}),href:"/config/system/safe",description:"safe.description"},{title:"subscribe.title",key:"subscribe",icon:e.jsx(mn,{size:18}),href:"/config/system/subscribe",description:"subscribe.description"},{title:"invite.title",key:"invite",icon:e.jsx(Ji,{size:18}),href:"/config/system/invite",description:"invite.description"},{title:"server.title",key:"server",icon:e.jsx(cn,{size:18}),href:"/config/system/server",description:"server.description"},{title:"email.title",key:"email",icon:e.jsx(Qi,{size:18}),href:"/config/system/email",description:"email.description"},{title:"telegram.title",key:"telegram",icon:e.jsx(Zi,{size:18}),href:"/config/system/telegram",description:"telegram.description"},{title:"app.title",key:"app",icon:e.jsx(on,{size:18}),href:"/config/system/app",description:"app.description"}];function au(){const{t:s}=M("settings");return e.jsxs(we,{fadedBelow:!0,fixedHeight:!0,children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight md:text-3xl",children:s("title")}),e.jsx("div",{className:"text-muted-foreground",children:s("description")})]}),e.jsx(ve,{className:"my-6"}),e.jsxs("div",{className:"flex flex-1 flex-col space-y-8 overflow-auto lg:flex-row lg:space-x-12 lg:space-y-0",children:[e.jsx("aside",{className:"sticky top-0 lg:w-1/5",children:e.jsx(su,{items:tu})}),e.jsx("div",{className:"w-full p-1 pr-4 lg:max-w-xl",children:e.jsx("div",{className:"pb-16",children:e.jsx(sa,{})})})]})]})]})}const nu=Object.freeze(Object.defineProperty({__proto__:null,default:au},Symbol.toStringTag,{value:"Module"})),G=m.forwardRef(({className:s,...n},a)=>e.jsx(En,{className:y("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...n,ref:a,children:e.jsx(Xi,{className:y("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}));G.displayName=En.displayName;const Cs=m.forwardRef(({className:s,...n},a)=>e.jsx("textarea",{className:y("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",s),ref:a,...n}));Cs.displayName="Textarea";const ru=p.object({logo:p.string().nullable().default(""),force_https:p.number().nullable().default(0),stop_register:p.number().nullable().default(0),app_name:p.string().nullable().default(""),app_description:p.string().nullable().default(""),app_url:p.string().nullable().default(""),subscribe_url:p.string().nullable().default(""),try_out_plan_id:p.number().nullable().default(0),try_out_hour:p.coerce.number().nullable().default(0),tos_url:p.string().nullable().default(""),currency:p.string().nullable().default(""),currency_symbol:p.string().nullable().default("")});function lu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),{data:r}=se({queryKey:["settings","site"],queryFn:()=>us("site")}),{data:c}=se({queryKey:["plans"],queryFn:()=>Ls()}),o=ce({resolver:ue(ru),defaultValues:{},mode:"onBlur"}),{mutateAsync:u}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(r?.data?.site){const d=r?.data?.site;Object.entries(d).forEach(([f,P])=>{o.setValue(f,P)}),l.current=d}},[r]);const h=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{const f=Object.entries(d).reduce((P,[E,x])=>(P[E]=x===null?"":x,P),{});await u(f),l.current=d}finally{a(!1)}}},1e3),[u]),i=m.useCallback(d=>{h(d)},[h]);return m.useEffect(()=>{const d=o.watch(f=>{i(f)});return()=>d.unsubscribe()},[o.watch,i]),e.jsx(he,{...o,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:o.control,name:"app_name",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteName.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteName.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.siteName.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_description",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteDescription.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteDescription.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.siteDescription.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"app_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.siteUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.siteUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.siteUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"force_https",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("site.form.forceHttps.label")}),e.jsx(L,{children:s("site.form.forceHttps.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"logo",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.logo.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.logo.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.logo.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"subscribe_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.subscribeUrl.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("site.form.subscribeUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.subscribeUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"tos_url",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.tosUrl.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tosUrl.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.tosUrl.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"stop_register",render:({field:d})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("site.form.stopRegister.label")}),e.jsx(L,{children:s("site.form.stopRegister.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:!!d.value,onCheckedChange:f=>{d.onChange(Number(f)),i(o.getValues())}})})]})}),e.jsx(j,{control:o.control,name:"try_out_plan_id",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.tryOut.label")}),e.jsx(_,{children:e.jsxs(W,{value:d.value?.toString(),onValueChange:f=>{d.onChange(Number(f)),i(o.getValues())},children:[e.jsx(K,{children:e.jsx(Y,{placeholder:s("site.form.tryOut.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("site.form.tryOut.placeholder")}),c?.data?.map(f=>e.jsx(U,{value:f.id.toString(),children:f.name},f.id.toString()))]})]})}),e.jsx(L,{children:s("site.form.tryOut.description")}),e.jsx(D,{})]})}),!!o.watch("try_out_plan_id")&&e.jsx(j,{control:o.control,name:"try_out_hour",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"",children:s("site.form.tryOut.duration.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.tryOut.duration.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.tryOut.duration.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.currency.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currency.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.currency.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:o.control,name:"currency_symbol",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("site.form.currencySymbol.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("site.form.currencySymbol.placeholder"),...d,value:d.value||"",onChange:f=>{d.onChange(f),i(o.getValues())}})}),e.jsx(L,{children:s("site.form.currencySymbol.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("site.form.saving")})]})})}function iu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("site.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("site.description")})]}),e.jsx(ve,{}),e.jsx(lu,{})]})}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),cu=p.object({email_verify:p.boolean().nullable(),safe_mode_enable:p.boolean().nullable(),secure_path:p.string().nullable(),email_whitelist_enable:p.boolean().nullable(),email_whitelist_suffix:p.array(p.string().nullable()).nullable(),email_gmail_limit_enable:p.boolean().nullable(),recaptcha_enable:p.boolean().nullable(),recaptcha_key:p.string().nullable(),recaptcha_site_key:p.string().nullable(),register_limit_by_ip_enable:p.boolean().nullable(),register_limit_count:p.coerce.string().transform(s=>s===""?null:s).nullable(),register_limit_expire:p.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_enable:p.boolean().nullable(),password_limit_count:p.coerce.string().transform(s=>s===""?null:s).nullable(),password_limit_expire:p.coerce.string().transform(s=>s===""?null:s).nullable()}),du={email_verify:!1,safe_mode_enable:!1,secure_path:"",email_whitelist_enable:!1,email_whitelist_suffix:[],email_gmail_limit_enable:!1,recaptcha_enable:!1,recaptcha_key:"",recaptcha_site_key:"",register_limit_by_ip_enable:!1,register_limit_count:"",register_limit_expire:"",password_limit_enable:!1,password_limit_count:"",password_limit_expire:""};function mu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(cu),defaultValues:du,mode:"onBlur"}),{data:c}=se({queryKey:["settings","safe"],queryFn:()=>us("safe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data.safe){const i=c.data.safe;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"email_verify",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailVerify.label")}),e.jsx(L,{children:s("safe.form.emailVerify.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"email_gmail_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.gmailLimit.label")}),e.jsx(L,{children:s("safe.form.gmailLimit.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"safe_mode_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.safeMode.label")}),e.jsx(L,{children:s("safe.form.safeMode.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"secure_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.securePath.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.securePath.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.securePath.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"email_whitelist_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailWhitelist.label")}),e.jsx(L,{children:s("safe.form.emailWhitelist.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("email_whitelist_enable")&&e.jsx(j,{control:r.control,name:"email_whitelist_suffix",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.emailWhitelist.suffixes.label")}),e.jsx(_,{children:e.jsx(Cs,{placeholder:s("safe.form.emailWhitelist.suffixes.placeholder"),...i,value:(i.value||[]).join(` `),onChange:d=>{const f=d.target.value.split(` -`).filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(O,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"recaptcha_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.key.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.recaptcha.key.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_site_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"register_limit_by_ip_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(O,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"register_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.registerLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"register_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"password_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(O,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"password_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"password_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(O,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function Km(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(be,{}),e.jsx(Gm,{})]})}const Bm=Object.freeze(Object.defineProperty({__proto__:null,default:Km},Symbol.toStringTag,{value:"Module"})),Wm=x.object({plan_change_enable:x.boolean().nullable().default(!1),reset_traffic_method:x.coerce.number().nullable().default(0),surplus_enable:x.boolean().nullable().default(!1),new_order_event_id:x.coerce.number().nullable().default(0),renew_order_event_id:x.coerce.number().nullable().default(0),change_order_event_id:x.coerce.number().nullable().default(0),show_info_to_server_enable:x.boolean().nullable().default(!1),show_protocol_to_server_enable:x.boolean().nullable().default(!1),default_remind_expire:x.boolean().nullable().default(!1),default_remind_traffic:x.boolean().nullable().default(!1),subscribe_path:x.string().nullable().default("s")}),Ym={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function Jm(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Wm),defaultValues:Ym,mode:"onBlur"}),{data:c}=se({queryKey:["settings","subscribe"],queryFn:()=>us("subscribe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.subscribe){const i=c?.data?.subscribe;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"plan_change_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(O,{children:s("subscribe.plan_change_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"reset_traffic_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择重置方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx(U,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx(U,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx(U,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx(U,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(O,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"surplus_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(O,{children:s("subscribe.surplus_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"new_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("subscribe.new_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"renew_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("renew_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"change_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(O,{children:s("subscribe.change_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"subscribe_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:"subscribe",...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:i.value||"s"})]}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"show_info_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(O,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"show_protocol_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(O,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Qm(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(be,{}),e.jsx(Jm,{})]})}const Zm=Object.freeze(Object.defineProperty({__proto__:null,default:Qm},Symbol.toStringTag,{value:"Module"})),Xm=x.object({invite_force:x.boolean().default(!1),invite_commission:x.coerce.string().default("0"),invite_gen_limit:x.coerce.string().default("0"),invite_never_expire:x.boolean().default(!1),commission_first_time_enable:x.boolean().default(!1),commission_auto_check_enable:x.boolean().default(!1),commission_withdraw_limit:x.coerce.string().default("0"),commission_withdraw_method:x.array(x.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:x.boolean().default(!1),commission_distribution_enable:x.boolean().default(!1),commission_distribution_l1:x.coerce.number().default(0),commission_distribution_l2:x.coerce.number().default(0),commission_distribution_l3:x.coerce.number().default(0)}),eu={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function su(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Xm),defaultValues:eu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","invite"],queryFn:()=>us("invite")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.invite){const i=c?.data?.invite;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"invite_force",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(O,{children:s("invite.invite_force.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"invite_commission",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_commission.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.invite_commission.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_gen_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_gen_limit.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.invite_gen_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_never_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(O,{children:s("invite.invite_never_expire.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_first_time_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(O,{children:s("invite.commission_first_time.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_auto_check_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(O,{children:s("invite.commission_auto_check.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_method.placeholder"),...i,value:Array.isArray(i.value)?i.value.join(","):"",onChange:d=>{const f=d.target.value.split(",").filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(O,{children:s("invite.commission_withdraw_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"withdraw_close_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(O,{children:s("invite.withdraw_close.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(O,{children:s("invite.commission_distribution.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"commission_distribution_l1",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l1")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l2",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l2")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l3",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:s("invite.commission_distribution.l3")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function tu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(be,{}),e.jsx(su,{})]})}const au=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"})),nu=x.object({frontend_theme:x.string().nullable(),frontend_theme_sidebar:x.string().nullable(),frontend_theme_header:x.string().nullable(),frontend_theme_color:x.string().nullable(),frontend_background_url:x.string().url().nullable()}),ru={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function lu(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>us("frontend")}),n=ce({resolver:ue(nu),defaultValues:ru,mode:"onChange"});m.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,c])=>{n.setValue(r,c)})}},[s]);function a(l){hs(l).then(({data:r})=>{r&&$.success("更新成功")})}return e.jsx(he,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"边栏风格"}),e.jsx(O,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(q,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:"头部风格"}),e.jsx(O,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(q,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(_,{children:e.jsxs("select",{className:y(Hs({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(na,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(O,{children:"主题色"}),e.jsx(D,{})]})}),e.jsx(j,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(g,{children:[e.jsx(v,{children:"背景"}),e.jsx(_,{children:e.jsx(T,{placeholder:"请输入图片地址",...l})}),e.jsx(O,{children:"将会在后台登录页面进行展示。"}),e.jsx(D,{})]})}),e.jsx(R,{type:"submit",children:"保存设置"})]})})}function iu(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(be,{}),e.jsx(lu,{})]})}const ou=Object.freeze(Object.defineProperty({__proto__:null,default:iu},Symbol.toStringTag,{value:"Module"})),cu=x.object({server_pull_interval:x.coerce.number().nullable(),server_push_interval:x.coerce.number().nullable(),server_token:x.string().nullable(),device_limit_mode:x.coerce.number().nullable()}),du={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function mu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(cu),defaultValues:du,mode:"onBlur"}),{data:c}=se({queryKey:["settings","server"],queryFn:()=>us("server")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.AutoSaved"))}});m.useEffect(()=>{if(c?.data.server){const d=c.data.server;Object.entries(d).forEach(([f,P])=>{r.setValue(f,P)}),l.current=d}},[c]);const u=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{await o(d),l.current=d}finally{a(!1)}}},1e3),[o]),h=m.useCallback(d=>{u(d)},[u]);m.useEffect(()=>{const d=r.watch(f=>{h(f)});return()=>d.unsubscribe()},[r.watch,h]);const i=()=>{const d=Math.floor(Math.random()*17)+16,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let P="";for(let I=0;Ie.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_token.title")}),e.jsx(_,{children:e.jsxs("div",{className:"relative",children:[e.jsx(T,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:f=>{f.preventDefault(),i()},children:e.jsx(Xi,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(O,{children:s("server.server_token.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(O,{children:s("server.server_pull_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(O,{children:s("server.server_push_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(W,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx(U,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(O,{children:s("server.device_limit_mode.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function uu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(be,{}),e.jsx(mu,{})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"}));function xu({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(ge,{open:s,onOpenChange:n,children:e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-destructive"}),e.jsx(je,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Te,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(rt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const pu=x.object({email_template:x.string().nullable().default("classic"),email_host:x.string().nullable().default(""),email_port:x.string().regex(/^\d+$/).nullable().default("465"),email_username:x.string().nullable().default(""),email_password:x.string().nullable().default(""),email_encryption:x.string().nullable().default(""),email_from_address:x.string().email().nullable().default(""),remind_mail_enable:x.boolean().nullable().default(!1)});function fu(){const{t:s}=M("settings"),[n,a]=m.useState(null),[l,r]=m.useState(!1),c=m.useRef(null),[o,u]=m.useState(!1),h=ce({resolver:ue(pu),defaultValues:{},mode:"onBlur"}),{data:i}=se({queryKey:["settings","email"],queryFn:()=>us("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>xm()}),{mutateAsync:f}=es({mutationFn:hs,onSuccess:k=>{k.data&&$.success(s("common.autoSaved"))}}),{mutate:P,isPending:I}=es({mutationFn:pm,onMutate:()=>{a(null),r(!1)},onSuccess:k=>{a(k.data),r(!0),k.data.error?$.error(s("email.test.error")):$.success(s("email.test.success"))}});m.useEffect(()=>{if(i?.data.email){const k=i.data.email;Object.entries(k).forEach(([b,w])=>{h.setValue(b,w)}),c.current=k}},[i]);const p=m.useCallback(fe.debounce(async k=>{if(!fe.isEqual(k,c.current)){u(!0);try{await f(k),c.current=k}finally{u(!1)}}},1e3),[f]),N=m.useCallback(k=>{p(k)},[p]);return m.useEffect(()=>{const k=h.watch(b=>{N(b)});return()=>k.unsubscribe()},[h.watch,N]),e.jsxs(e.Fragment,{children:[e.jsx(he,{...h,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"email_host",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_host.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email.email_host.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_port",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_port.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("common.placeholder"),...k,value:k.value||"",onChange:b=>{const w=b.target.value?Number(b.target.value):null;k.onChange(w)}})}),e.jsx(O,{children:s("email.email_port.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_encryption",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(W,{onValueChange:k.onChange,value:k.value||"none",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择加密方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"none",children:s("email.email_encryption.none")}),e.jsx(U,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx(U,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(O,{children:s("email.email_encryption.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_username",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email.email_username.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email.email_username.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_password",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_password.title")}),e.jsx(_,{children:e.jsx(T,{type:"password",placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email_password.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_from_address",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_from.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(O,{children:s("email_from.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_template",render:({field:k})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("email_template.title")}),e.jsxs(W,{onValueChange:b=>{k.onChange(b),N(h.getValues())},value:k.value||void 0,children:[e.jsx(_,{children:e.jsx(K,{className:"w-[200px]",children:e.jsx(Y,{placeholder:s("email_template.placeholder")})})}),e.jsx(B,{children:d?.data?.map(b=>e.jsx(U,{value:b,children:b},b))})]}),e.jsx(O,{children:s("email_template.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"remind_mail_enable",render:({field:k})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(v,{className:"text-base",children:s("remind_mail.title")}),e.jsx(O,{children:s("remind_mail.description")})]}),e.jsx(_,{children:e.jsx(q,{checked:k.value||!1,onCheckedChange:b=>{k.onChange(b),N(h.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(R,{onClick:()=>P(),loading:I,disabled:I,children:s(I?"test.sending":"test.title")})})]})}),o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(xu,{open:l,onOpenChange:r,result:n})]})}function gu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(be,{}),e.jsx(fu,{})]})}const ju=Object.freeze(Object.defineProperty({__proto__:null,default:gu},Symbol.toStringTag,{value:"Module"})),vu=x.object({telegram_bot_enable:x.boolean().nullable(),telegram_bot_token:x.string().nullable(),telegram_discuss_link:x.string().nullable()}),bu={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function yu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(vu),defaultValues:bu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","telegram"],queryFn:()=>us("telegram")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:f=>{f.data&&$.success(s("common.autoSaved"))}}),{mutate:u,isPending:h}=es({mutationFn:fm,onSuccess:f=>{f.data&&$.success(s("telegram.webhook_success"))}});m.useEffect(()=>{if(c?.data.telegram){const f=c.data.telegram;Object.entries(f).forEach(([P,I])=>{r.setValue(P,I)}),l.current=f}},[c]);const i=m.useCallback(fe.debounce(async f=>{if(!fe.isEqual(f,l.current)){a(!0);try{await o(f),l.current=f}finally{a(!1)}}},1e3),[o]),d=m.useCallback(f=>{i(f)},[i]);return m.useEffect(()=>{const f=r.watch(P=>{d(P)});return()=>f.unsubscribe()},[r.watch,d]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"telegram_bot_token",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.bot_token.placeholder"),...f,value:f.value||""})}),e.jsx(O,{children:s("telegram.bot_token.description")}),e.jsx(D,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(R,{loading:h,disabled:h,onClick:()=>u(),children:s(h?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(O,{children:s("telegram.webhook.description")}),e.jsx(D,{})]}),e.jsx(j,{control:r.control,name:"telegram_bot_enable",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(O,{children:s("telegram.bot_enable.description")}),e.jsx(_,{children:e.jsx(q,{checked:f.value||!1,onCheckedChange:P=>{f.onChange(P),d(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"telegram_discuss_link",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.discuss_link.placeholder"),...f,value:f.value||""})}),e.jsx(O,{children:s("telegram.discuss_link.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function _u(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(be,{}),e.jsx(yu,{})]})}const Nu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),wu=x.object({windows_version:x.string().nullable(),windows_download_url:x.string().nullable(),macos_version:x.string().nullable(),macos_download_url:x.string().nullable(),android_version:x.string().nullable(),android_download_url:x.string().nullable()}),Cu={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Su(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(wu),defaultValues:Cu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","app"],queryFn:()=>us("app")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("app.save_success"))}});m.useEffect(()=>{if(c?.data.app){const i=c.data.app;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"windows_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.windows.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"windows_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.windows.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.macos.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.macos.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.android.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{className:"text-base",children:s("app.android.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(O,{children:s("app.android.download.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function ku(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(be,{}),e.jsx(Su,{})]})}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"})),da=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...n})}));da.displayName="Table";const ma=m.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...n}));ma.displayName="TableHeader";const ua=m.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...n}));ua.displayName="TableBody";const Tu=m.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));Tu.displayName="TableFooter";const vs=m.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));vs.displayName="TableRow";const ha=m.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));ha.displayName="TableHead";const Us=m.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));Us.displayName="TableCell";const Du=m.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...n}));Du.displayName="TableCaption";function Ru({table:s}){const[n,a]=m.useState("");m.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const l=r=>{const c=parseInt(r);!isNaN(c)&&c>=1&&c<=s.getPageCount()?s.setPageIndex(c-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(W,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(r=>e.jsx(U,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(T,{type:"text",value:n,onChange:r=>a(r.target.value),onBlur:r=>l(r.target.value),onKeyDown:r=>{r.key==="Enter"&&l(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(eo,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(Cn,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(aa,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(so,{className:"h-4 w-4"})]})]})]})]})}function Ye({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:u,showPagination:h=!0,isLoading:i=!1}){const d=m.useRef(null),f=s.getAllColumns().filter(N=>N.getIsPinned()==="left"),P=s.getAllColumns().filter(N=>N.getIsPinned()==="right"),I=N=>f.slice(0,N).reduce((k,b)=>k+(b.getSize()??0),0),p=N=>P.slice(N+1).reduce((k,b)=>k+(b.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:d,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(da,{children:[e.jsx(ma,{children:s.getHeaderGroups().map(N=>e.jsx(vs,{className:"hover:bg-transparent",children:N.headers.map((k,b)=>{const w=k.column.getIsPinned()==="left",S=k.column.getIsPinned()==="right",C=w?I(f.indexOf(k.column)):void 0,E=S?p(P.indexOf(k.column)):void 0;return e.jsx(ha,{colSpan:k.colSpan,style:{width:k.getSize(),...w&&{left:C},...S&&{right:E}},className:y("h-11 bg-card px-4 text-muted-foreground",(w||S)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",w&&"before:right-0",S&&"before:left-0"]),children:k.isPlaceholder?null:bt(k.column.columnDef.header,k.getContext())},k.id)})},N.id))}),e.jsx(ua,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((N,k)=>e.jsx(vs,{"data-state":N.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:b=>l?.(b,k),onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:b=>u?.(b,k),children:N.getVisibleCells().map((b,w)=>{const S=b.column.getIsPinned()==="left",C=b.column.getIsPinned()==="right",E=S?I(f.indexOf(b.column)):void 0,A=C?p(P.indexOf(b.column)):void 0;return e.jsx(Us,{style:{width:b.column.getSize(),...S&&{left:E},...C&&{right:A}},className:y("bg-card",(S||C)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",S&&"before:right-0",C&&"before:left-0"]),children:bt(b.column.columnDef.cell,b.getContext())},b.id)})},N.id)):e.jsx(vs,{children:e.jsx(Us,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),h&&e.jsx(Ru,{table:s})]})}const Eu=s=>x.object({id:x.number().nullable(),name:x.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:x.string().optional().nullable(),notify_domain:x.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:x.coerce.number().min(0).optional().nullable(),handling_fee_percent:x.coerce.number().min(0).max(100).optional().nullable(),payment:x.string().min(1,s("form.validation.payment.required")),config:x.record(x.string(),x.string())}),Fa={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function br({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Fa}){const{t:r}=M("payment"),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState([]),[f,P]=m.useState([]),I=Eu(r),p=ce({resolver:ue(I),defaultValues:l,mode:"onChange"}),N=p.watch("payment");m.useEffect(()=>{c&&(async()=>{const{data:w}=await Ed();d(w)})()},[c]),m.useEffect(()=>{if(!N||!c)return;(async()=>{const w={payment:N,...a==="edit"&&{id:Number(p.getValues("id"))}};Id(w).then(({data:S})=>{P(S);const C=S.reduce((E,A)=>(A.field_name&&(E[A.field_name]=A.value??""),E),{});p.setValue("config",C)})})()},[N,c,p,a]);const k=async b=>{h(!0);try{(await Md(b)).data&&($.success(r("form.messages.success")),p.reset(Fa),s(),o(!1))}finally{h(!1)}};return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(he,{...p,children:e.jsxs("form",{onSubmit:p.handleSubmit(k),className:"space-y-4",children:[e.jsx(j,{control:p.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.name.placeholder"),...b})}),e.jsx(O,{children:r("form.fields.name.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"icon",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.icon.label")}),e.jsx(_,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(O,{children:r("form.fields.icon.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"notify_domain",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.notify_domain.label")}),e.jsx(_,{children:e.jsx(T,{...b,value:b.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(O,{children:r("form.fields.notify_domain.description")}),e.jsx(D,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(j,{control:p.control,name:"handling_fee_percent",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"handling_fee_fixed",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...b,value:b.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:p.control,name:"payment",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.payment.label")}),e.jsxs(W,{onValueChange:b.onChange,defaultValue:b.value,children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(B,{children:i.map(w=>e.jsx(U,{value:w,children:w},w))})]}),e.jsx(O,{children:r("form.fields.payment.description")}),e.jsx(D,{})]})}),f.length>0&&e.jsx("div",{className:"space-y-4",children:f.map(b=>e.jsx(j,{control:p.control,name:`config.${b.field_name}`,render:({field:w})=>e.jsxs(g,{children:[e.jsx(v,{children:b.label}),e.jsx(_,{children:e.jsx(T,{...w,value:w.value||""})}),e.jsx(D,{})]})},b.field_name))}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",disabled:u,children:r("form.buttons.submit")})]})]})})]})]})}function V({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(R,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Pa,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(Gt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Kt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(to,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Pa,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Iu=ao,Mu=no,Ou=ro,yr=m.forwardRef(({className:s,...n},a)=>e.jsx(Mn,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));yr.displayName=Mn.displayName;const _r=m.forwardRef(({className:s,...n},a)=>e.jsxs(Ou,{children:[e.jsx(yr,{}),e.jsx(On,{ref:a,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]}));_r.displayName=On.displayName;const Nr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});Nr.displayName="AlertDialogHeader";const wr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});wr.displayName="AlertDialogFooter";const Cr=m.forwardRef(({className:s,...n},a)=>e.jsx(Vn,{ref:a,className:y("text-lg font-semibold",s),...n}));Cr.displayName=Vn.displayName;const Sr=m.forwardRef(({className:s,...n},a)=>e.jsx(Ln,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Sr.displayName=Ln.displayName;const kr=m.forwardRef(({className:s,...n},a)=>e.jsx(An,{ref:a,className:y($s(),s),...n}));kr.displayName=An.displayName;const Pr=m.forwardRef(({className:s,...n},a)=>e.jsx(Fn,{ref:a,className:y($s({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));Pr.displayName=Fn.displayName;function Je({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:c="确认",variant:o="default",className:u}){return e.jsxs(Iu,{children:[e.jsx(Mu,{asChild:!0,children:n}),e.jsxs(_r,{className:y("sm:max-w-[425px]",u),children:[e.jsxs(Nr,{children:[e.jsx(Cr,{children:a}),e.jsx(Sr,{children:l})]}),e.jsxs(wr,{children:[e.jsx(Pr,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r})}),e.jsx(kr,{asChild:!0,children:e.jsx(R,{variant:o,onClick:s,children:c})})]})]})]})}const Tr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),Vu=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(q,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await Vd({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(V,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(V,{column:l,title:a("table.columns.notify_url")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"ml-1",children:e.jsx(Tr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(V,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(br,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await Od({id:l.original.id});r&&s()},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function Lu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("payment"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(br,{refetch:n}),e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:o=>s.getColumn("name")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function Au(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:b}=await Rd();return u(b?.map(w=>({...w,enable:!!w.enable}))||[]),b}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const I=(b,w)=>{r&&(b.dataTransfer.setData("text/plain",w.toString()),b.currentTarget.classList.add("opacity-50"))},p=(b,w)=>{if(!r)return;b.preventDefault(),b.currentTarget.classList.remove("bg-muted");const S=parseInt(b.dataTransfer.getData("text/plain"));if(S===w)return;const C=[...o],[E]=C.splice(S,1);C.splice(w,0,E),u(C)},N=async()=>{r?Ld({ids:o.map(b=>b.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},k=Ae({data:o,columns:Vu({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Ye,{table:k,toolbar:b=>e.jsx(Lu,{table:b,refetch:P,saveOrder:N,isSortMode:r}),draggable:r,onDragStart:I,onDragEnd:b=>b.currentTarget.classList.remove("opacity-50"),onDragOver:b=>{b.preventDefault(),b.currentTarget.classList.add("bg-muted")},onDragLeave:b=>b.currentTarget.classList.remove("bg-muted"),onDrop:p,showPagination:!r})}function Fu(){const{t:s}=M("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Au,{})})]})]})}const zu=Object.freeze(Object.defineProperty({__proto__:null,default:Fu},Symbol.toStringTag,{value:"Module"})),Uu=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(T,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(Cs,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:y($s({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function $u({themeKey:s,themeInfo:n}){const{t:a}=M("theme"),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),i=ce({defaultValues:n.configs.reduce((P,I)=>(P[I.field_name]="",P),{})}),d=async()=>{o(!0),gd(s).then(({data:P})=>{Object.entries(P).forEach(([I,p])=>{i.setValue(I,p)})}).finally(()=>{o(!1)})},f=async P=>{h(!0),jd(s,P).then(()=>{$.success(a("config.success")),r(!1)}).finally(()=>{h(!1)})};return e.jsxs(ge,{open:l,onOpenChange:P=>{r(P),P?d():i.reset()},children:[e.jsx(Oe,{asChild:!0,children:e.jsx(R,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(xe,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:a("config.title",{name:n.name})}),e.jsx(Te,{children:a("config.description")})]}),c?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})}):e.jsx(he,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(f),className:"space-y-4",children:[n.configs.map(P=>e.jsx(j,{control:i.control,name:P.field_name,render:({field:I})=>e.jsxs(g,{children:[e.jsx(v,{children:P.label}),e.jsx(_,{children:Uu(P,I)}),e.jsx(D,{})]})},P.field_name)),e.jsxs(Ve,{className:"mt-6 gap-2",children:[e.jsx(R,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(R,{type:"submit",loading:u,children:a("config.save")})]})]})})]})]})}function Hu(){const{t:s}=M("theme"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState(null),f=m.useRef(null),[P,I]=m.useState(0),{data:p,isLoading:N,refetch:k}=se({queryKey:["themeList"],queryFn:async()=>{const{data:z}=await fd();return z}}),b=async z=>{a(z),yd({frontend_theme:z}).then(()=>{$.success("主题切换成功"),k()}).finally(()=>{a(null)})},w=async z=>{if(!z.name.endsWith(".zip")){$.error(s("upload.error.format"));return}r(!0),vd(z).then(()=>{$.success("主题上传成功"),o(!1),k()}).finally(()=>{r(!1),f.current&&(f.current.value="")})},S=z=>{z.preventDefault(),z.stopPropagation(),z.type==="dragenter"||z.type==="dragover"?h(!0):z.type==="dragleave"&&h(!1)},C=z=>{z.preventDefault(),z.stopPropagation(),h(!1),z.dataTransfer.files&&z.dataTransfer.files[0]&&w(z.dataTransfer.files[0])},E=()=>{i&&I(z=>z===0?i.images.length-1:z-1)},A=()=>{i&&I(z=>z===i.images.length-1?0:z+1)},Z=(z,X)=>{I(0),d({name:z,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(R,{onClick:()=>o(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(qt,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:N?e.jsxs(e.Fragment,{children:[e.jsx(za,{}),e.jsx(za,{})]}):p?.themes&&Object.entries(p.themes).map(([z,X])=>e.jsx(qe,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Je,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if(z===p?.active){$.error(s("card.delete.error.active"));return}a(z),bd(z).then(()=>{$.success("主题删除成功"),k()}).finally(()=>{a(null)})},children:e.jsx(R,{disabled:n===z,loading:n===z,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(cs,{className:"h-4 w-4"})})})}),e.jsxs(ss,{children:[e.jsx(bs,{children:X.name}),e.jsx(tt,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(R,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Z(X.name,X.images),children:e.jsx(lo,{className:"h-4 w-4"})}),e.jsx($u,{themeKey:z,themeInfo:X}),e.jsx(R,{onClick:()=>b(z),disabled:n===z||z===p.active,loading:n===z,variant:z===p.active?"secondary":"default",children:z===p.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},z))}),e.jsx(ge,{open:c,onOpenChange:o,children:e.jsxs(xe,{className:"sm:max-w-md",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s("upload.title")}),e.jsx(Te,{children:s("upload.description")})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",u&&"border-primary/50 bg-muted/50"),onDragEnter:S,onDragLeave:S,onDragOver:S,onDrop:C,children:[e.jsx("input",{type:"file",ref:f,className:"hidden",accept:".zip",onChange:z=>{const X=z.target.files?.[0];X&&w(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(qt,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>f.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(ge,{open:!!i,onOpenChange:z=>{z||(d(null),I(0))},children:e.jsxs(xe,{className:"max-w-4xl",children:[e.jsxs(ve,{children:[e.jsxs(je,{children:[i?.name," ",s("preview.title")]}),e.jsx(Te,{className:"text-center",children:i&&s("preview.imageCount",{current:P+1,total:i.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:i?.images[P]&&e.jsx("img",{src:i.images[P],alt:`${i.name} 预览图 ${P+1}`,className:"h-full w-full object-contain"})}),i&&i.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(R,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:E,children:e.jsx(io,{className:"h-4 w-4"})}),e.jsx(R,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:A,children:e.jsx(oo,{className:"h-4 w-4"})})]})]}),i&&i.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:i.images.map((z,X)=>e.jsx("button",{onClick:()=>I(X),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",P===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:z,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function za(){return e.jsxs(qe,{children:[e.jsxs(ss,{children:[e.jsx(Ie,{className:"h-6 w-[200px]"}),e.jsx(Ie,{className:"h-4 w-[300px]"})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ie,{className:"h-10 w-[100px]"}),e.jsx(Ie,{className:"h-10 w-[100px]"})]})]})}const qu=Object.freeze(Object.defineProperty({__proto__:null,default:Hu},Symbol.toStringTag,{value:"Module"})),xa=m.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[c,o]=m.useState("");m.useEffect(()=>{if(c.includes(",")){const h=new Set([...n,...c.split(",").map(i=>i.trim())]);a(Array.from(h)),o("")}},[c,a,n]);const u=()=>{if(c){const h=new Set([...n,c]);a(Array.from(h)),o("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(h=>e.jsxs(H,{variant:"secondary",children:[h,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(i=>i!==h))},children:e.jsx(Bt,{className:"w-3"})})]},h)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:c,onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"||h.key===","?(h.preventDefault(),u()):h.key==="Backspace"&&c.length===0&&n.length>0&&(h.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});xa.displayName="InputTags";const Gu=x.object({id:x.number().nullable(),title:x.string().min(1).max(250),content:x.string().min(1),show:x.boolean(),tags:x.array(x.string()),img_url:x.string().nullable()}),Ku={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Dr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Ku}){const{t:r}=M("notice"),[c,o]=m.useState(!1),u=ce({resolver:ue(Gu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return e.jsx(he,{...u,children:e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(Te,{})]}),e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.title.placeholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"content",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.content.label")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"img_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...i,value:i.value||""})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"tags",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.fields.tags.label")}),e.jsx(_,{children:e.jsx(xa,{value:i.value,onChange:i.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",onClick:i=>{i.preventDefault(),u.handleSubmit(async d=>{Fd(d).then(({data:f})=>{f&&($.success(r("form.buttons.success")),s(),o(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function Bu({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("notice"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Dr,{refetch:n}),!l&&e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),c&&!l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const Wu=s=>{const{t:n}=M("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(co,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(q,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await Ud({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Dr,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Je,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{zd({id:a.original.id}).then(()=>{$.success(n("table.actions.delete.success")),s()})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function Yu(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({}),[P,I]=m.useState({pageSize:50,pageIndex:0}),[p,N]=m.useState([]),{refetch:k}=se({queryKey:["notices"],queryFn:async()=>{const{data:E}=await Ad();return N(E),E}});m.useEffect(()=>{l({"drag-handle":h,content:!h,created_at:!h,actions:!h}),I({pageSize:h?99999:50,pageIndex:0})},[h]);const b=(E,A)=>{h&&(E.dataTransfer.setData("text/plain",A.toString()),E.currentTarget.classList.add("opacity-50"))},w=(E,A)=>{if(!h)return;E.preventDefault(),E.currentTarget.classList.remove("bg-muted");const Z=parseInt(E.dataTransfer.getData("text/plain"));if(Z===A)return;const z=[...p],[X]=z.splice(Z,1);z.splice(A,0,X),N(z)},S=async()=>{if(!h){i(!0);return}gm(p.map(E=>E.id)).then(()=>{$.success("排序保存成功"),i(!1),k()}).finally(()=>{i(!1)})},C=Ae({data:p??[],columns:Wu(k),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:P},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:f,onPaginationChange:I,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:C,toolbar:E=>e.jsx(Bu,{table:E,refetch:k,saveOrder:S,isSortMode:h}),draggable:h,onDragStart:b,onDragEnd:E=>E.currentTarget.classList.remove("opacity-50"),onDragOver:E=>{E.preventDefault(),E.currentTarget.classList.add("bg-muted")},onDragLeave:E=>E.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!h})})}function Ju(){const{t:s}=M("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Yu,{})})]})]})}const Qu=Object.freeze(Object.defineProperty({__proto__:null,default:Ju},Symbol.toStringTag,{value:"Module"})),Zu=x.object({id:x.number().nullable(),language:x.string().max(250),category:x.string().max(250),title:x.string().min(1).max(250),body:x.string().min(1),show:x.boolean()}),Xu={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Rr({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Xu}){const{t:r}=M("knowledge"),[c,o]=m.useState(!1),u=ce({resolver:ue(Zu),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return m.useEffect(()=>{c&&l.id&&Hd(l.id).then(({data:i})=>{u.reset(i)})},[l.id,u,c]),e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[1025px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(Te,{})]}),e.jsxs(he,{...u,children:[e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.titlePlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"category",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.categoryPlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"language",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.language")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.languagePlaceholder")})}),e.jsx(B,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx(U,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(j,{control:u.control,name:"body",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.content")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{u.handleSubmit(i=>{qd(i).then(({data:d})=>{d&&(u.reset(),$.success(r("messages.operationSuccess")),o(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function eh({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function sh({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Rr,{refreshData:n}),e.jsx(T,{placeholder:c("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(eh,{column:s.getColumn("category"),title:c("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(o=>o.getValue("category")))).map(o=>({label:o,value:o}))}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[c("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:c(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const th=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(q,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{Kd({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(H,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(V,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Rr,{refreshData:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Gd({id:l.original.id}).then(({data:r})=>{r&&($.success(a("messages.operationSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function ah(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P,isLoading:I,data:p}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:S}=await $d();return u(S||[]),S}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const N=(S,C)=>{r&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!r)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const A=[...o],[Z]=A.splice(E,1);A.splice(C,0,Z),u(A)},b=async()=>{r?Bd({ids:o.map(S=>S.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},w=Ae({data:o,columns:th({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:w,toolbar:S=>e.jsx(sh,{table:S,refetch:P,saveOrder:b,isSortMode:r}),draggable:r,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!r})}function nh(){const{t:s}=M("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ah,{})})]})]})}const rh=Object.freeze(Object.defineProperty({__proto__:null,default:nh},Symbol.toStringTag,{value:"Module"}));function lh(s,n){const[a,l]=m.useState(s);return m.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function zt(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function ih(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(c=>!n.find(o=>o.value===c.value));return a}function oh(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const Er=m.forwardRef(({className:s,...n},a)=>mo(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);Er.displayName="CommandEmpty";const lt=m.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:c,onSearch:o,loadingIndicator:u,emptyIndicator:h,maxSelected:i=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:f,disabled:P,groupBy:I,className:p,badgeClassName:N,selectFirstItem:k=!0,creatable:b=!1,triggerSearchOnFocus:w=!1,commandProps:S,inputProps:C,hideClearAllButton:E=!1},A)=>{const Z=m.useRef(null),[z,X]=m.useState(!1),Gs=m.useRef(!1),[ba,ya]=m.useState(!1),[ee,Ks]=m.useState(s||[]),[Ss,_a]=m.useState(zt(l,I)),[xs,Vt]=m.useState(""),Bs=lh(xs,c||500);m.useImperativeHandle(A,()=>({selectedValue:[...ee],input:Z.current,focus:()=>Z.current?.focus()}),[ee]);const mt=m.useCallback(G=>{const ae=ee.filter(Pe=>Pe.value!==G.value);Ks(ae),n?.(ae)},[n,ee]),sl=m.useCallback(G=>{const ae=Z.current;ae&&((G.key==="Delete"||G.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||mt(ee[ee.length-1])),G.key==="Escape"&&ae.blur())},[mt,ee]);m.useEffect(()=>{s&&Ks(s)},[s]),m.useEffect(()=>{if(!r||o)return;const G=zt(r||[],I);JSON.stringify(G)!==JSON.stringify(Ss)&&_a(G)},[l,r,I,o,Ss]),m.useEffect(()=>{const G=async()=>{ya(!0);const Pe=await o?.(Bs);_a(zt(Pe||[],I)),ya(!1)};(async()=>{!o||!z||(w&&await G(),Bs&&await G())})()},[Bs,I,z,w]);const tl=()=>{if(!b||oh(Ss,[{value:xs,label:xs}])||ee.find(ae=>ae.value===xs))return;const G=e.jsx(Ne,{value:xs,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=i){d?.(ee.length);return}Vt("");const Pe=[...ee,{value:ae,label:ae}];Ks(Pe),n?.(Pe)},children:`Create "${xs}"`});if(!o&&xs.length>0||o&&Bs.length>0&&!ba)return G},al=m.useCallback(()=>{if(h)return o&&!b&&Object.keys(Ss).length===0?e.jsx(Ne,{value:"-",disabled:!0,children:h}):e.jsx(Er,{children:h})},[b,h,o,Ss]),nl=m.useMemo(()=>ih(Ss,ee),[Ss,ee]),rl=m.useCallback(()=>{if(S?.filter)return S.filter;if(b)return(G,ae)=>G.toLowerCase().includes(ae.toLowerCase())?1:-1},[b,S?.filter]),ll=m.useCallback(()=>{const G=ee.filter(ae=>ae.fixed);Ks(G),n?.(G)},[n,ee]);return e.jsxs(Ns,{...S,onKeyDown:G=>{sl(G),S?.onKeyDown?.(G)},className:y("h-auto overflow-visible bg-transparent",S?.className),shouldFilter:S?.shouldFilter!==void 0?S.shouldFilter:!o,filter:rl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!P&&ee.length!==0},p),onClick:()=>{P||Z.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(G=>e.jsxs(H,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",N),"data-fixed":G.fixed,"data-disabled":P||void 0,children:[G.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(P||G.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&mt(G)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>mt(G),children:e.jsx(Bt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},G.value)),e.jsx(Se.Input,{...C,ref:Z,value:xs,disabled:P,onValueChange:G=>{Vt(G),C?.onValueChange?.(G)},onBlur:G=>{Gs.current===!1&&X(!1),C?.onBlur?.(G)},onFocus:G=>{X(!0),w&&o?.(Bs),C?.onFocus?.(G)},placeholder:f&&ee.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":f,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},C?.className)}),e.jsx("button",{type:"button",onClick:ll,className:y((E||P||ee.length<1||ee.filter(G=>G.fixed).length===ee.length)&&"hidden"),children:e.jsx(Bt,{})})]})}),e.jsx("div",{className:"relative",children:z&&e.jsx(ws,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{Gs.current=!1},onMouseEnter:()=>{Gs.current=!0},onMouseUp:()=>{Z.current?.focus()},children:ba?e.jsx(e.Fragment,{children:u}):e.jsxs(e.Fragment,{children:[al(),tl(),!k&&e.jsx(Ne,{value:"-",className:"hidden"}),Object.entries(nl).map(([G,ae])=>e.jsx(Me,{heading:G,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(Pe=>e.jsx(Ne,{value:Pe.value,disabled:Pe.disable,onMouseDown:Ws=>{Ws.preventDefault(),Ws.stopPropagation()},onSelect:()=>{if(ee.length>=i){d?.(ee.length);return}Vt("");const Ws=[...ee,Pe];Ks(Ws),n?.(Ws)},className:y("cursor-pointer",Pe.disable&&"cursor-default text-muted-foreground"),children:Pe.label},Pe.value))})},G))]})})})]})});lt.displayName="MultipleSelector";const ch=s=>x.object({id:x.number().optional(),name:x.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function Ot({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=M("group"),c=ce({resolver:ue(ch(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1),[h,i]=m.useState(!1),d=async f=>{i(!0),kd(f).then(()=>{$.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),c.reset(),u(!1)}).finally(()=>{i(!1)})};return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(he,{...c,children:e.jsxs("form",{onSubmit:c.handleSubmit(d),className:"space-y-4",children:[e.jsx(j,{control:c.control,name:"name",render:({field:f})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.name")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.namePlaceholder"),...f,className:"w-full"})}),e.jsx(O,{children:r("form.nameDescription")}),e.jsx(D,{})]})}),e.jsxs(Ve,{className:"gap-2",children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(R,{type:"submit",disabled:h||!c.formState.isValid,children:[h&&e.jsx(ra,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Ir=m.createContext(void 0);function dh({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),[o,u]=m.useState(ye.Shadowsocks);return e.jsx(Ir.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:c,serverType:o,setServerType:u,refetch:n},children:s})}function Mr(){const s=m.useContext(Ir);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Ut({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=M("server");m.useEffect(()=>{console.log(n)},[n]);const[c,o]=m.useState(!1),[u,h]=m.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[i,d]=m.useState(null),f=b=>{if(!b)return null;try{const w=JSON.parse(b);return typeof w!="object"||w===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},P={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},I=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},p=()=>{const b=f(u||"");if(b){$.error(b);return}try{if(!u){a(null),o(!1);return}a(JSON.parse(u)),o(!1)}catch{$.error(r("network_settings.errors.save_failed"))}},N=b=>{h(b),d(f(b))},k=b=>{const w=P[b];if(w){const S=JSON.stringify(w.content,null,2);h(S),d(null)}};return m.useEffect(()=>{c&&console.log(n)},[c,n]),m.useEffect(()=>{c&&n&&Object.keys(n).length>0&&h(JSON.stringify(n,null,2))},[c,n]),e.jsxs(ge,{open:c,onOpenChange:b=>{!b&&c&&p(),o(b)},children:[e.jsx(Oe,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[I().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:I().map(b=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>k(b),children:r("network_settings.use_template",{template:P[b].label})},b))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Cs,{className:`min-h-[200px] font-mono text-sm ${i?"border-red-500 focus-visible:ring-red-500":""}`,value:u,placeholder:I().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:b=>N(b.target.value)}),i&&e.jsx("p",{className:"text-sm text-red-500",children:i})]})]}),e.jsxs(Ve,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>o(!1),children:r("common.cancel")}),e.jsx(J,{onClick:p,disabled:!!i,children:r("common.confirm")})]})]})]})}function dp(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const mh={},uh=Object.freeze(Object.defineProperty({__proto__:null,default:mh},Symbol.toStringTag,{value:"Module"})),mp=Co(uh),Ua=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),hh=()=>{try{const s=uo.box.keyPair(),n=Ua(Ta.encodeBase64(s.secretKey)),a=Ua(Ta.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},xh=()=>{try{return hh()}catch(s){throw console.error("Error generating key pair:",s),s}},ph=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},fh=()=>{const s=Math.floor(Math.random()*8)*2+2;return ph(s)},gh=x.object({cipher:x.string().default("aes-128-gcm"),obfs:x.string().default("0"),obfs_settings:x.object({path:x.string().default(""),host:x.string().default("")}).default({})}),jh=x.object({tls:x.coerce.number().default(0),tls_settings:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({})}),vh=x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({})}),bh=x.object({version:x.coerce.number().default(2),alpn:x.string().default("h2"),obfs:x.object({open:x.coerce.boolean().default(!1),type:x.string().default("salamander"),password:x.string().default("")}).default({}),tls:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),bandwidth:x.object({up:x.string().default(""),down:x.string().default("")}).default({})}),yh=x.object({tls:x.coerce.number().default(0),tls_settings:x.object({server_name:x.string().default(""),allow_insecure:x.boolean().default(!1)}).default({}),reality_settings:x.object({server_port:x.coerce.number().default(443),server_name:x.string().default(""),allow_insecure:x.boolean().default(!1),public_key:x.string().default(""),private_key:x.string().default(""),short_id:x.string().default("")}).default({}),network:x.string().default("tcp"),network_settings:x.record(x.any()).default({}),flow:x.string().default("")}),rs={shadowsocks:{schema:gh,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:jh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:vh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:bh,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:yh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},_h=({serverType:s,value:n,onChange:a})=>{const{t:l}=M("server"),r=s?rs[s]:null,c=r?.schema||x.record(x.any()),o=s?c.parse({}):{},u=ce({resolver:ue(c),defaultValues:o,mode:"onChange"});if(m.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const p=c.parse({});u.reset(p)}}else u.reset(n)},[s,n,a,u,c]),m.useEffect(()=>{const p=u.watch(N=>{a(N)});return()=>p.unsubscribe()},[u,a]),!s||!r)return null;const I={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"cipher",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.shadowsocks.ciphers.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(B,{children:e.jsxs(ps,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx(U,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),u.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs_settings.path",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...p})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"obfs_settings.host",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...p})}),e.jsx(D,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value?.toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx(U,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),u.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vmess.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.vmess.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...p,value:p.value||""})})]})}),e.jsx(j,{control:u.control,name:"allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.trojan.network.label"),e.jsx(Ut,{value:u.watch("network_settings")||{},setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")||"tcp"})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value||"tcp",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.trojan.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"version",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(_,{children:e.jsxs(W,{value:(p.value||2).toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.hysteria.versions.map(N=>e.jsxs(U,{value:N,className:"cursor-pointer",children:["V",N]},N))})})]})})]})}),u.watch("version")==1&&e.jsx(j,{control:u.control,name:"alpn",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value||"h2",onValueChange:p.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.hysteria.alpnOptions.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs.open",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})}),!!u.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[u.watch("version")=="2"&&e.jsx(j,{control:u.control,name:"obfs.type",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value||"salamander",onValueChange:p.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:e.jsx(U,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs.password",render:({field:p})=>e.jsxs(g,{className:u.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...p,value:p.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",k=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(b=>N[b%N.length]).join("");u.setValue("obfs.password",k),$.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...p,value:p.value||""})})]})}),e.jsx(j,{control:u.control,name:"tls.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value||!1,onCheckedChange:p.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"bandwidth.up",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...p,value:p.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(j,{control:u.control,name:"bandwidth.down",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...p,value:p.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:p.value?.toString(),onValueChange:N=>p.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx(U,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx(U,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),u.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),u.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"reality_settings.server_name",render:({field:p})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.server_port",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.allow_insecure",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(q,{checked:p.value,onCheckedChange:p.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(j,{control:u.control,name:"reality_settings.private_key",render:({field:p})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...p,className:"pr-9"})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const N=xh();u.setValue("reality_settings.private_key",N.privateKey),u.setValue("reality_settings.public_key",N.publicKey),$.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{$.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(j,{control:u.control,name:"reality_settings.public_key",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(_,{children:e.jsx(T,{...p})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.short_id",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...p,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N=fh();u.setValue("reality_settings.short_id",N),$.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(O,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:p})=>e.jsxs(g,{children:[e.jsxs(v,{children:[l("dynamic_form.vless.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:p.onChange,value:p.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(B,{children:e.jsx(ps,{children:rs.vless.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})}),e.jsx(j,{control:u.control,name:"flow",render:({field:p})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dynamic_form.vless.flow.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:N=>p.onChange(N==="none"?null:N),value:p.value||"none",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(B,{children:rs.vless.flowOptions.map(N=>e.jsx(U,{value:N,children:N},N))})]})})]})})]})};return e.jsx(oe,{children:I[s]?.()})},Nh=x.object({id:x.number().optional().nullable(),code:x.string().optional(),name:x.string().min(1,"form.name.error"),rate:x.string().min(1,"form.rate.error"),tags:x.array(x.string()).default([]),excludes:x.array(x.string()).default([]),ips:x.array(x.string()).default([]),group_ids:x.array(x.string()).default([]),host:x.string().min(1,"form.host.error"),port:x.string().min(1,"form.port.error"),server_port:x.string().min(1,"form.server_port.error"),parent_id:x.string().default("0").nullable(),route_ids:x.array(x.string()).default([]),protocol_settings:x.record(x.any()).default({}).nullable()}),xt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function wh(){const{t:s}=M("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:c,setServerType:o,refetch:u}=Mr(),[h,i]=m.useState([]),[d,f]=m.useState([]),[P,I]=m.useState([]),p=ce({resolver:ue(Nh),defaultValues:xt,mode:"onChange"});m.useEffect(()=>{N()},[n]),m.useEffect(()=>{l?.type&&l.type!==c&&o(l.type)},[l,c,o]),m.useEffect(()=>{l?l.type===c&&p.reset({...xt,...l}):p.reset({...xt,protocol_settings:rs[c].schema.parse({})})},[l,p,c]);const N=async()=>{if(!n)return;const[C,E,A]=await Promise.all([Mt(),pr(),xr()]);i(C.data?.map(Z=>({label:Z.name,value:Z.id.toString()}))||[]),f(E.data?.map(Z=>({label:Z.remarks,value:Z.id.toString()}))||[]),I(A.data||[])},k=m.useMemo(()=>P?.filter(C=>(C.parent_id===0||C.parent_id===null)&&C.type===c&&C.id!==p.watch("id")),[c,P,p]),b=()=>e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(is,{align:"start",children:e.jsx(Bc,{children:Ps.map(({type:C,label:E})=>e.jsx(pe,{onClick:()=>{o(C),a(!0)},className:"cursor-pointer",children:e.jsx(H,{variant:"outline",className:"text-white",style:{background:ls[C]},children:E})},C))})})]}),w=()=>{a(!1),r(null),p.reset(xt)},S=async()=>{const C=p.getValues();(await _d({...C,type:c})).data&&(w(),$.success(s("form.success")),u())};return e.jsxs(ge,{open:n,onOpenChange:w,children:[b(),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(Te,{})]}),e.jsxs(he,{...p,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:p.control,name:"name",render:({field:C})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:s("form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.name.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"rate",render:({field:C})=>e.jsxs(g,{className:"flex-[1]",children:[e.jsx(v,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(_,{children:e.jsx(T,{type:"number",min:"0",step:"0.1",...C})})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:p.control,name:"code",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.code.placeholder"),...C,value:C.value||""})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"tags",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.tags.label")}),e.jsx(_,{children:e.jsx(xa,{value:C.value,onChange:C.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"group_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(Ot,{dialogTrigger:e.jsx(R,{variant:"link",children:s("form.groups.add")}),refetch:N})]}),e.jsx(_,{children:e.jsx(lt,{options:h,onChange:E=>C.onChange(E.map(A=>A.value)),value:h?.filter(E=>C.value.includes(E.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:p.control,name:"host",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.host.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.host.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(j,{control:p.control,name:"port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:e.jsx(T,{placeholder:s("form.port.placeholder"),...C})}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const E=C.value;E&&p.setValue("server_port",E)},children:e.jsx(_e,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"server_port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(v,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.server_port.placeholder"),...C})}),e.jsx(D,{})]})})]})]}),n&&e.jsx(_h,{serverType:c,value:p.watch("protocol_settings"),onChange:C=>p.setValue("protocol_settings",C,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(j,{control:p.control,name:"parent_id",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.parent.label")}),e.jsxs(W,{onValueChange:C.onChange,value:C.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("form.parent.none")}),k?.map(E=>e.jsx(U,{value:E.id.toString(),className:"cursor-pointer",children:E.name},E.id))]})]}),e.jsx(D,{})]})}),e.jsx(j,{control:p.control,name:"route_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsx(v,{children:s("form.route.label")}),e.jsx(_,{children:e.jsx(lt,{options:d,onChange:E=>C.onChange(E.map(A=>A.value)),value:d?.filter(E=>C.value.includes(E.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(D,{})]})})]}),e.jsxs(Ve,{className:"mt-6",children:[e.jsx(R,{type:"button",variant:"outline",onClick:w,children:s("form.cancel")}),e.jsx(R,{type:"submit",onClick:S,children:s("form.submit")})]})]})]})]})}function $a({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const Ch=[{value:ye.Shadowsocks,label:Ps.find(s=>s.type===ye.Shadowsocks)?.label,color:ls[ye.Shadowsocks]},{value:ye.Vmess,label:Ps.find(s=>s.type===ye.Vmess)?.label,color:ls[ye.Vmess]},{value:ye.Trojan,label:Ps.find(s=>s.type===ye.Trojan)?.label,color:ls[ye.Trojan]},{value:ye.Hysteria,label:Ps.find(s=>s.type===ye.Hysteria)?.label,color:ls[ye.Hysteria]},{value:ye.Vless,label:Ps.find(s=>s.type===ye.Vless)?.label,color:ls[ye.Vless]}];function Sh({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("server"),o=l.map(u=>({label:u,value:u}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(wh,{}),e.jsx(T,{placeholder:c("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:u=>s.getColumn("name")?.setFilterValue(u.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx($a,{column:s.getColumn("type"),title:c("toolbar.type"),options:Ch}),s.getColumn("groups")&&e.jsx($a,{column:s.getColumn("groups"),title:c("columns.groups.title"),options:o})]}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[c("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:c(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const it=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),pt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},kh=s=>{const{t:n}=M("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Dt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(H,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ls[a.original.type]},children:[e.jsx(zn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:c=>{c.stopPropagation(),wt(r||l.toString())},children:e.jsx(Da,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ps.find(c=>c.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=m.useState(!!a.getValue("show"));return e.jsx(q,{checked:l,onCheckedChange:async c=>{r(c),Cd({id:a.original.id,type:a.original.type,show:c?1:0}).catch(()=>{r(!c),s()})},style:{backgroundColor:l?ls[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(V,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",pt[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",pt[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(oe,{delayDuration:0,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:c=>{c.stopPropagation(),wt(l)},children:e.jsx(Da,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(H,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,c)=>e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},c)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const c=a.getValue(l);return c?r.some(o=>c.includes(o)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(H,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ls[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:c}=Mr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(ys,{modal:!1,children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(_t,{className:"size-4"})})}),e.jsxs(is,{align:"end",className:"w-40",children:[e.jsx(pe,{className:"cursor-pointer",onClick:()=>{c(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(ho,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(pe,{className:"cursor-pointer",onClick:async()=>{wd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(xo,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(at,{}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:o=>o.preventDefault(),children:e.jsx(Je,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Nd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(cs,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Ph(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState({pageSize:500,pageIndex:0}),[h,i]=m.useState([]),[d,f]=m.useState(!1),[P,I]=m.useState({}),[p,N]=m.useState([]),{refetch:k}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:A}=await xr();return N(A),A}}),b=m.useMemo(()=>{const A=new Set;return p.forEach(Z=>{Z.groups&&Z.groups.forEach(z=>A.add(z.name))}),Array.from(A).sort()},[p]);m.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),I({name:d?2e3:200}),u({pageSize:d?99999:500,pageIndex:0})},[d]);const w=(A,Z)=>{d&&(A.dataTransfer.setData("text/plain",Z.toString()),A.currentTarget.classList.add("opacity-50"))},S=(A,Z)=>{if(!d)return;A.preventDefault(),A.currentTarget.classList.remove("bg-muted");const z=parseInt(A.dataTransfer.getData("text/plain"));if(z===Z)return;const X=[...p],[Gs]=X.splice(z,1);X.splice(Z,0,Gs),N(X)},C=async()=>{if(!d){f(!0);return}const A=p?.map((Z,z)=>({id:Z.id,order:z+1}));Sd(A).then(()=>{$.success("排序保存成功"),f(!1),k()}).finally(()=>{f(!1)})},E=Ae({data:p||[],columns:kh(k),state:{sorting:h,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:P,pagination:o},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:i,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:I,onPaginationChange:u,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(dh,{refetch:k,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:E,toolbar:A=>e.jsx(Sh,{table:A,refetch:k,saveOrder:C,isSortMode:d,groups:b}),draggable:d,onDragStart:w,onDragEnd:A=>A.currentTarget.classList.remove("opacity-50"),onDragOver:A=>{A.preventDefault(),A.currentTarget.classList.add("bg-muted")},onDragLeave:A=>A.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!d})})})}function Th(){const{t:s}=M("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ph,{})})]})]})}const Dh=Object.freeze(Object.defineProperty({__proto__:null,default:Th},Symbol.toStringTag,{value:"Module"}));function Rh({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Ot,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const Eh=s=>{const{t:n}=M("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(zn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Ot,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Pd({id:a.original.id}).then(({data:l})=>{l&&($.success(n("messages.updateSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Ih(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),{data:h,refetch:i,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:P}=await Mt();return P}}),f=Ae({data:h||[],columns:Eh(i),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(Rh,{table:P,refetch:i}),isLoading:d})}function Mh(){const{t:s}=M("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ih,{})})]})]})}const Oh=Object.freeze(Object.defineProperty({__proto__:null,default:Mh},Symbol.toStringTag,{value:"Module"})),Vh=s=>x.object({remarks:x.string().min(1,s("form.validation.remarks")),match:x.array(x.string()),action:x.enum(["block","dns"]),action_value:x.string().optional()});function Or({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=M("route"),c=ce({resolver:ue(Vh(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1);return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{})]}),e.jsxs(he,{...c,children:[e.jsx(j,{control:c.control,name:"remarks",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.remarksPlaceholder"),...h})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"match",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(v,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(Cs,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:h.value.join(` +`).filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.emailWhitelist.suffixes.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.enable.label")}),e.jsx(L,{children:s("safe.form.recaptcha.enable.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("recaptcha_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"recaptcha_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.key.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.key.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.recaptcha.key.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"recaptcha_site_key",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.recaptcha.siteKey.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.recaptcha.siteKey.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.recaptcha.siteKey.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"register_limit_by_ip_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.enable.label")}),e.jsx(L,{children:s("safe.form.registerLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("register_limit_by_ip_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"register_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.registerLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"register_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.registerLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.registerLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.registerLimit.expire.description")}),e.jsx(D,{})]})})]}),e.jsx(j,{control:r.control,name:"password_limit_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.enable.label")}),e.jsx(L,{children:s("safe.form.passwordLimit.enable.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("password_limit_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"password_limit_count",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.count.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.count.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.passwordLimit.count.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"password_limit_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("safe.form.passwordLimit.expire.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("safe.form.passwordLimit.expire.placeholder"),...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(L,{children:s("safe.form.passwordLimit.expire.description")}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("safe.form.saving")})]})})}function uu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("safe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("safe.description")})]}),e.jsx(ve,{}),e.jsx(mu,{})]})}const hu=Object.freeze(Object.defineProperty({__proto__:null,default:uu},Symbol.toStringTag,{value:"Module"})),pu=p.object({plan_change_enable:p.boolean().nullable().default(!1),reset_traffic_method:p.coerce.number().nullable().default(0),surplus_enable:p.boolean().nullable().default(!1),new_order_event_id:p.coerce.number().nullable().default(0),renew_order_event_id:p.coerce.number().nullable().default(0),change_order_event_id:p.coerce.number().nullable().default(0),show_info_to_server_enable:p.boolean().nullable().default(!1),show_protocol_to_server_enable:p.boolean().nullable().default(!1),default_remind_expire:p.boolean().nullable().default(!1),default_remind_traffic:p.boolean().nullable().default(!1),subscribe_path:p.string().nullable().default("s")}),xu={plan_change_enable:!1,reset_traffic_method:0,surplus_enable:!1,new_order_event_id:0,renew_order_event_id:0,change_order_event_id:0,show_info_to_server_enable:!1,show_protocol_to_server_enable:!1,default_remind_expire:!1,default_remind_traffic:!1,subscribe_path:"s"};function fu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(pu),defaultValues:xu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","subscribe"],queryFn:()=>us("subscribe")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.subscribe){const i=c?.data?.subscribe;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"plan_change_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.plan_change_enable.title")}),e.jsx(L,{children:s("subscribe.plan_change_enable.description")}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"reset_traffic_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.reset_traffic_method.title")}),e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择重置方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.reset_traffic_method.options.monthly_first")}),e.jsx(U,{value:"1",children:s("subscribe.reset_traffic_method.options.monthly_reset")}),e.jsx(U,{value:"2",children:s("subscribe.reset_traffic_method.options.no_reset")}),e.jsx(U,{value:"3",children:s("subscribe.reset_traffic_method.options.yearly_first")}),e.jsx(U,{value:"4",children:s("subscribe.reset_traffic_method.options.yearly_reset")})]})]}),e.jsx(L,{children:s("subscribe.reset_traffic_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"surplus_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.surplus_enable.title")}),e.jsx(L,{children:s("subscribe.surplus_enable.description")}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"new_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.new_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.new_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.new_order_event.options.reset_traffic")})]})]})})}),e.jsx(L,{children:s("subscribe.new_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"renew_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.renew_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.renew_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.renew_order_event.options.reset_traffic")})]})]})})}),e.jsx(L,{children:s("renew_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"change_order_event_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.change_order_event.title")}),e.jsx("div",{className:"relative w-max",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:i.onChange,value:i.value?.toString(),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择"})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("subscribe.change_order_event.options.no_action")}),e.jsx(U,{value:"1",children:s("subscribe.change_order_event.options.reset_traffic")})]})]})})}),e.jsx(L,{children:s("subscribe.change_order_event.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"subscribe_path",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("subscribe.subscribe_path.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:"subscribe",...i,value:i.value||"",onChange:d=>{i.onChange(d),h(r.getValues())}})}),e.jsxs("div",{className:"text-sm text-muted-foreground",children:[s("subscribe.subscribe_path.description"),e.jsx("br",{}),s("subscribe.subscribe_path.current_format",{path:i.value||"s"})]}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"show_info_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("subscribe.show_info_to_server.title")}),e.jsx(L,{children:s("subscribe.show_info_to_server.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"show_protocol_to_server_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("subscribe.show_protocol_to_server.title")}),e.jsx(L,{children:s("subscribe.show_protocol_to_server.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value||!1,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function gu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("subscribe.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("subscribe.description")})]}),e.jsx(ve,{}),e.jsx(fu,{})]})}const ju=Object.freeze(Object.defineProperty({__proto__:null,default:gu},Symbol.toStringTag,{value:"Module"})),bu=p.object({invite_force:p.boolean().default(!1),invite_commission:p.coerce.string().default("0"),invite_gen_limit:p.coerce.string().default("0"),invite_never_expire:p.boolean().default(!1),commission_first_time_enable:p.boolean().default(!1),commission_auto_check_enable:p.boolean().default(!1),commission_withdraw_limit:p.coerce.string().default("0"),commission_withdraw_method:p.array(p.string()).default(["支付宝","USDT","Paypal"]),withdraw_close_enable:p.boolean().default(!1),commission_distribution_enable:p.boolean().default(!1),commission_distribution_l1:p.coerce.number().default(0),commission_distribution_l2:p.coerce.number().default(0),commission_distribution_l3:p.coerce.number().default(0)}),vu={invite_force:!1,invite_commission:"0",invite_gen_limit:"0",invite_never_expire:!1,commission_first_time_enable:!1,commission_auto_check_enable:!1,commission_withdraw_limit:"0",commission_withdraw_method:["支付宝","USDT","Paypal"],withdraw_close_enable:!1,commission_distribution_enable:!1,commission_distribution_l1:0,commission_distribution_l2:0,commission_distribution_l3:0};function yu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(bu),defaultValues:vu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","invite"],queryFn:()=>us("invite")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("common.autoSaved"))}});m.useEffect(()=>{if(c?.data?.invite){const i=c?.data?.invite;Object.entries(i).forEach(([d,f])=>{typeof f=="number"?r.setValue(d,String(f)):r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"invite_force",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.invite_force.title")}),e.jsx(L,{children:s("invite.invite_force.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"invite_commission",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("invite.invite_commission.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_commission.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("invite.invite_commission.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_gen_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("invite.invite_gen_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.invite_gen_limit.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("invite.invite_gen_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"invite_never_expire",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.invite_never_expire.title")}),e.jsx(L,{children:s("invite.invite_never_expire.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_first_time_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_first_time.title")}),e.jsx(L,{children:s("invite.commission_first_time.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_auto_check_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_auto_check.title")}),e.jsx(L,{children:s("invite.commission_auto_check.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("invite.commission_withdraw_limit.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_limit.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("invite.commission_withdraw_limit.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_withdraw_method",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("invite.commission_withdraw_method.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("invite.commission_withdraw_method.placeholder"),...i,value:Array.isArray(i.value)?i.value.join(","):"",onChange:d=>{const f=d.target.value.split(",").filter(Boolean);i.onChange(f),h(r.getValues())}})}),e.jsx(L,{children:s("invite.commission_withdraw_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"withdraw_close_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.withdraw_close.title")}),e.jsx(L,{children:s("invite.withdraw_close.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("invite.commission_distribution.title")}),e.jsx(L,{children:s("invite.commission_distribution.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:d=>{i.onChange(d),h(r.getValues())}})})]})}),r.watch("commission_distribution_enable")&&e.jsxs(e.Fragment,{children:[e.jsx(j,{control:r.control,name:"commission_distribution_l1",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:s("invite.commission_distribution.l1")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l2",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:s("invite.commission_distribution.l2")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"commission_distribution_l3",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:s("invite.commission_distribution.l3")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("invite.commission_distribution.placeholder"),...i,value:i.value||"",onChange:d=>{const f=d.target.value?Number(d.target.value):0;i.onChange(f),h(r.getValues())}})}),e.jsx(D,{})]})})]}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("invite.saving")})]})})}function _u(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("invite.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("invite.description")})]}),e.jsx(ve,{}),e.jsx(yu,{})]})}const Nu=Object.freeze(Object.defineProperty({__proto__:null,default:_u},Symbol.toStringTag,{value:"Module"})),wu=p.object({frontend_theme:p.string().nullable(),frontend_theme_sidebar:p.string().nullable(),frontend_theme_header:p.string().nullable(),frontend_theme_color:p.string().nullable(),frontend_background_url:p.string().url().nullable()}),Cu={frontend_theme:"",frontend_theme_sidebar:"",frontend_theme_header:"",frontend_theme_color:"",frontend_background_url:""};function Su(){const{data:s}=se({queryKey:["settings","frontend"],queryFn:()=>us("frontend")}),n=ce({resolver:ue(wu),defaultValues:Cu,mode:"onChange"});m.useEffect(()=>{if(s?.data?.frontend){const l=s?.data?.frontend;Object.entries(l).forEach(([r,c])=>{n.setValue(r,c)})}},[s]);function a(l){hs(l).then(({data:r})=>{r&&$.success("更新成功")})}return e.jsx(he,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(a),className:"space-y-8",children:[e.jsx(j,{control:n.control,name:"frontend_theme_sidebar",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:"边栏风格"}),e.jsx(L,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(G,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_header",render:({field:l})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:"头部风格"}),e.jsx(L,{children:"边栏风格"})]}),e.jsx(_,{children:e.jsx(G,{checked:l.value,onCheckedChange:l.onChange})})]})}),e.jsx(j,{control:n.control,name:"frontend_theme_color",render:({field:l})=>e.jsxs(g,{children:[e.jsx(b,{children:"主题色"}),e.jsxs("div",{className:"relative w-max",children:[e.jsx(_,{children:e.jsxs("select",{className:y(Hs({variant:"outline"}),"w-[200px] appearance-none font-normal"),...l,children:[e.jsx("option",{value:"default",children:"默认"}),e.jsx("option",{value:"black",children:"黑色"}),e.jsx("option",{value:"blackblue",children:"暗蓝色"}),e.jsx("option",{value:"green",children:"奶绿色"})]})}),e.jsx(na,{className:"absolute right-3 top-2.5 h-4 w-4 opacity-50"})]}),e.jsx(L,{children:"主题色"}),e.jsx(D,{})]})}),e.jsx(j,{control:n.control,name:"frontend_background_url",render:({field:l})=>e.jsxs(g,{children:[e.jsx(b,{children:"背景"}),e.jsx(_,{children:e.jsx(T,{placeholder:"请输入图片地址",...l})}),e.jsx(L,{children:"将会在后台登录页面进行展示。"}),e.jsx(D,{})]})}),e.jsx(R,{type:"submit",children:"保存设置"})]})})}function ku(){return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"个性化设置"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"自定义系统界面外观,包括主题风格、布局、颜色方案、背景图等个性化选项。"})]}),e.jsx(ve,{}),e.jsx(Su,{})]})}const Pu=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"})),Tu=p.object({server_pull_interval:p.coerce.number().nullable(),server_push_interval:p.coerce.number().nullable(),server_token:p.string().nullable(),device_limit_mode:p.coerce.number().nullable()}),Du={server_pull_interval:0,server_push_interval:0,server_token:"",device_limit_mode:0};function Ru(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Tu),defaultValues:Du,mode:"onBlur"}),{data:c}=se({queryKey:["settings","server"],queryFn:()=>us("server")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:d=>{d.data&&$.success(s("common.AutoSaved"))}});m.useEffect(()=>{if(c?.data.server){const d=c.data.server;Object.entries(d).forEach(([f,P])=>{r.setValue(f,P)}),l.current=d}},[c]);const u=m.useCallback(fe.debounce(async d=>{if(!fe.isEqual(d,l.current)){a(!0);try{await o(d),l.current=d}finally{a(!1)}}},1e3),[o]),h=m.useCallback(d=>{u(d)},[u]);m.useEffect(()=>{const d=r.watch(f=>{h(f)});return()=>d.unsubscribe()},[r.watch,h]);const i=()=>{const d=Math.floor(Math.random()*17)+16,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let P="";for(let E=0;Ee.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("server.server_token.title")}),e.jsx(_,{children:e.jsxs("div",{className:"relative",children:[e.jsx(T,{placeholder:s("server.server_token.placeholder"),...d,value:d.value||"",className:"pr-10"}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",className:"absolute right-0 top-0 h-full px-3 py-2",onClick:f=>{f.preventDefault(),i()},children:e.jsx(eo,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"})})}),e.jsx(te,{children:e.jsx("p",{children:s("server.server_token.generate_tooltip")})})]})})]})}),e.jsx(L,{children:s("server.server_token.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_pull_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("server.server_pull_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_pull_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(L,{children:s("server.server_pull_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"server_push_interval",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("server.server_push_interval.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("server.server_push_interval.placeholder"),...d,value:d.value||"",onChange:f=>{const P=f.target.value?Number(f.target.value):null;d.onChange(P)}})}),e.jsx(L,{children:s("server.server_push_interval.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"device_limit_mode",render:({field:d})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("server.device_limit_mode.title")}),e.jsxs(W,{onValueChange:d.onChange,value:d.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("server.device_limit_mode.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("server.device_limit_mode.strict")}),e.jsx(U,{value:"1",children:s("server.device_limit_mode.relaxed")})]})]}),e.jsx(L,{children:s("server.device_limit_mode.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("server.saving")})]})})}function Iu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("server.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("server.description")})]}),e.jsx(ve,{}),e.jsx(Ru,{})]})}const Eu=Object.freeze(Object.defineProperty({__proto__:null,default:Iu},Symbol.toStringTag,{value:"Module"}));function Mu({open:s,onOpenChange:n,result:a}){const l=!a.error;return e.jsx(ge,{open:s,onOpenChange:n,children:e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l?e.jsx(Dn,{className:"h-5 w-5 text-green-500"}):e.jsx(Rn,{className:"h-5 w-5 text-destructive"}),e.jsx(je,{children:l?"邮件发送成功":"邮件发送失败"})]}),e.jsx(Te,{children:l?"测试邮件已成功发送,请检查收件箱":"发送测试邮件时遇到错误"})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"发送详情"}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2 text-sm",children:[e.jsx("div",{className:"text-muted-foreground",children:"收件地址"}),e.jsx("div",{children:a.email}),e.jsx("div",{className:"text-muted-foreground",children:"邮件主题"}),e.jsx("div",{children:a.subject}),e.jsx("div",{className:"text-muted-foreground",children:"模板名称"}),e.jsx("div",{children:a.template_name})]})]}),a.error&&e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium text-destructive",children:"错误信息"}),e.jsx("div",{className:"rounded-md bg-destructive/10 p-3 text-sm text-destructive break-all",children:a.error})]}),e.jsxs("div",{className:"grid gap-2",children:[e.jsx("div",{className:"font-medium",children:"配置信息"}),e.jsx(rt,{className:"h-[200px] rounded-md border p-4",children:e.jsx("div",{className:"grid gap-2 text-sm",children:e.jsxs("div",{className:"grid grid-cols-[100px_1fr] items-center gap-2",children:[e.jsx("div",{className:"text-muted-foreground",children:"驱动"}),e.jsx("div",{children:a.config.driver}),e.jsx("div",{className:"text-muted-foreground",children:"服务器"}),e.jsx("div",{children:a.config.host}),e.jsx("div",{className:"text-muted-foreground",children:"端口"}),e.jsx("div",{children:a.config.port}),e.jsx("div",{className:"text-muted-foreground",children:"加密方式"}),e.jsx("div",{children:a.config.encryption||"无"}),e.jsx("div",{className:"text-muted-foreground",children:"发件人"}),e.jsx("div",{children:a.config.from.address?`${a.config.from.address}${a.config.from.name?` (${a.config.from.name})`:""}`:"未设置"}),e.jsx("div",{className:"text-muted-foreground",children:"用户名"}),e.jsx("div",{children:a.config.username||"未设置"})]})})})]})]})]})})}const Lu=p.object({email_template:p.string().nullable().default("classic"),email_host:p.string().nullable().default(""),email_port:p.string().regex(/^\d+$/).nullable().default("465"),email_username:p.string().nullable().default(""),email_password:p.string().nullable().default(""),email_encryption:p.string().nullable().default(""),email_from_address:p.string().email().nullable().default(""),remind_mail_enable:p.boolean().nullable().default(!1)});function Ou(){const{t:s}=M("settings"),[n,a]=m.useState(null),[l,r]=m.useState(!1),c=m.useRef(null),[o,u]=m.useState(!1),h=ce({resolver:ue(Lu),defaultValues:{},mode:"onBlur"}),{data:i}=se({queryKey:["settings","email"],queryFn:()=>us("email")}),{data:d}=se({queryKey:["emailTemplate"],queryFn:()=>Mm()}),{mutateAsync:f}=es({mutationFn:hs,onSuccess:k=>{k.data&&$.success(s("common.autoSaved"))}}),{mutate:P,isPending:E}=es({mutationFn:Lm,onMutate:()=>{a(null),r(!1)},onSuccess:k=>{a(k.data),r(!0),k.data.error?$.error(s("email.test.error")):$.success(s("email.test.success"))}});m.useEffect(()=>{if(i?.data.email){const k=i.data.email;Object.entries(k).forEach(([v,w])=>{h.setValue(v,w)}),c.current=k}},[i]);const x=m.useCallback(fe.debounce(async k=>{if(!fe.isEqual(k,c.current)){u(!0);try{await f(k),c.current=k}finally{u(!1)}}},1e3),[f]),N=m.useCallback(k=>{x(k)},[x]);return m.useEffect(()=>{const k=h.watch(v=>{N(v)});return()=>k.unsubscribe()},[h.watch,N]),e.jsxs(e.Fragment,{children:[e.jsx(he,{...h,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"email_host",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email.email_host.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(L,{children:s("email.email_host.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_port",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email.email_port.title")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:s("common.placeholder"),...k,value:k.value||"",onChange:v=>{const w=v.target.value?Number(v.target.value):null;k.onChange(w)}})}),e.jsx(L,{children:s("email.email_port.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_encryption",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email.email_encryption.title")}),e.jsxs(W,{onValueChange:k.onChange,value:k.value||"none",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:"请选择加密方式"})})}),e.jsxs(B,{children:[e.jsx(U,{value:"none",children:s("email.email_encryption.none")}),e.jsx(U,{value:"ssl",children:s("email.email_encryption.ssl")}),e.jsx(U,{value:"tls",children:s("email.email_encryption.tls")})]})]}),e.jsx(L,{children:s("email.email_encryption.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_username",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email.email_username.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(L,{children:s("email.email_username.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_password",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email_password.title")}),e.jsx(_,{children:e.jsx(T,{type:"password",placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(L,{children:s("email_password.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_from_address",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email_from.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...k,value:k.value||""})}),e.jsx(L,{children:s("email_from.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"email_template",render:({field:k})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("email_template.title")}),e.jsxs(W,{onValueChange:v=>{k.onChange(v),N(h.getValues())},value:k.value||void 0,children:[e.jsx(_,{children:e.jsx(K,{className:"w-[200px]",children:e.jsx(Y,{placeholder:s("email_template.placeholder")})})}),e.jsx(B,{children:d?.data?.map(v=>e.jsx(U,{value:v,children:v},v))})]}),e.jsx(L,{children:s("email_template.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"remind_mail_enable",render:({field:k})=>e.jsxs(g,{children:[e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(b,{className:"text-base",children:s("remind_mail.title")}),e.jsx(L,{children:s("remind_mail.description")})]}),e.jsx(_,{children:e.jsx(G,{checked:k.value||!1,onCheckedChange:v=>{k.onChange(v),N(h.getValues())}})})]})}),e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(R,{onClick:()=>P(),loading:E,disabled:E,children:s(E?"test.sending":"test.title")})})]})}),o&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("saving")}),n&&e.jsx(Mu,{open:l,onOpenChange:r,result:n})]})}function Vu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("email.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("email.description")})]}),e.jsx(ve,{}),e.jsx(Ou,{})]})}const Au=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"})),Fu=p.object({telegram_bot_enable:p.boolean().nullable(),telegram_bot_token:p.string().nullable(),telegram_discuss_link:p.string().nullable()}),zu={telegram_bot_enable:!1,telegram_bot_token:"",telegram_discuss_link:""};function Uu(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Fu),defaultValues:zu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","telegram"],queryFn:()=>us("telegram")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:f=>{f.data&&$.success(s("common.autoSaved"))}}),{mutate:u,isPending:h}=es({mutationFn:Om,onSuccess:f=>{f.data&&$.success(s("telegram.webhook_success"))}});m.useEffect(()=>{if(c?.data.telegram){const f=c.data.telegram;Object.entries(f).forEach(([P,E])=>{r.setValue(P,E)}),l.current=f}},[c]);const i=m.useCallback(fe.debounce(async f=>{if(!fe.isEqual(f,l.current)){a(!0);try{await o(f),l.current=f}finally{a(!1)}}},1e3),[o]),d=m.useCallback(f=>{i(f)},[i]);return m.useEffect(()=>{const f=r.watch(P=>{d(P)});return()=>f.unsubscribe()},[r.watch,d]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"telegram_bot_token",render:({field:f})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("telegram.bot_token.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.bot_token.placeholder"),...f,value:f.value||""})}),e.jsx(L,{children:s("telegram.bot_token.description")}),e.jsx(D,{})]})}),r.watch("telegram_bot_token")&&e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("telegram.webhook.title")}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(R,{loading:h,disabled:h,onClick:()=>u(),children:s(h?"telegram.webhook.setting":"telegram.webhook.button")}),n&&e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.saving")})]}),e.jsx(L,{children:s("telegram.webhook.description")}),e.jsx(D,{})]}),e.jsx(j,{control:r.control,name:"telegram_bot_enable",render:({field:f})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("telegram.bot_enable.title")}),e.jsx(L,{children:s("telegram.bot_enable.description")}),e.jsx(_,{children:e.jsx(G,{checked:f.value||!1,onCheckedChange:P=>{f.onChange(P),d(r.getValues())}})}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"telegram_discuss_link",render:({field:f})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("telegram.discuss_link.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("telegram.discuss_link.placeholder"),...f,value:f.value||""})}),e.jsx(L,{children:s("telegram.discuss_link.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function $u(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("telegram.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("telegram.description")})]}),e.jsx(ve,{}),e.jsx(Uu,{})]})}const Hu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"})),Gu=p.object({windows_version:p.string().nullable(),windows_download_url:p.string().nullable(),macos_version:p.string().nullable(),macos_download_url:p.string().nullable(),android_version:p.string().nullable(),android_download_url:p.string().nullable()}),qu={windows_version:"",windows_download_url:"",macos_version:"",macos_download_url:"",android_version:"",android_download_url:""};function Ku(){const{t:s}=M("settings"),[n,a]=m.useState(!1),l=m.useRef(null),r=ce({resolver:ue(Gu),defaultValues:qu,mode:"onBlur"}),{data:c}=se({queryKey:["settings","app"],queryFn:()=>us("app")}),{mutateAsync:o}=es({mutationFn:hs,onSuccess:i=>{i.data&&$.success(s("app.save_success"))}});m.useEffect(()=>{if(c?.data.app){const i=c.data.app;Object.entries(i).forEach(([d,f])=>{r.setValue(d,f)}),l.current=i}},[c]);const u=m.useCallback(fe.debounce(async i=>{if(!fe.isEqual(i,l.current)){a(!0);try{await o(i),l.current=i}finally{a(!1)}}},1e3),[o]),h=m.useCallback(i=>{u(i)},[u]);return m.useEffect(()=>{const i=r.watch(d=>{h(d)});return()=>i.unsubscribe()},[r.watch,h]),e.jsx(he,{...r,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:r.control,name:"windows_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.windows.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.windows.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"windows_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.windows.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.windows.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.macos.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.macos.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"macos_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.macos.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.macos.download.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_version",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.android.version.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.android.version.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"android_download_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{className:"text-base",children:s("app.android.download.title")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("common.placeholder"),...i,value:i.value||""})}),e.jsx(L,{children:s("app.android.download.description")}),e.jsx(D,{})]})}),n&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("common.saving")})]})})}function Bu(){const{t:s}=M("settings");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:s("app.title")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s("app.description")})]}),e.jsx(ve,{}),e.jsx(Ku,{})]})}const Wu=Object.freeze(Object.defineProperty({__proto__:null,default:Bu},Symbol.toStringTag,{value:"Module"})),da=m.forwardRef(({className:s,...n},a)=>e.jsx("div",{className:"relative w-full overflow-auto",children:e.jsx("table",{ref:a,className:y("w-full caption-bottom text-sm",s),...n})}));da.displayName="Table";const ma=m.forwardRef(({className:s,...n},a)=>e.jsx("thead",{ref:a,className:y("[&_tr]:border-b",s),...n}));ma.displayName="TableHeader";const ua=m.forwardRef(({className:s,...n},a)=>e.jsx("tbody",{ref:a,className:y("[&_tr:last-child]:border-0",s),...n}));ua.displayName="TableBody";const Yu=m.forwardRef(({className:s,...n},a)=>e.jsx("tfoot",{ref:a,className:y("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",s),...n}));Yu.displayName="TableFooter";const bs=m.forwardRef(({className:s,...n},a)=>e.jsx("tr",{ref:a,className:y("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",s),...n}));bs.displayName="TableRow";const ha=m.forwardRef(({className:s,...n},a)=>e.jsx("th",{ref:a,className:y("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));ha.displayName="TableHead";const Us=m.forwardRef(({className:s,...n},a)=>e.jsx("td",{ref:a,className:y("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",s),...n}));Us.displayName="TableCell";const Ju=m.forwardRef(({className:s,...n},a)=>e.jsx("caption",{ref:a,className:y("mt-4 text-sm text-muted-foreground",s),...n}));Ju.displayName="TableCaption";function Qu({table:s}){const[n,a]=m.useState("");m.useEffect(()=>{a((s.getState().pagination.pageIndex+1).toString())},[s.getState().pagination.pageIndex]);const l=r=>{const c=parseInt(r);!isNaN(c)&&c>=1&&c<=s.getPageCount()?s.setPageIndex(c-1):a((s.getState().pagination.pageIndex+1).toString())};return e.jsxs("div",{className:"flex flex-col-reverse gap-4 px-2 py-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex-1 text-sm text-muted-foreground",children:["已选择 ",s.getFilteredSelectedRowModel().rows.length," 项, 共"," ",s.getFilteredRowModel().rows.length," 项"]}),e.jsxs("div",{className:"flex flex-col-reverse items-center gap-4 sm:flex-row sm:gap-6 lg:gap-8",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"每页显示"}),e.jsxs(W,{value:`${s.getState().pagination.pageSize}`,onValueChange:r=>{s.setPageSize(Number(r))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:s.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50,100,500].map(r=>e.jsx(U,{value:`${r}`,children:r},r))})]})]}),e.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm font-medium",children:[e.jsx("span",{children:"第"}),e.jsx(T,{type:"text",value:n,onChange:r=>a(r.target.value),onBlur:r=>l(r.target.value),onKeyDown:r=>{r.key==="Enter"&&l(r.currentTarget.value)},className:"h-8 w-[50px] text-center"}),e.jsxs("span",{children:["页,共 ",s.getPageCount()," 页"]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(0),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到第一页"}),e.jsx(so,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.previousPage(),disabled:!s.getCanPreviousPage(),children:[e.jsx("span",{className:"sr-only",children:"上一页"}),e.jsx(Cn,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"h-8 w-8 p-0",onClick:()=>s.nextPage(),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"下一页"}),e.jsx(aa,{className:"h-4 w-4"})]}),e.jsxs(R,{variant:"outline",className:"hidden h-8 w-8 p-0 lg:flex",onClick:()=>s.setPageIndex(s.getPageCount()-1),disabled:!s.getCanNextPage(),children:[e.jsx("span",{className:"sr-only",children:"跳转到最后一页"}),e.jsx(to,{className:"h-4 w-4"})]})]})]})]})}function Ye({table:s,toolbar:n,draggable:a=!1,onDragStart:l,onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:u,showPagination:h=!0,isLoading:i=!1}){const d=m.useRef(null),f=s.getAllColumns().filter(N=>N.getIsPinned()==="left"),P=s.getAllColumns().filter(N=>N.getIsPinned()==="right"),E=N=>f.slice(0,N).reduce((k,v)=>k+(v.getSize()??0),0),x=N=>P.slice(N+1).reduce((k,v)=>k+(v.getSize()??0),0);return e.jsxs("div",{className:"space-y-4",children:[typeof n=="function"?n(s):n,e.jsx("div",{ref:d,className:"relative overflow-auto rounded-md border bg-card",children:e.jsx("div",{className:"overflow-auto",children:e.jsxs(da,{children:[e.jsx(ma,{children:s.getHeaderGroups().map(N=>e.jsx(bs,{className:"hover:bg-transparent",children:N.headers.map((k,v)=>{const w=k.column.getIsPinned()==="left",S=k.column.getIsPinned()==="right",C=w?E(f.indexOf(k.column)):void 0,I=S?x(P.indexOf(k.column)):void 0;return e.jsx(ha,{colSpan:k.colSpan,style:{width:k.getSize(),...w&&{left:C},...S&&{right:I}},className:y("h-11 bg-card px-4 text-muted-foreground",(w||S)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",w&&"before:right-0",S&&"before:left-0"]),children:k.isPlaceholder?null:vt(k.column.columnDef.header,k.getContext())},k.id)})},N.id))}),e.jsx(ua,{children:s.getRowModel().rows?.length?s.getRowModel().rows.map((N,k)=>e.jsx(bs,{"data-state":N.getIsSelected()&&"selected",className:"hover:bg-muted/50",draggable:a,onDragStart:v=>l?.(v,k),onDragEnd:r,onDragOver:c,onDragLeave:o,onDrop:v=>u?.(v,k),children:N.getVisibleCells().map((v,w)=>{const S=v.column.getIsPinned()==="left",C=v.column.getIsPinned()==="right",I=S?E(f.indexOf(v.column)):void 0,A=C?x(P.indexOf(v.column)):void 0;return e.jsx(Us,{style:{width:v.column.getSize(),...S&&{left:I},...C&&{right:A}},className:y("bg-card",(S||C)&&["sticky z-20","before:absolute before:bottom-0 before:top-0 before:w-[1px] before:bg-border",S&&"before:right-0",C&&"before:left-0"]),children:vt(v.column.columnDef.cell,v.getContext())},v.id)})},N.id)):e.jsx(bs,{children:e.jsx(Us,{colSpan:s.getAllColumns().length,className:"h-24 text-center",children:"暂无数据"})})})]})})}),h&&e.jsx(Qu,{table:s})]})}const Zu=s=>p.object({id:p.number().nullable(),name:p.string().min(2,s("form.validation.name.min")).max(30,s("form.validation.name.max")),icon:p.string().optional().nullable(),notify_domain:p.string().refine(a=>!a||/^https?:\/\/\S+/.test(a),s("form.validation.notify_domain.url")).optional().nullable(),handling_fee_fixed:p.coerce.number().min(0).optional().nullable(),handling_fee_percent:p.coerce.number().min(0).max(100).optional().nullable(),payment:p.string().min(1,s("form.validation.payment.required")),config:p.record(p.string(),p.string())}),Fa={id:null,name:"",icon:"",notify_domain:"",handling_fee_fixed:0,handling_fee_percent:0,payment:"",config:{}};function vr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=Fa}){const{t:r}=M("payment"),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState([]),[f,P]=m.useState([]),E=Zu(r),x=ce({resolver:ue(E),defaultValues:l,mode:"onChange"}),N=x.watch("payment");m.useEffect(()=>{c&&(async()=>{const{data:w}=await Zd();d(w)})()},[c]),m.useEffect(()=>{if(!N||!c)return;(async()=>{const w={payment:N,...a==="edit"&&{id:Number(x.getValues("id"))}};Xd(w).then(({data:S})=>{P(S);const C=S.reduce((I,A)=>(A.field_name&&(I[A.field_name]=A.value??""),I),{});x.setValue("config",C)})})()},[N,c,x,a]);const k=async v=>{h(!0);try{(await em(v)).data&&($.success(r("form.messages.success")),x.reset(Fa),s(),o(!1))}finally{h(!1)}};return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")})}),e.jsx(he,{...x,children:e.jsxs("form",{onSubmit:x.handleSubmit(k),className:"space-y-4",children:[e.jsx(j,{control:x.control,name:"name",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.name.placeholder"),...v})}),e.jsx(L,{children:r("form.fields.name.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"icon",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.icon.label")}),e.jsx(_,{children:e.jsx(T,{...v,value:v.value||"",placeholder:r("form.fields.icon.placeholder")})}),e.jsx(L,{children:r("form.fields.icon.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"notify_domain",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.notify_domain.label")}),e.jsx(_,{children:e.jsx(T,{...v,value:v.value||"",placeholder:r("form.fields.notify_domain.placeholder")})}),e.jsx(L,{children:r("form.fields.notify_domain.description")}),e.jsx(D,{})]})}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsx(j,{control:x.control,name:"handling_fee_percent",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.handling_fee_percent.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...v,value:v.value||"",placeholder:r("form.fields.handling_fee_percent.placeholder")})}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"handling_fee_fixed",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.handling_fee_fixed.label")}),e.jsx(_,{children:e.jsx(T,{type:"number",...v,value:v.value||"",placeholder:r("form.fields.handling_fee_fixed.placeholder")})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:x.control,name:"payment",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.payment.label")}),e.jsxs(W,{onValueChange:v.onChange,defaultValue:v.value,children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.fields.payment.placeholder")})})}),e.jsx(B,{children:i.map(w=>e.jsx(U,{value:w,children:w},w))})]}),e.jsx(L,{children:r("form.fields.payment.description")}),e.jsx(D,{})]})}),f.length>0&&e.jsx("div",{className:"space-y-4",children:f.map(v=>e.jsx(j,{control:x.control,name:`config.${v.field_name}`,render:({field:w})=>e.jsxs(g,{children:[e.jsx(b,{children:v.label}),e.jsx(_,{children:e.jsx(T,{...w,value:w.value||""})}),e.jsx(D,{})]})},v.field_name))}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",disabled:u,children:r("form.buttons.submit")})]})]})})]})]})}function O({column:s,title:n,tooltip:a,className:l}){return s.getCanSort()?e.jsx("div",{className:"flex items-center gap-1",children:e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(R,{variant:"ghost",size:"default",className:y("-ml-3 flex h-8 items-center gap-2 text-nowrap font-medium hover:bg-muted/60",l),onClick:()=>s.toggleSorting(s.getIsSorted()==="asc"),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(Pa,{className:"h-4 w-4 cursor-pointer text-muted-foreground"})}),e.jsx(te,{children:a})]})}),s.getIsSorted()==="asc"?e.jsx(qt,{className:"h-4 w-4 text-foreground/70"}):s.getIsSorted()==="desc"?e.jsx(Kt,{className:"h-4 w-4 text-foreground/70"}):e.jsx(ao,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-foreground/70"})]})})}):e.jsxs("div",{className:y("flex items-center space-x-1 text-nowrap py-2 font-medium text-muted-foreground",l),children:[e.jsx("span",{children:n}),a&&e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Pa,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(te,{children:a})]})})]})}const Xu=no,eh=ro,sh=lo,yr=m.forwardRef(({className:s,...n},a)=>e.jsx(Mn,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));yr.displayName=Mn.displayName;const _r=m.forwardRef(({className:s,...n},a)=>e.jsxs(sh,{children:[e.jsx(yr,{}),e.jsx(Ln,{ref:a,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",s),...n})]}));_r.displayName=Ln.displayName;const Nr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});Nr.displayName="AlertDialogHeader";const wr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});wr.displayName="AlertDialogFooter";const Cr=m.forwardRef(({className:s,...n},a)=>e.jsx(On,{ref:a,className:y("text-lg font-semibold",s),...n}));Cr.displayName=On.displayName;const Sr=m.forwardRef(({className:s,...n},a)=>e.jsx(Vn,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));Sr.displayName=Vn.displayName;const kr=m.forwardRef(({className:s,...n},a)=>e.jsx(An,{ref:a,className:y($s(),s),...n}));kr.displayName=An.displayName;const Pr=m.forwardRef(({className:s,...n},a)=>e.jsx(Fn,{ref:a,className:y($s({variant:"outline"}),"mt-2 sm:mt-0",s),...n}));Pr.displayName=Fn.displayName;function Je({onConfirm:s,children:n,title:a="确认操作",description:l="确定要执行此操作吗?",cancelText:r="取消",confirmText:c="确认",variant:o="default",className:u}){return e.jsxs(Xu,{children:[e.jsx(eh,{asChild:!0,children:n}),e.jsxs(_r,{className:y("sm:max-w-[425px]",u),children:[e.jsxs(Nr,{children:[e.jsx(Cr,{children:a}),e.jsx(Sr,{children:l})]}),e.jsxs(wr,{children:[e.jsx(Pr,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r})}),e.jsx(kr,{asChild:!0,children:e.jsx(R,{variant:o,onClick:s,children:c})})]})]})]})}const Tr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M11.29 15.29a2 2 0 0 0-.12.15a.8.8 0 0 0-.09.18a.6.6 0 0 0-.06.18a1.4 1.4 0 0 0 0 .2a.84.84 0 0 0 .08.38a.9.9 0 0 0 .54.54a.94.94 0 0 0 .76 0a.9.9 0 0 0 .54-.54A1 1 0 0 0 13 16a1 1 0 0 0-.29-.71a1 1 0 0 0-1.42 0M12 2a10 10 0 1 0 10 10A10 10 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8 8 0 0 1-8 8m0-13a3 3 0 0 0-2.6 1.5a1 1 0 1 0 1.73 1A1 1 0 0 1 12 9a1 1 0 0 1 0 2a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-.18A3 3 0 0 0 12 7"})}),th=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("payment");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"enable",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.enable")}),cell:({row:l})=>e.jsx(G,{defaultChecked:l.getValue("enable"),onCheckedChange:async()=>{const{data:r}=await tm({id:l.original.id});r||s()}}),enableSorting:!1,size:100},{accessorKey:"name",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.name")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("name")})}),enableSorting:!1,size:200},{accessorKey:"payment",header:({column:l})=>e.jsx(O,{column:l,title:a("table.columns.payment")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[200px] truncate font-medium",children:l.getValue("payment")})}),enableSorting:!1,size:200},{accessorKey:"notify_url",header:({column:l})=>e.jsxs("div",{className:"flex items-center",children:[e.jsx(O,{column:l,title:a("table.columns.notify_url")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"ml-1",children:e.jsx(Tr,{className:"h-4 w-4"})}),e.jsx(te,{children:a("table.columns.notify_url_tooltip")})]})})]}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{className:"max-w-[300px] truncate font-medium",children:l.getValue("notify_url")})}),enableSorting:!1,size:3e3},{id:"actions",header:({column:l})=>e.jsx(O,{className:"justify-end",column:l,title:a("table.columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(vr,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("table.actions.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("table.actions.delete.title"),description:a("table.actions.delete.description"),onConfirm:async()=>{const{data:r}=await sm({id:l.original.id});r&&s()},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-destructive/10",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-destructive"}),e.jsx("span",{className:"sr-only",children:a("table.actions.delete.title")})]})})]}),size:100}]};function ah({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("payment"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:r("table.toolbar.sort.hint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(vr,{refetch:n}),e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:o=>s.getColumn("name")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[r("table.toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}function nh(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P}=se({queryKey:["paymentList"],queryFn:async()=>{const{data:v}=await Qd();return u(v?.map(w=>({...w,enable:!!w.enable}))||[]),v}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const E=(v,w)=>{r&&(v.dataTransfer.setData("text/plain",w.toString()),v.currentTarget.classList.add("opacity-50"))},x=(v,w)=>{if(!r)return;v.preventDefault(),v.currentTarget.classList.remove("bg-muted");const S=parseInt(v.dataTransfer.getData("text/plain"));if(S===w)return;const C=[...o],[I]=C.splice(S,1);C.splice(w,0,I),u(C)},N=async()=>{r?am({ids:o.map(v=>v.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},k=Ae({data:o,columns:th({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}},pageCount:r?1:void 0});return e.jsx(Ye,{table:k,toolbar:v=>e.jsx(ah,{table:v,refetch:P,saveOrder:N,isSortMode:r}),draggable:r,onDragStart:E,onDragEnd:v=>v.currentTarget.classList.remove("opacity-50"),onDragOver:v=>{v.preventDefault(),v.currentTarget.classList.add("bg-muted")},onDragLeave:v=>v.currentTarget.classList.remove("bg-muted"),onDrop:x,showPagination:!r})}function rh(){const{t:s}=M("payment");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{children:[e.jsx("header",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("section",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(nh,{})})]})]})}const lh=Object.freeze(Object.defineProperty({__proto__:null,default:rh},Symbol.toStringTag,{value:"Module"})),ih=(s,n)=>{let a=null;switch(s.field_type){case"input":a=e.jsx(T,{placeholder:s.placeholder,...n});break;case"textarea":a=e.jsx(Cs,{placeholder:s.placeholder,...n});break;case"select":a=e.jsx("select",{className:y($s({variant:"outline"}),"w-full appearance-none font-normal"),...n,children:s.select_options&&Object.keys(s.select_options).map(l=>e.jsx("option",{value:l,children:s.select_options?.[l]},l))});break;default:a=null;break}return a};function oh({themeKey:s,themeInfo:n}){const{t:a}=M("theme"),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),i=ce({defaultValues:n.configs.reduce((P,E)=>(P[E.field_name]="",P),{})}),d=async()=>{o(!0),Vd(s).then(({data:P})=>{Object.entries(P).forEach(([E,x])=>{i.setValue(E,x)})}).finally(()=>{o(!1)})},f=async P=>{h(!0),Ad(s,P).then(()=>{$.success(a("config.success")),r(!1)}).finally(()=>{h(!1)})};return e.jsxs(ge,{open:l,onOpenChange:P=>{r(P),P?d():i.reset()},children:[e.jsx(Le,{asChild:!0,children:e.jsx(R,{variant:"outline",children:a("card.configureTheme")})}),e.jsxs(pe,{className:"max-h-[90vh] overflow-auto sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:a("config.title",{name:n.name})}),e.jsx(Te,{children:a("config.description")})]}),c?e.jsx("div",{className:"flex h-40 items-center justify-center",children:e.jsx(ra,{className:"h-6 w-6 animate-spin"})}):e.jsx(he,{...i,children:e.jsxs("form",{onSubmit:i.handleSubmit(f),className:"space-y-4",children:[n.configs.map(P=>e.jsx(j,{control:i.control,name:P.field_name,render:({field:E})=>e.jsxs(g,{children:[e.jsx(b,{children:P.label}),e.jsx(_,{children:ih(P,E)}),e.jsx(D,{})]})},P.field_name)),e.jsxs(Oe,{className:"mt-6 gap-2",children:[e.jsx(R,{type:"button",variant:"secondary",onClick:()=>r(!1),children:a("config.cancel")}),e.jsx(R,{type:"submit",loading:u,children:a("config.save")})]})]})})]})]})}function ch(){const{t:s}=M("theme"),[n,a]=m.useState(null),[l,r]=m.useState(!1),[c,o]=m.useState(!1),[u,h]=m.useState(!1),[i,d]=m.useState(null),f=m.useRef(null),[P,E]=m.useState(0),{data:x,isLoading:N,refetch:k}=se({queryKey:["themeList"],queryFn:async()=>{const{data:z}=await Od();return z}}),v=async z=>{a(z),Ud({frontend_theme:z}).then(()=>{$.success("主题切换成功"),k()}).finally(()=>{a(null)})},w=async z=>{if(!z.name.endsWith(".zip")){$.error(s("upload.error.format"));return}r(!0),Fd(z).then(()=>{$.success("主题上传成功"),o(!1),k()}).finally(()=>{r(!1),f.current&&(f.current.value="")})},S=z=>{z.preventDefault(),z.stopPropagation(),z.type==="dragenter"||z.type==="dragover"?h(!0):z.type==="dragleave"&&h(!1)},C=z=>{z.preventDefault(),z.stopPropagation(),h(!1),z.dataTransfer.files&&z.dataTransfer.files[0]&&w(z.dataTransfer.files[0])},I=()=>{i&&E(z=>z===0?i.images.length-1:z-1)},A=()=>{i&&E(z=>z===i.images.length-1?0:z+1)},Z=(z,X)=>{E(0),d({name:z,images:X})};return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"",children:[e.jsxs("header",{className:"mb-8",children:[e.jsx("div",{className:"mb-2",children:e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"text-muted-foreground",children:s("description")}),e.jsxs(R,{onClick:()=>o(!0),variant:"outline",className:"ml-4 shrink-0",size:"sm",children:[e.jsx(Gt,{className:"mr-2 h-4 w-4"}),s("upload.button")]})]})]}),e.jsx("section",{className:"grid gap-6 md:grid-cols-1 lg:grid-cols-2 xl:grid-cols-3",children:N?e.jsxs(e.Fragment,{children:[e.jsx(za,{}),e.jsx(za,{})]}):x?.themes&&Object.entries(x.themes).map(([z,X])=>e.jsx(Ge,{className:"group relative overflow-hidden transition-all hover:shadow-md",style:{backgroundImage:X.background_url?`url(${X.background_url})`:"none",backgroundSize:"cover",backgroundPosition:"center"},children:e.jsxs("div",{className:y("relative z-10 h-full transition-colors",X.background_url?"group-hover:from-background/98 bg-gradient-to-t from-background/95 via-background/80 to-background/60 backdrop-blur-[1px] group-hover:via-background/90 group-hover:to-background/70":"bg-background"),children:[!!X.can_delete&&e.jsx("div",{className:"absolute right-2 top-2",children:e.jsx(Je,{title:s("card.delete.title"),description:s("card.delete.description"),confirmText:s("card.delete.button"),variant:"destructive",onConfirm:async()=>{if(z===x?.active){$.error(s("card.delete.error.active"));return}a(z),zd(z).then(()=>{$.success("主题删除成功"),k()}).finally(()=>{a(null)})},children:e.jsx(R,{disabled:n===z,loading:n===z,variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-destructive",children:e.jsx(cs,{className:"h-4 w-4"})})})}),e.jsxs(ss,{children:[e.jsx(vs,{children:X.name}),e.jsx(tt,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{children:X.description}),X.version&&e.jsx("div",{className:"text-sm text-muted-foreground",children:s("card.version",{version:X.version})})]})})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[X.images&&Array.isArray(X.images)&&X.images.length>0&&e.jsx(R,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>Z(X.name,X.images),children:e.jsx(io,{className:"h-4 w-4"})}),e.jsx(oh,{themeKey:z,themeInfo:X}),e.jsx(R,{onClick:()=>v(z),disabled:n===z||z===x.active,loading:n===z,variant:z===x.active?"secondary":"default",children:z===x.active?s("card.currentTheme"):s("card.activateTheme")})]})]})},z))}),e.jsx(ge,{open:c,onOpenChange:o,children:e.jsxs(pe,{className:"sm:max-w-md",children:[e.jsxs(be,{children:[e.jsx(je,{children:s("upload.title")}),e.jsx(Te,{children:s("upload.description")})]}),e.jsxs("div",{className:y("relative mt-4 flex h-64 flex-col items-center justify-center rounded-lg border-2 border-dashed border-muted-foreground/25 px-5 py-10 text-center transition-colors",u&&"border-primary/50 bg-muted/50"),onDragEnter:S,onDragLeave:S,onDragOver:S,onDrop:C,children:[e.jsx("input",{type:"file",ref:f,className:"hidden",accept:".zip",onChange:z=>{const X=z.target.files?.[0];X&&w(X)}}),l?e.jsxs("div",{className:"flex flex-col items-center space-y-2",children:[e.jsx("div",{className:"h-10 w-10 animate-spin rounded-full border-b-2 border-primary"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s("upload.uploading")})]}):e.jsx(e.Fragment,{children:e.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[e.jsx("div",{className:"rounded-full border-2 border-muted-foreground/25 p-3",children:e.jsx(Gt,{className:"h-6 w-6 text-muted-foreground/50"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"text-sm font-medium",children:[s("upload.dragText")," ",e.jsx("button",{type:"button",onClick:()=>f.current?.click(),className:"mx-1 text-primary hover:underline",children:s("upload.clickText")})]}),e.jsx("div",{className:"text-xs text-muted-foreground",children:s("upload.supportText")})]})]})})]})]})}),e.jsx(ge,{open:!!i,onOpenChange:z=>{z||(d(null),E(0))},children:e.jsxs(pe,{className:"max-w-4xl",children:[e.jsxs(be,{children:[e.jsxs(je,{children:[i?.name," ",s("preview.title")]}),e.jsx(Te,{className:"text-center",children:i&&s("preview.imageCount",{current:P+1,total:i.images.length})})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"aspect-[16/9] overflow-hidden rounded-lg border bg-muted",children:i?.images[P]&&e.jsx("img",{src:i.images[P],alt:`${i.name} 预览图 ${P+1}`,className:"h-full w-full object-contain"})}),i&&i.images.length>1&&e.jsxs(e.Fragment,{children:[e.jsx(R,{variant:"outline",size:"icon",className:"absolute left-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:I,children:e.jsx(oo,{className:"h-4 w-4"})}),e.jsx(R,{variant:"outline",size:"icon",className:"absolute right-4 top-1/2 h-8 w-8 -translate-y-1/2 rounded-full bg-background/80 hover:bg-background",onClick:A,children:e.jsx(co,{className:"h-4 w-4"})})]})]}),i&&i.images.length>1&&e.jsx("div",{className:"mt-4 flex gap-2 overflow-x-auto pb-2",children:i.images.map((z,X)=>e.jsx("button",{onClick:()=>E(X),className:y("relative h-16 w-16 flex-shrink-0 overflow-hidden rounded-md border-2",P===X?"border-primary":"border-transparent"),children:e.jsx("img",{src:z,alt:`缩略图 ${X+1}`,className:"h-full w-full object-cover"})},X))})]})})]})]})}function za(){return e.jsxs(Ge,{children:[e.jsxs(ss,{children:[e.jsx(Ee,{className:"h-6 w-[200px]"}),e.jsx(Ee,{className:"h-4 w-[300px]"})]}),e.jsxs(ts,{className:"flex items-center justify-end space-x-3",children:[e.jsx(Ee,{className:"h-10 w-[100px]"}),e.jsx(Ee,{className:"h-10 w-[100px]"})]})]})}const dh=Object.freeze(Object.defineProperty({__proto__:null,default:ch},Symbol.toStringTag,{value:"Module"})),pa=m.forwardRef(({className:s,value:n,onChange:a,...l},r)=>{const[c,o]=m.useState("");m.useEffect(()=>{if(c.includes(",")){const h=new Set([...n,...c.split(",").map(i=>i.trim())]);a(Array.from(h)),o("")}},[c,a,n]);const u=()=>{if(c){const h=new Set([...n,c]);a(Array.from(h)),o("")}};return e.jsxs("div",{className:y(" has-[:focus-visible]:outline-none has-[:focus-visible]:ring-1 has-[:focus-visible]:ring-neutral-950 dark:has-[:focus-visible]:ring-neutral-300 flex w-full flex-wrap gap-2 rounded-md border border-input shadow-sm px-3 py-2 text-sm ring-offset-white disabled:cursor-not-allowed disabled:opacity-50",s),children:[n.map(h=>e.jsxs(H,{variant:"secondary",children:[h,e.jsx(J,{variant:"ghost",size:"icon",className:"ml-2 h-3 w-3",onClick:()=>{a(n.filter(i=>i!==h))},children:e.jsx(Bt,{className:"w-3"})})]},h)),e.jsx("input",{className:"flex-1 outline-none placeholder:text-muted-foreground bg-transparent",value:c,onChange:h=>o(h.target.value),onKeyDown:h=>{h.key==="Enter"||h.key===","?(h.preventDefault(),u()):h.key==="Backspace"&&c.length===0&&n.length>0&&(h.preventDefault(),a(n.slice(0,-1)))},...l,ref:r})]})});pa.displayName="InputTags";const mh=p.object({id:p.number().nullable(),title:p.string().min(1).max(250),content:p.string().min(1),show:p.boolean(),tags:p.array(p.string()),img_url:p.string().nullable()}),uh={id:null,show:!1,tags:[],img_url:"",title:"",content:""};function Dr({refetch:s,dialogTrigger:n,type:a="add",defaultFormValues:l=uh}){const{t:r}=M("notice"),[c,o]=m.useState(!1),u=ce({resolver:ue(mh),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return e.jsx(he,{...u,children:e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add.button")})]})}),e.jsxs(pe,{className:"sm:max-w-[1025px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:r(a==="add"?"form.add.title":"form.edit.title")}),e.jsx(Te,{})]}),e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.title.label")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.fields.title.placeholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"content",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.content.label")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"img_url",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.img_url.label")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.fields.img_url.placeholder"),...i,value:i.value||""})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.show.label")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"tags",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.fields.tags.label")}),e.jsx(_,{children:e.jsx(pa,{value:i.value,onChange:i.onChange,placeholder:r("form.fields.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.buttons.cancel")})}),e.jsx(R,{type:"submit",onClick:i=>{i.preventDefault(),u.handleSubmit(async d=>{rm(d).then(({data:f})=>{f&&($.success(r("form.buttons.success")),s(),o(!1))})})()},children:r("form.buttons.submit")})]})]})]})})}function hh({table:s,refetch:n,saveOrder:a,isSortMode:l}){const{t:r}=M("notice"),c=s.getState().columnFilters.length>0;return e.jsxs("div",{className:"flex items-center justify-between space-x-2 ",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[!l&&e.jsx(Dr,{refetch:n}),!l&&e.jsx(T,{placeholder:r("table.toolbar.search"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),c&&!l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-9 px-2 lg:px-3",children:[r("table.toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,className:"h-8",size:"sm",children:r(l?"table.toolbar.sort.save":"table.toolbar.sort.edit")})})]})}const ph=s=>{const{t:n}=M("notice");return[{id:"drag-handle",header:"",cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(mo,{className:"h-4 w-4 text-muted-foreground cursor-move"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",className:"font-mono",children:a.getValue("id")}),enableSorting:!0,size:60},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(G,{defaultChecked:a.getValue("show"),onCheckedChange:async()=>{const{data:l}=await im({id:a.original.id});l||s()}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.title")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[500px] items-center",children:e.jsx("span",{className:"truncate font-medium",children:a.getValue("title")})}),enableSorting:!1,size:6e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[e.jsx(Dr,{refetch:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),type:"edit",defaultFormValues:a.original}),e.jsx(Je,{title:n("table.actions.delete.title"),description:n("table.actions.delete.description"),onConfirm:async()=>{lm({id:a.original.id}).then(()=>{$.success(n("table.actions.delete.success")),s()})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete.title")})]})})]}),size:100}]};function xh(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({}),[P,E]=m.useState({pageSize:50,pageIndex:0}),[x,N]=m.useState([]),{refetch:k}=se({queryKey:["notices"],queryFn:async()=>{const{data:I}=await nm();return N(I),I}});m.useEffect(()=>{l({"drag-handle":h,content:!h,created_at:!h,actions:!h}),E({pageSize:h?99999:50,pageIndex:0})},[h]);const v=(I,A)=>{h&&(I.dataTransfer.setData("text/plain",A.toString()),I.currentTarget.classList.add("opacity-50"))},w=(I,A)=>{if(!h)return;I.preventDefault(),I.currentTarget.classList.remove("bg-muted");const Z=parseInt(I.dataTransfer.getData("text/plain"));if(Z===A)return;const z=[...x],[X]=z.splice(Z,1);z.splice(A,0,X),N(z)},S=async()=>{if(!h){i(!0);return}Vm(x.map(I=>I.id)).then(()=>{$.success("排序保存成功"),i(!1),k()}).finally(()=>{i(!1)})},C=Ae({data:x??[],columns:ph(k),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:d,pagination:P},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:f,onPaginationChange:E,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:C,toolbar:I=>e.jsx(hh,{table:I,refetch:k,saveOrder:S,isSortMode:h}),draggable:h,onDragStart:v,onDragEnd:I=>I.currentTarget.classList.remove("opacity-50"),onDragOver:I=>{I.preventDefault(),I.currentTarget.classList.add("bg-muted")},onDragLeave:I=>I.currentTarget.classList.remove("bg-muted"),onDrop:w,showPagination:!h})})}function fh(){const{t:s}=M("notice");return e.jsxs(we,{children:[e.jsxs(Ce,{className:"flex items-center justify-between",children:[e.jsx(De,{}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("div",{className:"mb-2",children:e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")})}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(xh,{})})]})]})}const gh=Object.freeze(Object.defineProperty({__proto__:null,default:fh},Symbol.toStringTag,{value:"Module"})),jh=p.object({id:p.number().nullable(),language:p.string().max(250),category:p.string().max(250),title:p.string().min(1).max(250),body:p.string().min(1),show:p.boolean()}),bh={id:null,language:"zh-CN",category:"",title:"",body:"",show:!1};function Rr({refreshData:s,dialogTrigger:n,type:a="add",defaultFormValues:l=bh}){const{t:r}=M("knowledge"),[c,o]=m.useState(!1),u=ce({resolver:ue(jh),defaultValues:l,mode:"onChange",shouldFocusError:!0}),h=new la({html:!0});return m.useEffect(()=>{c&&l.id&&cm(l.id).then(({data:i})=>{u.reset(i)})},[l.id,u,c]),e.jsxs(ge,{onOpenChange:o,open:c,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(pe,{className:"sm:max-w-[1025px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:r(a==="add"?"form.add":"form.edit")}),e.jsx(Te,{})]}),e.jsxs(he,{...u,children:[e.jsx(j,{control:u.control,name:"title",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.title")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.titlePlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"category",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.category")}),e.jsx("div",{className:"relative ",children:e.jsx(_,{children:e.jsx(T,{placeholder:r("form.categoryPlaceholder"),...i})})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"language",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.language")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.languagePlaceholder")})}),e.jsx(B,{children:[{value:"en-US"},{value:"ja-JP"},{value:"ko-KR"},{value:"vi-VN"},{value:"zh-CN"},{value:"zh-TW"}].map(d=>e.jsx(U,{value:d.value,className:"cursor-pointer",children:r(`languages.${d.value}`)},d.value))})]})})]})}),e.jsx(j,{control:u.control,name:"body",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.content")}),e.jsx(_,{children:e.jsx(ia,{style:{height:"500px"},value:i.value,renderHTML:d=>h.render(d),onChange:({text:d})=>{i.onChange(d)}})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"show",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.show")}),e.jsx("div",{className:"relative py-2",children:e.jsx(_,{children:e.jsx(G,{checked:i.value,onCheckedChange:i.onChange})})}),e.jsx(D,{})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{u.handleSubmit(i=>{dm(i).then(({data:d})=>{d&&(u.reset(),$.success(r("messages.operationSuccess")),o(!1),s())})})()},children:r("form.submit")})]})]})]})]})}function vh({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Es,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}function yh({table:s,refetch:n,saveOrder:a,isSortMode:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("knowledge");return e.jsxs("div",{className:"flex items-center justify-between",children:[l?e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sortModeHint")}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Rr,{refreshData:n}),e.jsx(T,{placeholder:c("toolbar.searchPlaceholder"),value:s.getColumn("title")?.getFilterValue()??"",onChange:o=>s.getColumn("title")?.setFilterValue(o.target.value),className:"h-8 w-[250px]"}),s.getColumn("category")&&e.jsx(vh,{column:s.getColumn("category"),title:c("columns.category"),options:Array.from(new Set(s.getCoreRowModel().rows.map(o=>o.getValue("category")))).map(o=>({label:o,value:o}))}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),children:[c("toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:l?"default":"outline",onClick:a,size:"sm",children:c(l?"toolbar.saveSort":"toolbar.editSort")})})]})}const _h=({refetch:s,isSortMode:n=!1})=>{const{t:a}=M("knowledge");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:n?"cursor-move":"opacity-0",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",className:"justify-center",children:l.getValue("id")}),enableSorting:!0,size:70},{accessorKey:"show",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.status")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center",children:e.jsx(G,{defaultChecked:l.getValue("show"),onCheckedChange:async()=>{um({id:l.original.id}).then(({data:r})=>{r||s()})}})}),enableSorting:!1,size:100},{accessorKey:"title",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.title")}),cell:({row:l})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"line-clamp-2 font-medium",children:l.getValue("title")})}),enableSorting:!0,size:600},{accessorKey:"category",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.category")}),cell:({row:l})=>e.jsx(H,{variant:"secondary",className:"max-w-[180px] truncate",children:l.getValue("category")}),enableSorting:!0,size:1800},{id:"actions",header:({column:l})=>e.jsx(O,{className:"justify-end",column:l,title:a("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-end space-x-1",children:[e.jsx(Rr,{refreshData:s,dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:a("form.edit")})]}),type:"edit",defaultFormValues:l.original}),e.jsx(Je,{title:a("messages.deleteConfirm"),description:a("messages.deleteDescription"),confirmText:a("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{mm({id:l.original.id}).then(({data:r})=>{r&&($.success(a("messages.operationSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:a("messages.deleteButton")})]})})]}),size:100}]};function Nh(){const[s,n]=m.useState([]),[a,l]=m.useState([]),[r,c]=m.useState(!1),[o,u]=m.useState([]),[h,i]=m.useState({"drag-handle":!1}),[d,f]=m.useState({pageSize:20,pageIndex:0}),{refetch:P,isLoading:E,data:x}=se({queryKey:["knowledge"],queryFn:async()=>{const{data:S}=await om();return u(S||[]),S}});m.useEffect(()=>{i({"drag-handle":r,actions:!r}),f({pageSize:r?99999:10,pageIndex:0})},[r]);const N=(S,C)=>{r&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!r)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const I=parseInt(S.dataTransfer.getData("text/plain"));if(I===C)return;const A=[...o],[Z]=A.splice(I,1);A.splice(C,0,Z),u(A)},v=async()=>{r?hm({ids:o.map(S=>S.id)}).then(()=>{P(),c(!1),$.success("排序保存成功")}):c(!0)},w=Ae({data:o,columns:_h({refetch:P,isSortMode:r}),state:{sorting:a,columnFilters:s,columnVisibility:h,pagination:d},onSortingChange:l,onColumnFiltersChange:n,onColumnVisibilityChange:i,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:w,toolbar:S=>e.jsx(yh,{table:S,refetch:P,saveOrder:v,isSortMode:r}),draggable:r,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!r})}function wh(){const{t:s}=M("knowledge");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight mb-2",children:s("title")}),e.jsx("p",{className:"text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Nh,{})})]})]})}const Ch=Object.freeze(Object.defineProperty({__proto__:null,default:wh},Symbol.toStringTag,{value:"Module"}));function Sh(s,n){const[a,l]=m.useState(s);return m.useEffect(()=>{const r=setTimeout(()=>l(s),n);return()=>{clearTimeout(r)}},[s,n]),a}function zt(s,n){if(s.length===0)return{};if(!n)return{"":s};const a={};return s.forEach(l=>{const r=l[n]||"";a[r]||(a[r]=[]),a[r].push(l)}),a}function kh(s,n){const a=JSON.parse(JSON.stringify(s));for(const[l,r]of Object.entries(a))a[l]=r.filter(c=>!n.find(o=>o.value===c.value));return a}function Ph(s,n){for(const[,a]of Object.entries(s))if(a.some(l=>n.find(r=>r.value===l.value)))return!0;return!1}const Ir=m.forwardRef(({className:s,...n},a)=>uo(r=>r.filtered.count===0)?e.jsx("div",{ref:a,className:y("py-6 text-center text-sm",s),"cmdk-empty":"",role:"presentation",...n}):null);Ir.displayName="CommandEmpty";const lt=m.forwardRef(({value:s,onChange:n,placeholder:a,defaultOptions:l=[],options:r,delay:c,onSearch:o,loadingIndicator:u,emptyIndicator:h,maxSelected:i=Number.MAX_SAFE_INTEGER,onMaxSelected:d,hidePlaceholderWhenSelected:f,disabled:P,groupBy:E,className:x,badgeClassName:N,selectFirstItem:k=!0,creatable:v=!1,triggerSearchOnFocus:w=!1,commandProps:S,inputProps:C,hideClearAllButton:I=!1},A)=>{const Z=m.useRef(null),[z,X]=m.useState(!1),qs=m.useRef(!1),[va,ya]=m.useState(!1),[ee,Ks]=m.useState(s||[]),[Ss,_a]=m.useState(zt(l,E)),[ps,Ot]=m.useState(""),Bs=Sh(ps,c||500);m.useImperativeHandle(A,()=>({selectedValue:[...ee],input:Z.current,focus:()=>Z.current?.focus()}),[ee]);const mt=m.useCallback(q=>{const ae=ee.filter(Pe=>Pe.value!==q.value);Ks(ae),n?.(ae)},[n,ee]),sl=m.useCallback(q=>{const ae=Z.current;ae&&((q.key==="Delete"||q.key==="Backspace")&&ae.value===""&&ee.length>0&&(ee[ee.length-1].fixed||mt(ee[ee.length-1])),q.key==="Escape"&&ae.blur())},[mt,ee]);m.useEffect(()=>{s&&Ks(s)},[s]),m.useEffect(()=>{if(!r||o)return;const q=zt(r||[],E);JSON.stringify(q)!==JSON.stringify(Ss)&&_a(q)},[l,r,E,o,Ss]),m.useEffect(()=>{const q=async()=>{ya(!0);const Pe=await o?.(Bs);_a(zt(Pe||[],E)),ya(!1)};(async()=>{!o||!z||(w&&await q(),Bs&&await q())})()},[Bs,E,z,w]);const tl=()=>{if(!v||Ph(Ss,[{value:ps,label:ps}])||ee.find(ae=>ae.value===ps))return;const q=e.jsx(Ne,{value:ps,className:"cursor-pointer",onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onSelect:ae=>{if(ee.length>=i){d?.(ee.length);return}Ot("");const Pe=[...ee,{value:ae,label:ae}];Ks(Pe),n?.(Pe)},children:`Create "${ps}"`});if(!o&&ps.length>0||o&&Bs.length>0&&!va)return q},al=m.useCallback(()=>{if(h)return o&&!v&&Object.keys(Ss).length===0?e.jsx(Ne,{value:"-",disabled:!0,children:h}):e.jsx(Ir,{children:h})},[v,h,o,Ss]),nl=m.useMemo(()=>kh(Ss,ee),[Ss,ee]),rl=m.useCallback(()=>{if(S?.filter)return S.filter;if(v)return(q,ae)=>q.toLowerCase().includes(ae.toLowerCase())?1:-1},[v,S?.filter]),ll=m.useCallback(()=>{const q=ee.filter(ae=>ae.fixed);Ks(q),n?.(q)},[n,ee]);return e.jsxs(Ns,{...S,onKeyDown:q=>{sl(q),S?.onKeyDown?.(q)},className:y("h-auto overflow-visible bg-transparent",S?.className),shouldFilter:S?.shouldFilter!==void 0?S.shouldFilter:!o,filter:rl(),children:[e.jsx("div",{className:y("rounded-md border border-input text-sm ring-offset-background focus-within:ring-1 focus-within:ring-ring ",{"px-3 py-2":ee.length!==0,"cursor-text":!P&&ee.length!==0},x),onClick:()=>{P||Z.current?.focus()},children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[ee.map(q=>e.jsxs(H,{className:y("data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground","data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",N),"data-fixed":q.fixed,"data-disabled":P||void 0,children:[q.label,e.jsx("button",{className:y("ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",(P||q.fixed)&&"hidden"),onKeyDown:ae=>{ae.key==="Enter"&&mt(q)},onMouseDown:ae=>{ae.preventDefault(),ae.stopPropagation()},onClick:()=>mt(q),children:e.jsx(Bt,{className:"h-3 w-3 text-muted-foreground hover:text-foreground"})})]},q.value)),e.jsx(Se.Input,{...C,ref:Z,value:ps,disabled:P,onValueChange:q=>{Ot(q),C?.onValueChange?.(q)},onBlur:q=>{qs.current===!1&&X(!1),C?.onBlur?.(q)},onFocus:q=>{X(!0),w&&o?.(Bs),C?.onFocus?.(q)},placeholder:f&&ee.length!==0?"":a,className:y("flex-1 bg-transparent outline-none placeholder:text-muted-foreground",{"w-full":f,"px-3 py-2":ee.length===0,"ml-1":ee.length!==0},C?.className)}),e.jsx("button",{type:"button",onClick:ll,className:y((I||P||ee.length<1||ee.filter(q=>q.fixed).length===ee.length)&&"hidden"),children:e.jsx(Bt,{})})]})}),e.jsx("div",{className:"relative",children:z&&e.jsx(ws,{className:"absolute top-1 z-10 w-full rounded-md border bg-popover text-popover-foreground shadow-md outline-none animate-in",onMouseLeave:()=>{qs.current=!1},onMouseEnter:()=>{qs.current=!0},onMouseUp:()=>{Z.current?.focus()},children:va?e.jsx(e.Fragment,{children:u}):e.jsxs(e.Fragment,{children:[al(),tl(),!k&&e.jsx(Ne,{value:"-",className:"hidden"}),Object.entries(nl).map(([q,ae])=>e.jsx(Me,{heading:q,className:"h-full overflow-auto",children:e.jsx(e.Fragment,{children:ae.map(Pe=>e.jsx(Ne,{value:Pe.value,disabled:Pe.disable,onMouseDown:Ws=>{Ws.preventDefault(),Ws.stopPropagation()},onSelect:()=>{if(ee.length>=i){d?.(ee.length);return}Ot("");const Ws=[...ee,Pe];Ks(Ws),n?.(Ws)},className:y("cursor-pointer",Pe.disable&&"cursor-default text-muted-foreground"),children:Pe.label},Pe.value))})},q))]})})})]})});lt.displayName="MultipleSelector";const Th=s=>p.object({id:p.number().optional(),name:p.string().min(2,s("messages.nameValidation.min")).max(50,s("messages.nameValidation.max")).regex(/^[a-zA-Z0-9\u4e00-\u9fa5_-]+$/,s("messages.nameValidation.pattern"))});function Lt({refetch:s,dialogTrigger:n,defaultValues:a={name:""},type:l="add"}){const{t:r}=M("group"),c=ce({resolver:ue(Th(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1),[h,i]=m.useState(!1),d=async f=>{i(!0),Bd(f).then(()=>{$.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),s&&s(),c.reset(),u(!1)}).finally(()=>{i(!1)})};return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("span",{children:r("form.add")})]})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{children:r(l==="edit"?"form.editDescription":"form.createDescription")})]}),e.jsx(he,{...c,children:e.jsxs("form",{onSubmit:c.handleSubmit(d),className:"space-y-4",children:[e.jsx(j,{control:c.control,name:"name",render:({field:f})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.name")}),e.jsx(_,{children:e.jsx(T,{placeholder:r("form.namePlaceholder"),...f,className:"w-full"})}),e.jsx(L,{children:r("form.nameDescription")}),e.jsx(D,{})]})}),e.jsxs(Oe,{className:"gap-2",children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{type:"button",variant:"outline",children:r("form.cancel")})}),e.jsxs(R,{type:"submit",disabled:h||!c.formState.isValid,children:[h&&e.jsx(ra,{className:"mr-2 h-4 w-4 animate-spin"}),r(l==="edit"?"form.update":"form.create")]})]})]})})]})]})}const Er=m.createContext(void 0);function Dh({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),[o,u]=m.useState(ye.Shadowsocks);return e.jsx(Er.Provider,{value:{isOpen:a,setIsOpen:l,editingServer:r,setEditingServer:c,serverType:o,setServerType:u,refetch:n},children:s})}function Mr(){const s=m.useContext(Er);if(s===void 0)throw new Error("useServerEdit must be used within a ServerEditProvider");return s}function Ut({dialogTrigger:s,value:n,setValue:a,templateType:l}){const{t:r}=M("server");m.useEffect(()=>{console.log(n)},[n]);const[c,o]=m.useState(!1),[u,h]=m.useState(()=>{if(!n||Object.keys(n).length===0)return"";try{return JSON.stringify(n,null,2)}catch{return""}}),[i,d]=m.useState(null),f=v=>{if(!v)return null;try{const w=JSON.parse(v);return typeof w!="object"||w===null?r("network_settings.validation.must_be_object"):null}catch{return r("network_settings.validation.invalid_json")}},P={tcp:{label:"TCP",content:{acceptProxyProtocol:!1,header:{type:"none"}}},"tcp-http":{label:"TCP + HTTP",content:{acceptProxyProtocol:!1,header:{type:"http",request:{version:"1.1",method:"GET",path:["/"],headers:{Host:["www.example.com"]}},response:{version:"1.1",status:"200",reason:"OK"}}}},grpc:{label:"gRPC",content:{serviceName:"GunService"}},ws:{label:"WebSocket",content:{path:"/",headers:{Host:"v2ray.com"}}}},E=()=>{switch(l){case"tcp":return["tcp","tcp-http"];case"grpc":return["grpc"];case"ws":return["ws"];default:return[]}},x=()=>{const v=f(u||"");if(v){$.error(v);return}try{if(!u){a(null),o(!1);return}a(JSON.parse(u)),o(!1)}catch{$.error(r("network_settings.errors.save_failed"))}},N=v=>{h(v),d(f(v))},k=v=>{const w=P[v];if(w){const S=JSON.stringify(w.content,null,2);h(S),d(null)}};return m.useEffect(()=>{c&&console.log(n)},[c,n]),m.useEffect(()=>{c&&n&&Object.keys(n).length>0&&h(JSON.stringify(n,null,2))},[c,n]),e.jsxs(ge,{open:c,onOpenChange:v=>{!v&&c&&x(),o(v)},children:[e.jsx(Le,{asChild:!0,children:s??e.jsx(J,{variant:"link",children:r("network_settings.edit_protocol")})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(je,{children:r("network_settings.edit_protocol_config")})}),e.jsxs("div",{className:"space-y-4",children:[E().length>0&&e.jsx("div",{className:"flex flex-wrap gap-2 pt-2",children:E().map(v=>e.jsx(J,{variant:"outline",size:"sm",onClick:()=>k(v),children:r("network_settings.use_template",{template:P[v].label})},v))}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(Cs,{className:`min-h-[200px] font-mono text-sm ${i?"border-red-500 focus-visible:ring-red-500":""}`,value:u,placeholder:E().length>0?r("network_settings.json_config_placeholder_with_template"):r("network_settings.json_config_placeholder"),onChange:v=>N(v.target.value)}),i&&e.jsx("p",{className:"text-sm text-red-500",children:i})]})]}),e.jsxs(Oe,{className:"gap-2",children:[e.jsx(J,{variant:"outline",onClick:()=>o(!1),children:r("common.cancel")}),e.jsx(J,{onClick:x,disabled:!!i,children:r("common.confirm")})]})]})]})}function Dx(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}const Rh={},Ih=Object.freeze(Object.defineProperty({__proto__:null,default:Rh},Symbol.toStringTag,{value:"Module"})),Rx=So(Ih),Ua=s=>s.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,""),Eh=()=>{try{const s=ho.box.keyPair(),n=Ua(Ta.encodeBase64(s.secretKey)),a=Ua(Ta.encodeBase64(s.publicKey));return{privateKey:n,publicKey:a}}catch(s){throw console.error("Error generating x25519 key pair:",s),s}},Mh=()=>{try{return Eh()}catch(s){throw console.error("Error generating key pair:",s),s}},Lh=s=>{const n=new Uint8Array(Math.ceil(s/2));return window.crypto.getRandomValues(n),Array.from(n).map(a=>a.toString(16).padStart(2,"0")).join("").substring(0,s)},Oh=()=>{const s=Math.floor(Math.random()*8)*2+2;return Lh(s)},Vh=p.object({cipher:p.string().default("aes-128-gcm"),obfs:p.string().default("0"),obfs_settings:p.object({path:p.string().default(""),host:p.string().default("")}).default({})}),Ah=p.object({tls:p.coerce.number().default(0),tls_settings:p.object({server_name:p.string().default(""),allow_insecure:p.boolean().default(!1)}).default({}),network:p.string().default("tcp"),network_settings:p.record(p.any()).default({})}),Fh=p.object({server_name:p.string().default(""),allow_insecure:p.boolean().default(!1),network:p.string().default("tcp"),network_settings:p.record(p.any()).default({})}),zh=p.object({version:p.coerce.number().default(2),alpn:p.string().default("h2"),obfs:p.object({open:p.coerce.boolean().default(!1),type:p.string().default("salamander"),password:p.string().default("")}).default({}),tls:p.object({server_name:p.string().default(""),allow_insecure:p.boolean().default(!1)}).default({}),bandwidth:p.object({up:p.string().default(""),down:p.string().default("")}).default({})}),Uh=p.object({tls:p.coerce.number().default(0),tls_settings:p.object({server_name:p.string().default(""),allow_insecure:p.boolean().default(!1)}).default({}),reality_settings:p.object({server_port:p.coerce.number().default(443),server_name:p.string().default(""),allow_insecure:p.boolean().default(!1),public_key:p.string().default(""),private_key:p.string().default(""),short_id:p.string().default("")}).default({}),network:p.string().default("tcp"),network_settings:p.record(p.any()).default({}),flow:p.string().default("")}),rs={shadowsocks:{schema:Vh,ciphers:["aes-128-gcm","aes-192-gcm","aes-256-gcm","chacha20-ietf-poly1305","2022-blake3-aes-128-gcm","2022-blake3-aes-256-gcm"]},vmess:{schema:Ah,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},trojan:{schema:Fh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"}]},hysteria:{schema:zh,versions:["1","2"],alpnOptions:["hysteria","http/1.1","h2","h3"]},vless:{schema:Uh,networkOptions:[{value:"tcp",label:"TCP"},{value:"ws",label:"Websocket"},{value:"grpc",label:"gRPC"},{value:"kcp",label:"mKCP"},{value:"httpupgrade",label:"HttpUpgrade"},{value:"xhttp",label:"XHTTP"}],flowOptions:["none","xtls-rprx-direct","xtls-rprx-splice","xtls-rprx-vision"]}},$h=({serverType:s,value:n,onChange:a})=>{const{t:l}=M("server"),r=s?rs[s]:null,c=r?.schema||p.record(p.any()),o=s?c.parse({}):{},u=ce({resolver:ue(c),defaultValues:o,mode:"onChange"});if(m.useEffect(()=>{if(!n||Object.keys(n).length===0){if(s){const x=c.parse({});u.reset(x)}}else u.reset(n)},[s,n,a,u,c]),m.useEffect(()=>{const x=u.watch(N=>{a(N)});return()=>x.unsubscribe()},[u,a]),!s||!r)return null;const E={shadowsocks:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"cipher",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.shadowsocks.cipher.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:x.onChange,value:x.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.cipher.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.shadowsocks.ciphers.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.shadowsocks.obfs.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:x.onChange,value:x.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.shadowsocks.obfs.placeholder")})}),e.jsx(B,{children:e.jsxs(xs,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.shadowsocks.obfs.none")}),e.jsx(U,{value:"http",children:l("dynamic_form.shadowsocks.obfs.http")})]})})]})})]})}),u.watch("obfs")==="http"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs_settings.path",render:({field:x})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.path"),...x})}),e.jsx(D,{})]})}),e.jsx(j,{control:u.control,name:"obfs_settings.host",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:l("dynamic_form.shadowsocks.obfs_settings.host"),...x})}),e.jsx(D,{})]})})]})]}),vmess:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vmess.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:x.value?.toString(),onValueChange:N=>x.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vmess.tls.disabled")}),e.jsx(U,{value:"1",children:l("dynamic_form.vmess.tls.enabled")})]})]})})]})}),u.watch("tls")==1&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vmess.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vmess.tls_settings.server_name.placeholder"),...x})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vmess.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:x})=>e.jsxs(g,{children:[e.jsxs(b,{children:[l("dynamic_form.vmess.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:x.onChange,value:x.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vmess.network.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.vmess.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),trojan:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"server_name",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.trojan.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.trojan.server_name.placeholder"),...x,value:x.value||""})})]})}),e.jsx(j,{control:u.control,name:"allow_insecure",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.trojan.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:x})=>e.jsxs(g,{children:[e.jsxs(b,{children:[l("dynamic_form.trojan.network.label"),e.jsx(Ut,{value:u.watch("network_settings")||{},setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")||"tcp"})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:x.onChange,value:x.value||"tcp",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.trojan.network.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.trojan.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})})]}),hysteria:()=>e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"version",render:({field:x})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.hysteria.version.label")}),e.jsx(_,{children:e.jsxs(W,{value:(x.value||2).toString(),onValueChange:N=>x.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.version.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.hysteria.versions.map(N=>e.jsxs(U,{value:N,className:"cursor-pointer",children:["V",N]},N))})})]})})]})}),u.watch("version")==1&&e.jsx(j,{control:u.control,name:"alpn",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.alpn.label")}),e.jsx(_,{children:e.jsxs(W,{value:x.value||"h2",onValueChange:x.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.alpn.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.hysteria.alpnOptions.map(N=>e.jsx(U,{value:N,children:N},N))})})]})})]})})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"obfs.open",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.label")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})}),!!u.watch("obfs.open")&&e.jsxs(e.Fragment,{children:[u.watch("version")=="2"&&e.jsx(j,{control:u.control,name:"obfs.type",render:({field:x})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.type.label")}),e.jsx(_,{children:e.jsxs(W,{value:x.value||"salamander",onValueChange:x.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.hysteria.obfs.type.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:e.jsx(U,{value:"salamander",children:l("dynamic_form.hysteria.obfs.type.salamander")})})})]})})]})}),e.jsx(j,{control:u.control,name:"obfs.password",render:({field:x})=>e.jsxs(g,{className:u.watch("version")==2?"w-full":"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.obfs.password.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.obfs.password.placeholder"),...x,value:x.value||"",className:"pr-9"})}),e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",k=Array.from(crypto.getRandomValues(new Uint8Array(16))).map(v=>N[v%N.length]).join("");u.setValue("obfs.password",k),$.success(l("dynamic_form.hysteria.obfs.password.generate_success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})]})]})})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls.server_name",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.hysteria.tls.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.hysteria.tls.server_name.placeholder"),...x,value:x.value||""})})]})}),e.jsx(j,{control:u.control,name:"tls.allow_insecure",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.tls.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value||!1,onCheckedChange:x.onChange})})})]})})]}),e.jsx(j,{control:u.control,name:"bandwidth.up",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.bandwidth.up.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.up.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.up.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...x,value:x.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.up.suffix")})})]})]})}),e.jsx(j,{control:u.control,name:"bandwidth.down",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.hysteria.bandwidth.down.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dynamic_form.hysteria.bandwidth.down.placeholder")+(u.watch("version")==2?l("dynamic_form.hysteria.bandwidth.down.bbr_tip"):""),className:"rounded-br-none rounded-tr-none",...x,value:x.value||""})}),e.jsx("div",{className:"pointer-events-none z-[-1] flex items-center rounded-md rounded-bl-none rounded-tl-none border border-l-0 border-input px-3 shadow-sm",children:e.jsx("span",{className:"text-gray-500",children:l("dynamic_form.hysteria.bandwidth.down.suffix")})})]})]})})]}),vless:()=>e.jsxs(e.Fragment,{children:[e.jsx(j,{control:u.control,name:"tls",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.tls.label")}),e.jsx(_,{children:e.jsxs(W,{value:x.value?.toString(),onValueChange:N=>x.onChange(Number(N)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.tls.placeholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:l("dynamic_form.vless.tls.none")}),e.jsx(U,{value:"1",children:l("dynamic_form.vless.tls.tls")}),e.jsx(U,{value:"2",children:l("dynamic_form.vless.tls.reality")})]})]})})]})}),u.watch("tls")=="1"&&e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"tls_settings.server_name",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vless.tls_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.tls_settings.server_name.placeholder"),...x})})]})}),e.jsx(j,{control:u.control,name:"tls_settings.allow_insecure",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.tls_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),u.watch("tls")==2&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:u.control,name:"reality_settings.server_name",render:({field:x})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.server_name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_name.placeholder"),...x})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.server_port",render:({field:x})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.server_port.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dynamic_form.vless.reality_settings.server_port.placeholder"),...x})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.allow_insecure",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.allow_insecure")}),e.jsx("div",{className:"py-2 text-center",children:e.jsx(_,{children:e.jsx(G,{checked:x.value,onCheckedChange:x.onChange})})})]})})]}),e.jsx("div",{className:"flex items-end gap-2",children:e.jsx(j,{control:u.control,name:"reality_settings.private_key",render:({field:x})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.private_key.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...x,className:"pr-9"})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{try{const N=Mh();u.setValue("reality_settings.private_key",N.privateKey),u.setValue("reality_settings.public_key",N.publicKey),$.success(l("dynamic_form.vless.reality_settings.key_pair.success"))}catch{$.error(l("dynamic_form.vless.reality_settings.key_pair.error"))}},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:key-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.key_pair.generate")})})})]})]})]})})}),e.jsx(j,{control:u.control,name:"reality_settings.public_key",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.public_key.label")}),e.jsx(_,{children:e.jsx(T,{...x})})]})}),e.jsx(j,{control:u.control,name:"reality_settings.short_id",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.reality_settings.short_id.label")}),e.jsxs("div",{className:"relative",children:[e.jsx(_,{children:e.jsx(T,{...x,className:"pr-9",placeholder:l("dynamic_form.vless.reality_settings.short_id.placeholder")})}),e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(J,{type:"button",variant:"ghost",size:"icon",onClick:()=>{const N=Oh();u.setValue("reality_settings.short_id",N),$.success(l("dynamic_form.vless.reality_settings.short_id.success"))},className:"absolute right-0 top-0 h-full px-2 active:scale-90 transition-transform duration-150",children:e.jsx(_e,{icon:"ion:refresh-outline",className:"h-4 w-4 transition-transform hover:rotate-180 duration-300"})})}),e.jsx(yt,{children:e.jsx(te,{children:e.jsx("p",{children:l("dynamic_form.vless.reality_settings.short_id.generate")})})})]})]}),e.jsx(L,{className:"text-xs text-muted-foreground",children:l("dynamic_form.vless.reality_settings.short_id.description")})]})})]}),e.jsx(j,{control:u.control,name:"network",render:({field:x})=>e.jsxs(g,{children:[e.jsxs(b,{children:[l("dynamic_form.vless.network.label"),e.jsx(Ut,{value:u.watch("network_settings"),setValue:N=>u.setValue("network_settings",N),templateType:u.watch("network")})]}),e.jsx(_,{children:e.jsxs(W,{onValueChange:x.onChange,value:x.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.network.placeholder")})}),e.jsx(B,{children:e.jsx(xs,{children:rs.vless.networkOptions.map(N=>e.jsx(U,{value:N.value,className:"cursor-pointer",children:N.label},N.value))})})]})})]})}),e.jsx(j,{control:u.control,name:"flow",render:({field:x})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dynamic_form.vless.flow.label")}),e.jsx(_,{children:e.jsxs(W,{onValueChange:N=>x.onChange(N==="none"?null:N),value:x.value||"none",children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dynamic_form.vless.flow.placeholder")})}),e.jsx(B,{children:rs.vless.flowOptions.map(N=>e.jsx(U,{value:N,children:N},N))})]})})]})})]})};return e.jsx(oe,{children:E[s]?.()})},Hh=p.object({id:p.number().optional().nullable(),code:p.string().optional(),name:p.string().min(1,"form.name.error"),rate:p.string().min(1,"form.rate.error"),tags:p.array(p.string()).default([]),excludes:p.array(p.string()).default([]),ips:p.array(p.string()).default([]),group_ids:p.array(p.string()).default([]),host:p.string().min(1,"form.host.error"),port:p.string().min(1,"form.port.error"),server_port:p.string().min(1,"form.server_port.error"),parent_id:p.string().default("0").nullable(),route_ids:p.array(p.string()).default([]),protocol_settings:p.record(p.any()).default({}).nullable()}),pt={id:null,code:"",name:"",rate:"1",tags:[],excludes:[],ips:[],group_ids:[],host:"",port:"",server_port:"",parent_id:"0",route_ids:[],protocol_settings:null};function Gh(){const{t:s}=M("server"),{isOpen:n,setIsOpen:a,editingServer:l,setEditingServer:r,serverType:c,setServerType:o,refetch:u}=Mr(),[h,i]=m.useState([]),[d,f]=m.useState([]),[P,E]=m.useState([]),x=ce({resolver:ue(Hh),defaultValues:pt,mode:"onChange"});m.useEffect(()=>{N()},[n]),m.useEffect(()=>{l?.type&&l.type!==c&&o(l.type)},[l,c,o]),m.useEffect(()=>{l?l.type===c&&x.reset({...pt,...l}):x.reset({...pt,protocol_settings:rs[c].schema.parse({})})},[l,x,c]);const N=async()=>{if(!n)return;const[C,I,A]=await Promise.all([Mt(),xr(),pr()]);i(C.data?.map(Z=>({label:Z.name,value:Z.id.toString()}))||[]),f(I.data?.map(Z=>({label:Z.remarks,value:Z.id.toString()}))||[]),E(A.data||[])},k=m.useMemo(()=>P?.filter(C=>(C.parent_id===0||C.parent_id===null)&&C.type===c&&C.id!==x.watch("id")),[c,P,x]),v=()=>e.jsxs(ys,{children:[e.jsx(_s,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:s("form.add_node")})]})}),e.jsx(is,{align:"start",children:e.jsx(hd,{children:Ps.map(({type:C,label:I})=>e.jsx(xe,{onClick:()=>{o(C),a(!0)},className:"cursor-pointer",children:e.jsx(H,{variant:"outline",className:"text-white",style:{background:ls[C]},children:I})},C))})})]}),w=()=>{a(!1),r(null),x.reset(pt)},S=async()=>{const C=x.getValues();(await $d({...C,type:c})).data&&(w(),$.success(s("form.success")),u())};return e.jsxs(ge,{open:n,onOpenChange:w,children:[v(),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:s(l?"form.edit_node":"form.new_node")}),e.jsx(Te,{})]}),e.jsxs(he,{...x,children:[e.jsxs("div",{className:"grid gap-4",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{control:x.control,name:"name",render:({field:C})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:s("form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.name.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"rate",render:({field:C})=>e.jsxs(g,{className:"flex-[1]",children:[e.jsx(b,{children:s("form.rate.label")}),e.jsx("div",{className:"relative flex",children:e.jsx(_,{children:e.jsx(T,{type:"number",min:"0",step:"0.1",...C})})}),e.jsx(D,{})]})})]}),e.jsx(j,{control:x.control,name:"code",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(b,{children:[s("form.code.label"),e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:s("form.code.optional")})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.code.placeholder"),...C,value:C.value||""})}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"tags",render:({field:C})=>e.jsxs(g,{children:[e.jsx(b,{children:s("form.tags.label")}),e.jsx(_,{children:e.jsx(pa,{value:C.value,onChange:C.onChange,placeholder:s("form.tags.placeholder"),className:"w-full"})}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"group_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsxs(b,{className:"flex items-center justify-between",children:[s("form.groups.label"),e.jsx(Lt,{dialogTrigger:e.jsx(R,{variant:"link",children:s("form.groups.add")}),refetch:N})]}),e.jsx(_,{children:e.jsx(lt,{options:h,onChange:I=>C.onChange(I.map(A=>A.value)),value:h?.filter(I=>C.value.includes(I.value)),placeholder:s("form.groups.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.groups.empty")})})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:x.control,name:"host",render:({field:C})=>e.jsxs(g,{children:[e.jsx(b,{children:s("form.host.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.host.placeholder"),...C})}),e.jsx(D,{})]})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(j,{control:x.control,name:"port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(b,{className:"flex items-center gap-1.5",children:[s("form.port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.port.tooltip")})})})]})})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(_,{children:e.jsx(T,{placeholder:s("form.port.placeholder"),...C})}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0 text-muted-foreground/50 hover:text-muted-foreground",onClick:()=>{const I=C.value;I&&x.setValue("server_port",I)},children:e.jsx(_e,{icon:"tabler:arrows-right",className:"size-3"})})}),e.jsx(te,{side:"right",children:e.jsx("p",{children:s("form.port.sync")})})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"server_port",render:({field:C})=>e.jsxs(g,{className:"flex-1",children:[e.jsxs(b,{className:"flex items-center gap-1.5",children:[s("form.server_port.label"),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(_e,{icon:"ph:info-light",className:"size-3.5 cursor-help text-muted-foreground"})}),e.jsx(yt,{children:e.jsx(te,{side:"top",sideOffset:8,className:"max-w-80 p-3",children:e.jsx("p",{children:s("form.server_port.tooltip")})})})]})})]}),e.jsx(_,{children:e.jsx(T,{placeholder:s("form.server_port.placeholder"),...C})}),e.jsx(D,{})]})})]})]}),n&&e.jsx($h,{serverType:c,value:x.watch("protocol_settings"),onChange:C=>x.setValue("protocol_settings",C,{shouldDirty:!0,shouldTouch:!0,shouldValidate:!0})}),e.jsx(j,{control:x.control,name:"parent_id",render:({field:C})=>e.jsxs(g,{children:[e.jsx(b,{children:s("form.parent.label")}),e.jsxs(W,{onValueChange:C.onChange,value:C.value?.toString()||"0",children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:s("form.parent.placeholder")})})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:s("form.parent.none")}),k?.map(I=>e.jsx(U,{value:I.id.toString(),className:"cursor-pointer",children:I.name},I.id))]})]}),e.jsx(D,{})]})}),e.jsx(j,{control:x.control,name:"route_ids",render:({field:C})=>e.jsxs(g,{children:[e.jsx(b,{children:s("form.route.label")}),e.jsx(_,{children:e.jsx(lt,{options:d,onChange:I=>C.onChange(I.map(A=>A.value)),value:d?.filter(I=>C.value.includes(I.value)),placeholder:s("form.route.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-lg leading-10 text-gray-600 dark:text-gray-400",children:s("form.route.empty")})})}),e.jsx(D,{})]})})]}),e.jsxs(Oe,{className:"mt-6",children:[e.jsx(R,{type:"button",variant:"outline",onClick:w,children:s("form.cancel")}),e.jsx(R,{type:"submit",onClick:S,children:s("form.submit")})]})]})]})]})}function $a({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Es,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},className:"cursor-pointer",children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center cursor-pointer",children:"Clear filters"})})]})]})]})})]})}const qh=[{value:ye.Shadowsocks,label:Ps.find(s=>s.type===ye.Shadowsocks)?.label,color:ls[ye.Shadowsocks]},{value:ye.Vmess,label:Ps.find(s=>s.type===ye.Vmess)?.label,color:ls[ye.Vmess]},{value:ye.Trojan,label:Ps.find(s=>s.type===ye.Trojan)?.label,color:ls[ye.Trojan]},{value:ye.Hysteria,label:Ps.find(s=>s.type===ye.Hysteria)?.label,color:ls[ye.Hysteria]},{value:ye.Vless,label:Ps.find(s=>s.type===ye.Vless)?.label,color:ls[ye.Vless]}];function Kh({table:s,saveOrder:n,isSortMode:a,groups:l}){const r=s.getState().columnFilters.length>0,{t:c}=M("server"),o=l.map(u=>({label:u,value:u}));return e.jsxs("div",{className:"flex items-center justify-between ",children:[e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[!a&&e.jsxs(e.Fragment,{children:[e.jsx(Gh,{}),e.jsx(T,{placeholder:c("toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:u=>s.getColumn("name")?.setFilterValue(u.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex gap-x-2",children:[s.getColumn("type")&&e.jsx($a,{column:s.getColumn("type"),title:c("toolbar.type"),options:qh}),s.getColumn("groups")&&e.jsx($a,{column:s.getColumn("groups"),title:c("columns.groups.title"),options:o})]}),r&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[c("toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]}),a&&e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:c("toolbar.sort.tip")})})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:c(a?"toolbar.sort.save":"toolbar.sort.edit")})})]})}const it=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.71 12.71a6 6 0 1 0-7.42 0a10 10 0 0 0-6.22 8.18a1 1 0 0 0 2 .22a8 8 0 0 1 15.9 0a1 1 0 0 0 1 .89h.11a1 1 0 0 0 .88-1.1a10 10 0 0 0-6.25-8.19M12 12a4 4 0 1 1 4-4a4 4 0 0 1-4 4"})}),xt={0:"bg-destructive/80 shadow-sm shadow-destructive/50",1:"bg-yellow-500/80 shadow-sm shadow-yellow-500/50",2:"bg-emerald-500/80 shadow-sm shadow-emerald-500/50"},Bh=s=>{const{t:n}=M("server");return[{id:"drag-handle",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.sort")}),cell:()=>e.jsx("div",{className:"flex items-center justify-center",children:e.jsx(Dt,{className:"size-4 cursor-move text-muted-foreground transition-colors hover:text-primary","aria-hidden":"true"})}),size:50},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.nodeId")}),cell:({row:a})=>{const l=a.getValue("id"),r=a.original.code;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsxs("div",{className:"group/id flex items-center space-x-2",children:[e.jsxs(H,{variant:"outline",className:y("border-2 font-medium transition-all duration-200 hover:opacity-80","flex items-center gap-1.5"),style:{borderColor:ls[a.original.type]},children:[e.jsx(zn,{className:"size-3"}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"flex items-center gap-0.5",children:r??l}),a.original.parent?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-sm text-muted-foreground/30",children:"→"}),e.jsx("span",{children:a.original.parent?.code||a.original.parent?.id})]}):""]})]}),e.jsx(R,{variant:"ghost",size:"icon",className:"size-5 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:text-muted-foreground group-hover/id:opacity-100",onClick:c=>{c.stopPropagation(),wt(r||l.toString())},children:e.jsx(Da,{className:"size-3"})})]})}),e.jsxs(te,{side:"top",className:"flex flex-col gap-1 p-3",children:[e.jsxs("p",{className:"font-medium",children:[Ps.find(c=>c.type===a.original.type)?.label,a.original.parent_id?" (子节点)":""]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r?"点击括号内容或复制按钮可复制节点代码":"点击复制按钮可复制节点ID"})]})]})})},size:200,enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.show")}),cell:({row:a})=>{const[l,r]=m.useState(!!a.getValue("show"));return e.jsx(G,{checked:l,onCheckedChange:async c=>{r(c),qd({id:a.original.id,type:a.original.type,show:c?1:0}).catch(()=>{r(!c),s()})},style:{backgroundColor:l?ls[a.original.type]:void 0}})},size:50,enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx(O,{column:a,title:n("columns.node"),tooltip:e.jsxs("div",{className:"grid grid-cols-1 gap-3 p-2",children:[e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",xt[0])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.0")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",xt[1])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.1")})]}),e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("h-2.5 w-2.5 rounded-full",xt[2])}),e.jsx("span",{className:"text-sm font-medium",children:n("columns.status.2")})]})]})})}),cell:({row:a})=>e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center space-x-2.5",children:[e.jsx("span",{className:y("size-2.5 flex-shrink-0 rounded-full transition-all duration-200",xt[a.original.available_status])}),e.jsx("span",{className:"text-left font-medium transition-colors hover:text-primary",children:a.getValue("name")})]})}),e.jsx(te,{children:e.jsx("p",{className:"font-medium",children:n(`columns.status.${a.original.available_status}`)})})]})}),enableSorting:!1,size:200},{accessorKey:"host",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.address")}),cell:({row:a})=>{const l=`${a.original.host}:${a.original.port}`,r=a.original.port!==a.original.server_port;return e.jsxs("div",{className:"group relative flex min-w-0 items-start",children:[e.jsxs("div",{className:"flex min-w-0 flex-wrap items-baseline gap-x-1 gap-y-0.5 pr-7",children:[e.jsx("div",{className:"flex items-center ",children:e.jsxs("span",{className:"font-mono text-sm font-medium text-foreground/90",children:[a.original.host,":",a.original.port]})}),r&&e.jsxs("span",{className:"whitespace-nowrap text-[0.7rem] tracking-tight text-muted-foreground/40",children:["(",n("columns.internalPort")," ",a.original.server_port,")"]})]}),e.jsx("div",{className:"absolute right-0 top-0",children:e.jsx(oe,{delayDuration:0,children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"icon",className:"size-6 text-muted-foreground/40 opacity-0 transition-all duration-200 hover:bg-muted/50 hover:text-muted-foreground group-hover:opacity-100",onClick:c=>{c.stopPropagation(),wt(l)},children:e.jsx(Da,{className:"size-3"})})}),e.jsx(te,{side:"top",sideOffset:10,children:n("columns.copyAddress")})]})})})]})},enableSorting:!1,enableHiding:!0},{accessorKey:"online",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.onlineUsers.title"),tooltip:n("columns.onlineUsers.tooltip")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"size-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("online")})]}),size:80,enableSorting:!0,enableHiding:!0},{accessorKey:"rate",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.rate.title"),tooltip:n("columns.rate.tooltip")}),cell:({row:a})=>e.jsxs(H,{variant:"secondary",className:"font-medium",children:[a.getValue("rate")," x"]}),size:80,enableSorting:!1,enableHiding:!0},{accessorKey:"groups",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.groups.title"),tooltip:n("columns.groups.tooltip")}),cell:({row:a})=>{const l=a.getValue("groups")||[];return e.jsx("div",{className:"flex min-w-[300px] max-w-[600px] flex-wrap items-center gap-1.5",children:l.length>0?l.map((r,c)=>e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:r.name},c)):e.jsx("span",{className:"text-sm text-muted-foreground",children:n("columns.groups.empty")})})},enableSorting:!1,size:600,filterFn:(a,l,r)=>{const c=a.getValue(l);return c?r.some(o=>c.includes(o)):!1}},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.type")}),cell:({row:a})=>{const l=a.getValue("type");return e.jsx(H,{variant:"outline",className:"border-2 font-medium transition-colors",style:{borderColor:ls[l]},children:l})},enableSorting:!1,enableHiding:!0,enableColumnFilter:!1,size:8e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingServer:r,setServerType:c}=Mr();return e.jsx("div",{className:"flex justify-center",children:e.jsxs(ys,{modal:!1,children:[e.jsx(_s,{asChild:!0,children:e.jsx(R,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":n("columns.actions"),children:e.jsx(_t,{className:"size-4"})})}),e.jsxs(is,{align:"end",className:"w-40",children:[e.jsx(xe,{className:"cursor-pointer",onClick:()=>{c(a.original.type),r(a.original),l(!0)},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(po,{className:"mr-2 size-4"}),n("columns.actions_dropdown.edit")]})}),e.jsxs(xe,{className:"cursor-pointer",onClick:async()=>{Gd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.copy_success")),s())})},children:[e.jsx(xo,{className:"mr-2 size-4"}),n("columns.actions_dropdown.copy")]}),e.jsx(at,{}),e.jsx(xe,{className:"cursor-pointer text-destructive focus:text-destructive",onSelect:o=>o.preventDefault(),children:e.jsx(Je,{title:n("columns.actions_dropdown.delete.title"),description:n("columns.actions_dropdown.delete.description"),confirmText:n("columns.actions_dropdown.delete.confirm"),variant:"destructive",onConfirm:async()=>{Hd({id:a.original.id}).then(({data:o})=>{o&&($.success(n("columns.actions_dropdown.delete_success")),s())})},children:e.jsxs("div",{className:"flex w-full items-center",children:[e.jsx(cs,{className:"mr-2 size-4"}),n("columns.actions_dropdown.delete.confirm")]})})})]})]})})},size:50}]};function Wh(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState({pageSize:500,pageIndex:0}),[h,i]=m.useState([]),[d,f]=m.useState(!1),[P,E]=m.useState({}),[x,N]=m.useState([]),{refetch:k}=se({queryKey:["nodeList"],queryFn:async()=>{const{data:A}=await pr();return N(A),A}}),v=m.useMemo(()=>{const A=new Set;return x.forEach(Z=>{Z.groups&&Z.groups.forEach(z=>A.add(z.name))}),Array.from(A).sort()},[x]);m.useEffect(()=>{l({"drag-handle":d,show:!d,host:!d,online:!d,rate:!d,groups:!d,type:!1,actions:!d}),E({name:d?2e3:200}),u({pageSize:d?99999:500,pageIndex:0})},[d]);const w=(A,Z)=>{d&&(A.dataTransfer.setData("text/plain",Z.toString()),A.currentTarget.classList.add("opacity-50"))},S=(A,Z)=>{if(!d)return;A.preventDefault(),A.currentTarget.classList.remove("bg-muted");const z=parseInt(A.dataTransfer.getData("text/plain"));if(z===Z)return;const X=[...x],[qs]=X.splice(z,1);X.splice(Z,0,qs),N(X)},C=async()=>{if(!d){f(!0);return}const A=x?.map((Z,z)=>({id:Z.id,order:z+1}));Kd(A).then(()=>{$.success("排序保存成功"),f(!1),k()}).finally(()=>{f(!1)})},I=Ae({data:x||[],columns:Bh(k),state:{sorting:h,columnVisibility:a,rowSelection:s,columnFilters:r,columnSizing:P,pagination:o},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:i,onColumnFiltersChange:c,onColumnVisibilityChange:l,onColumnSizingChange:E,onPaginationChange:u,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Dh,{refetch:k,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:I,toolbar:A=>e.jsx(Kh,{table:A,refetch:k,saveOrder:C,isSortMode:d,groups:v}),draggable:d,onDragStart:w,onDragEnd:A=>A.currentTarget.classList.remove("opacity-50"),onDragOver:A=>{A.preventDefault(),A.currentTarget.classList.add("bg-muted")},onDragLeave:A=>A.currentTarget.classList.remove("bg-muted"),onDrop:S,showPagination:!d})})})}function Yh(){const{t:s}=M("server");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Wh,{})})]})]})}const Jh=Object.freeze(Object.defineProperty({__proto__:null,default:Yh},Symbol.toStringTag,{value:"Module"}));function Qh({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("group");return e.jsx("div",{className:"flex items-center justify-between space-x-4",children:e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsx(Lt,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:y("h-8 w-[150px] lg:w-[250px]",a&&"border-primary/50 ring-primary/20")}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]})})}const Zh=s=>{const{t:n}=M("group");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium",children:a.getValue("name")})})},{accessorKey:"users_count",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.usersCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"server_count",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.serverCount")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-4",children:[e.jsx(zn,{className:"h-4 w-4"}),e.jsx("span",{className:"font-medium",children:a.getValue("server_count")})]}),enableSorting:!0,size:8e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Lt,{defaultValues:a.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Wd({id:a.original.id}).then(({data:l})=>{l&&($.success(n("messages.updateSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function Xh(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),{data:h,refetch:i,isLoading:d}=se({queryKey:["serverGroupList"],queryFn:async()=>{const{data:P}=await Mt();return P}}),f=Ae({data:h||[],columns:Zh(i),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r},enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(Qh,{table:P,refetch:i}),isLoading:d})}function ep(){const{t:s}=M("group");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Xh,{})})]})]})}const sp=Object.freeze(Object.defineProperty({__proto__:null,default:ep},Symbol.toStringTag,{value:"Module"})),tp=s=>p.object({remarks:p.string().min(1,s("form.validation.remarks")),match:p.array(p.string()),action:p.enum(["block","dns"]),action_value:p.string().optional()});function Lr({refetch:s,dialogTrigger:n,defaultValues:a={remarks:"",match:[],action:"block",action_value:""},type:l="add"}){const{t:r}=M("route"),c=ce({resolver:ue(tp(r)),defaultValues:a,mode:"onChange"}),[o,u]=m.useState(!1);return e.jsxs(ge,{open:o,onOpenChange:u,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"space-x-2",children:[e.jsx(_e,{icon:"ion:add"})," ",e.jsx("div",{children:r("form.add")})]})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:r(l==="edit"?"form.edit":"form.create")}),e.jsx(Te,{})]}),e.jsxs(he,{...c,children:[e.jsx(j,{control:c.control,name:"remarks",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:r("form.remarks")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.remarksPlaceholder"),...h})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"match",render:({field:h})=>e.jsxs(g,{className:"flex-[2]",children:[e.jsx(b,{children:r("form.match")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(Cs,{className:"min-h-[120px]",placeholder:r("form.matchPlaceholder"),value:h.value.join(` `),onChange:i=>{h.onChange(i.target.value.split(` -`))}})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"action",render:({field:h})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:h.onChange,defaultValue:h.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"block",children:r("actions.block")}),e.jsx(U,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(D,{})]})}),c.watch("action")==="dns"&&e.jsx(j,{control:c.control,name:"action_value",render:({field:h})=>e.jsxs(g,{children:[e.jsx(v,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.dnsPlaceholder"),...h})})})]})}),e.jsxs(Ve,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{Td(c.getValues()).then(({data:h})=>{h&&(u(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),c.reset())})},children:r("form.submit")})]})]})]})]})}function Lh({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Or,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}function Ah({columns:s,data:n,refetch:a}){const[l,r]=m.useState({}),[c,o]=m.useState({}),[u,h]=m.useState([]),[i,d]=m.useState([]),f=Ae({data:n,columns:s,state:{sorting:i,columnVisibility:c,rowSelection:l,columnFilters:u},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:h,onColumnVisibilityChange:o,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(Lh,{table:P,refetch:a})})}const Fh=s=>{const{t:n}=M("route"),a={block:{icon:po,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:fo,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(V,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),c=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:a[r]?.variant||"default",className:y("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[c&&e.jsx(c,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Or,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Dd({id:l.original.id}).then(({data:r})=>{r&&($.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function zh(){const{t:s}=M("route"),[n,a]=m.useState([]);function l(){pr().then(({data:r})=>{a(r)})}return m.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Ah,{data:n,columns:Fh(l),refetch:l})})]})]})}const Uh=Object.freeze(Object.defineProperty({__proto__:null,default:zh},Symbol.toStringTag,{value:"Module"})),Vr=m.createContext(void 0);function $h({children:s,refreshData:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null);return e.jsx(Vr.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:c,refreshData:n},children:s})}function pa(){const s=m.useContext(Vr);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function Hh({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=pa(),{t:r}=M("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(T,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const Ha={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},qh=s=>{const{t:n}=M("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{Ft({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{Ft({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{Ft({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(it,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(V,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:c,key:o,unit:u})=>l[o]!=null&&e.jsxs(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Ha[o].color,Ha[o].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[c," ¥",l[o],u]},o))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=pa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Je,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{Yd({id:a.original.id}).then(({data:c})=>{c&&($.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},Gh=x.object({id:x.number().nullable(),group_id:x.union([x.number(),x.string()]).nullable().optional(),name:x.string().min(1).max(250),content:x.string().nullable().optional(),transfer_enable:x.union([x.number().min(0),x.string().min(1)]),prices:x.object({monthly:x.union([x.number(),x.string()]).nullable().optional(),quarterly:x.union([x.number(),x.string()]).nullable().optional(),half_yearly:x.union([x.number(),x.string()]).nullable().optional(),yearly:x.union([x.number(),x.string()]).nullable().optional(),two_yearly:x.union([x.number(),x.string()]).nullable().optional(),three_yearly:x.union([x.number(),x.string()]).nullable().optional(),onetime:x.union([x.number(),x.string()]).nullable().optional(),reset_traffic:x.union([x.number(),x.string()]).nullable().optional()}).default({}),speed_limit:x.union([x.number(),x.string()]).nullable().optional(),capacity_limit:x.union([x.number(),x.string()]).nullable().optional(),device_limit:x.union([x.number(),x.string()]).nullable().optional(),force_update:x.boolean().optional(),reset_traffic_method:x.number().nullable(),users_count:x.number().optional()}),Lr=m.forwardRef(({className:s,...n},a)=>e.jsx(Un,{ref:a,className:y("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...n,children:e.jsx(go,{className:y("flex items-center justify-center text-current"),children:e.jsx(Ds,{className:"h-4 w-4"})})}));Lr.displayName=Un.displayName;const ft={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},Kh=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function Bh(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=pa(),[c,o]=m.useState(!1),{t:u}=M("subscribe"),h=ce({resolver:ue(Gh),defaultValues:{...ft,...a||{}},mode:"onChange"});m.useEffect(()=>{a?h.reset({...ft,...a}):h.reset(ft)},[a,h]);const i=new la({html:!0}),[d,f]=m.useState();async function P(){Mt().then(({data:N})=>{f(N)})}m.useEffect(()=>{s&&P()},[s]);const I=N=>{if(isNaN(N))return;const k=Object.entries(gt).reduce((b,[w,S])=>{const C=N*S.months*S.discount;return{...b,[w]:C.toFixed(2)}},{});h.setValue("prices",k,{shouldDirty:!0})},p=()=>{n(!1),l(null),h.reset(ft)};return e.jsx(ge,{open:s,onOpenChange:p,children:e.jsxs(xe,{children:[e.jsxs(ve,{children:[e.jsx(je,{children:u(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(Te,{})]}),e.jsxs(he,{...h,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"name",render:({field:N})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:u("plan.form.name.placeholder"),...N})}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"group_id",render:({field:N})=>e.jsxs(g,{children:[e.jsxs(v,{className:"flex items-center justify-between",children:[u("plan.form.group.label"),e.jsx(Ot,{dialogTrigger:e.jsx(R,{variant:"link",children:u("plan.form.group.add")}),refetch:P})]}),e.jsxs(W,{value:N.value?.toString()??"",onValueChange:k=>N.onChange(k?Number(k):null),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.group.placeholder")})})}),e.jsx(B,{children:d?.map(k=>e.jsx(U,{value:k.id.toString(),children:k.name},k.id))})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"transfer_enable",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.transfer.placeholder"),className:"rounded-r-none",...N})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.transfer.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"speed_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.speed.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.speed.unit")})]}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:u("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(T,{type:"number",placeholder:u("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:N=>{const k=parseFloat(N.target.value);I(k)}})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const N=Object.keys(gt).reduce((k,b)=>({...k,[b]:""}),{});h.setValue("prices",N,{shouldDirty:!0})},children:u("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:u("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([N])=>!["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:b})=>e.jsxs(g,{children:[e.jsxs(v,{className:"text-xs font-medium text-muted-foreground",children:[u(`plan.columns.price_period.${N}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",k.months===1?u("plan.form.price.period.monthly"):u("plan.form.price.period.months",{count:k.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,value:b.value??"",onChange:w=>b.onChange(w.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},N))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([N])=>["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:b})=>e.jsx(g,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(v,{className:"text-xs font-medium",children:u(`plan.columns.price_period.${N}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:u(N==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...b,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},N))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(j,{control:h.control,name:"device_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.device.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.device.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"capacity_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(v,{children:u("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.capacity.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.capacity.unit")})]}),e.jsx(D,{})]})})]}),e.jsx(j,{control:h.control,name:"reset_traffic_method",render:({field:N})=>e.jsxs(g,{children:[e.jsx(v,{children:u("plan.form.reset_method.label")}),e.jsxs(W,{value:N.value?.toString()??"null",onValueChange:k=>N.onChange(k=="null"?null:Number(k)),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.reset_method.placeholder")})})}),e.jsx(B,{children:Kh.map(k=>e.jsx(U,{value:k.value?.toString()??"null",children:u(`plan.form.reset_method.options.${k.label}`)},k.value))})]}),e.jsx(O,{className:"text-xs",children:u("plan.form.reset_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"content",render:({field:N})=>{const[k,b]=m.useState(!1);return e.jsxs(g,{className:"space-y-2",children:[e.jsxs(v,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[u("plan.form.content.label"),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>b(!k),children:k?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:u(k?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{N.onChange(u("plan.form.content.template.content"))},children:u("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:u("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${k?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(_,{children:e.jsx(ia,{style:{height:"400px"},value:N.value||"",renderHTML:w=>i.render(w),onChange:({text:w})=>N.onChange(w),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:u("plan.form.content.placeholder"),className:"rounded-md border"})})}),k&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:u("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:i.render(N.value||"")}})})]})]}),e.jsx(O,{className:"text-xs",children:u("plan.form.content.description")}),e.jsx(D,{})]})}})]}),e.jsx(Ve,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(j,{control:h.control,name:"force_update",render:({field:N})=>e.jsxs(g,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(_,{children:e.jsx(Lr,{checked:N.value,onCheckedChange:N.onChange})}),e.jsx("div",{className:"",children:e.jsx(v,{className:"text-sm",children:u("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(R,{type:"button",variant:"outline",onClick:p,children:u("plan.form.submit.cancel")}),e.jsx(R,{type:"submit",disabled:c,onClick:()=>{h.handleSubmit(async N=>{o(!0),(await Wd(N)).data&&($.success(u(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),p(),r()),o(!1)})()},children:u(c?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function Wh(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({pageSize:20,pageIndex:0}),[P,I]=m.useState([]),{refetch:p}=se({queryKey:["planList"],queryFn:async()=>{const{data:S}=await Os();return I(S),S}});m.useEffect(()=>{l({"drag-handle":h}),f({pageSize:h?99999:10,pageIndex:0})},[h]);const N=(S,C)=>{h&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!h)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const E=parseInt(S.dataTransfer.getData("text/plain"));if(E===C)return;const A=[...P],[Z]=A.splice(E,1);A.splice(C,0,Z),I(A)},b=async()=>{if(!h){i(!0);return}const S=P?.map(C=>C.id);Jd(S).then(()=>{$.success("排序保存成功"),i(!1),p()}).finally(()=>{i(!1)})},w=Ae({data:P||[],columns:qh(p),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:f,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}},pageCount:h?1:void 0});return e.jsx($h,{refreshData:p,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ye,{table:w,toolbar:S=>e.jsx(Hh,{table:S,refetch:p,saveOrder:b,isSortMode:h}),draggable:h,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!h}),e.jsx(Bh,{})]})})}function Yh(){const{t:s}=M("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Wh,{})})]})]})}const Jh=Object.freeze(Object.defineProperty({__proto__:null,default:Yh},Symbol.toStringTag,{value:"Module"})),Fs=[{value:Q.PENDING,label:Ys[Q.PENDING],icon:jo,color:Js[Q.PENDING]},{value:Q.PROCESSING,label:Ys[Q.PROCESSING],icon:$n,color:Js[Q.PROCESSING]},{value:Q.COMPLETED,label:Ys[Q.COMPLETED],icon:Wt,color:Js[Q.COMPLETED]},{value:Q.CANCELLED,label:Ys[Q.CANCELLED],icon:Hn,color:Js[Q.CANCELLED]},{value:Q.DISCOUNTED,label:Ys[Q.DISCOUNTED],icon:Wt,color:Js[Q.DISCOUNTED]}],Zs=[{value:ne.PENDING,label:ut[ne.PENDING],icon:vo,color:ht[ne.PENDING]},{value:ne.PROCESSING,label:ut[ne.PROCESSING],icon:$n,color:ht[ne.PROCESSING]},{value:ne.VALID,label:ut[ne.VALID],icon:Wt,color:ht[ne.VALID]},{value:ne.INVALID,label:ut[ne.INVALID],icon:Hn,color:ht[ne.INVALID]}];function jt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),c=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,c?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:c.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):a.filter(o=>c.has(o.value)).map(o=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(o=>{const u=c.has(o.value);return e.jsxs(Ne,{onSelect:()=>{const h=new Set(c);u?h.delete(o.value):h.add(o.value);const i=Array.from(h);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",u?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),l?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(o.value)})]},o.value)})}),c.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Qh=x.object({email:x.string().min(1),plan_id:x.number(),period:x.string(),total_amount:x.number()}),Zh={email:"",plan_id:0,total_amount:0,period:""};function Ar({refetch:s,trigger:n,defaultValues:a}){const{t:l}=M("order"),[r,c]=m.useState(!1),o=ce({resolver:ue(Qh),defaultValues:{...Zh,...a},mode:"onChange"}),[u,h]=m.useState([]);return m.useEffect(()=>{r&&Os().then(({data:i})=>{h(i)})},[r]),e.jsxs(ge,{open:r,onOpenChange:c,children:[e.jsx(Oe,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:l("dialog.assignOrder")}),e.jsx(Te,{})]}),e.jsxs(he,{...o,children:[e.jsx(j,{control:o.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.userEmail")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dialog.placeholders.email"),...i})})]})}),e.jsx(j,{control:o.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value?.toString():void 0,onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(B,{children:u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(j,{control:o.control,name:"period",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.orderPeriod")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.period")})}),e.jsx(B,{children:Object.keys(km).map(d=>e.jsx(U,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(j,{control:o.control,name:"total_amount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:l("dialog.fields.paymentAmount")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dialog.placeholders.amount"),value:i.value/100,onChange:d=>i.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(D,{})]})}),e.jsxs(Ve,{children:[e.jsx(R,{variant:"outline",onClick:()=>c(!1),children:l("dialog.actions.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{o.handleSubmit(i=>{sm(i).then(({data:d})=>{d&&(s&&s(),o.reset(),c(!1),$.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function Xh({table:s,refetch:n}){const{t:a}=M("order"),l=s.getState().columnFilters.length>0,r=Object.values(He).filter(h=>typeof h=="number").map(h=>({label:a(`type.${He[h]}`),value:h,color:h===He.NEW?"green-500":h===He.RENEWAL?"blue-500":h===He.UPGRADE?"purple-500":"orange-500"})),c=Object.values(de).map(h=>({label:a(`period.${h}`),value:h,color:h===de.MONTH_PRICE?"slate-500":h===de.QUARTER_PRICE?"cyan-500":h===de.HALF_YEAR_PRICE?"indigo-500":h===de.YEAR_PRICE?"violet-500":h===de.TWO_YEAR_PRICE?"fuchsia-500":h===de.THREE_YEAR_PRICE?"pink-500":h===de.ONETIME_PRICE?"rose-500":"orange-500"})),o=Object.values(Q).filter(h=>typeof h=="number").map(h=>({label:a(`status.${Q[h]}`),value:h,icon:h===Q.PENDING?Fs[0].icon:h===Q.PROCESSING?Fs[1].icon:h===Q.COMPLETED?Fs[2].icon:h===Q.CANCELLED?Fs[3].icon:Fs[4].icon,color:h===Q.PENDING?"yellow-500":h===Q.PROCESSING?"blue-500":h===Q.COMPLETED?"green-500":h===Q.CANCELLED?"red-500":"green-500"})),u=Object.values(ne).filter(h=>typeof h=="number").map(h=>({label:a(`commission.${ne[h]}`),value:h,icon:h===ne.PENDING?Zs[0].icon:h===ne.PROCESSING?Zs[1].icon:h===ne.VALID?Zs[2].icon:Zs[3].icon,color:h===ne.PENDING?"yellow-500":h===ne.PROCESSING?"blue-500":h===ne.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ar,{refetch:n}),e.jsx(T,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:h=>s.getColumn("trade_no")?.setFilterValue(h.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(jt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(jt,{column:s.getColumn("period"),title:a("table.columns.period"),options:c}),s.getColumn("status")&&e.jsx(jt,{column:s.getColumn("status"),title:a("table.columns.status"),options:o}),s.getColumn("commission_status")&&e.jsx(jt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:u})]}),l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}function ze({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",l),children:n||"-"})]})}function ex({status:s}){const{t:n}=M("order"),a={[Q.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Q.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Q.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Q.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Q.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(H,{variant:"secondary",className:y("font-medium",a[s]),children:n(`status.${Q[s]}`)})}function sx({id:s,trigger:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(),{t:o}=M("order");return m.useEffect(()=>{(async()=>{if(a){const{data:h}=await Zd({id:s});c(h)}})()},[a,s]),e.jsxs(ge,{onOpenChange:l,open:a,children:[e.jsx(Oe,{asChild:!0,children:n}),e.jsxs(xe,{className:"max-w-xl",children:[e.jsxs(ve,{className:"space-y-2",children:[e.jsx(je,{className:"text-lg font-medium",children:o("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[o("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(ex,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Rs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(qn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(ze,{label:o("dialog.fields.orderPeriod"),value:r&&o(`period.${r.period}`)}),e.jsx(ze,{label:o("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(ze,{label:o("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.paymentAmount"),value:ks(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(be,{className:"my-2"}),e.jsx(ze,{label:o("dialog.fields.balancePayment"),value:ks(r?.balance_amount||0)}),e.jsx(ze,{label:o("dialog.fields.discountAmount"),value:ks(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(ze,{label:o("dialog.fields.refundAmount"),value:ks(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(ze,{label:o("dialog.fields.deductionAmount"),value:ks(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.createdAt"),value:me(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(ze,{label:o("dialog.fields.updatedAt"),value:me(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const tx={[He.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},ax={[de.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},nx=s=>Q[s],rx=s=>ne[s],lx=s=>He[s],ix=s=>{const{t:n}=M("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(sx,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(qn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=tx[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${lx(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=ax[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(V,{column:a,title:n("table.columns.status")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Tr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=Fs.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${nx(l.value)}`)})]}),l.value===Q.PENDING&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[140px]",children:[e.jsx(pe,{className:"cursor-pointer",onClick:async()=>{await Xd({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await em({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,c=Zs.find(o=>o.value===a.getValue("commission_status"));return r==0||!c?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon&&e.jsx(c.icon,{className:`h-4 w-4 text-${c.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${rx(c.value)}`)})]}),c.value===ne.PENDING&&l===Q.COMPLETED&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[120px]",children:[e.jsx(pe,{className:"cursor-pointer",onClick:async()=>{await La({trade_no:a.original.trade_no,commission_status:ne.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(pe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await La({trade_no:a.original.trade_no,commission_status:ne.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:me(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function ox(){const[s]=Gn(),[n,a]=m.useState({}),[l,r]=m.useState({}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const k=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([b,w])=>{const S=s.get(b);return S?{id:b,value:w==="number"?parseInt(S):S}:null}).filter(Boolean);k.length>0&&o(k)},[s]);const{refetch:f,data:P,isLoading:I}=se({queryKey:["orderList",i,c,u],queryFn:()=>Qd({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),p=Ae({data:P?.data??[],columns:ix(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:p,toolbar:e.jsx(Xh,{table:p,refetch:f}),showPagination:!0})}function cx(){const{t:s}=M("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ox,{})})]})]})}const dx=Object.freeze(Object.defineProperty({__proto__:null,default:cx},Symbol.toStringTag,{value:"Module"}));function mx({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const ux=x.object({id:x.coerce.number().nullable().optional(),name:x.string().min(1,"请输入优惠券名称"),code:x.string().nullable(),type:x.union([x.string(),x.nativeEnum(js)]),value:x.coerce.number(),started_at:x.coerce.number(),ended_at:x.coerce.number(),limit_use:x.union([x.string(),x.number()]).nullable(),limit_use_with_user:x.union([x.string(),x.number()]).nullable(),generate_count:x.coerce.number().nullable().optional(),limit_plan_ids:x.array(x.number()).default([]).nullable(),limit_period:x.array(x.nativeEnum(de)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),qa={name:"",code:"",type:js.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Fr({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:c}){const{t:o}=M("coupon"),[u,h]=m.useState(!1),i=r??u,d=c??h,[f,P]=m.useState([]),I=ce({resolver:ue(ux),defaultValues:s||qa});m.useEffect(()=>{s&&I.reset(s)},[s,I]),m.useEffect(()=>{Os().then(({data:b})=>P(b))},[]);const p=b=>{if(!b)return;const w=(S,C)=>{const E=new Date(C*1e3);return S.setHours(E.getHours(),E.getMinutes(),E.getSeconds()),Math.floor(S.getTime()/1e3)};b.from&&I.setValue("started_at",w(b.from,I.watch("started_at"))),b.to&&I.setValue("ended_at",w(b.to,I.watch("ended_at")))},N=async b=>{am(b).then(()=>{d(!1),a==="create"&&I.reset(qa),n()})},k=(b,w)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:w}),e.jsx(T,{type:"datetime-local",step:"1",value:me(I.watch(b),"YYYY-MM-DDTHH:mm:ss"),onChange:S=>{const C=new Date(S.target.value);I.setValue(b,Math.floor(C.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ge,{open:i,onOpenChange:d,children:[l&&e.jsx(Oe,{asChild:!0,children:l}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsx(ve,{children:e.jsx(je,{children:o(a==="create"?"form.add":"form.edit")})}),e.jsx(he,{...I,children:e.jsxs("form",{onSubmit:I.handleSubmit(N),className:"space-y-4",children:[e.jsx(j,{control:I.control,name:"name",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.name.label")}),e.jsx(T,{placeholder:o("form.name.placeholder"),...b}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"code",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.code.label")}),e.jsx(T,{placeholder:o("form.code.placeholder"),...b,className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.code.description")}),e.jsx(D,{})]})}),e.jsxs(g,{children:[e.jsx(v,{children:o("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(j,{control:I.control,name:"type",render:({field:b})=>e.jsxs(W,{value:b.value.toString(),onValueChange:b.onChange,children:[e.jsx(K,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:o("form.type.placeholder")})}),e.jsx(B,{children:Object.entries(Pm).map(([w,S])=>e.jsx(U,{value:w,children:o(`table.toolbar.types.${w}`)},w))})]})}),e.jsx(j,{control:I.control,name:"value",render:({field:b})=>e.jsx(T,{type:"number",placeholder:o("form.value.placeholder"),...b,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:I.watch("type")===js.AMOUNT?"¥":"%"})})]})]}),e.jsxs(g,{children:[e.jsx(v,{children:o("form.validity.label")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",className:y("w-full justify-start text-left font-normal",!I.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4"}),me(I.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",o("form.validity.to")," ",me(I.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(We,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Vs,{mode:"range",selected:{from:new Date(I.watch("started_at")*1e3),to:new Date(I.watch("ended_at")*1e3)},onSelect:p,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[k("started_at",o("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:o("form.validity.to")}),k("ended_at",o("table.validity.endTime"))]})})]})]}),e.jsx(D,{})]}),e.jsx(j,{control:I.control,name:"limit_use",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitUse.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUse.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.limitUse.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_use_with_user",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitUseWithUser.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUseWithUser.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.limitUseWithUser.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_period",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitPeriod.label")}),e.jsx(lt,{options:Object.entries(de).filter(([w])=>isNaN(Number(w))).map(([w,S])=>({label:S,value:w})),onChange:w=>{if(w.length===0){b.onChange([]);return}const S=w.map(C=>de[C.value]);b.onChange(S)},value:(b.value||[]).map(w=>({label:Object.entries(de).find(([S,C])=>C===w)?.[1]||"",value:Object.entries(de).find(([S,C])=>C===w)?.[0]||""})),placeholder:o("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPeriod.empty")})}),e.jsx(O,{className:"text-xs",children:o("form.limitPeriod.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:I.control,name:"limit_plan_ids",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.limitPlan.label")}),e.jsx(lt,{options:f?.map(w=>({label:w.name,value:w.id.toString()}))||[],onChange:w=>b.onChange(w.map(S=>Number(S.value))),value:(f||[]).filter(w=>(b.value||[]).includes(w.id)).map(w=>({label:w.name,value:w.id.toString()})),placeholder:o("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPlan.empty")})}),e.jsx(D,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(j,{control:I.control,name:"generate_count",render:({field:b})=>e.jsxs(g,{children:[e.jsx(v,{children:o("form.generateCount.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.generateCount.placeholder"),...b,value:b.value===void 0?"":b.value,onChange:w=>b.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(O,{className:"text-xs",children:o("form.generateCount.description")}),e.jsx(D,{})]})})}),e.jsx(Ve,{children:e.jsx(R,{type:"submit",disabled:I.formState.isSubmitting,children:I.formState.isSubmitting?o("form.submit.saving"):o("form.submit.save")})})]})})]})]})}function hx({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fr,{refetch:n,dialogTrigger:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(T,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(mx,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:js.AMOUNT,label:l(`table.toolbar.types.${js.AMOUNT}`)},{value:js.PERCENTAGE,label:l(`table.toolbar.types.${js.PERCENTAGE}`)}]}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})}const zr=m.createContext(void 0);function xx({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),o=h=>{c(h),l(!0)},u=()=>{l(!1),c(null)};return e.jsxs(zr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:o,closeEdit:u},children:[s,r&&e.jsx(Fr,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function px(){const s=m.useContext(zr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const fx=s=>{const{t:n}=M("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(q,{defaultChecked:a.original.show,onCheckedChange:l=>{rm({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(H,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(V,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=m.useState(!1),c=Date.now(),o=a.original.started_at*1e3,u=a.original.ended_at*1e3,h=c>u,i=ce.jsx(V,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=px();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Es,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Je,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{nm({id:a.original.id}).then(({data:r})=>{r&&($.success("删除成功"),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function gx(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f}=se({queryKey:["couponList",h,r,o],queryFn:()=>tm({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),P=Ae({data:f?.data??[],columns:fx(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},pageCount:Math.ceil((f?.total??0)/h.pageSize),rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onPaginationChange:i,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(xx,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:P,toolbar:e.jsx(hx,{table:P,refetch:d})})})})}function jx(){const{t:s}=M("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(gx,{})})]})]})}const vx=Object.freeze(Object.defineProperty({__proto__:null,default:jx},Symbol.toStringTag,{value:"Module"})),bx=x.object({email_prefix:x.string().optional(),email_suffix:x.string().min(1),password:x.string().optional(),expired_at:x.number().optional().nullable(),plan_id:x.number().nullable(),generate_count:x.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),yx={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function _x({refetch:s}){const{t:n}=M("user"),[a,l]=m.useState(!1),r=ce({resolver:ue(bx),defaultValues:yx,mode:"onChange"}),[c,o]=m.useState([]);return m.useEffect(()=>{a&&Os().then(({data:u})=>{u&&o(u)})},[a]),e.jsxs(ge,{open:a,onOpenChange:l,children:[e.jsx(Oe,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(xe,{className:"sm:max-w-[425px]",children:[e.jsxs(ve,{children:[e.jsx(je,{children:n("generate.title")}),e.jsx(Te,{})]}),e.jsxs(he,{...r,children:[e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(j,{control:r.control,name:"email_prefix",render:({field:u})=>e.jsx(T,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...u})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(j,{control:r.control,name:"email_suffix",render:({field:u})=>e.jsx(T,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...u})})]})]}),e.jsx(j,{control:r.control,name:"password",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.password")}),e.jsx(T,{placeholder:n("generate.form.password_placeholder"),...u}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"expired_at",render:({field:u})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("generate.form.expire_time")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(J,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!u.value&&"text-muted-foreground"),children:[u.value?me(u.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(We,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(yo,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{u.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Vs,{mode:"single",selected:u.value?new Date(u.value*1e3):void 0,onSelect:h=>{h&&u.onChange(h?.getTime()/1e3)}})})]})]})]})}),e.jsx(j,{control:r.control,name:"plan_id",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:u.value?u.value.toString():"null",onValueChange:h=>u.onChange(h==="null"?null:parseInt(h)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("generate.form.subscription_none")}),c.map(h=>e.jsx(U,{value:h.id.toString(),children:h.name},h.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(j,{control:r.control,name:"generate_count",render:({field:u})=>e.jsxs(g,{children:[e.jsx(v,{children:n("generate.form.generate_count")}),e.jsx(T,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:u.value||"",onChange:h=>u.onChange(h.target.value?parseInt(h.target.value):null)})]})})]}),e.jsxs(Ve,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(u=>{cm(u).then(({data:h})=>{h&&($.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const Ur=Ba,$r=Wa,Nx=Ya,Hr=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));Hr.displayName=St.displayName;const wx=Ts("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),fa=m.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Nx,{children:[e.jsx(Hr,{}),e.jsxs(kt,{ref:r,className:y(wx({side:s}),n),...l,children:[e.jsxs(ta,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Le,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));fa.displayName=kt.displayName;const ga=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});ga.displayName="SheetHeader";const qr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});qr.displayName="SheetFooter";const ja=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold text-foreground",s),...n}));ja.displayName=Pt.displayName;const va=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));va.displayName=Tt.displayName;function Cx({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=M("user"),c=s.getState().columnFilters.length>0,[o,u]=m.useState([]),[h,i]=m.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],f=w=>w*1024*1024*1024,P=w=>w/(1024*1024*1024),I=()=>{u([...o,{field:"",operator:"",value:""}])},p=w=>{u(o.filter((S,C)=>C!==w))},N=(w,S,C)=>{const E=[...o];if(E[w]={...E[w],[S]:C},S==="field"){const A=d.find(Z=>Z.value===C);A&&(E[w].operator=A.operators[0].value,E[w].value=A.type==="boolean"?!1:"")}u(E)},k=(w,S)=>{const C=d.find(E=>E.value===w.field);if(!C)return null;switch(C.type){case"text":return e.jsx(T,{placeholder:r("filter.sheet.value"),value:w.value,onChange:E=>N(S,"value",E.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{type:"number",placeholder:r("filter.sheet.value_number",{unit:C.unit}),value:C.unit==="GB"?P(w.value||0):w.value,onChange:E=>{const A=Number(E.target.value);N(S,"value",C.unit==="GB"?f(A):A)}}),C.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:C.unit})]});case"date":return e.jsx(Vs,{mode:"single",selected:w.value,onSelect:E=>N(S,"value",E),className:"rounded-md border"});case"select":return e.jsxs(W,{value:w.value,onValueChange:E=>N(S,"value",E),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.value")})}),e.jsx(B,{children:C.useOptions?l.map(E=>e.jsx(U,{value:E.value.toString(),children:E.label},E.value)):C.options?.map(E=>e.jsx(U,{value:E.value.toString(),children:E.label},E.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(q,{checked:w.value,onCheckedChange:E=>N(S,"value",E)}),e.jsx(Nt,{children:w.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},b=()=>{const w=o.filter(S=>S.field&&S.operator&&S.value!=="").map(S=>{const C=d.find(A=>A.value===S.field);let E=S.value;return S.operator==="contains"?{id:S.field,value:E}:(C?.type==="date"&&E instanceof Date&&(E=Math.floor(E.getTime()/1e3)),C?.type==="boolean"&&(E=E?1:0),{id:S.field,value:`${S.operator}:${E}`})});s.setColumnFilters(w),i(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx(_x,{refetch:n}),e.jsx(T,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:w=>s.getColumn("email")?.setFilterValue(w.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Ur,{open:h,onOpenChange:i,children:[e.jsx($r,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(_o,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),o.length>0&&e.jsx(H,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:o.length})]})}),e.jsxs(fa,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:r("filter.sheet.title")}),e.jsx(va,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(R,{variant:"outline",size:"sm",onClick:I,children:r("filter.sheet.add")})]}),e.jsx(rt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:o.map((w,S)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Nt,{children:r("filter.sheet.condition",{number:S+1})}),e.jsx(R,{variant:"ghost",size:"sm",onClick:()=>p(S),children:e.jsx(Le,{className:"h-4 w-4"})})]}),e.jsxs(W,{value:w.field,onValueChange:C=>N(S,"field",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.field")})}),e.jsx(B,{children:d.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&e.jsxs(W,{value:w.operator,onValueChange:C=>N(S,"operator",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.operator")})}),e.jsx(B,{children:d.find(C=>C.value===w.field)?.operators.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&w.operator&&k(w,S)]},S))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(R,{variant:"outline",onClick:()=>{u([]),i(!1)},children:r("filter.sheet.reset")}),e.jsx(R,{onClick:b,children:r("filter.sheet.apply")})]})]})]})]}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),u([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(Le,{className:"ml-2 h-4 w-4"})]})]})})}const Sx=x.object({id:x.number(),email:x.string().email(),invite_user_email:x.string().email().nullable().optional(),password:x.string().optional().nullable(),balance:x.coerce.number(),commission_balance:x.coerce.number(),u:x.number(),d:x.number(),transfer_enable:x.number(),expired_at:x.number().nullable(),plan_id:x.number().nullable(),banned:x.number(),commission_type:x.number(),commission_rate:x.number().nullable(),discount:x.number().nullable(),speed_limit:x.number().nullable(),device_limit:x.number().nullable(),is_admin:x.number(),is_staff:x.number(),remarks:x.string().nullable()}),Gr=m.createContext(void 0);function kx({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,c]=m.useState(!1),[o,u]=m.useState(!1),[h,i]=m.useState([]),d=ce({resolver:ue(Sx),defaultValues:n,mode:"onChange"});m.useEffect(()=>{a!==void 0&&c(a)},[a]);const f=P=>{c(P),l?.(P)};return e.jsx(Gr.Provider,{value:{form:d,formOpen:r,setFormOpen:f,datePickerOpen:o,setDatePickerOpen:u,planList:h,setPlanList:i},children:s})}function Px(){const s=m.useContext(Gr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Tx({refetch:s}){const{t:n}=M("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:c,setDatePickerOpen:o,planList:u,setPlanList:h}=Px();return m.useEffect(()=>{l&&Os().then(({data:i})=>{h(i)})},[l,h]),e.jsxs(he,{...a,children:[e.jsx(j,{control:a.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.email")}),e.jsx(_,{children:e.jsx(T,{...i,placeholder:n("edit.form.email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"invite_user_email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.inviter_email")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:d=>i.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"password",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.password")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(D,{...i})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(j,{control:a.control,name:"balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"commission_balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"u",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.upload")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"d",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.download")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})})]}),e.jsx(j,{control:a.control,name:"transfer_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.total_traffic")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"expired_at",render:({field:i})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(v,{children:n("edit.form.expire_time")}),e.jsxs(as,{open:c,onOpenChange:o,children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(R,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!i.value&&"text-muted-foreground"),onClick:()=>o(!0),children:[i.value?me(i.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(We,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{i.onChange(null),o(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Vs,{mode:"single",selected:i.value?new Date(i.value*1e3):void 0,onSelect:d=>{if(d){const f=new Date(i.value?i.value*1e3:Date.now());d.setHours(f.getHours(),f.getMinutes(),f.getSeconds()),i.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{type:"datetime-local",step:"1",value:me(i.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const f=new Date(d.target.value);isNaN(f.getTime())||i.onChange(Math.floor(f.getTime()/1e3))},className:"flex-1"}),e.jsx(R,{type:"button",variant:"outline",onClick:()=>o(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value.toString():"null",onValueChange:d=>i.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("edit.form.subscription_none")}),u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(j,{control:a.control,name:"banned",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.account_status")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{})}),e.jsxs(B,{children:[e.jsx(U,{value:"1",children:n("columns.status_text.banned")}),e.jsx(U,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_type",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_type")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx(U,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx(U,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_rate",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.commission_rate")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(j,{control:a.control,name:"discount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.discount")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"speed_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.speed_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"device_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.device_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"is_admin",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"is_staff",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(q,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"remarks",render:({field:i})=>e.jsxs(g,{children:[e.jsx(v,{children:n("edit.form.remarks")}),e.jsx(_,{children:e.jsx(Cs,{className:"h-24",value:i.value||"",onChange:d=>i.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(D,{})]})}),e.jsxs(qr,{children:[e.jsx(R,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{a.handleSubmit(i=>{im(i).then(({data:d})=>{d&&($.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Kr({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(R,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=M("user"),[r,c]=m.useState(!1);return e.jsx(kx,{defaultValues:n,open:r,onOpenChange:c,children:e.jsxs(Ur,{open:r,onOpenChange:c,children:[e.jsx($r,{asChild:!0,children:a}),e.jsxs(fa,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:l("edit.title")}),e.jsx(va,{})]}),e.jsx(Tx,{refetch:s})]})]})})}const Br=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Wr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Dx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Rx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),$t=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:Fc(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Br,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Ze(n)})}}];function Yr({user_id:s,dialogTrigger:n}){const{t:a}=M(["traffic"]),[l,r]=m.useState(!1),[c,o]=m.useState({pageIndex:0,pageSize:20}),{data:u,isLoading:h}=se({queryKey:["userStats",s,c,l],queryFn:()=>l?dm({user_id:s,pageSize:c.pageSize,page:c.pageIndex+1}):null}),i=Ae({data:u?.data??[],columns:$t,pageCount:Math.ceil((u?.total??0)/c.pageSize),state:{pagination:c},manualPagination:!0,getCoreRowModel:Fe(),onPaginationChange:o});return e.jsxs(ge,{open:l,onOpenChange:r,children:[e.jsx(Oe,{asChild:!0,children:n}),e.jsxs(xe,{className:"sm:max-w-[700px]",children:[e.jsx(ve,{children:e.jsx(je,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(da,{children:[e.jsx(ma,{children:i.getHeaderGroups().map(d=>e.jsx(vs,{children:d.headers.map(f=>e.jsx(ha,{className:y("h-10 px-2 text-xs",f.id==="total"&&"text-right"),children:f.isPlaceholder?null:bt(f.column.columnDef.header,f.getContext())},f.id))},d.id))}),e.jsx(ua,{children:h?Array.from({length:c.pageSize}).map((d,f)=>e.jsx(vs,{children:Array.from({length:$t.length}).map((P,I)=>e.jsx(Us,{className:"p-2",children:e.jsx(Ie,{className:"h-6 w-full"})},I))},f)):i.getRowModel().rows?.length?i.getRowModel().rows.map(d=>e.jsx(vs,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(f=>e.jsx(Us,{className:"px-2",children:bt(f.column.columnDef.cell,f.getContext())},f.id))},d.id)):e.jsx(vs,{children:e.jsx(Us,{colSpan:$t.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(W,{value:`${i.getState().pagination.pageSize}`,onValueChange:d=>{i.setPageSize(Number(d))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:i.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx(U,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:i.getState().pagination.pageIndex+1,total:i.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage()||h,children:e.jsx(Dx,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.nextPage(),disabled:!i.getCanNextPage()||h,children:e.jsx(Rx,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Ex=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Ix=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),Mx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),Ox=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),Vx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),Lx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),Ax=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),Fx=(s,n)=>{const{t:a}=M("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,c=Date.now()/1e3-r<120,o=Math.floor(Date.now()/1e3-r);let u=c?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:me(r)});if(!c&&r!==0){const h=Math.floor(o/60),i=Math.floor(h/60),d=Math.floor(i/24);d>0?u+=` +`))}})})}),e.jsx(D,{})]})}),e.jsx(j,{control:c.control,name:"action",render:({field:h})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.action")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsxs(W,{onValueChange:h.onChange,defaultValue:h.value,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("form.actionPlaceholder")})}),e.jsxs(B,{children:[e.jsx(U,{value:"block",children:r("actions.block")}),e.jsx(U,{value:"dns",children:r("actions.dns")})]})]})})}),e.jsx(D,{})]})}),c.watch("action")==="dns"&&e.jsx(j,{control:c.control,name:"action_value",render:({field:h})=>e.jsxs(g,{children:[e.jsx(b,{children:r("form.dns")}),e.jsx("div",{className:"relative",children:e.jsx(_,{children:e.jsx(T,{type:"text",placeholder:r("form.dnsPlaceholder"),...h})})})]})}),e.jsxs(Oe,{children:[e.jsx(dt,{asChild:!0,children:e.jsx(R,{variant:"outline",children:r("form.cancel")})}),e.jsx(R,{type:"submit",onClick:()=>{Yd(c.getValues()).then(({data:h})=>{h&&(u(!1),s&&s(),toast.success(r(l==="edit"?"messages.updateSuccess":"messages.createSuccess")),c.reset())})},children:r("form.submit")})]})]})]})]})}function ap({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("route");return e.jsx("div",{className:"flex items-center justify-between ",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-2",children:[e.jsx(Lr,{refetch:n}),e.jsx(T,{placeholder:l("toolbar.searchPlaceholder"),value:s.getColumn("remarks")?.getFilterValue()??"",onChange:r=>s.getColumn("remarks")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]})})}function np({columns:s,data:n,refetch:a}){const[l,r]=m.useState({}),[c,o]=m.useState({}),[u,h]=m.useState([]),[i,d]=m.useState([]),f=Ae({data:n,columns:s,state:{sorting:i,columnVisibility:c,rowSelection:l,columnFilters:u},enableRowSelection:!0,onRowSelectionChange:r,onSortingChange:d,onColumnFiltersChange:h,onColumnVisibilityChange:o,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:f,toolbar:P=>e.jsx(ap,{table:P,refetch:a})})}const rp=s=>{const{t:n}=M("route"),a={block:{icon:fo,variant:"destructive",className:"bg-red-100 text-red-700 dark:bg-red-900 dark:text-red-400 hover:bg-red-200 dark:hover:bg-red-800"},dns:{icon:go,variant:"secondary",className:"bg-blue-100 text-blue-700 dark:bg-blue-900 dark:text-blue-400 hover:bg-blue-200 dark:hover:bg-blue-800"}};return[{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.id")}),cell:({row:l})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:l.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"remarks",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.remarks")}),cell:({row:l})=>{const r=l.original.match?.length||0;return e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:n("columns.matchRules",{count:r})})})},enableHiding:!1,enableSorting:!1},{accessorKey:"action",header:({column:l})=>e.jsx(O,{column:l,title:n("columns.action")}),cell:({row:l})=>{const r=l.getValue("action"),c=a[r]?.icon;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:a[r]?.variant||"default",className:y("flex items-center gap-1.5 px-3 py-1 capitalize",a[r]?.className),children:[c&&e.jsx(c,{className:"h-3.5 w-3.5"}),n(`actions.${r}`)]})})},enableSorting:!1,size:9e3},{id:"actions",header:()=>e.jsx("div",{className:"text-right",children:n("columns.actions")}),cell:({row:l})=>e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Lr,{defaultValues:l.original,refetch:s,type:"edit",dialogTrigger:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("form.edit")})]})}),e.jsx(Je,{title:n("messages.deleteConfirm"),description:n("messages.deleteDescription"),confirmText:n("messages.deleteButton"),variant:"destructive",onConfirm:async()=>{Jd({id:l.original.id}).then(({data:r})=>{r&&($.success(n("messages.deleteSuccess")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("messages.deleteButton")})]})})]})}]};function lp(){const{t:s}=M("route"),[n,a]=m.useState([]);function l(){xr().then(({data:r})=>{a(r)})}return m.useEffect(()=>{l()},[]),e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(np,{data:n,columns:rp(l),refetch:l})})]})]})}const ip=Object.freeze(Object.defineProperty({__proto__:null,default:lp},Symbol.toStringTag,{value:"Module"})),Or=m.createContext(void 0);function op({children:s,refreshData:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null);return e.jsx(Or.Provider,{value:{isOpen:a,setIsOpen:l,editingPlan:r,setEditingPlan:c,refreshData:n},children:s})}function xa(){const s=m.useContext(Or);if(s===void 0)throw new Error("usePlanEdit must be used within a PlanEditProvider");return s}function cp({table:s,saveOrder:n,isSortMode:a}){const{setIsOpen:l}=xa(),{t:r}=M("subscribe");return e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center space-x-2",children:[e.jsxs(R,{variant:"outline",className:"space-x-2",size:"sm",onClick:()=>l(!0),children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:r("plan.add")})]}),e.jsx(T,{placeholder:r("plan.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:c=>s.getColumn("name")?.setFilterValue(c.target.value),className:"h-8 w-[150px] lg:w-[250px]"})]}),s.getRowCount()>0&&e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(R,{variant:a?"default":"outline",onClick:n,size:"sm",children:r(a?"plan.sort.save":"plan.sort.edit")})})]})}const Ha={monthly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},quarterly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},half_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},two_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},three_yearly:{color:"text-slate-700",bgColor:"bg-slate-100/80"},onetime:{color:"text-slate-700",bgColor:"bg-slate-100/80"},reset_traffic:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},dp=s=>{const{t:n}=M("subscribe");return[{id:"drag-handle",header:()=>null,cell:()=>e.jsx("div",{className:"cursor-move",children:e.jsx(Dt,{className:"size-4"})}),size:40,enableSorting:!1},{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.id")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(H,{variant:"outline",children:a.getValue("id")})}),enableSorting:!0,enableHiding:!1},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.show")}),cell:({row:a})=>e.jsx(G,{defaultChecked:a.getValue("show"),onCheckedChange:l=>{Ft({id:a.original.id,show:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"sell",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.sell")}),cell:({row:a})=>e.jsx(G,{defaultChecked:a.getValue("sell"),onCheckedChange:l=>{Ft({id:a.original.id,sell:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"renew",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.renew"),tooltip:n("plan.columns.renew_tooltip")}),cell:({row:a})=>e.jsx(G,{defaultChecked:a.getValue("renew"),onCheckedChange:l=>{Ft({id:a.original.id,renew:l}).then(({data:r})=>{!r&&s()})}}),enableSorting:!1,enableHiding:!1},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("name")})}),enableSorting:!1,enableHiding:!1,size:900},{accessorKey:"users_count",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.stats")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 px-2",children:[e.jsx(it,{}),e.jsx("span",{className:"max-w-32 truncate font-medium sm:max-w-72 md:max-w-[31rem]",children:a.getValue("users_count")})]}),enableSorting:!0},{accessorKey:"group",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.group")}),cell:({row:a})=>e.jsx("div",{className:"flex max-w-[600px] flex-wrap items-center gap-1.5 text-nowrap",children:e.jsx(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5"),children:a.getValue("group")?.name})}),enableSorting:!1,enableHiding:!1},{accessorKey:"prices",header:({column:a})=>e.jsx(O,{column:a,title:n("plan.columns.price")}),cell:({row:a})=>{const l=a.getValue("prices"),r=[{period:n("plan.columns.price_period.monthly"),key:"monthly",unit:n("plan.columns.price_period.unit.month")},{period:n("plan.columns.price_period.quarterly"),key:"quarterly",unit:n("plan.columns.price_period.unit.quarter")},{period:n("plan.columns.price_period.half_yearly"),key:"half_yearly",unit:n("plan.columns.price_period.unit.half_year")},{period:n("plan.columns.price_period.yearly"),key:"yearly",unit:n("plan.columns.price_period.unit.year")},{period:n("plan.columns.price_period.two_yearly"),key:"two_yearly",unit:n("plan.columns.price_period.unit.two_year")},{period:n("plan.columns.price_period.three_yearly"),key:"three_yearly",unit:n("plan.columns.price_period.unit.three_year")},{period:n("plan.columns.price_period.onetime"),key:"onetime",unit:""},{period:n("plan.columns.price_period.reset_traffic"),key:"reset_traffic",unit:n("plan.columns.price_period.unit.times")}];return e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:r.map(({period:c,key:o,unit:u})=>l[o]!=null&&e.jsxs(H,{variant:"secondary",className:y("px-2 py-0.5 font-medium transition-colors text-nowrap",Ha[o].color,Ha[o].bgColor,"border border-border/50","hover:bg-slate-200/80"),children:[c," ¥",l[o],u]},o))})},enableSorting:!1,size:9e3},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("plan.columns.actions")}),cell:({row:a})=>{const{setIsOpen:l,setEditingPlan:r}=xa();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>{r(a.original),l(!0)},children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.edit")})]}),e.jsx(Je,{title:n("plan.columns.delete_confirm.title"),description:n("plan.columns.delete_confirm.description"),confirmText:n("plan.columns.delete"),variant:"destructive",onConfirm:async()=>{xm({id:a.original.id}).then(({data:c})=>{c&&($.success(n("plan.columns.delete_confirm.success")),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("plan.columns.delete")})]})})]})}}]},mp=p.object({id:p.number().nullable(),group_id:p.union([p.number(),p.string()]).nullable().optional(),name:p.string().min(1).max(250),content:p.string().nullable().optional(),transfer_enable:p.union([p.number().min(0),p.string().min(1)]),prices:p.object({monthly:p.union([p.number(),p.string()]).nullable().optional(),quarterly:p.union([p.number(),p.string()]).nullable().optional(),half_yearly:p.union([p.number(),p.string()]).nullable().optional(),yearly:p.union([p.number(),p.string()]).nullable().optional(),two_yearly:p.union([p.number(),p.string()]).nullable().optional(),three_yearly:p.union([p.number(),p.string()]).nullable().optional(),onetime:p.union([p.number(),p.string()]).nullable().optional(),reset_traffic:p.union([p.number(),p.string()]).nullable().optional()}).default({}),speed_limit:p.union([p.number(),p.string()]).nullable().optional(),capacity_limit:p.union([p.number(),p.string()]).nullable().optional(),device_limit:p.union([p.number(),p.string()]).nullable().optional(),force_update:p.boolean().optional(),reset_traffic_method:p.number().nullable(),users_count:p.number().optional()}),Vr=m.forwardRef(({className:s,...n},a)=>e.jsx(Un,{ref:a,className:y("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",s),...n,children:e.jsx(jo,{className:y("flex items-center justify-center text-current"),children:e.jsx(Ds,{className:"h-4 w-4"})})}));Vr.displayName=Un.displayName;const ft={id:null,group_id:null,name:"",content:"",transfer_enable:"",prices:{monthly:"",quarterly:"",half_yearly:"",yearly:"",two_yearly:"",three_yearly:"",onetime:"",reset_traffic:""},speed_limit:"",capacity_limit:"",device_limit:"",force_update:!1,reset_traffic_method:null},gt={monthly:{label:"月付",months:1,discount:1},quarterly:{label:"季付",months:3,discount:.95},half_yearly:{label:"半年付",months:6,discount:.9},yearly:{label:"年付",months:12,discount:.85},two_yearly:{label:"两年付",months:24,discount:.8},three_yearly:{label:"三年付",months:36,discount:.75},onetime:{label:"流量包",months:1,discount:1},reset_traffic:{label:"重置包",months:1,discount:1}},up=[{value:null,label:"follow_system"},{value:0,label:"monthly_first"},{value:1,label:"monthly_reset"},{value:2,label:"no_reset"},{value:3,label:"yearly_first"},{value:4,label:"yearly_reset"}];function hp(){const{isOpen:s,setIsOpen:n,editingPlan:a,setEditingPlan:l,refreshData:r}=xa(),[c,o]=m.useState(!1),{t:u}=M("subscribe"),h=ce({resolver:ue(mp),defaultValues:{...ft,...a||{}},mode:"onChange"});m.useEffect(()=>{a?h.reset({...ft,...a}):h.reset(ft)},[a,h]);const i=new la({html:!0}),[d,f]=m.useState();async function P(){Mt().then(({data:N})=>{f(N)})}m.useEffect(()=>{s&&P()},[s]);const E=N=>{if(isNaN(N))return;const k=Object.entries(gt).reduce((v,[w,S])=>{const C=N*S.months*S.discount;return{...v,[w]:C.toFixed(2)}},{});h.setValue("prices",k,{shouldDirty:!0})},x=()=>{n(!1),l(null),h.reset(ft)};return e.jsx(ge,{open:s,onOpenChange:x,children:e.jsxs(pe,{children:[e.jsxs(be,{children:[e.jsx(je,{children:u(a?"plan.form.edit_title":"plan.form.add_title")}),e.jsx(Te,{})]}),e.jsxs(he,{...h,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(j,{control:h.control,name:"name",render:({field:N})=>e.jsxs(g,{children:[e.jsx(b,{children:u("plan.form.name.label")}),e.jsx(_,{children:e.jsx(T,{placeholder:u("plan.form.name.placeholder"),...N})}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"group_id",render:({field:N})=>e.jsxs(g,{children:[e.jsxs(b,{className:"flex items-center justify-between",children:[u("plan.form.group.label"),e.jsx(Lt,{dialogTrigger:e.jsx(R,{variant:"link",children:u("plan.form.group.add")}),refetch:P})]}),e.jsxs(W,{value:N.value?.toString()??"",onValueChange:k=>N.onChange(k?Number(k):null),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.group.placeholder")})})}),e.jsx(B,{children:d?.map(k=>e.jsx(U,{value:k.id.toString(),children:k.name},k.id))})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"transfer_enable",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:u("plan.form.transfer.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.transfer.placeholder"),className:"rounded-r-none",...N})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.transfer.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"speed_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:u("plan.form.speed.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.speed.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.speed.unit")})]}),e.jsx(D,{})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex flex-1 items-center",children:[e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"}),e.jsx("h3",{className:"mx-4 text-sm font-medium text-gray-500 dark:text-gray-400",children:u("plan.form.price.title")}),e.jsx("div",{className:"flex-grow border-t border-gray-200 dark:border-gray-700"})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-2",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(T,{type:"number",placeholder:u("plan.form.price.base_price"),className:"h-7 w-32 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500",onChange:N=>{const k=parseFloat(N.target.value);E(k)}})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>{const N=Object.keys(gt).reduce((k,v)=>({...k,[v]:""}),{});h.setValue("prices",N,{shouldDirty:!0})},children:u("plan.form.price.clear.button")})}),e.jsx(te,{side:"top",align:"end",children:e.jsx("p",{className:"text-xs",children:u("plan.form.price.clear.tooltip")})})]})})]})]}),e.jsx("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-3",children:Object.entries(gt).filter(([N])=>!["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"group relative rounded-md bg-card p-2 ring-1 ring-gray-200 transition-all hover:ring-primary dark:ring-gray-800",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:v})=>e.jsxs(g,{children:[e.jsxs(b,{className:"text-xs font-medium text-muted-foreground",children:[u(`plan.columns.price_period.${N}`),e.jsxs("span",{className:"ml-1 text-[10px] text-gray-400",children:["(",k.months===1?u("plan.form.price.period.monthly"):u("plan.form.price.period.months",{count:k.months}),")"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...v,value:v.value??"",onChange:w=>v.onChange(w.target.value),className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})},N))}),e.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:Object.entries(gt).filter(([N])=>["onetime","reset_traffic"].includes(N)).map(([N,k])=>e.jsx("div",{className:"rounded-md border border-dashed border-gray-200 bg-muted/30 p-3 dark:border-gray-700",children:e.jsx(j,{control:h.control,name:`prices.${N}`,render:({field:v})=>e.jsx(g,{children:e.jsxs("div",{className:"flex flex-col gap-2 md:flex-row md:items-center md:justify-between",children:[e.jsxs("div",{className:"space-y-0",children:[e.jsx(b,{className:"text-xs font-medium",children:u(`plan.columns.price_period.${N}`)}),e.jsx("p",{className:"text-[10px] text-muted-foreground",children:u(N==="onetime"?"plan.form.price.onetime_desc":"plan.form.price.reset_desc")})]}),e.jsxs("div",{className:"relative w-full md:w-32",children:[e.jsx("div",{className:"pointer-events-none absolute inset-y-0 left-0 flex items-center pl-2",children:e.jsx("span",{className:"text-sm font-medium text-gray-400",children:"¥"})}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:"0.00",min:0,...v,className:"h-7 border-0 bg-gray-50 pl-6 pr-2 text-sm shadow-none ring-1 ring-gray-200 transition-shadow focus-visible:ring-2 focus-visible:ring-primary dark:bg-gray-800/50 dark:ring-gray-700 dark:placeholder:text-gray-500"})})]})]})})})},N))})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsx(j,{control:h.control,name:"device_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:u("plan.form.device.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.device.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.device.unit")})]}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"capacity_limit",render:({field:N})=>e.jsxs(g,{className:"flex-1",children:[e.jsx(b,{children:u("plan.form.capacity.label")}),e.jsxs("div",{className:"relative flex",children:[e.jsx(_,{children:e.jsx(T,{type:"number",min:0,placeholder:u("plan.form.capacity.placeholder"),className:"rounded-r-none",...N,value:N.value??""})}),e.jsx("div",{className:"flex items-center rounded-r-md border border-l-0 border-input bg-muted px-3 text-sm text-muted-foreground",children:u("plan.form.capacity.unit")})]}),e.jsx(D,{})]})})]}),e.jsx(j,{control:h.control,name:"reset_traffic_method",render:({field:N})=>e.jsxs(g,{children:[e.jsx(b,{children:u("plan.form.reset_method.label")}),e.jsxs(W,{value:N.value?.toString()??"null",onValueChange:k=>N.onChange(k=="null"?null:Number(k)),children:[e.jsx(_,{children:e.jsx(K,{children:e.jsx(Y,{placeholder:u("plan.form.reset_method.placeholder")})})}),e.jsx(B,{children:up.map(k=>e.jsx(U,{value:k.value?.toString()??"null",children:u(`plan.form.reset_method.options.${k.label}`)},k.value))})]}),e.jsx(L,{className:"text-xs",children:u("plan.form.reset_method.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:h.control,name:"content",render:({field:N})=>{const[k,v]=m.useState(!1);return e.jsxs(g,{className:"space-y-2",children:[e.jsxs(b,{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[u("plan.form.content.label"),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>v(!k),children:k?e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{d:"M10 12.5a2.5 2.5 0 100-5 2.5 2.5 0 000 5z"}),e.jsx("path",{fillRule:"evenodd",d:"M.664 10.59a1.651 1.651 0 010-1.186A10.004 10.004 0 0110 3c4.257 0 7.893 2.66 9.336 6.41.147.381.146.804 0 1.186A10.004 10.004 0 0110 17c-4.257 0-7.893-2.66-9.336-6.41zM14 10a4 4 0 11-8 0 4 4 0 018 0z",clipRule:"evenodd"})]}):e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",className:"h-4 w-4",children:[e.jsx("path",{fillRule:"evenodd",d:"M3.28 2.22a.75.75 0 00-1.06 1.06l14.5 14.5a.75.75 0 101.06-1.06l-1.745-1.745a10.029 10.029 0 003.3-4.38 1.651 1.651 0 000-1.185A10.004 10.004 0 009.999 3a9.956 9.956 0 00-4.744 1.194L3.28 2.22zM7.752 6.69l1.092 1.092a2.5 2.5 0 013.374 3.373l1.091 1.092a4 4 0 00-5.557-5.557z",clipRule:"evenodd"}),e.jsx("path",{d:"M10.748 13.93l2.523 2.523a9.987 9.987 0 01-3.27.547c-4.258 0-7.894-2.66-9.337-6.41a1.651 1.651 0 010-1.186A10.007 10.007 0 012.839 6.02L6.07 9.252a4 4 0 004.678 4.678z"})]})})}),e.jsx(te,{side:"top",children:e.jsx("p",{className:"text-xs",children:u(k?"plan.form.content.preview_button.hide":"plan.form.content.preview_button.show")})})]})})]}),e.jsx(oe,{children:e.jsxs(re,{children:[e.jsx(le,{asChild:!0,children:e.jsx(R,{variant:"outline",size:"sm",onClick:()=>{N.onChange(u("plan.form.content.template.content"))},children:u("plan.form.content.template.button")})}),e.jsx(te,{side:"left",align:"center",children:e.jsx("p",{className:"text-xs",children:u("plan.form.content.template.tooltip")})})]})})]}),e.jsxs("div",{className:`grid gap-4 ${k?"grid-cols-1 lg:grid-cols-2":"grid-cols-1"}`,children:[e.jsx("div",{className:"space-y-2",children:e.jsx(_,{children:e.jsx(ia,{style:{height:"400px"},value:N.value||"",renderHTML:w=>i.render(w),onChange:({text:w})=>N.onChange(w),config:{view:{menu:!0,md:!0,html:!1},canView:{menu:!0,md:!0,html:!1,fullScreen:!1,hideMenu:!1}},placeholder:u("plan.form.content.placeholder"),className:"rounded-md border"})})}),k&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm text-muted-foreground",children:u("plan.form.content.preview")}),e.jsx("div",{className:"prose prose-sm dark:prose-invert h-[400px] max-w-none overflow-y-auto rounded-md border p-4",children:e.jsx("div",{dangerouslySetInnerHTML:{__html:i.render(N.value||"")}})})]})]}),e.jsx(L,{className:"text-xs",children:u("plan.form.content.description")}),e.jsx(D,{})]})}})]}),e.jsx(Oe,{className:"mt-6",children:e.jsxs("div",{className:"flex w-full items-center justify-between",children:[e.jsx("div",{className:"flex-shrink-0",children:a&&e.jsx(j,{control:h.control,name:"force_update",render:({field:N})=>e.jsxs(g,{className:"flex flex-row items-center space-x-2 space-y-0",children:[e.jsx(_,{children:e.jsx(Vr,{checked:N.value,onCheckedChange:N.onChange})}),e.jsx("div",{className:"",children:e.jsx(b,{className:"text-sm",children:u("plan.form.force_update.label")})})]})})}),e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(R,{type:"button",variant:"outline",onClick:x,children:u("plan.form.submit.cancel")}),e.jsx(R,{type:"submit",disabled:c,onClick:()=>{h.handleSubmit(async N=>{o(!0),(await pm(N)).data&&($.success(u(a?"plan.form.submit.success.update":"plan.form.submit.success.add")),x(),r()),o(!1)})()},children:u(c?"plan.form.submit.submitting":"plan.form.submit.submit")})]})]})})]})]})})}function pp(){const[s,n]=m.useState({}),[a,l]=m.useState({"drag-handle":!1}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState(!1),[d,f]=m.useState({pageSize:20,pageIndex:0}),[P,E]=m.useState([]),{refetch:x}=se({queryKey:["planList"],queryFn:async()=>{const{data:S}=await Ls();return E(S),S}});m.useEffect(()=>{l({"drag-handle":h}),f({pageSize:h?99999:10,pageIndex:0})},[h]);const N=(S,C)=>{h&&(S.dataTransfer.setData("text/plain",C.toString()),S.currentTarget.classList.add("opacity-50"))},k=(S,C)=>{if(!h)return;S.preventDefault(),S.currentTarget.classList.remove("bg-muted");const I=parseInt(S.dataTransfer.getData("text/plain"));if(I===C)return;const A=[...P],[Z]=A.splice(I,1);A.splice(C,0,Z),E(A)},v=async()=>{if(!h){i(!0);return}const S=P?.map(C=>C.id);fm(S).then(()=>{$.success("排序保存成功"),i(!1),x()}).finally(()=>{i(!1)})},w=Ae({data:P||[],columns:dp(x),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:d},enableRowSelection:!0,onPaginationChange:f,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}},pageCount:h?1:void 0});return e.jsx(op,{refreshData:x,children:e.jsxs("div",{className:"space-y-4",children:[e.jsx(Ye,{table:w,toolbar:S=>e.jsx(cp,{table:S,refetch:x,saveOrder:v,isSortMode:h}),draggable:h,onDragStart:N,onDragEnd:S=>S.currentTarget.classList.remove("opacity-50"),onDragOver:S=>{S.preventDefault(),S.currentTarget.classList.add("bg-muted")},onDragLeave:S=>S.currentTarget.classList.remove("bg-muted"),onDrop:k,showPagination:!h}),e.jsx(hp,{})]})})}function xp(){const{t:s}=M("subscribe");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("plan.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("plan.page.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(pp,{})})]})]})}const fp=Object.freeze(Object.defineProperty({__proto__:null,default:xp},Symbol.toStringTag,{value:"Module"})),Fs=[{value:Q.PENDING,label:Ys[Q.PENDING],icon:bo,color:Js[Q.PENDING]},{value:Q.PROCESSING,label:Ys[Q.PROCESSING],icon:$n,color:Js[Q.PROCESSING]},{value:Q.COMPLETED,label:Ys[Q.COMPLETED],icon:Wt,color:Js[Q.COMPLETED]},{value:Q.CANCELLED,label:Ys[Q.CANCELLED],icon:Hn,color:Js[Q.CANCELLED]},{value:Q.DISCOUNTED,label:Ys[Q.DISCOUNTED],icon:Wt,color:Js[Q.DISCOUNTED]}],Zs=[{value:ne.PENDING,label:ut[ne.PENDING],icon:vo,color:ht[ne.PENDING]},{value:ne.PROCESSING,label:ut[ne.PROCESSING],icon:$n,color:ht[ne.PROCESSING]},{value:ne.VALID,label:ut[ne.VALID],icon:Wt,color:ht[ne.VALID]},{value:ne.INVALID,label:ut[ne.INVALID],icon:Hn,color:ht[ne.INVALID]}];function jt({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=s?.getFilterValue(),c=Array.isArray(r)?new Set(r):r!==void 0?new Set([r]):new Set;return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,c?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:c.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:c.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[c.size," selected"]}):a.filter(o=>c.has(o.value)).map(o=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:o.label},o.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Es,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(o=>{const u=c.has(o.value);return e.jsxs(Ne,{onSelect:()=>{const h=new Set(c);u?h.delete(o.value):h.add(o.value);const i=Array.from(h);s?.setFilterValue(i.length?i:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",u?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),o.icon&&e.jsx(o.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${o.color}`}),e.jsx("span",{children:o.label}),l?.get(o.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(o.value)})]},o.value)})}),c.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const gp=p.object({email:p.string().min(1),plan_id:p.number(),period:p.string(),total_amount:p.number()}),jp={email:"",plan_id:0,total_amount:0,period:""};function Ar({refetch:s,trigger:n,defaultValues:a}){const{t:l}=M("order"),[r,c]=m.useState(!1),o=ce({resolver:ue(gp),defaultValues:{...jp,...a},mode:"onChange"}),[u,h]=m.useState([]);return m.useEffect(()=>{r&&Ls().then(({data:i})=>{h(i)})},[r]),e.jsxs(ge,{open:r,onOpenChange:c,children:[e.jsx(Le,{asChild:!0,children:n||e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("dialog.addOrder")})]})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:l("dialog.assignOrder")}),e.jsx(Te,{})]}),e.jsxs(he,{...o,children:[e.jsx(j,{control:o.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dialog.fields.userEmail")}),e.jsx(_,{children:e.jsx(T,{placeholder:l("dialog.placeholders.email"),...i})})]})}),e.jsx(j,{control:o.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dialog.fields.subscriptionPlan")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value?.toString():void 0,onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.plan")})}),e.jsx(B,{children:u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))})]})})]})}),e.jsx(j,{control:o.control,name:"period",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dialog.fields.orderPeriod")}),e.jsx(_,{children:e.jsxs(W,{value:i.value,onValueChange:i.onChange,children:[e.jsx(K,{children:e.jsx(Y,{placeholder:l("dialog.placeholders.period")})}),e.jsx(B,{children:Object.keys(Bm).map(d=>e.jsx(U,{value:d,children:l(`period.${d}`)},d))})]})})]})}),e.jsx(j,{control:o.control,name:"total_amount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:l("dialog.fields.paymentAmount")}),e.jsx(_,{children:e.jsx(T,{type:"number",placeholder:l("dialog.placeholders.amount"),value:i.value/100,onChange:d=>i.onChange(parseFloat(d.currentTarget.value)*100)})}),e.jsx(D,{})]})}),e.jsxs(Oe,{children:[e.jsx(R,{variant:"outline",onClick:()=>c(!1),children:l("dialog.actions.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{o.handleSubmit(i=>{ym(i).then(({data:d})=>{d&&(s&&s(),o.reset(),c(!1),$.success(l("dialog.messages.addSuccess")))})})()},children:l("dialog.actions.confirm")})]})]})]})]})}function bp({table:s,refetch:n}){const{t:a}=M("order"),l=s.getState().columnFilters.length>0,r=Object.values(He).filter(h=>typeof h=="number").map(h=>({label:a(`type.${He[h]}`),value:h,color:h===He.NEW?"green-500":h===He.RENEWAL?"blue-500":h===He.UPGRADE?"purple-500":"orange-500"})),c=Object.values(de).map(h=>({label:a(`period.${h}`),value:h,color:h===de.MONTH_PRICE?"slate-500":h===de.QUARTER_PRICE?"cyan-500":h===de.HALF_YEAR_PRICE?"indigo-500":h===de.YEAR_PRICE?"violet-500":h===de.TWO_YEAR_PRICE?"fuchsia-500":h===de.THREE_YEAR_PRICE?"pink-500":h===de.ONETIME_PRICE?"rose-500":"orange-500"})),o=Object.values(Q).filter(h=>typeof h=="number").map(h=>({label:a(`status.${Q[h]}`),value:h,icon:h===Q.PENDING?Fs[0].icon:h===Q.PROCESSING?Fs[1].icon:h===Q.COMPLETED?Fs[2].icon:h===Q.CANCELLED?Fs[3].icon:Fs[4].icon,color:h===Q.PENDING?"yellow-500":h===Q.PROCESSING?"blue-500":h===Q.COMPLETED?"green-500":h===Q.CANCELLED?"red-500":"green-500"})),u=Object.values(ne).filter(h=>typeof h=="number").map(h=>({label:a(`commission.${ne[h]}`),value:h,icon:h===ne.PENDING?Zs[0].icon:h===ne.PROCESSING?Zs[1].icon:h===ne.VALID?Zs[2].icon:Zs[3].icon,color:h===ne.PENDING?"yellow-500":h===ne.PROCESSING?"blue-500":h===ne.VALID?"green-500":"red-500"}));return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Ar,{refetch:n}),e.jsx(T,{placeholder:a("search.placeholder"),value:s.getColumn("trade_no")?.getFilterValue()??"",onChange:h=>s.getColumn("trade_no")?.setFilterValue(h.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs("div",{className:"flex flex-wrap gap-x-2",children:[s.getColumn("type")&&e.jsx(jt,{column:s.getColumn("type"),title:a("table.columns.type"),options:r}),s.getColumn("period")&&e.jsx(jt,{column:s.getColumn("period"),title:a("table.columns.period"),options:c}),s.getColumn("status")&&e.jsx(jt,{column:s.getColumn("status"),title:a("table.columns.status"),options:o}),s.getColumn("commission_status")&&e.jsx(jt,{column:s.getColumn("commission_status"),title:a("table.columns.commissionStatus"),options:u})]}),l&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[a("actions.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]})}function ze({label:s,value:n,className:a,valueClassName:l}){return e.jsxs("div",{className:y("flex items-center py-1.5",a),children:[e.jsx("div",{className:"w-28 shrink-0 text-sm text-muted-foreground",children:s}),e.jsx("div",{className:y("text-sm",l),children:n||"-"})]})}function vp({status:s}){const{t:n}=M("order"),a={[Q.PENDING]:"bg-yellow-100 text-yellow-800 hover:bg-yellow-100",[Q.PROCESSING]:"bg-blue-100 text-blue-800 hover:bg-blue-100",[Q.CANCELLED]:"bg-red-100 text-red-800 hover:bg-red-100",[Q.COMPLETED]:"bg-green-100 text-green-800 hover:bg-green-100",[Q.DISCOUNTED]:"bg-gray-100 text-gray-800 hover:bg-gray-100"};return e.jsx(H,{variant:"secondary",className:y("font-medium",a[s]),children:n(`status.${Q[s]}`)})}function yp({id:s,trigger:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(),{t:o}=M("order");return m.useEffect(()=>{(async()=>{if(a){const{data:h}=await jm({id:s});c(h)}})()},[a,s]),e.jsxs(ge,{onOpenChange:l,open:a,children:[e.jsx(Le,{asChild:!0,children:n}),e.jsxs(pe,{className:"max-w-xl",children:[e.jsxs(be,{className:"space-y-2",children:[e.jsx(je,{className:"text-lg font-medium",children:o("dialog.title")}),e.jsx("div",{className:"flex items-center justify-between text-sm",children:e.jsxs("div",{className:"flex items-center space-x-6",children:[e.jsxs("div",{className:"text-muted-foreground",children:[o("table.columns.tradeNo"),":",r?.trade_no]}),r?.status&&e.jsx(vp,{status:r.status})]})})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.basicInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.userEmail"),value:r?.user?.email?e.jsxs(Rs,{to:`/user/manage?email=${r.user.email}`,className:"group inline-flex items-center gap-1 text-primary hover:underline",children:[r.user.email,e.jsx(Gn,{className:"h-3.5 w-3.5 opacity-0 transition-opacity group-hover:opacity-100"})]}):"-"}),e.jsx(ze,{label:o("dialog.fields.orderPeriod"),value:r&&o(`period.${r.period}`)}),e.jsx(ze,{label:o("dialog.fields.subscriptionPlan"),value:r?.plan?.name,valueClassName:"font-medium"}),e.jsx(ze,{label:o("dialog.fields.callbackNo"),value:r?.callback_no,valueClassName:"font-mono text-xs"})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.amountInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.paymentAmount"),value:ks(r?.total_amount||0),valueClassName:"font-medium text-primary"}),e.jsx(ve,{className:"my-2"}),e.jsx(ze,{label:o("dialog.fields.balancePayment"),value:ks(r?.balance_amount||0)}),e.jsx(ze,{label:o("dialog.fields.discountAmount"),value:ks(r?.discount_amount||0),valueClassName:"text-green-600"}),e.jsx(ze,{label:o("dialog.fields.refundAmount"),value:ks(r?.refund_amount||0),valueClassName:"text-red-600"}),e.jsx(ze,{label:o("dialog.fields.deductionAmount"),value:ks(r?.surplus_amount||0)})]})]}),e.jsxs("div",{className:"rounded-lg border p-4",children:[e.jsx("div",{className:"mb-2 text-sm font-medium",children:o("dialog.timeInfo")}),e.jsxs("div",{className:"space-y-0.5",children:[e.jsx(ze,{label:o("dialog.fields.createdAt"),value:me(r?.created_at),valueClassName:"font-mono text-xs"}),e.jsx(ze,{label:o("dialog.fields.updatedAt"),value:me(r?.updated_at),valueClassName:"font-mono text-xs"})]})]})]})]})]})}const _p={[He.NEW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RENEWAL]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.UPGRADE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[He.RESET_FLOW]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},Np={[de.MONTH_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.QUARTER_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.HALF_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.TWO_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.THREE_YEAR_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.ONETIME_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"},[de.RESET_PRICE]:{color:"text-slate-700",bgColor:"bg-slate-100/80"}},wp=s=>Q[s],Cp=s=>ne[s],Sp=s=>He[s],kp=s=>{const{t:n}=M("order");return[{accessorKey:"trade_no",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.tradeNo")}),cell:({row:a})=>{const l=a.original.trade_no,r=l.length>6?`${l.slice(0,3)}...${l.slice(-3)}`:l;return e.jsx("div",{className:"flex items-center",children:e.jsx(yp,{trigger:e.jsxs(J,{variant:"ghost",size:"sm",className:"flex h-8 items-center gap-1.5 px-2 font-medium text-primary transition-colors hover:bg-primary/10 hover:text-primary/80",children:[e.jsx("span",{className:"font-mono",children:r}),e.jsx(Gn,{className:"h-3.5 w-3.5 opacity-70"})]}),id:a.original.id})})},enableSorting:!1,enableHiding:!1},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.type")}),cell:({row:a})=>{const l=a.getValue("type"),r=_p[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"border border-border/50","hover:bg-slate-200/80"),children:n(`type.${Sp(l)}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"plan.name",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.plan")}),cell:({row:a})=>e.jsx("div",{className:"flex space-x-2",children:e.jsx("span",{className:"max-w-32 truncate font-medium text-foreground/90 sm:max-w-72 md:max-w-[31rem]",children:a.original.plan?.name||"-"})}),enableSorting:!1,enableHiding:!1},{accessorKey:"period",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.period")}),cell:({row:a})=>{const l=a.getValue("period"),r=Np[l];return e.jsx(H,{variant:"secondary",className:y("font-medium transition-colors text-nowrap",r.color,r.bgColor,"hover:bg-opacity-80"),children:n(`period.${l}`)})},enableSorting:!1,enableHiding:!1},{accessorKey:"total_amount",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.amount")}),cell:({row:a})=>{const l=a.getValue("total_amount"),r=typeof l=="number"?(l/100).toFixed(2):"N/A";return e.jsxs("div",{className:"flex items-center font-mono text-foreground/90",children:["¥",r]})},enableSorting:!0,enableHiding:!1},{accessorKey:"status",header:({column:a})=>e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(O,{column:a,title:n("table.columns.status")}),e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx(Tr,{className:"h-4 w-4 text-muted-foreground/70 transition-colors hover:text-muted-foreground"})}),e.jsx(te,{side:"top",className:"max-w-[200px] text-sm",children:n("status.tooltip")})]})})]}),cell:({row:a})=>{const l=Fs.find(r=>r.value===a.getValue("status"));return l?e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[l.icon&&e.jsx(l.icon,{className:`h-4 w-4 text-${l.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`status.${wp(l.value)}`)})]}),l.value===Q.PENDING&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[140px]",children:[e.jsx(xe,{className:"cursor-pointer",onClick:async()=>{await bm({trade_no:a.original.trade_no}),s()},children:n("actions.markAsPaid")}),e.jsx(xe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await vm({trade_no:a.original.trade_no}),s()},children:n("actions.cancel")})]})]})]}):null},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_balance",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.commission")}),cell:({row:a})=>{const l=a.getValue("commission_balance"),r=l?(l/100).toFixed(2):"-";return e.jsx("div",{className:"flex items-center font-mono text-foreground/90",children:l?`¥${r}`:"-"})},enableSorting:!0,enableHiding:!1},{accessorKey:"commission_status",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.commissionStatus")}),cell:({row:a})=>{const l=a.original.status,r=a.original.commission_balance,c=Zs.find(o=>o.value===a.getValue("commission_status"));return r==0||!c?e.jsx("span",{className:"text-muted-foreground",children:"-"}):e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[c.icon&&e.jsx(c.icon,{className:`h-4 w-4 text-${c.color}`}),e.jsx("span",{className:"text-sm font-medium",children:n(`commission.${Cp(c.value)}`)})]}),c.value===ne.PENDING&&l===Q.COMPLETED&&e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0 hover:bg-muted/60",children:[e.jsx(_t,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:n("actions.openMenu")})]})}),e.jsxs(is,{align:"end",className:"w-[120px]",children:[e.jsx(xe,{className:"cursor-pointer",onClick:async()=>{await Va({trade_no:a.original.trade_no,commission_status:ne.PROCESSING}),s()},children:n("commission.PROCESSING")}),e.jsx(xe,{className:"cursor-pointer text-destructive focus:text-destructive",onClick:async()=>{await Va({trade_no:a.original.trade_no,commission_status:ne.INVALID}),s()},children:n("commission.INVALID")})]})]})]})},enableSorting:!0,enableHiding:!1},{accessorKey:"created_at",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.createdAt")}),cell:({row:a})=>e.jsx("div",{className:"text-nowrap font-mono text-sm text-muted-foreground",children:me(a.getValue("created_at"),"YYYY/MM/DD HH:mm:ss")}),enableSorting:!0,enableHiding:!1}]};function Pp(){const[s]=qn(),[n,a]=m.useState({}),[l,r]=m.useState({}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const k=Object.entries({user_id:"string",order_id:"string",commission_status:"number",status:"number",commission_balance:"string"}).map(([v,w])=>{const S=s.get(v);return S?{id:v,value:w==="number"?parseInt(S):S}:null}).filter(Boolean);k.length>0&&o(k)},[s]);const{refetch:f,data:P,isLoading:E}=se({queryKey:["orderList",i,c,u],queryFn:()=>gm({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),x=Ae({data:P?.data??[],columns:kp(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:x,toolbar:e.jsx(bp,{table:x,refetch:f}),showPagination:!0})}function Tp(){const{t:s}=M("order");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Pp,{})})]})]})}const Dp=Object.freeze(Object.defineProperty({__proto__:null,default:Tp},Symbol.toStringTag,{value:"Module"}));function Rp({column:s,title:n,options:a}){const l=s?.getFacetedUniqueValues(),r=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),n,r?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:r.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:r.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[r.size," selected"]}):a.filter(c=>r.has(c.value)).map(c=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:c.label},c.value))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Es,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(c=>{const o=r.has(c.value);return e.jsxs(Ne,{onSelect:()=>{o?r.delete(c.value):r.add(c.value);const u=Array.from(r);s?.setFilterValue(u.length?u:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",o?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Ds,{className:y("h-4 w-4")})}),c.icon&&e.jsx(c.icon,{className:`mr-2 h-4 w-4 text-muted-foreground text-${c.color}`}),e.jsx("span",{children:c.label}),l?.get(c.value)&&e.jsx("span",{className:"ml-auto flex h-4 w-4 items-center justify-center font-mono text-xs",children:l.get(c.value)})]},c.value)})}),r.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const Ip=p.object({id:p.coerce.number().nullable().optional(),name:p.string().min(1,"请输入优惠券名称"),code:p.string().nullable(),type:p.union([p.string(),p.nativeEnum(js)]),value:p.coerce.number(),started_at:p.coerce.number(),ended_at:p.coerce.number(),limit_use:p.union([p.string(),p.number()]).nullable(),limit_use_with_user:p.union([p.string(),p.number()]).nullable(),generate_count:p.coerce.number().nullable().optional(),limit_plan_ids:p.array(p.number()).default([]).nullable(),limit_period:p.array(p.nativeEnum(de)).default([]).nullable()}).refine(s=>s.ended_at>s.started_at,{message:"结束时间必须晚于开始时间",path:["ended_at"]}),Ga={name:"",code:"",type:js.AMOUNT,value:0,started_at:Math.floor(Date.now()/1e3),ended_at:Math.floor(Date.now()/1e3)+7*24*60*60,limit_use:"",limit_use_with_user:"",limit_plan_ids:[],limit_period:[],generate_count:""};function Fr({defaultValues:s,refetch:n,type:a="create",dialogTrigger:l=null,open:r,onOpenChange:c}){const{t:o}=M("coupon"),[u,h]=m.useState(!1),i=r??u,d=c??h,[f,P]=m.useState([]),E=ce({resolver:ue(Ip),defaultValues:s||Ga});m.useEffect(()=>{s&&E.reset(s)},[s,E]),m.useEffect(()=>{Ls().then(({data:v})=>P(v))},[]);const x=v=>{if(!v)return;const w=(S,C)=>{const I=new Date(C*1e3);return S.setHours(I.getHours(),I.getMinutes(),I.getSeconds()),Math.floor(S.getTime()/1e3)};v.from&&E.setValue("started_at",w(v.from,E.watch("started_at"))),v.to&&E.setValue("ended_at",w(v.to,E.watch("ended_at")))},N=async v=>{Nm(v).then(()=>{d(!1),a==="create"&&E.reset(Ga),n()})},k=(v,w)=>e.jsxs("div",{className:"flex-1 space-y-1.5",children:[e.jsx("div",{className:"text-sm font-medium text-muted-foreground",children:w}),e.jsx(T,{type:"datetime-local",step:"1",value:me(E.watch(v),"YYYY-MM-DDTHH:mm:ss"),onChange:S=>{const C=new Date(S.target.value);E.setValue(v,Math.floor(C.getTime()/1e3))},className:"h-8 [&::-webkit-calendar-picker-indicator]:hidden"})]});return e.jsxs(ge,{open:i,onOpenChange:d,children:[l&&e.jsx(Le,{asChild:!0,children:l}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsx(be,{children:e.jsx(je,{children:o(a==="create"?"form.add":"form.edit")})}),e.jsx(he,{...E,children:e.jsxs("form",{onSubmit:E.handleSubmit(N),className:"space-y-4",children:[e.jsx(j,{control:E.control,name:"name",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.name.label")}),e.jsx(T,{placeholder:o("form.name.placeholder"),...v}),e.jsx(D,{})]})}),e.jsx(j,{control:E.control,name:"code",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.code.label")}),e.jsx(T,{placeholder:o("form.code.placeholder"),...v,className:"h-9"}),e.jsx(L,{className:"text-xs",children:o("form.code.description")}),e.jsx(D,{})]})}),e.jsxs(g,{children:[e.jsx(b,{children:o("form.type.label")}),e.jsxs("div",{className:"flex",children:[e.jsx(j,{control:E.control,name:"type",render:({field:v})=>e.jsxs(W,{value:v.value.toString(),onValueChange:v.onChange,children:[e.jsx(K,{className:"flex-[1.2] rounded-r-none border-r-0 focus:z-10",children:e.jsx(Y,{placeholder:o("form.type.placeholder")})}),e.jsx(B,{children:Object.entries(Wm).map(([w,S])=>e.jsx(U,{value:w,children:o(`table.toolbar.types.${w}`)},w))})]})}),e.jsx(j,{control:E.control,name:"value",render:({field:v})=>e.jsx(T,{type:"number",placeholder:o("form.value.placeholder"),...v,onChange:w=>v.onChange(w.target.value===""?"":w.target.value),className:"flex-[2] rounded-none border-x-0 text-left"})}),e.jsx("div",{className:"flex min-w-[40px] items-center justify-center rounded-md rounded-l-none border border-l-0 border-input bg-muted/50 px-3 font-medium text-muted-foreground",children:e.jsx("span",{children:E.watch("type")===js.AMOUNT?"¥":"%"})})]})]}),e.jsxs(g,{children:[e.jsx(b,{children:o("form.validity.label")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(R,{variant:"outline",className:y("w-full justify-start text-left font-normal",!E.watch("started_at")&&"text-muted-foreground"),children:[e.jsx(ot,{className:"mr-2 h-4 w-4"}),me(E.watch("started_at"),"YYYY-MM-DD HH:mm:ss")," ",o("form.validity.to")," ",me(E.watch("ended_at"),"YYYY-MM-DD HH:mm:ss")]})}),e.jsxs(We,{className:"w-auto p-0",align:"start",children:[e.jsx("div",{className:"border-b border-border",children:e.jsx(Os,{mode:"range",selected:{from:new Date(E.watch("started_at")*1e3),to:new Date(E.watch("ended_at")*1e3)},onSelect:x,numberOfMonths:2})}),e.jsx("div",{className:"p-3",children:e.jsxs("div",{className:"flex items-center gap-4",children:[k("started_at",o("table.validity.startTime")),e.jsx("div",{className:"mt-6 text-sm text-muted-foreground",children:o("form.validity.to")}),k("ended_at",o("table.validity.endTime"))]})})]})]}),e.jsx(D,{})]}),e.jsx(j,{control:E.control,name:"limit_use",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.limitUse.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUse.placeholder"),...v,value:v.value===void 0?"":v.value,onChange:w=>v.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(L,{className:"text-xs",children:o("form.limitUse.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:E.control,name:"limit_use_with_user",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.limitUseWithUser.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.limitUseWithUser.placeholder"),...v,value:v.value===void 0?"":v.value,onChange:w=>v.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(L,{className:"text-xs",children:o("form.limitUseWithUser.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:E.control,name:"limit_period",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.limitPeriod.label")}),e.jsx(lt,{options:Object.entries(de).filter(([w])=>isNaN(Number(w))).map(([w,S])=>({label:S,value:w})),onChange:w=>{if(w.length===0){v.onChange([]);return}const S=w.map(C=>de[C.value]);v.onChange(S)},value:(v.value||[]).map(w=>({label:Object.entries(de).find(([S,C])=>C===w)?.[1]||"",value:Object.entries(de).find(([S,C])=>C===w)?.[0]||""})),placeholder:o("form.limitPeriod.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPeriod.empty")})}),e.jsx(L,{className:"text-xs",children:o("form.limitPeriod.description")}),e.jsx(D,{})]})}),e.jsx(j,{control:E.control,name:"limit_plan_ids",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.limitPlan.label")}),e.jsx(lt,{options:f?.map(w=>({label:w.name,value:w.id.toString()}))||[],onChange:w=>v.onChange(w.map(S=>Number(S.value))),value:(f||[]).filter(w=>(v.value||[]).includes(w.id)).map(w=>({label:w.name,value:w.id.toString()})),placeholder:o("form.limitPlan.placeholder"),emptyIndicator:e.jsx("p",{className:"text-center text-sm text-muted-foreground",children:o("form.limitPlan.empty")})}),e.jsx(D,{})]})}),a==="create"&&e.jsx(e.Fragment,{children:e.jsx(j,{control:E.control,name:"generate_count",render:({field:v})=>e.jsxs(g,{children:[e.jsx(b,{children:o("form.generateCount.label")}),e.jsx(T,{type:"number",min:0,placeholder:o("form.generateCount.placeholder"),...v,value:v.value===void 0?"":v.value,onChange:w=>v.onChange(w.target.value===""?"":w.target.value),className:"h-9"}),e.jsx(L,{className:"text-xs",children:o("form.generateCount.description")}),e.jsx(D,{})]})})}),e.jsx(Oe,{children:e.jsx(R,{type:"submit",disabled:E.formState.isSubmitting,children:E.formState.isSubmitting?o("form.submit.saving"):o("form.submit.save")})})]})})]})]})}function Ep({table:s,refetch:n}){const a=s.getState().columnFilters.length>0,{t:l}=M("coupon");return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Fr,{refetch:n,dialogTrigger:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 space-x-2",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:l("form.add")})]})}),e.jsx(T,{placeholder:l("table.toolbar.search"),value:s.getColumn("name")?.getFilterValue()??"",onChange:r=>s.getColumn("name")?.setFilterValue(r.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),s.getColumn("type")&&e.jsx(Rp,{column:s.getColumn("type"),title:l("table.toolbar.type"),options:[{value:js.AMOUNT,label:l(`table.toolbar.types.${js.AMOUNT}`)},{value:js.PERCENTAGE,label:l(`table.toolbar.types.${js.PERCENTAGE}`)}]}),a&&e.jsxs(R,{variant:"ghost",onClick:()=>s.resetColumnFilters(),className:"h-8 px-2 lg:px-3",children:[l("table.toolbar.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]})}const zr=m.createContext(void 0);function Mp({children:s,refetch:n}){const[a,l]=m.useState(!1),[r,c]=m.useState(null),o=h=>{c(h),l(!0)},u=()=>{l(!1),c(null)};return e.jsxs(zr.Provider,{value:{isOpen:a,currentCoupon:r,openEdit:o,closeEdit:u},children:[s,r&&e.jsx(Fr,{defaultValues:r,refetch:n,type:"edit",open:a,onOpenChange:l})]})}function Lp(){const s=m.useContext(zr);if(s===void 0)throw new Error("useCouponEdit must be used within a CouponEditProvider");return s}const Op=s=>{const{t:n}=M("coupon");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.id")}),cell:({row:a})=>e.jsx(H,{children:a.original.id}),enableSorting:!0},{accessorKey:"show",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.show")}),cell:({row:a})=>e.jsx(G,{defaultChecked:a.original.show,onCheckedChange:l=>{Cm({id:a.original.id,show:l}).then(({data:r})=>!r&&s())}}),enableSorting:!1},{accessorKey:"name",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.name")}),cell:({row:a})=>e.jsx("div",{className:"flex items-center",children:e.jsx("span",{children:a.original.name})}),enableSorting:!1,size:800},{accessorKey:"type",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.type")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:n(`table.toolbar.types.${a.original.type}`)}),enableSorting:!0},{accessorKey:"code",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.code")}),cell:({row:a})=>e.jsx(H,{variant:"secondary",children:a.original.code}),enableSorting:!0},{accessorKey:"limit_use",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.limitUse")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use===null?n("table.validity.unlimited"):a.original.limit_use}),enableSorting:!0},{accessorKey:"limit_use_with_user",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.limitUseWithUser")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.original.limit_use_with_user===null?n("table.validity.noLimit"):a.original.limit_use_with_user}),enableSorting:!0},{accessorKey:"#",header:({column:a})=>e.jsx(O,{column:a,title:n("table.columns.validity")}),cell:({row:a})=>{const[l,r]=m.useState(!1),c=Date.now(),o=a.original.started_at*1e3,u=a.original.ended_at*1e3,h=c>u,i=ce.jsx(O,{className:"justify-end",column:a,title:n("table.columns.actions")}),cell:({row:a})=>{const{openEdit:l}=Lp();return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-muted",onClick:()=>l(a.original),children:[e.jsx(Is,{className:"h-4 w-4 text-muted-foreground hover:text-foreground"}),e.jsx("span",{className:"sr-only",children:n("table.actions.edit")})]}),e.jsx(Je,{title:n("table.actions.deleteConfirm.title"),description:n("table.actions.deleteConfirm.description"),confirmText:n("table.actions.deleteConfirm.confirmText"),variant:"destructive",onConfirm:async()=>{wm({id:a.original.id}).then(({data:r})=>{r&&($.success("删除成功"),s())})},children:e.jsxs(R,{variant:"ghost",size:"icon",className:"h-8 w-8 hover:bg-red-100 dark:hover:bg-red-900",children:[e.jsx(cs,{className:"h-4 w-4 text-muted-foreground hover:text-red-600 dark:hover:text-red-400"}),e.jsx("span",{className:"sr-only",children:n("table.actions.delete")})]})})]})}}]};function Vp(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f}=se({queryKey:["couponList",h,r,o],queryFn:()=>_m({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),P=Ae({data:f?.data??[],columns:Op(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},pageCount:Math.ceil((f?.total??0)/h.pageSize),rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,onPaginationChange:i,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsx(Mp,{refetch:d,children:e.jsx("div",{className:"space-y-4",children:e.jsx(Ye,{table:P,toolbar:e.jsx(Ep,{table:P,refetch:d})})})})}function Ap(){const{t:s}=M("coupon");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"text-muted-foreground mt-2",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Vp,{})})]})]})}const Fp=Object.freeze(Object.defineProperty({__proto__:null,default:Ap},Symbol.toStringTag,{value:"Module"})),zp=p.object({email_prefix:p.string().optional(),email_suffix:p.string().min(1),password:p.string().optional(),expired_at:p.number().optional().nullable(),plan_id:p.number().nullable(),generate_count:p.number().optional().nullable()}).refine(s=>s.generate_count===null?s.email_prefix!==void 0&&s.email_prefix!=="":!0,{message:"Email prefix is required when generate_count is null",path:["email_prefix"]}),Up={email_prefix:"",email_suffix:"",password:"",expired_at:null,plan_id:null,generate_count:void 0};function $p({refetch:s}){const{t:n}=M("user"),[a,l]=m.useState(!1),r=ce({resolver:ue(zp),defaultValues:Up,mode:"onChange"}),[c,o]=m.useState([]);return m.useEffect(()=>{a&&Ls().then(({data:u})=>{u&&o(u)})},[a]),e.jsxs(ge,{open:a,onOpenChange:l,children:[e.jsx(Le,{asChild:!0,children:e.jsxs(J,{size:"sm",variant:"outline",className:"space-x-2 gap-0",children:[e.jsx(_e,{icon:"ion:add"}),e.jsx("div",{children:n("generate.button")})]})}),e.jsxs(pe,{className:"sm:max-w-[425px]",children:[e.jsxs(be,{children:[e.jsx(je,{children:n("generate.title")}),e.jsx(Te,{})]}),e.jsxs(he,{...r,children:[e.jsxs(g,{children:[e.jsx(b,{children:n("generate.form.email")}),e.jsxs("div",{className:"flex",children:[!r.watch("generate_count")&&e.jsx(j,{control:r.control,name:"email_prefix",render:({field:u})=>e.jsx(T,{className:"flex-[5] rounded-r-none",placeholder:n("generate.form.email_prefix"),...u})}),e.jsx("div",{className:`z-[-1] border border-r-0 border-input px-3 py-1 shadow-sm ${r.watch("generate_count")?"rounded-l-md":"border-l-0"}`,children:"@"}),e.jsx(j,{control:r.control,name:"email_suffix",render:({field:u})=>e.jsx(T,{className:"flex-[4] rounded-l-none",placeholder:n("generate.form.email_domain"),...u})})]})]}),e.jsx(j,{control:r.control,name:"password",render:({field:u})=>e.jsxs(g,{children:[e.jsx(b,{children:n("generate.form.password")}),e.jsx(T,{placeholder:n("generate.form.password_placeholder"),...u}),e.jsx(D,{})]})}),e.jsx(j,{control:r.control,name:"expired_at",render:({field:u})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(b,{children:n("generate.form.expire_time")}),e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(J,{variant:"outline",className:y("w-full pl-3 text-left font-normal",!u.value&&"text-muted-foreground"),children:[u.value?me(u.value):e.jsx("span",{children:n("generate.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsxs(We,{className:"flex w-auto flex-col space-y-2 p-2",children:[e.jsx(_o,{asChild:!0,children:e.jsx(J,{variant:"outline",className:"w-full",onClick:()=>{u.onChange(null)},children:n("generate.form.permanent")})}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Os,{mode:"single",selected:u.value?new Date(u.value*1e3):void 0,onSelect:h=>{h&&u.onChange(h?.getTime()/1e3)}})})]})]})]})}),e.jsx(j,{control:r.control,name:"plan_id",render:({field:u})=>e.jsxs(g,{children:[e.jsx(b,{children:n("generate.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:u.value?u.value.toString():"null",onValueChange:h=>u.onChange(h==="null"?null:parseInt(h)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("generate.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("generate.form.subscription_none")}),c.map(h=>e.jsx(U,{value:h.id.toString(),children:h.name},h.id))]})]})})]})}),!r.watch("email_prefix")&&e.jsx(j,{control:r.control,name:"generate_count",render:({field:u})=>e.jsxs(g,{children:[e.jsx(b,{children:n("generate.form.generate_count")}),e.jsx(T,{type:"number",placeholder:n("generate.form.generate_count_placeholder"),value:u.value||"",onChange:h=>u.onChange(h.target.value?parseInt(h.target.value):null)})]})})]}),e.jsxs(Oe,{children:[e.jsx(J,{variant:"outline",onClick:()=>l(!1),children:n("generate.form.cancel")}),e.jsx(J,{onClick:()=>r.handleSubmit(u=>{Tm(u).then(({data:h})=>{h&&($.success(n("generate.form.success")),r.reset(),s(),l(!1))})})(),children:n("generate.form.submit")})]})]})]})}const Ur=Ba,$r=Wa,Hp=Ya,Hr=m.forwardRef(({className:s,...n},a)=>e.jsx(St,{className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",s),...n,ref:a}));Hr.displayName=St.displayName;const Gp=Ts("fixed overflow-y-scroll z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-300 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-md",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-md"}},defaultVariants:{side:"right"}}),fa=m.forwardRef(({side:s="right",className:n,children:a,...l},r)=>e.jsxs(Hp,{children:[e.jsx(Hr,{}),e.jsxs(kt,{ref:r,className:y(Gp({side:s}),n),...l,children:[e.jsxs(ta,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[e.jsx(Ve,{className:"h-4 w-4"}),e.jsx("span",{className:"sr-only",children:"Close"})]}),a]})]}));fa.displayName=kt.displayName;const ga=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col space-y-2 text-center sm:text-left",s),...n});ga.displayName="SheetHeader";const Gr=({className:s,...n})=>e.jsx("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",s),...n});Gr.displayName="SheetFooter";const ja=m.forwardRef(({className:s,...n},a)=>e.jsx(Pt,{ref:a,className:y("text-lg font-semibold text-foreground",s),...n}));ja.displayName=Pt.displayName;const ba=m.forwardRef(({className:s,...n},a)=>e.jsx(Tt,{ref:a,className:y("text-sm text-muted-foreground",s),...n}));ba.displayName=Tt.displayName;function qp({table:s,refetch:n,permissionGroups:a=[],subscriptionPlans:l=[]}){const{t:r}=M("user"),c=s.getState().columnFilters.length>0,[o,u]=m.useState([]),[h,i]=m.useState(!1),d=[{label:r("filter.fields.email"),value:"email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.id"),value:"id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.plan_id"),value:"plan_id",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],useOptions:!0},{label:r("filter.fields.transfer_enable"),value:"transfer_enable",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.total_used"),value:"total_used",type:"number",unit:"GB",operators:[{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.online_count"),value:"online_count",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.lt"),value:"lt"}]},{label:r("filter.fields.expired_at"),value:"expired_at",type:"date",operators:[{label:r("filter.operators.lt"),value:"lt"},{label:r("filter.operators.gt"),value:"gt"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.uuid"),value:"uuid",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.token"),value:"token",type:"text",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.banned"),value:"banned",type:"select",operators:[{label:r("filter.operators.eq"),value:"eq"}],options:[{label:r("filter.status.normal"),value:"0"},{label:r("filter.status.banned"),value:"1"}]},{label:r("filter.fields.remark"),value:"remark",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.inviter_email"),value:"inviter_email",type:"text",operators:[{label:r("filter.operators.contains"),value:"contains"},{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.invite_user_id"),value:"invite_user_id",type:"number",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_admin"),value:"is_admin",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]},{label:r("filter.fields.is_staff"),value:"is_staff",type:"boolean",operators:[{label:r("filter.operators.eq"),value:"eq"}]}],f=w=>w*1024*1024*1024,P=w=>w/(1024*1024*1024),E=()=>{u([...o,{field:"",operator:"",value:""}])},x=w=>{u(o.filter((S,C)=>C!==w))},N=(w,S,C)=>{const I=[...o];if(I[w]={...I[w],[S]:C},S==="field"){const A=d.find(Z=>Z.value===C);A&&(I[w].operator=A.operators[0].value,I[w].value=A.type==="boolean"?!1:"")}u(I)},k=(w,S)=>{const C=d.find(I=>I.value===w.field);if(!C)return null;switch(C.type){case"text":return e.jsx(T,{placeholder:r("filter.sheet.value"),value:w.value,onChange:I=>N(S,"value",I.target.value)});case"number":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(T,{type:"number",placeholder:r("filter.sheet.value_number",{unit:C.unit}),value:C.unit==="GB"?P(w.value||0):w.value,onChange:I=>{const A=Number(I.target.value);N(S,"value",C.unit==="GB"?f(A):A)}}),C.unit&&e.jsx("span",{className:"text-sm text-muted-foreground",children:C.unit})]});case"date":return e.jsx(Os,{mode:"single",selected:w.value,onSelect:I=>N(S,"value",I),className:"rounded-md border"});case"select":return e.jsxs(W,{value:w.value,onValueChange:I=>N(S,"value",I),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.value")})}),e.jsx(B,{children:C.useOptions?l.map(I=>e.jsx(U,{value:I.value.toString(),children:I.label},I.value)):C.options?.map(I=>e.jsx(U,{value:I.value.toString(),children:I.label},I.value))})]});case"boolean":return e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(G,{checked:w.value,onCheckedChange:I=>N(S,"value",I)}),e.jsx(Nt,{children:w.value?r("filter.boolean.true"):r("filter.boolean.false")})]});default:return null}},v=()=>{const w=o.filter(S=>S.field&&S.operator&&S.value!=="").map(S=>{const C=d.find(A=>A.value===S.field);let I=S.value;return S.operator==="contains"?{id:S.field,value:I}:(C?.type==="date"&&I instanceof Date&&(I=Math.floor(I.getTime()/1e3)),C?.type==="boolean"&&(I=I?1:0),{id:S.field,value:`${S.operator}:${I}`})});s.setColumnFilters(w),i(!1)};return e.jsx("div",{className:"flex flex-wrap items-center justify-between gap-2",children:e.jsxs("div",{className:"flex flex-1 flex-wrap items-center gap-2",children:[e.jsx($p,{refetch:n}),e.jsx(T,{placeholder:r("filter.email_search"),value:s.getColumn("email")?.getFilterValue()??"",onChange:w=>s.getColumn("email")?.setFilterValue(w.target.value),className:"h-8 w-[150px] lg:w-[250px]"}),e.jsxs(Ur,{open:h,onOpenChange:i,children:[e.jsx($r,{asChild:!0,children:e.jsxs(R,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(No,{className:"mr-2 h-4 w-4"}),r("filter.advanced"),o.length>0&&e.jsx(H,{variant:"secondary",className:"ml-2 rounded-sm px-1",children:o.length})]})}),e.jsxs(fa,{className:"w-[400px] sm:w-[540px]",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:r("filter.sheet.title")}),e.jsx(ba,{children:r("filter.sheet.description")})]}),e.jsxs("div",{className:"mt-6 space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h4",{className:"font-medium",children:r("filter.sheet.conditions")}),e.jsx(R,{variant:"outline",size:"sm",onClick:E,children:r("filter.sheet.add")})]}),e.jsx(rt,{className:"h-[calc(100vh-280px)] pr-4",children:e.jsx("div",{className:"space-y-4",children:o.map((w,S)=>e.jsxs("div",{className:"space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Nt,{children:r("filter.sheet.condition",{number:S+1})}),e.jsx(R,{variant:"ghost",size:"sm",onClick:()=>x(S),children:e.jsx(Ve,{className:"h-4 w-4"})})]}),e.jsxs(W,{value:w.field,onValueChange:C=>N(S,"field",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.field")})}),e.jsx(B,{children:d.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&e.jsxs(W,{value:w.operator,onValueChange:C=>N(S,"operator",C),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:r("filter.sheet.operator")})}),e.jsx(B,{children:d.find(C=>C.value===w.field)?.operators.map(C=>e.jsx(U,{value:C.value,children:C.label},C.value))})]}),w.field&&w.operator&&k(w,S)]},S))})}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(R,{variant:"outline",onClick:()=>{u([]),i(!1)},children:r("filter.sheet.reset")}),e.jsx(R,{onClick:v,children:r("filter.sheet.apply")})]})]})]})]}),c&&e.jsxs(R,{variant:"ghost",onClick:()=>{s.resetColumnFilters(),u([])},className:"h-8 px-2 lg:px-3",children:[r("filter.reset"),e.jsx(Ve,{className:"ml-2 h-4 w-4"})]})]})})}const Kp=p.object({id:p.number(),email:p.string().email(),invite_user_email:p.string().email().nullable().optional(),password:p.string().optional().nullable(),balance:p.coerce.number(),commission_balance:p.coerce.number(),u:p.number(),d:p.number(),transfer_enable:p.number(),expired_at:p.number().nullable(),plan_id:p.number().nullable(),banned:p.number(),commission_type:p.number(),commission_rate:p.number().nullable(),discount:p.number().nullable(),speed_limit:p.number().nullable(),device_limit:p.number().nullable(),is_admin:p.number(),is_staff:p.number(),remarks:p.string().nullable()}),qr=m.createContext(void 0);function Bp({children:s,defaultValues:n,open:a,onOpenChange:l}){const[r,c]=m.useState(!1),[o,u]=m.useState(!1),[h,i]=m.useState([]),d=ce({resolver:ue(Kp),defaultValues:n,mode:"onChange"});m.useEffect(()=>{a!==void 0&&c(a)},[a]);const f=P=>{c(P),l?.(P)};return e.jsx(qr.Provider,{value:{form:d,formOpen:r,setFormOpen:f,datePickerOpen:o,setDatePickerOpen:u,planList:h,setPlanList:i},children:s})}function Wp(){const s=m.useContext(qr);if(!s)throw new Error("useUserForm must be used within a UserFormProvider");return s}function Yp({refetch:s}){const{t:n}=M("user"),{form:a,formOpen:l,setFormOpen:r,datePickerOpen:c,setDatePickerOpen:o,planList:u,setPlanList:h}=Wp();return m.useEffect(()=>{l&&Ls().then(({data:i})=>{h(i)})},[l,h]),e.jsxs(he,{...a,children:[e.jsx(j,{control:a.control,name:"email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.email")}),e.jsx(_,{children:e.jsx(T,{...i,placeholder:n("edit.form.email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"invite_user_email",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.inviter_email")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:d=>i.onChange(d.target.value?d.target.value:null),placeholder:n("edit.form.inviter_email_placeholder")})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"password",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.password")}),e.jsx(_,{children:e.jsx(T,{value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.password_placeholder")})}),e.jsx(D,{...i})]})}),e.jsxs("div",{className:"grid gap-2 md:grid-cols-2",children:[e.jsx(j,{control:a.control,name:"balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"commission_balance",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.commission_balance")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:i.onChange,placeholder:n("edit.form.commission_balance_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"¥"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"u",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.upload")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.upload_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})}),e.jsx(j,{control:a.control,name:"d",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.download")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.download_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{...i})]})})]}),e.jsx(j,{control:a.control,name:"transfer_enable",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.total_traffic")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value/1024/1024/1024||"",onChange:d=>i.onChange(parseInt(d.target.value)*1024*1024*1024),placeholder:n("edit.form.total_traffic_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"GB"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"expired_at",render:({field:i})=>e.jsxs(g,{className:"flex flex-col",children:[e.jsx(b,{children:n("edit.form.expire_time")}),e.jsxs(as,{open:c,onOpenChange:o,children:[e.jsx(ns,{asChild:!0,children:e.jsx(_,{children:e.jsxs(R,{type:"button",variant:"outline",className:y("w-full pl-3 text-left font-normal",!i.value&&"text-muted-foreground"),onClick:()=>o(!0),children:[i.value?me(i.value):e.jsx("span",{children:n("edit.form.expire_time_placeholder")}),e.jsx(ot,{className:"ml-auto h-4 w-4 opacity-50"})]})})}),e.jsx(We,{className:"w-auto p-0",align:"start",side:"top",sideOffset:4,onInteractOutside:d=>{d.preventDefault()},onEscapeKeyDown:d=>{d.preventDefault()},children:e.jsxs("div",{className:"flex flex-col space-y-3 p-3",children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{i.onChange(null),o(!1)},children:n("edit.form.expire_time_permanent")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+1),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_1month")}),e.jsx(R,{type:"button",variant:"outline",className:"flex-1",onClick:()=>{const d=new Date;d.setMonth(d.getMonth()+3),d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3)),o(!1)},children:n("edit.form.expire_time_3months")})]}),e.jsx("div",{className:"rounded-md border",children:e.jsx(Os,{mode:"single",selected:i.value?new Date(i.value*1e3):void 0,onSelect:d=>{if(d){const f=new Date(i.value?i.value*1e3:Date.now());d.setHours(f.getHours(),f.getMinutes(),f.getSeconds()),i.onChange(Math.floor(d.getTime()/1e3))}},disabled:d=>d{const d=new Date;d.setHours(23,59,59,999),i.onChange(Math.floor(d.getTime()/1e3))},className:"h-6 px-2 text-xs",children:n("edit.form.expire_time_today")})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(T,{type:"datetime-local",step:"1",value:me(i.value,"YYYY-MM-DDTHH:mm:ss"),onChange:d=>{const f=new Date(d.target.value);isNaN(f.getTime())||i.onChange(Math.floor(f.getTime()/1e3))},className:"flex-1"}),e.jsx(R,{type:"button",variant:"outline",onClick:()=>o(!1),children:n("edit.form.expire_time_confirm")})]})]})]})})]}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"plan_id",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.subscription")}),e.jsx(_,{children:e.jsxs(W,{value:i.value?i.value.toString():"null",onValueChange:d=>i.onChange(d==="null"?null:parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"null",children:n("edit.form.subscription_none")}),u.map(d=>e.jsx(U,{value:d.id.toString(),children:d.name},d.id))]})]})})]})}),e.jsx(j,{control:a.control,name:"banned",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.account_status")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{})}),e.jsxs(B,{children:[e.jsx(U,{value:"1",children:n("columns.status_text.banned")}),e.jsx(U,{value:"0",children:n("columns.status_text.normal")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_type",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.commission_type")}),e.jsx(_,{children:e.jsxs(W,{value:i.value.toString(),onValueChange:d=>i.onChange(parseInt(d)),children:[e.jsx(K,{children:e.jsx(Y,{placeholder:n("edit.form.subscription_none")})}),e.jsxs(B,{children:[e.jsx(U,{value:"0",children:n("edit.form.commission_type_system")}),e.jsx(U,{value:"1",children:n("edit.form.commission_type_cycle")}),e.jsx(U,{value:"2",children:n("edit.form.commission_type_onetime")})]})]})})]})}),e.jsx(j,{control:a.control,name:"commission_rate",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.commission_rate")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.commission_rate_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})})]})}),e.jsx(j,{control:a.control,name:"discount",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.discount")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.discount_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"%"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"speed_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.speed_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.speed_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"Mbps"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"device_limit",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.device_limit")}),e.jsx(_,{children:e.jsxs("div",{className:"flex",children:[e.jsx(T,{type:"number",value:i.value||"",onChange:d=>i.onChange(parseInt(d.currentTarget.value)||null),placeholder:n("edit.form.device_limit_placeholder"),className:"rounded-r-none"}),e.jsx("div",{className:"z-[-1] rounded-md rounded-l-none border border-l-0 border-input px-3 py-1 shadow-sm",children:"台"})]})}),e.jsx(D,{})]})}),e.jsx(j,{control:a.control,name:"is_admin",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.is_admin")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(G,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"is_staff",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.is_staff")}),e.jsx("div",{className:"py-2",children:e.jsx(_,{children:e.jsx(G,{checked:i.value===1,onCheckedChange:d=>i.onChange(d?1:0)})})})]})}),e.jsx(j,{control:a.control,name:"remarks",render:({field:i})=>e.jsxs(g,{children:[e.jsx(b,{children:n("edit.form.remarks")}),e.jsx(_,{children:e.jsx(Cs,{className:"h-24",value:i.value||"",onChange:d=>i.onChange(d.currentTarget.value??null),placeholder:n("edit.form.remarks_placeholder")})}),e.jsx(D,{})]})}),e.jsxs(Gr,{children:[e.jsx(R,{variant:"outline",onClick:()=>r(!1),children:n("edit.form.cancel")}),e.jsx(R,{type:"submit",onClick:()=>{a.handleSubmit(i=>{km(i).then(({data:d})=>{d&&($.success(n("edit.form.success")),r(!1),s())})})()},children:n("edit.form.submit")})]})]})}function Kr({refetch:s,defaultValues:n,dialogTrigger:a=e.jsxs(R,{variant:"outline",size:"sm",className:"ml-auto hidden h-8 lg:flex",children:[e.jsx(ct,{className:"mr-2 h-4 w-4"}),t("edit.button")]})}){const{t:l}=M("user"),[r,c]=m.useState(!1);return e.jsx(Bp,{defaultValues:n,open:r,onOpenChange:c,children:e.jsxs(Ur,{open:r,onOpenChange:c,children:[e.jsx($r,{asChild:!0,children:a}),e.jsxs(fa,{className:"max-w-[90%] space-y-4",children:[e.jsxs(ga,{children:[e.jsx(ja,{children:l("edit.title")}),e.jsx(ba,{})]}),e.jsx(Yp,{refetch:s})]})]})})}const Br=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m17.71 11.29l-5-5a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21l-5 5a1 1 0 0 0 1.42 1.42L11 9.41V17a1 1 0 0 0 2 0V9.41l3.29 3.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42"})}),Wr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.71 11.29a1 1 0 0 0-1.42 0L13 14.59V7a1 1 0 0 0-2 0v7.59l-3.29-3.3a1 1 0 0 0-1.42 1.42l5 5a1 1 0 0 0 .33.21a.94.94 0 0 0 .76 0a1 1 0 0 0 .33-.21l5-5a1 1 0 0 0 0-1.42"})}),Jp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17 11H9.41l3.3-3.29a1 1 0 1 0-1.42-1.42l-5 5a1 1 0 0 0-.21.33a1 1 0 0 0 0 .76a1 1 0 0 0 .21.33l5 5a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42L9.41 13H17a1 1 0 0 0 0-2"})}),Qp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M17.92 11.62a1 1 0 0 0-.21-.33l-5-5a1 1 0 0 0-1.42 1.42l3.3 3.29H7a1 1 0 0 0 0 2h7.59l-3.3 3.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l5-5a1 1 0 0 0 .21-.33a1 1 0 0 0 0-.76"})}),$t=[{accessorKey:"record_at",header:"时间",cell:({row:s})=>e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx("time",{className:"text-sm text-muted-foreground",children:rd(s.original.record_at)})})},{accessorKey:"u",header:"上行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Br,{className:"h-4 w-4 text-emerald-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.u)})]})},{accessorKey:"d",header:"下行流量",cell:({row:s})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(Wr,{className:"h-4 w-4 text-blue-500"}),e.jsx("span",{className:"font-mono text-sm",children:Ze(s.original.d)})]})},{accessorKey:"server_rate",header:"倍率",cell:({row:s})=>{const n=s.original.server_rate;return e.jsx("div",{className:"flex items-center space-x-2",children:e.jsxs(H,{variant:"outline",className:"font-mono",children:[n,"x"]})})}},{id:"total",header:"总计",cell:({row:s})=>{const n=s.original.u+s.original.d;return e.jsx("div",{className:"flex items-center justify-end font-mono text-sm",children:Ze(n)})}}];function Yr({user_id:s,dialogTrigger:n}){const{t:a}=M(["traffic"]),[l,r]=m.useState(!1),[c,o]=m.useState({pageIndex:0,pageSize:20}),{data:u,isLoading:h}=se({queryKey:["userStats",s,c,l],queryFn:()=>l?Dm({user_id:s,pageSize:c.pageSize,page:c.pageIndex+1}):null}),i=Ae({data:u?.data??[],columns:$t,pageCount:Math.ceil((u?.total??0)/c.pageSize),state:{pagination:c},manualPagination:!0,getCoreRowModel:Fe(),onPaginationChange:o});return e.jsxs(ge,{open:l,onOpenChange:r,children:[e.jsx(Le,{asChild:!0,children:n}),e.jsxs(pe,{className:"sm:max-w-[700px]",children:[e.jsx(be,{children:e.jsx(je,{children:a("trafficRecord.title")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"rounded-md border",children:e.jsxs(da,{children:[e.jsx(ma,{children:i.getHeaderGroups().map(d=>e.jsx(bs,{children:d.headers.map(f=>e.jsx(ha,{className:y("h-10 px-2 text-xs",f.id==="total"&&"text-right"),children:f.isPlaceholder?null:vt(f.column.columnDef.header,f.getContext())},f.id))},d.id))}),e.jsx(ua,{children:h?Array.from({length:c.pageSize}).map((d,f)=>e.jsx(bs,{children:Array.from({length:$t.length}).map((P,E)=>e.jsx(Us,{className:"p-2",children:e.jsx(Ee,{className:"h-6 w-full"})},E))},f)):i.getRowModel().rows?.length?i.getRowModel().rows.map(d=>e.jsx(bs,{"data-state":d.getIsSelected()&&"selected",className:"h-10",children:d.getVisibleCells().map(f=>e.jsx(Us,{className:"px-2",children:vt(f.column.columnDef.cell,f.getContext())},f.id))},d.id)):e.jsx(bs,{children:e.jsx(Us,{colSpan:$t.length,className:"h-24 text-center",children:a("trafficRecord.noRecords")})})})]})}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.perPage")}),e.jsxs(W,{value:`${i.getState().pagination.pageSize}`,onValueChange:d=>{i.setPageSize(Number(d))},children:[e.jsx(K,{className:"h-8 w-[70px]",children:e.jsx(Y,{placeholder:i.getState().pagination.pageSize})}),e.jsx(B,{side:"top",children:[10,20,30,40,50].map(d=>e.jsx(U,{value:`${d}`,children:d},d))})]}),e.jsx("p",{className:"text-sm font-medium",children:a("trafficRecord.records")})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("div",{className:"flex w-[100px] items-center justify-center text-sm",children:a("trafficRecord.page",{current:i.getState().pagination.pageIndex+1,total:i.getPageCount()})}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.previousPage(),disabled:!i.getCanPreviousPage()||h,children:e.jsx(Jp,{className:"h-4 w-4"})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",onClick:()=>i.nextPage(),disabled:!i.getCanNextPage()||h,children:e.jsx(Qp,{className:"h-4 w-4"})})]})]})]})]})]})]})}const Zp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M5 18h4.24a1 1 0 0 0 .71-.29l6.92-6.93L19.71 8a1 1 0 0 0 0-1.42l-4.24-4.29a1 1 0 0 0-1.42 0l-2.82 2.83l-6.94 6.93a1 1 0 0 0-.29.71V17a1 1 0 0 0 1 1m9.76-13.59l2.83 2.83l-1.42 1.42l-2.83-2.83ZM6 13.17l5.93-5.93l2.83 2.83L8.83 16H6ZM21 20H3a1 1 0 0 0 0 2h18a1 1 0 0 0 0-2"})}),Xp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11h-6V5a1 1 0 0 0-2 0v6H5a1 1 0 0 0 0 2h6v6a1 1 0 0 0 2 0v-6h6a1 1 0 0 0 0-2"})}),ex=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 8.94a1.3 1.3 0 0 0-.06-.27v-.09a1 1 0 0 0-.19-.28l-6-6a1 1 0 0 0-.28-.19a.3.3 0 0 0-.09 0a.9.9 0 0 0-.33-.11H10a3 3 0 0 0-3 3v1H6a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3v-1h1a3 3 0 0 0 3-3zm-6-3.53L17.59 8H16a1 1 0 0 1-1-1ZM15 19a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V9a1 1 0 0 1 1-1h1v7a3 3 0 0 0 3 3h5Zm4-4a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3v3a3 3 0 0 0 3 3h3Z"})}),sx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21 11a1 1 0 0 0-1 1a8.05 8.05 0 1 1-2.22-5.5h-2.4a1 1 0 0 0 0 2h4.53a1 1 0 0 0 1-1V3a1 1 0 0 0-2 0v1.77A10 10 0 1 0 22 12a1 1 0 0 0-1-1"})}),tx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9.5 10.5H12a1 1 0 0 0 0-2h-1V8a1 1 0 0 0-2 0v.55a2.5 2.5 0 0 0 .5 4.95h1a.5.5 0 0 1 0 1H8a1 1 0 0 0 0 2h1v.5a1 1 0 0 0 2 0v-.55a2.5 2.5 0 0 0-.5-4.95h-1a.5.5 0 0 1 0-1M21 12h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Z"})}),ax=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12.3 12.22A4.92 4.92 0 0 0 14 8.5a5 5 0 0 0-10 0a4.92 4.92 0 0 0 1.7 3.72A8 8 0 0 0 1 19.5a1 1 0 0 0 2 0a6 6 0 0 1 12 0a1 1 0 0 0 2 0a8 8 0 0 0-4.7-7.28M9 11.5a3 3 0 1 1 3-3a3 3 0 0 1-3 3m9.74.32A5 5 0 0 0 15 3.5a1 1 0 0 0 0 2a3 3 0 0 1 3 3a3 3 0 0 1-1.5 2.59a1 1 0 0 0-.5.84a1 1 0 0 0 .45.86l.39.26l.13.07a7 7 0 0 1 4 6.38a1 1 0 0 0 2 0a9 9 0 0 0-4.23-7.68"})}),nx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M12 2a10 10 0 0 0-6.88 2.77V3a1 1 0 0 0-2 0v4.5a1 1 0 0 0 1 1h4.5a1 1 0 0 0 0-2h-2.4A8 8 0 1 1 4 12a1 1 0 0 0-2 0A10 10 0 1 0 12 2m0 6a1 1 0 0 0-1 1v3a1 1 0 0 0 1 1h2a1 1 0 0 0 0-2h-1V9a1 1 0 0 0-1-1"})}),rx=(s,n)=>{const{t:a}=M("user");return[{accessorKey:"is_admin",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.is_admin")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"is_staff",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.is_staff")}),enableSorting:!1,enableHiding:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r)),size:0},{accessorKey:"id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.id")}),cell:({row:l})=>e.jsx(H,{variant:"outline",children:l.original.id}),enableSorting:!0,enableHiding:!1},{accessorKey:"email",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.email")}),cell:({row:l})=>{const r=l.original.t||0,c=Date.now()/1e3-r<120,o=Math.floor(Date.now()/1e3-r);let u=c?a("columns.online_status.online"):r===0?a("columns.online_status.never"):a("columns.online_status.last_online",{time:me(r)});if(!c&&r!==0){const h=Math.floor(o/60),i=Math.floor(h/60),d=Math.floor(i/24);d>0?u+=` `+a("columns.online_status.offline_duration.days",{count:d}):i>0?u+=` `+a("columns.online_status.offline_duration.hours",{count:i}):h>0?u+=` `+a("columns.online_status.offline_duration.minutes",{count:h}):u+=` -`+a("columns.online_status.offline_duration.seconds",{count:o})}return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",c?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:u})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,c=l.original.online_count||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:y("min-w-[4rem] justify-center",r!==null&&c>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[c," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(H,{className:y("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(H,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=Ze(l.original?.total_used),c=Ze(l.original?.transfer_enable),o=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",o>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(o,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",c]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Ze(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,c=Date.now()/1e3,o=r!=null&&re.jsx(V,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=zs(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=zs(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(V,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:me(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(V,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(_t,{className:"size-4"})})})}),e.jsxs(is,{align:"end",className:"min-w-[40px]",children:[e.jsx(pe,{onSelect:c=>{c.preventDefault()},className:"p-0",children:e.jsx(Kr,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ex,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(pe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Ar,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ix,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(pe,{onSelect:()=>{wt(l.original.subscribe_url)},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Mx,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(pe,{onSelect:()=>{om({id:l.original.id}).then(({data:c})=>{c&&$.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Ox,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(pe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Rs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(Vx,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(pe,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(Lx,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(pe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Yr,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Ax,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function zx(){const[s]=Gn(),[n,a]=m.useState({}),[l,r]=m.useState({is_admin:!1,is_staff:!1}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const E=s.get("email");E&&o(A=>A.some(z=>z.id==="email")?A:[...A,{id:"email",value:E}])},[s]);const{refetch:f,data:P,isLoading:I}=se({queryKey:["userList",i,c,u],queryFn:()=>lm({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),[p,N]=m.useState([]),[k,b]=m.useState([]);m.useEffect(()=>{Mt().then(({data:E})=>{N(E)}),Os().then(({data:E})=>{b(E)})},[]);const w=p.map(E=>({label:E.name,value:E.id})),S=k.map(E=>({label:E.name,value:E.id})),C=Ae({data:P?.data??[],columns:Fx(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:C,toolbar:e.jsx(Cx,{table:C,refetch:f,serverGroupList:p,permissionGroups:w,subscriptionPlans:S})})}function Ux(){const{t:s}=M("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(zx,{})})})]})]})}const $x=Object.freeze(Object.defineProperty({__proto__:null,default:Ux},Symbol.toStringTag,{value:"Module"}));function Hx({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(No,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(be,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Is,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(r=>{const c=l.has(r.value);return e.jsxs(Ne,{onSelect:()=>{c?l.delete(r.value):l.add(r.value);const o=Array.from(l);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(wo,{className:y("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(qs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function Gx({table:s}){const{t:n}=M("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(gr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(ca,{className:"grid w-full grid-cols-2",children:[e.jsx(nt,{value:"0",children:n("status.pending")}),e.jsx(nt,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(Hx,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:Xe.LOW,icon:qx,color:"gray"},{label:n("level.medium"),value:Xe.MIDDLE,icon:Br,color:"yellow"},{label:n("level.high"),value:Xe.HIGH,icon:Wr,color:"red"}]})]})})}function Kx(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const Bx=Ts("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Jr=m.forwardRef(({className:s,variant:n,layout:a,children:l,...r},c)=>e.jsx("div",{className:y(Bx({variant:n,layout:a,className:s}),"relative group"),ref:c,...r,children:m.Children.map(l,o=>m.isValidElement(o)&&typeof o.type!="string"?m.cloneElement(o,{variant:n,layout:a}):o)}));Jr.displayName="ChatBubble";const Wx=Ts("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Qr=m.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...c},o)=>e.jsx("div",{className:y(Wx({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:o,...c,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(Kx,{})}):r}));Qr.displayName="ChatBubbleMessage";const Yx=m.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));Yx.displayName="ChatBubbleActionWrapper";const Zr=m.forwardRef(({className:s,...n},a)=>e.jsx(Cs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));Zr.displayName="ChatInput";const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),Jx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),Qx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function Zx(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ie,{className:"h-8 w-3/4"}),e.jsx(Ie,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ie,{className:"h-20 w-2/3"},s))})]})}function Xx({ticketId:s,dialogTrigger:n}){const{t:a}=M("ticket"),l=os(),r=m.useRef(null),[c,o]=m.useState(!1),[u,h]=m.useState(""),[i,d]=m.useState(!1),{data:f,refetch:P,isLoading:I}=se({queryKey:["ticket",s,c],queryFn:()=>c?um(s):Promise.resolve(null),refetchInterval:c?5e3:!1,retry:3}),p=f?.data,N=(C="smooth")=>{if(r.current){const{scrollHeight:E,clientHeight:A}=r.current;r.current.scrollTo({top:E-A,behavior:C})}};m.useEffect(()=>{if(!c)return;const C=requestAnimationFrame(()=>{N("instant"),setTimeout(()=>N(),1e3)});return()=>{cancelAnimationFrame(C)}},[c,p?.messages]);const k=async()=>{const C=u.trim();!C||i||(d(!0),hm({id:s,message:C}).then(()=>{h(""),P(),N()}).finally(()=>{d(!1)}))},b=async()=>{fr(s).then(()=>{$.success(a("actions.close_success")),P()})},w=()=>{p?.user&&l("/finance/order?user_id="+p.user.id)},S=p?.status===et.CLOSED;return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Oe,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(xe,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(je,{}),I?e.jsx(Zx,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:p?.subject}),e.jsx(H,{variant:S?"secondary":"default",children:a(S?"status.closed":"status.processing")}),!S&&e.jsx(Je,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:b,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Xr,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{children:p?.user?.email})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",me(p?.created_at)]})]}),e.jsx(be,{orientation:"vertical",className:"h-4"}),e.jsx(H,{variant:"outline",children:p?.level!=null&&a(`level.${p.level===Xe.LOW?"low":p.level===Xe.MIDDLE?"medium":"high"}`)})]})]}),p?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Kr,{defaultValues:p.user,refetch:P,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(it,{className:"h-4 w-4"})})}),e.jsx(Yr,{user_id:p.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(Jx,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:w,children:e.jsx(Qx,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:p?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):p?.messages?.map(C=>e.jsx(Jr,{variant:C.is_me?"sent":"received",className:C.is_me?"ml-auto":"mr-auto",children:e.jsx(Qr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:C.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:me(C.created_at)})})]})})},C.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Zr,{disabled:S||i,placeholder:a(S?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:u,onChange:C=>h(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),k())}}),e.jsx(J,{disabled:S||i||!u.trim(),onClick:k,children:a(i?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const ep=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),sp=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),tp=s=>{const{t:n}=M("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(ep,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===Xe.LOW?"default":l===Xe.MIDDLE?"secondary":"destructive";return e.jsx(H,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===Xe.LOW?"low":l===Xe.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,c=l===et.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),o=l===et.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(H,{variant:o,className:"whitespace-nowrap",children:c})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:me(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(V,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:me(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(V,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==et.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(Xx,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(sp,{className:"h-4 w-4"})})}),l&&e.jsx(Je,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{fr(a.original.id).then(()=>{$.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(Xr,{className:"h-4 w-4"})})})]})}}]};function ap(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([{id:"status",value:"0"}]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f,isLoading:P}=se({queryKey:["orderList",h,r,o],queryFn:()=>mm({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),I=Ae({data:f?.data??[],columns:tp(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:Ge(),getPaginationRowModel:Ke(),onPaginationChange:i,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(Gx,{table:I,refetch:d}),e.jsx(Ye,{table:I,showPagination:!0})]})}function np(){const{t:s}=M("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ee,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(ap,{})})]})]})}const rp=Object.freeze(Object.defineProperty({__proto__:null,default:np},Symbol.toStringTag,{value:"Module"}));export{dp as a,op as c,cp as g,mp as r}; +`+a("columns.online_status.offline_duration.seconds",{count:o})}return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx("div",{className:y("size-2.5 rounded-full ring-2 ring-offset-2",c?"bg-green-500 ring-green-500/20":"bg-gray-300 ring-gray-300/20","transition-all duration-300")}),e.jsx("span",{className:"font-medium text-foreground/90",children:l.original.email})]})}),e.jsx(te,{side:"bottom",className:"max-w-[280px]",children:e.jsx("p",{className:"whitespace-pre-line text-sm",children:u})})]})})},enableSorting:!1,enableHiding:!1},{accessorKey:"online_count",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.online_count")}),cell:({row:l})=>{const r=l.original.device_limit,c=l.original.online_count||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{children:e.jsx("div",{className:"flex items-center gap-1.5",children:e.jsxs(H,{variant:"outline",className:y("min-w-[4rem] justify-center",r!==null&&c>=r?"border-destructive/50 bg-destructive/10 text-destructive":"border-primary/40 bg-primary/5 text-primary/90"),children:[c," / ",r===null?"∞":r]})})}),e.jsx(te,{side:"bottom",children:e.jsx("p",{className:"text-sm",children:r===null?a("columns.device_limit.unlimited"):a("columns.device_limit.limited",{count:r})})})]})})},enableSorting:!0,enableHiding:!1},{accessorKey:"banned",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.status")}),cell:({row:l})=>{const r=l.original.banned;return e.jsx("div",{className:"flex justify-center",children:e.jsx(H,{className:y("min-w-20 justify-center transition-colors",r?"bg-destructive/15 text-destructive hover:bg-destructive/25":"bg-success/15 text-success hover:bg-success/25"),children:a(r?"columns.status_text.banned":"columns.status_text.normal")})})},enableSorting:!0,filterFn:(l,r,c)=>c.includes(l.getValue(r))},{accessorKey:"plan_id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.subscription")}),cell:({row:l})=>e.jsx("div",{className:"min-w-[10em] break-all",children:l.original?.plan?.name||"-"}),enableSorting:!1,enableHiding:!1},{accessorKey:"group_id",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.group")}),cell:({row:l})=>e.jsx("div",{className:"flex flex-wrap gap-1",children:e.jsx(H,{variant:"outline",className:y("px-2 py-0.5 font-medium","bg-secondary/50 hover:bg-secondary/70","border border-border/50","transition-all duration-200","cursor-default select-none","flex items-center gap-1.5 whitespace-nowrap"),children:l.original?.group?.name||"-"})}),enableSorting:!1},{accessorKey:"total_used",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.used_traffic")}),cell:({row:l})=>{const r=Ze(l.original?.total_used),c=Ze(l.original?.transfer_enable),o=l.original?.total_used/l.original?.transfer_enable*100||0;return e.jsx(oe,{delayDuration:100,children:e.jsxs(re,{children:[e.jsx(le,{className:"w-full",children:e.jsxs("div",{className:"w-full space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:r}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.toFixed(1),"%"]})]}),e.jsx("div",{className:"h-1.5 w-full rounded-full bg-secondary",children:e.jsx("div",{className:y("h-full rounded-full transition-all",o>90?"bg-destructive":"bg-primary"),style:{width:`${Math.min(o,100)}%`}})})]})}),e.jsx(te,{side:"bottom",children:e.jsxs("p",{className:"text-sm",children:[a("columns.total_traffic"),": ",c]})})]})})}},{accessorKey:"transfer_enable",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.total_traffic")}),cell:({row:l})=>e.jsx("div",{className:"font-medium text-muted-foreground",children:Ze(l.original?.transfer_enable)})},{accessorKey:"expired_at",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.expire_time")}),cell:({row:l})=>{const r=l.original.expired_at,c=Date.now()/1e3,o=r!=null&&re.jsx(O,{column:l,title:a("columns.balance")}),cell:({row:l})=>{const r=zs(l.original?.balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"commission_balance",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.commission")}),cell:({row:l})=>{const r=zs(l.original?.commission_balance);return e.jsxs("div",{className:"flex items-center gap-1 font-medium",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:"¥"}),e.jsx("span",{className:"tabular-nums text-foreground",children:r})]})}},{accessorKey:"created_at",header:({column:l})=>e.jsx(O,{column:l,title:a("columns.register_time")}),cell:({row:l})=>e.jsx("div",{className:"truncate",children:me(l.original?.created_at)}),size:1e3},{id:"actions",header:({column:l})=>e.jsx(O,{column:l,className:"justify-end",title:a("columns.actions")}),cell:({row:l,table:r})=>e.jsxs(ys,{modal:!0,children:[e.jsx(_s,{asChild:!0,children:e.jsx("div",{className:"text-center",children:e.jsx(J,{variant:"ghost",className:"h-8 w-8 p-0 hover:bg-muted","aria-label":a("columns.actions"),children:e.jsx(_t,{className:"size-4"})})})}),e.jsxs(is,{align:"end",className:"min-w-[40px]",children:[e.jsx(xe,{onSelect:c=>{c.preventDefault()},className:"p-0",children:e.jsx(Kr,{defaultValues:{...l.original,invite_user_email:l.original.invite_user?.email},refetch:s,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Zp,{className:"mr-2"}),a("columns.actions_menu.edit")]})})}),e.jsx(xe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Ar,{defaultValues:{email:l.original.email},trigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(Xp,{className:"mr-2 "}),a("columns.actions_menu.assign_order")]})})}),e.jsx(xe,{onSelect:()=>{wt(l.original.subscribe_url)},className:"p-0",children:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(ex,{className:"mr-2"}),a("columns.actions_menu.copy_url")]})}),e.jsx(xe,{onSelect:()=>{Pm({id:l.original.id}).then(({data:c})=>{c&&$.success("重置成功")})},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(sx,{className:"mr-2 "}),a("columns.actions_menu.reset_secret")]})}),e.jsx(xe,{onSelect:()=>{},className:"p-0",children:e.jsxs(Rs,{className:"flex items-center px-2 py-1.5",to:`/finance/order?user_id=${l.original?.id}`,children:[e.jsx(tx,{className:"mr-2"}),a("columns.actions_menu.orders")]})}),e.jsx(xe,{onSelect:()=>{r.setColumnFilters([{id:"invite_user_id",value:l.original?.id}])},children:e.jsxs("div",{className:"flex items-center",children:[e.jsx(ax,{className:"mr-2 "}),a("columns.actions_menu.invites")]})}),e.jsx(xe,{onSelect:c=>c.preventDefault(),className:"p-0",children:e.jsx(Yr,{user_id:l.original?.id,dialogTrigger:e.jsxs(J,{variant:"ghost",className:"w-full justify-start px-2 py-1.5",children:[e.jsx(nx,{className:"mr-2 "}),a("columns.actions_menu.traffic_records")]})})})]})]})}]};function lx(){const[s]=qn(),[n,a]=m.useState({}),[l,r]=m.useState({is_admin:!1,is_staff:!1}),[c,o]=m.useState([]),[u,h]=m.useState([]),[i,d]=m.useState({pageIndex:0,pageSize:20});m.useEffect(()=>{const I=s.get("email");I&&o(A=>A.some(z=>z.id==="email")?A:[...A,{id:"email",value:I}])},[s]);const{refetch:f,data:P,isLoading:E}=se({queryKey:["userList",i,c,u],queryFn:()=>Sm({pageSize:i.pageSize,current:i.pageIndex+1,filter:c,sort:u})}),[x,N]=m.useState([]),[k,v]=m.useState([]);m.useEffect(()=>{Mt().then(({data:I})=>{N(I)}),Ls().then(({data:I})=>{v(I)})},[]);const w=x.map(I=>({label:I.name,value:I.id})),S=k.map(I=>({label:I.name,value:I.id})),C=Ae({data:P?.data??[],columns:rx(f),state:{sorting:u,columnVisibility:l,rowSelection:n,columnFilters:c,pagination:i},rowCount:P?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:a,onSortingChange:h,onColumnFiltersChange:o,onColumnVisibilityChange:r,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),onPaginationChange:d,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnVisibility:{commission_balance:!1,created_at:!1,is_admin:!1,is_staff:!1,permission_group:!1,plan_id:!1},columnPinning:{right:["actions"]}}});return e.jsx(Ye,{table:C,toolbar:e.jsx(qp,{table:C,refetch:f,serverGroupList:x,permissionGroups:w,subscriptionPlans:S})})}function ix(){const{t:s}=M("user");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("manage.title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("manage.description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx("div",{className:"w-full",children:e.jsx(lx,{})})})]})]})}const ox=Object.freeze(Object.defineProperty({__proto__:null,default:ix},Symbol.toStringTag,{value:"Module"}));function cx({column:s,title:n,options:a}){const l=new Set(s?.getFilterValue());return e.jsxs(as,{children:[e.jsx(ns,{asChild:!0,children:e.jsxs(J,{variant:"outline",size:"sm",className:"h-8 border-dashed",children:[e.jsx(wo,{className:"mr-2 h-4 w-4"}),n,l?.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(ve,{orientation:"vertical",className:"mx-2 h-4"}),e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal lg:hidden",children:l.size}),e.jsx("div",{className:"hidden space-x-1 lg:flex",children:l.size>2?e.jsxs(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:[l.size," selected"]}):a.filter(r=>l.has(r.value)).map(r=>e.jsx(H,{variant:"secondary",className:"rounded-sm px-1 font-normal",children:r.label},`selected-${r.value}`))})]})]})}),e.jsx(We,{className:"w-[200px] p-0",align:"start",children:e.jsxs(Ns,{children:[e.jsx(Es,{placeholder:n}),e.jsxs(ws,{children:[e.jsx(Ms,{children:"No results found."}),e.jsx(Me,{children:a.map(r=>{const c=l.has(r.value);return e.jsxs(Ne,{onSelect:()=>{c?l.delete(r.value):l.add(r.value);const o=Array.from(l);s?.setFilterValue(o.length?o:void 0)},children:[e.jsx("div",{className:y("mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",c?"bg-primary text-primary-foreground":"opacity-50 [&_svg]:invisible"),children:e.jsx(Co,{className:y("h-4 w-4")})}),r.icon&&e.jsx(r.icon,{className:"mr-2 h-4 w-4 text-muted-foreground"}),e.jsx("span",{children:r.label})]},`option-${r.value}`)})}),l.size>0&&e.jsxs(e.Fragment,{children:[e.jsx(Gs,{}),e.jsx(Me,{children:e.jsx(Ne,{onSelect:()=>s?.setFilterValue(void 0),className:"justify-center text-center",children:"Clear filters"})})]})]})]})})]})}const dx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 11H5a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})});function mx({table:s}){const{t:n}=M("ticket");return e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{className:"flex flex-1 flex-col-reverse items-start gap-y-2 sm:flex-row sm:items-center sm:space-x-4",children:[e.jsx(gr,{defaultValue:s.getColumn("status")?.getFilterValue(),onValueChange:a=>s.getColumn("status")?.setFilterValue(a),children:e.jsxs(ca,{className:"grid w-full grid-cols-2",children:[e.jsx(nt,{value:"0",children:n("status.pending")}),e.jsx(nt,{value:"1",children:n("status.closed")})]})}),s.getColumn("level")&&e.jsx(cx,{column:s.getColumn("level"),title:n("columns.level"),options:[{label:n("level.low"),value:Xe.LOW,icon:dx,color:"gray"},{label:n("level.medium"),value:Xe.MIDDLE,icon:Br,color:"yellow"},{label:n("level.high"),value:Xe.HIGH,icon:Wr,color:"red"}]})]})})}function ux(){return e.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",className:"text-foreground",children:[e.jsx("circle",{cx:"4",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_qFRN",begin:"0;spinner_OcgL.end+0.25s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{begin:"spinner_qFRN.begin+0.1s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})}),e.jsx("circle",{cx:"20",cy:"12",r:"2",fill:"currentColor",children:e.jsx("animate",{id:"spinner_OcgL",begin:"spinner_qFRN.begin+0.2s",attributeName:"cy",calcMode:"spline",dur:"0.6s",values:"12;6;12",keySplines:".33,.66,.66,1;.33,0,.66,.33"})})]})}const hx=Ts("flex gap-2 max-w-[60%] items-end relative group",{variants:{variant:{received:"self-start",sent:"self-end flex-row-reverse"},layout:{default:"",ai:"max-w-full w-full items-center"}},defaultVariants:{variant:"received",layout:"default"}}),Jr=m.forwardRef(({className:s,variant:n,layout:a,children:l,...r},c)=>e.jsx("div",{className:y(hx({variant:n,layout:a,className:s}),"relative group"),ref:c,...r,children:m.Children.map(l,o=>m.isValidElement(o)&&typeof o.type!="string"?m.cloneElement(o,{variant:n,layout:a}):o)}));Jr.displayName="ChatBubble";const px=Ts("p-4",{variants:{variant:{received:"bg-secondary text-secondary-foreground rounded-r-lg rounded-tl-lg",sent:"bg-primary text-primary-foreground rounded-l-lg rounded-tr-lg"},layout:{default:"",ai:"border-t w-full rounded-none bg-transparent"}},defaultVariants:{variant:"received",layout:"default"}}),Qr=m.forwardRef(({className:s,variant:n,layout:a,isLoading:l=!1,children:r,...c},o)=>e.jsx("div",{className:y(px({variant:n,layout:a,className:s}),"break-words max-w-full whitespace-pre-wrap"),ref:o,...c,children:l?e.jsx("div",{className:"flex items-center space-x-2",children:e.jsx(ux,{})}):r}));Qr.displayName="ChatBubbleMessage";const xx=m.forwardRef(({variant:s,className:n,children:a,...l},r)=>e.jsx("div",{ref:r,className:y("absolute top-1/2 -translate-y-1/2 flex opacity-0 group-hover:opacity-100 transition-opacity duration-200",s==="sent"?"-left-1 -translate-x-full flex-row-reverse":"-right-1 translate-x-full",n),...l,children:a}));xx.displayName="ChatBubbleActionWrapper";const Zr=m.forwardRef(({className:s,...n},a)=>e.jsx(Cs,{autoComplete:"off",ref:a,name:"message",className:y("max-h-12 px-4 py-3 bg-background text-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 w-full rounded-md flex items-center h-16 resize-none",s),...n}));Zr.displayName="ChatInput";const Xr=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"m13.41 12l4.3-4.29a1 1 0 1 0-1.42-1.42L12 10.59l-4.29-4.3a1 1 0 0 0-1.42 1.42l4.3 4.29l-4.3 4.29a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l4.29-4.3l4.29 4.3a1 1 0 0 0 1.42 0a1 1 0 0 0 0-1.42Z"})}),el=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M15.098 12.634L13 11.423V7a1 1 0 0 0-2 0v5a1 1 0 0 0 .5.866l2.598 1.5a1 1 0 1 0 1-1.732M12 2a10 10 0 1 0 10 10A10.01 10.01 0 0 0 12 2m0 18a8 8 0 1 1 8-8a8.01 8.01 0 0 1-8 8"})}),fx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M3.71 16.29a1 1 0 0 0-.33-.21a1 1 0 0 0-.76 0a1 1 0 0 0-.33.21a1 1 0 0 0-.21.33a1 1 0 0 0 .21 1.09a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1 1 0 0 0 .21-1.09a1 1 0 0 0-.21-.33M7 8h14a1 1 0 0 0 0-2H7a1 1 0 0 0 0 2m-3.29 3.29a1 1 0 0 0-1.09-.21a1.2 1.2 0 0 0-.33.21a1 1 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1 1 0 0 0-.21-.33M21 11H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2M3.71 6.29a1 1 0 0 0-.33-.21a1 1 0 0 0-1.09.21a1.2 1.2 0 0 0-.21.33a.94.94 0 0 0 0 .76a1.2 1.2 0 0 0 .21.33a1.2 1.2 0 0 0 .33.21a1 1 0 0 0 1.09-.21a1.2 1.2 0 0 0 .21-.33a.94.94 0 0 0 0-.76a1.2 1.2 0 0 0-.21-.33M21 16H7a1 1 0 0 0 0 2h14a1 1 0 0 0 0-2"})}),gx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M9 12H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m-1-2h4a1 1 0 0 0 0-2H8a1 1 0 0 0 0 2m1 6H7a1 1 0 0 0 0 2h2a1 1 0 0 0 0-2m12-4h-3V3a1 1 0 0 0-.5-.87a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0l-3 1.72l-3-1.72a1 1 0 0 0-1 0A1 1 0 0 0 2 3v16a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3v-6a1 1 0 0 0-1-1M5 20a1 1 0 0 1-1-1V4.73l2 1.14a1.08 1.08 0 0 0 1 0l3-1.72l3 1.72a1.08 1.08 0 0 0 1 0l2-1.14V19a3 3 0 0 0 .18 1Zm15-1a1 1 0 0 1-2 0v-5h2Zm-6.44-2.83a.8.8 0 0 0-.18-.09a.6.6 0 0 0-.19-.06a1 1 0 0 0-.9.27A1.05 1.05 0 0 0 12 17a1 1 0 0 0 .07.38a1.2 1.2 0 0 0 .22.33a1.2 1.2 0 0 0 .33.21a.94.94 0 0 0 .76 0a1.2 1.2 0 0 0 .33-.21A1 1 0 0 0 14 17a1.05 1.05 0 0 0-.29-.71a2 2 0 0 0-.15-.12m.14-3.88a1 1 0 0 0-1.62.33A1 1 0 0 0 13 14a1 1 0 0 0 1-1a1 1 0 0 0-.08-.38a.9.9 0 0 0-.22-.33"})});function jx(){return e.jsxs("div",{className:"flex h-full flex-col space-y-4 p-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(Ee,{className:"h-8 w-3/4"}),e.jsx(Ee,{className:"h-4 w-1/2"})]}),e.jsx("div",{className:"flex-1 space-y-4",children:[1,2,3].map(s=>e.jsx(Ee,{className:"h-20 w-2/3"},s))})]})}function bx({ticketId:s,dialogTrigger:n}){const{t:a}=M("ticket"),l=os(),r=m.useRef(null),[c,o]=m.useState(!1),[u,h]=m.useState(""),[i,d]=m.useState(!1),{data:f,refetch:P,isLoading:E}=se({queryKey:["ticket",s,c],queryFn:()=>c?Im(s):Promise.resolve(null),refetchInterval:c?5e3:!1,retry:3}),x=f?.data,N=(C="smooth")=>{if(r.current){const{scrollHeight:I,clientHeight:A}=r.current;r.current.scrollTo({top:I-A,behavior:C})}};m.useEffect(()=>{if(!c)return;const C=requestAnimationFrame(()=>{N("instant"),setTimeout(()=>N(),1e3)});return()=>{cancelAnimationFrame(C)}},[c,x?.messages]);const k=async()=>{const C=u.trim();!C||i||(d(!0),Em({id:s,message:C}).then(()=>{h(""),P(),N()}).finally(()=>{d(!1)}))},v=async()=>{fr(s).then(()=>{$.success(a("actions.close_success")),P()})},w=()=>{x?.user&&l("/finance/order?user_id="+x.user.id)},S=x?.status===et.CLOSED;return e.jsxs(ge,{open:c,onOpenChange:o,children:[e.jsx(Le,{asChild:!0,children:n??e.jsx(J,{variant:"outline",children:a("actions.view_ticket")})}),e.jsxs(pe,{className:"flex h-[90vh] max-w-4xl flex-col gap-0 p-0",children:[e.jsx(je,{}),E?e.jsx(jx,{}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex flex-col space-y-4 border-b p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx("h2",{className:"text-2xl font-semibold",children:x?.subject}),e.jsx(H,{variant:S?"secondary":"default",children:a(S?"status.closed":"status.processing")}),!S&&e.jsx(Je,{title:a("actions.close_confirm_title"),description:a("actions.close_confirm_description"),confirmText:a("actions.close_confirm_button"),variant:"destructive",onConfirm:v,children:e.jsxs(J,{variant:"ghost",size:"sm",className:"gap-1 text-muted-foreground hover:text-destructive",children:[e.jsx(Xr,{className:"h-4 w-4"}),a("actions.close_ticket")]})})]}),e.jsxs("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(it,{className:"h-4 w-4"}),e.jsx("span",{children:x?.user?.email})]}),e.jsx(ve,{orientation:"vertical",className:"h-4"}),e.jsxs("div",{className:"flex items-center space-x-1",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsxs("span",{children:[a("detail.created_at")," ",me(x?.created_at)]})]}),e.jsx(ve,{orientation:"vertical",className:"h-4"}),e.jsx(H,{variant:"outline",children:x?.level!=null&&a(`level.${x.level===Xe.LOW?"low":x.level===Xe.MIDDLE?"medium":"high"}`)})]})]}),x?.user&&e.jsxs("div",{className:"flex space-x-2",children:[e.jsx(Kr,{defaultValues:x.user,refetch:P,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.user_info"),children:e.jsx(it,{className:"h-4 w-4"})})}),e.jsx(Yr,{user_id:x.user.id,dialogTrigger:e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.traffic_records"),children:e.jsx(fx,{className:"h-4 w-4"})})}),e.jsx(J,{variant:"outline",size:"icon",className:"h-8 w-8",title:a("detail.order_records"),onClick:w,children:e.jsx(gx,{className:"h-4 w-4"})})]})]})}),e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsx("div",{ref:r,className:"h-full space-y-4 overflow-y-auto p-6",children:x?.messages?.length===0?e.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground",children:a("detail.no_messages")}):x?.messages?.map(C=>e.jsx(Jr,{variant:C.is_me?"sent":"received",className:C.is_me?"ml-auto":"mr-auto",children:e.jsx(Qr,{children:e.jsxs("div",{className:"space-y-1",children:[e.jsx("div",{className:"whitespace-pre-wrap break-words",children:C.message}),e.jsx("div",{className:"text-right",children:e.jsx("time",{className:"text-[10px] text-muted-foreground",children:me(C.created_at)})})]})})},C.id))})}),e.jsx("div",{className:"border-t p-4",children:e.jsxs("div",{className:"relative flex items-center space-x-2",children:[e.jsx(Zr,{disabled:S||i,placeholder:a(S?"detail.input.closed_placeholder":"detail.input.reply_placeholder"),className:"flex-1 resize-none rounded-lg border bg-background p-3 focus-visible:ring-1",value:u,onChange:C=>h(C.target.value),onKeyDown:C=>{C.key==="Enter"&&!C.shiftKey&&(C.preventDefault(),k())}}),e.jsx(J,{disabled:S||i||!u.trim(),onClick:k,children:a(i?"detail.input.sending":"detail.input.send")})]})})]})]})]})}const vx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M19 4H5a3 3 0 0 0-3 3v10a3 3 0 0 0 3 3h14a3 3 0 0 0 3-3V7a3 3 0 0 0-3-3m-.41 2l-5.88 5.88a1 1 0 0 1-1.42 0L5.41 6ZM20 17a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V7.41l5.88 5.88a3 3 0 0 0 4.24 0L20 7.41Z"})}),yx=s=>e.jsx("svg",{className:"inline-block",viewBox:"0 0 24 24",width:"1.2em",height:"1.2em",...s,children:e.jsx("path",{fill:"currentColor",d:"M21.92 11.6C19.9 6.91 16.1 4 12 4s-7.9 2.91-9.92 7.6a1 1 0 0 0 0 .8C4.1 17.09 7.9 20 12 20s7.9-2.91 9.92-7.6a1 1 0 0 0 0-.8M12 18c-3.17 0-6.17-2.29-7.9-6C5.83 8.29 8.83 6 12 6s6.17 2.29 7.9 6c-1.73 3.71-4.73 6-7.9 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4m0 6a2 2 0 1 1 2-2a2 2 0 0 1-2 2"})}),_x=s=>{const{t:n}=M("ticket");return[{accessorKey:"id",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.id")}),cell:({row:a})=>e.jsx(H,{variant:"outline",children:a.getValue("id")}),enableSorting:!1,enableHiding:!1},{accessorKey:"subject",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.subject")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(vx,{className:"h-4 w-4 text-muted-foreground"}),e.jsx("span",{className:"max-w-[500px] truncate font-medium",children:a.getValue("subject")})]}),enableSorting:!1,enableHiding:!1,size:4e3},{accessorKey:"level",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.level")}),cell:({row:a})=>{const l=a.getValue("level"),r=l===Xe.LOW?"default":l===Xe.MIDDLE?"secondary":"destructive";return e.jsx(H,{variant:r,className:"whitespace-nowrap",children:n(`level.${l===Xe.LOW?"low":l===Xe.MIDDLE?"medium":"high"}`)})},filterFn:(a,l,r)=>r.includes(a.getValue(l))},{accessorKey:"status",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.status")}),cell:({row:a})=>{const l=a.getValue("status"),r=a.original.reply_status,c=l===et.CLOSED?n("status.closed"):n(r===0?"status.replied":"status.pending"),o=l===et.CLOSED?"default":r===0?"secondary":"destructive";return e.jsx(H,{variant:o,className:"whitespace-nowrap",children:c})}},{accessorKey:"updated_at",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.updated_at")}),cell:({row:a})=>e.jsxs("div",{className:"flex items-center space-x-2 text-muted-foreground",children:[e.jsx(el,{className:"h-4 w-4"}),e.jsx("span",{className:"text-sm",children:me(a.getValue("updated_at"))})]}),enableSorting:!0},{accessorKey:"created_at",header:({column:a})=>e.jsx(O,{column:a,title:n("columns.created_at")}),cell:({row:a})=>e.jsx("div",{className:"text-sm text-muted-foreground",children:me(a.getValue("created_at"))}),enableSorting:!0,meta:{isFlexGrow:!0}},{id:"actions",header:({column:a})=>e.jsx(O,{className:"justify-end",column:a,title:n("columns.actions")}),cell:({row:a})=>{const l=a.original.status!==et.CLOSED;return e.jsxs("div",{className:"flex items-center justify-center",children:[e.jsx(bx,{ticketId:a.original.id,dialogTrigger:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.view_details"),children:e.jsx(yx,{className:"h-4 w-4"})})}),l&&e.jsx(Je,{title:n("actions.close_confirm_title"),description:n("actions.close_confirm_description"),confirmText:n("actions.close_confirm_button"),variant:"destructive",onConfirm:async()=>{fr(a.original.id).then(()=>{$.success(n("actions.close_success")),s()})},children:e.jsx(J,{variant:"ghost",size:"icon",className:"h-8 w-8",title:n("actions.close_ticket"),children:e.jsx(Xr,{className:"h-4 w-4"})})})]})}}]};function Nx(){const[s,n]=m.useState({}),[a,l]=m.useState({}),[r,c]=m.useState([{id:"status",value:"0"}]),[o,u]=m.useState([]),[h,i]=m.useState({pageIndex:0,pageSize:20}),{refetch:d,data:f,isLoading:P}=se({queryKey:["orderList",h,r,o],queryFn:()=>Rm({pageSize:h.pageSize,current:h.pageIndex+1,filter:r,sort:o})}),E=Ae({data:f?.data??[],columns:_x(d),state:{sorting:o,columnVisibility:a,rowSelection:s,columnFilters:r,pagination:h},rowCount:f?.total??0,manualPagination:!0,manualFiltering:!0,manualSorting:!0,enableRowSelection:!0,onRowSelectionChange:n,onSortingChange:u,onColumnFiltersChange:c,onColumnVisibilityChange:l,getCoreRowModel:Fe(),getFilteredRowModel:qe(),getPaginationRowModel:Ke(),onPaginationChange:i,getSortedRowModel:Be(),getFacetedRowModel:ds(),getFacetedUniqueValues:ms(),initialState:{columnPinning:{right:["actions"]}}});return e.jsxs("div",{className:"space-y-4",children:[e.jsx(mx,{table:E,refetch:d}),e.jsx(Ye,{table:E,showPagination:!0})]})}function wx(){const{t:s}=M("ticket");return e.jsxs(we,{children:[e.jsxs(Ce,{children:[e.jsx(De,{}),e.jsxs("div",{className:"ml-auto flex items-center space-x-4",children:[e.jsx(Re,{}),e.jsx(Ie,{})]})]}),e.jsxs(ke,{className:"flex flex-col",fixedHeight:!0,children:[e.jsx("div",{className:"mb-2 flex items-center justify-between space-y-2",children:e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:s("title")}),e.jsx("p",{className:"mt-2 text-muted-foreground",children:s("description")})]})}),e.jsx("div",{className:"-mx-4 flex-1 overflow-auto px-4 py-1 lg:flex-row lg:space-x-12 lg:space-y-0",children:e.jsx(Nx,{})})]})]})}const Cx=Object.freeze(Object.defineProperty({__proto__:null,default:wx},Symbol.toStringTag,{value:"Module"}));export{Dx as a,Px as c,Tx as g,Rx as r}; diff --git a/public/assets/admin/assets/vendor.js b/public/assets/admin/assets/vendor.js index c9ed53c4..ceca38ec 100644 --- a/public/assets/admin/assets/vendor.js +++ b/public/assets/admin/assets/vendor.js @@ -1,4 +1,4 @@ -import{g as Pn,c as la,a as cre,r as fre}from"./index.js";function mN(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var vN={exports:{}},Sx={},yN={exports:{}},an={};/** +import{g as Pn,c as la,a as cre,r as fre}from"./index.js";function vN(e,t){for(var n=0;nr[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var yN={exports:{}},Sx={},bN={exports:{}},an={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ import{g as Pn,c as la,a as cre,r as fre}from"./index.js";function mN(e,t){for(v * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lm=Symbol.for("react.element"),dre=Symbol.for("react.portal"),hre=Symbol.for("react.fragment"),pre=Symbol.for("react.strict_mode"),gre=Symbol.for("react.profiler"),mre=Symbol.for("react.provider"),vre=Symbol.for("react.context"),yre=Symbol.for("react.forward_ref"),bre=Symbol.for("react.suspense"),xre=Symbol.for("react.memo"),wre=Symbol.for("react.lazy"),jk=Symbol.iterator;function _re(e){return e===null||typeof e!="object"?null:(e=jk&&e[jk]||e["@@iterator"],typeof e=="function"?e:null)}var bN={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xN=Object.assign,wN={};function Ph(e,t,n){this.props=e,this.context=t,this.refs=wN,this.updater=n||bN}Ph.prototype.isReactComponent={};Ph.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ph.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _N(){}_N.prototype=Ph.prototype;function C4(e,t,n){this.props=e,this.context=t,this.refs=wN,this.updater=n||bN}var E4=C4.prototype=new _N;E4.constructor=C4;xN(E4,Ph.prototype);E4.isPureReactComponent=!0;var Bk=Array.isArray,SN=Object.prototype.hasOwnProperty,O4={current:null},CN={key:!0,ref:!0,__self:!0,__source:!0};function EN(e,t,n){var r,i={},o=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(o=""+t.key),t)SN.call(t,r)&&!CN.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1>>1,Q=j[oe];if(0>>1;oei(de,Y))Sei(me,de)?(j[oe]=me,j[Se]=Y,oe=Se):(j[oe]=de,j[ue]=Y,oe=ue);else if(Sei(me,Y))j[oe]=me,j[Se]=Y,oe=Se;else break e}}return K}function i(j,K){var Y=j.sortIndex-K.sortIndex;return Y!==0?Y:j.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,f=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var K=n(l);K!==null;){if(K.callback===null)r(l);else if(K.startTime<=j)r(l),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(l)}}function O(j){if(v=!1,S(j),!m)if(n(u)!==null)m=!0,q(E);else{var K=n(l);K!==null&&W(O,K.startTime-j)}}function E(j,K){m=!1,v&&(v=!1,w(M),M=-1),p=!0;var Y=h;try{for(S(K),f=n(u);f!==null&&(!(f.expirationTime>K)||j&&!H());){var oe=f.callback;if(typeof oe=="function"){f.callback=null,h=f.priorityLevel;var Q=oe(f.expirationTime<=K);K=e.unstable_now(),typeof Q=="function"?f.callback=Q:f===n(u)&&r(u),S(K)}else r(u);f=n(u)}if(f!==null)var J=!0;else{var ue=n(l);ue!==null&&W(O,ue.startTime-K),J=!1}return J}finally{f=null,h=Y,p=!1}}var C=!1,k=null,M=-1,N=5,z=-1;function H(){return!(e.unstable_now()-zj||125oe?(j.sortIndex=Y,t(l,j),n(u)===null&&j===n(l)&&(v?(w(M),M=-1):v=!0,W(O,Y-oe))):(j.sortIndex=Q,t(u,j),m||p||(m=!0,q(E))),j},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(j){var K=h;return function(){var Y=h;h=K;try{return j.apply(this,arguments)}finally{h=Y}}}})(TN);kN.exports=TN;var Dre=kN.exports;/** + */(function(e){function t(j,K){var Y=j.length;j.push(K);e:for(;0>>1,Q=j[oe];if(0>>1;oei(de,Y))Sei(me,de)?(j[oe]=me,j[Se]=Y,oe=Se):(j[oe]=de,j[ue]=Y,oe=ue);else if(Sei(me,Y))j[oe]=me,j[Se]=Y,oe=Se;else break e}}return K}function i(j,K){var Y=j.sortIndex-K.sortIndex;return Y!==0?Y:j.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var u=[],l=[],c=1,f=null,h=3,p=!1,m=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(j){for(var K=n(l);K!==null;){if(K.callback===null)r(l);else if(K.startTime<=j)r(l),K.sortIndex=K.expirationTime,t(u,K);else break;K=n(l)}}function O(j){if(v=!1,S(j),!m)if(n(u)!==null)m=!0,q(E);else{var K=n(l);K!==null&&W(O,K.startTime-j)}}function E(j,K){m=!1,v&&(v=!1,w(M),M=-1),p=!0;var Y=h;try{for(S(K),f=n(u);f!==null&&(!(f.expirationTime>K)||j&&!H());){var oe=f.callback;if(typeof oe=="function"){f.callback=null,h=f.priorityLevel;var Q=oe(f.expirationTime<=K);K=e.unstable_now(),typeof Q=="function"?f.callback=Q:f===n(u)&&r(u),S(K)}else r(u);f=n(u)}if(f!==null)var J=!0;else{var ue=n(l);ue!==null&&W(O,ue.startTime-K),J=!1}return J}finally{f=null,h=Y,p=!1}}var C=!1,k=null,M=-1,N=5,z=-1;function H(){return!(e.unstable_now()-zj||125oe?(j.sortIndex=Y,t(l,j),n(u)===null&&j===n(l)&&(v?(w(M),M=-1):v=!0,W(O,Y-oe))):(j.sortIndex=Q,t(u,j),m||p||(m=!0,q(E))),j},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(j){var K=h;return function(){var Y=h;h=K;try{return j.apply(this,arguments)}finally{h=Y}}}})(MN);TN.exports=MN;var Dre=TN.exports;/** * @license React * react-dom.production.min.js * @@ -30,14 +30,14 @@ import{g as Pn,c as la,a as cre,r as fre}from"./index.js";function mN(e,t){for(v * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var $re=y,Bo=Dre;function We(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N3=Object.prototype.hasOwnProperty,Ire=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Vk={},Wk={};function Nre(e){return N3.call(Wk,e)?!0:N3.call(Vk,e)?!1:Ire.test(e)?Wk[e]=!0:(Vk[e]=!0,!1)}function Lre(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fre(e,t,n,r){if(t===null||typeof t>"u"||Lre(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gi(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mi[e]=new Gi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mi[t]=new Gi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mi[e]=new Gi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mi[e]=new Gi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mi[e]=new Gi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mi[e]=new Gi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mi[e]=new Gi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mi[e]=new Gi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mi[e]=new Gi(e,5,!1,e.toLowerCase(),null,!1,!1)});var k4=/[\-:]([a-z])/g;function T4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!1,!1)});mi.xlinkHref=new Gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!0,!0)});function M4(e,t,n,r){var i=mi.hasOwnProperty(t)?mi[t]:null;(i!==null?i.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),N3=Object.prototype.hasOwnProperty,Ire=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Wk={},Hk={};function Nre(e){return N3.call(Hk,e)?!0:N3.call(Wk,e)?!1:Ire.test(e)?Hk[e]=!0:(Wk[e]=!0,!1)}function Lre(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Fre(e,t,n,r){if(t===null||typeof t>"u"||Lre(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Gi(e,t,n,r,i,o,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var mi={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mi[e]=new Gi(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mi[t]=new Gi(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mi[e]=new Gi(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mi[e]=new Gi(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){mi[e]=new Gi(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mi[e]=new Gi(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mi[e]=new Gi(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mi[e]=new Gi(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mi[e]=new Gi(e,5,!1,e.toLowerCase(),null,!1,!1)});var k4=/[\-:]([a-z])/g;function T4(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(k4,T4);mi[t]=new Gi(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!1,!1)});mi.xlinkHref=new Gi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mi[e]=new Gi(e,1,!1,e.toLowerCase(),null,!0,!0)});function M4(e,t,n,r){var i=mi.hasOwnProperty(t)?mi[t]:null;(i!==null?i.type!==0:r||!(2s||i[a]!==o[s]){var u=` -`+i[a].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{T_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Jp(e):""}function jre(e){switch(e.tag){case 5:return Jp(e.type);case 16:return Jp("Lazy");case 13:return Jp("Suspense");case 19:return Jp("SuspenseList");case 0:case 2:case 15:return e=M_(e.type,!1),e;case 11:return e=M_(e.type.render,!1),e;case 1:return e=M_(e.type,!0),e;default:return""}}function B3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case id:return"Fragment";case rd:return"Portal";case L3:return"Profiler";case R4:return"StrictMode";case F3:return"Suspense";case j3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case DN:return(e.displayName||"Context")+".Consumer";case RN:return(e._context.displayName||"Context")+".Provider";case D4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $4:return t=e.displayName||null,t!==null?t:B3(e.type)||"Memo";case Zu:t=e._payload,e=e._init;try{return B3(e(t))}catch{}}return null}function Bre(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B3(t);case 8:return t===R4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function IN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zre(e){var t=IN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nv(e){e._valueTracker||(e._valueTracker=zre(e))}function NN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=IN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function o1(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function z3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Kk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function LN(e,t){t=t.checked,t!=null&&M4(e,"checked",t,!1)}function U3(e,t){LN(e,t);var n=Cl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?V3(e,t.type,n):t.hasOwnProperty("defaultValue")&&V3(e,t.type,Cl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function V3(e,t,n){(t!=="number"||o1(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var e0=Array.isArray;function bd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Lv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function D0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var c0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ure=["Webkit","ms","Moz","O"];Object.keys(c0).forEach(function(e){Ure.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),c0[t]=c0[e]})});function zN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||c0.hasOwnProperty(e)&&c0[e]?(""+t).trim():t+"px"}function UN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=zN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vre=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K3(e,t){if(t){if(Vre[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(We(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(We(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(We(61))}if(t.style!=null&&typeof t.style!="object")throw Error(We(62))}}function q3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G3=null;function I4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Y3=null,xd=null,wd=null;function Zk(e){if(e=dm(e)){if(typeof Y3!="function")throw Error(We(280));var t=e.stateNode;t&&(t=Px(t),Y3(e.stateNode,e.type,t))}}function VN(e){xd?wd?wd.push(e):wd=[e]:xd=e}function WN(){if(xd){var e=xd,t=wd;if(wd=xd=null,Zk(e),t)for(e=0;e>>=0,e===0?32:31-(eie(e)/tie|0)|0}var Fv=64,jv=4194304;function t0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function l1(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=t0(s):(o&=a,o!==0&&(r=t0(o)))}else a=n&~i,a!==0?r=t0(a):o!==0&&(r=t0(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function cm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Va(t),e[t]=n}function oie(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=d0),oT=" ",aT=!1;function cL(e,t){switch(e){case"keyup":return Die.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function fL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var od=!1;function Iie(e,t){switch(e){case"compositionend":return fL(t);case"keypress":return t.which!==32?null:(aT=!0,oT);case"textInput":return e=t.data,e===oT&&aT?null:e;default:return null}}function Nie(e,t){if(od)return e==="compositionend"||!V4&&cL(e,t)?(e=uL(),Ly=B4=ol=null,od=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=cT(n)}}function gL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mL(){for(var e=window,t=o1();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=o1(e.document)}return t}function W4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Hie(e){var t=mL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&gL(n.ownerDocument.documentElement,n)){if(r!==null&&W4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=fT(n,o);var a=fT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ad=null,tC=null,p0=null,nC=!1;function dT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nC||ad==null||ad!==o1(r)||(r=ad,"selectionStart"in r&&W4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),p0&&j0(p0,r)||(p0=r,r=d1(tC,"onSelect"),0ld||(e.current=uC[ld],uC[ld]=null,ld--)}function Wn(e,t){ld++,uC[ld]=e.current,e.current=t}var El={},Di=Fl(El),lo=Fl(!1),Nc=El;function Bd(e,t){var n=e.type.contextTypes;if(!n)return El;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function co(e){return e=e.childContextTypes,e!=null}function p1(){nr(lo),nr(Di)}function bT(e,t,n){if(Di.current!==El)throw Error(We(168));Wn(Di,t),Wn(lo,n)}function EL(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(We(108,Bre(e)||"Unknown",i));return hr({},n,r)}function g1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||El,Nc=Di.current,Wn(Di,e),Wn(lo,lo.current),!0}function xT(e,t,n){var r=e.stateNode;if(!r)throw Error(We(169));n?(e=EL(e,t,Nc),r.__reactInternalMemoizedMergedChildContext=e,nr(lo),nr(Di),Wn(Di,e)):nr(lo),Wn(lo,n)}var tu=null,kx=!1,H_=!1;function OL(e){tu===null?tu=[e]:tu.push(e)}function roe(e){kx=!0,OL(e)}function jl(){if(!H_&&tu!==null){H_=!0;var e=0,t=Rn;try{var n=tu;for(Rn=1;e>=a,i-=a,ru=1<<32-Va(t)+i|n<M?(N=k,k=null):N=k.sibling;var z=h(w,k,S[M],O);if(z===null){k===null&&(k=N);break}e&&k&&z.alternate===null&&t(w,k),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z,k=N}if(M===S.length)return n(w,k),or&&sc(w,M),E;if(k===null){for(;MM?(N=k,k=null):N=k.sibling;var H=h(w,k,z.value,O);if(H===null){k===null&&(k=N);break}e&&k&&H.alternate===null&&t(w,k),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,k=N}if(z.done)return n(w,k),or&&sc(w,M),E;if(k===null){for(;!z.done;M++,z=S.next())z=f(w,z.value,O),z!==null&&(x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return or&&sc(w,M),E}for(k=r(w,k);!z.done;M++,z=S.next())z=p(k,w,M,z.value,O),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?M:z.key),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return e&&k.forEach(function(V){return t(w,V)}),or&&sc(w,M),E}function b(w,x,S,O){if(typeof S=="object"&&S!==null&&S.type===id&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Iv:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===id){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Zu&&ST(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=Ep(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===id?(x=kc(S.props.children,w.mode,O,S.key),x.return=w,w=x):(O=Hy(S.type,S.key,S.props,null,w.mode,O),O.ref=Ep(w,x,S),O.return=w,w=O)}return a(w);case rd:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=J_(S,w.mode,O),x.return=w,w=x}return a(w);case Zu:return C=S._init,b(w,x,C(S._payload),O)}if(e0(S))return m(w,x,S,O);if(xp(S))return v(w,x,S,O);Kv(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=Q_(S,w.mode,O),x.return=w,w=x),a(w)):n(w,x)}return b}var Ud=TL(!0),ML=TL(!1),y1=Fl(null),b1=null,dd=null,G4=null;function Y4(){G4=dd=b1=null}function Z4(e){var t=y1.current;nr(y1),e._currentValue=t}function fC(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sd(e,t){b1=e,G4=dd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ao=!0),e.firstContext=null)}function ga(e){var t=e._currentValue;if(G4!==e)if(e={context:e,memoizedValue:t,next:null},dd===null){if(b1===null)throw Error(We(308));dd=e,b1.dependencies={lanes:0,firstContext:e}}else dd=dd.next=e;return t}var yc=null;function X4(e){yc===null?yc=[e]:yc.push(e)}function RL(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,X4(t)):(n.next=i.next,i.next=n),t.interleaved=n,mu(e,r)}function mu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xu=!1;function Q4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function DL(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,vn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mu(e,n)}return i=r.interleaved,i===null?(t.next=t,X4(r)):(t.next=i.next,i.next=t),r.interleaved=t,mu(e,n)}function jy(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}function CT(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function x1(e,t,n,r){var i=e.updateQueue;Xu=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,c=l=u=null,s=o;do{var h=s.lane,p=s.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(h=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=hr({},f,h);break e;case 2:Xu=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=f):c=c.next=p,a|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jc|=a,e.lanes=a,e.memoizedState=f}}function ET(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=q_.transition;q_.transition={};try{e(!1),t()}finally{Rn=n,q_.transition=r}}function ZL(){return ma().memoizedState}function soe(e,t,n){var r=xl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},XL(e))QL(t,n);else if(n=RL(e,t,n,r),n!==null){var i=Wi();Wa(n,e,r,i),JL(n,t,r)}}function uoe(e,t,n){var r=xl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(XL(e))QL(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ga(s,a)){var u=t.interleaved;u===null?(i.next=i,X4(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=RL(e,t,i,r),n!==null&&(i=Wi(),Wa(n,e,r,i),JL(n,t,r))}}function XL(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function QL(e,t){g0=_1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function JL(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}var S1={readContext:ga,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},loe={readContext:ga,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:AT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,zy(4194308,4,HL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zy(4194308,4,e,t)},useInsertionEffect:function(e,t){return zy(4,2,e,t)},useMemo:function(e,t){var n=cs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cs();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=soe.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:OT,useDebugValue:aO,useDeferredValue:function(e){return cs().memoizedState=e},useTransition:function(){var e=OT(!1),t=e[0];return e=aoe.bind(null,e[1]),cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=cs();if(or){if(n===void 0)throw Error(We(407));n=n()}else{if(n=t(),ri===null)throw Error(We(349));Fc&30||LL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,AT(jL.bind(null,r,o,e),[e]),r.flags|=2048,q0(9,FL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=cs(),t=ri.identifierPrefix;if(or){var n=iu,r=ru;n=(r&~(1<<32-Va(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=H0++,0")&&(u=u.replace("",e.displayName)),u}while(1<=a&&0<=s);break}}}finally{T_=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Jp(e):""}function jre(e){switch(e.tag){case 5:return Jp(e.type);case 16:return Jp("Lazy");case 13:return Jp("Suspense");case 19:return Jp("SuspenseList");case 0:case 2:case 15:return e=M_(e.type,!1),e;case 11:return e=M_(e.type.render,!1),e;case 1:return e=M_(e.type,!0),e;default:return""}}function B3(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case id:return"Fragment";case rd:return"Portal";case L3:return"Profiler";case R4:return"StrictMode";case F3:return"Suspense";case j3:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case $N:return(e.displayName||"Context")+".Consumer";case DN:return(e._context.displayName||"Context")+".Provider";case D4:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $4:return t=e.displayName||null,t!==null?t:B3(e.type)||"Memo";case Zu:t=e._payload,e=e._init;try{return B3(e(t))}catch{}}return null}function Bre(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return B3(t);case 8:return t===R4?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cl(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function NN(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function zre(e){var t=NN(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lv(e){e._valueTracker||(e._valueTracker=zre(e))}function LN(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=NN(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function a1(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function z3(e,t){var n=t.checked;return hr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function qk(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cl(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function FN(e,t){t=t.checked,t!=null&&M4(e,"checked",t,!1)}function U3(e,t){FN(e,t);var n=Cl(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?V3(e,t.type,n):t.hasOwnProperty("defaultValue")&&V3(e,t.type,Cl(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Gk(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function V3(e,t,n){(t!=="number"||a1(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var e0=Array.isArray;function bd(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Fv.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function D0(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var c0={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ure=["Webkit","ms","Moz","O"];Object.keys(c0).forEach(function(e){Ure.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),c0[t]=c0[e]})});function UN(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||c0.hasOwnProperty(e)&&c0[e]?(""+t).trim():t+"px"}function VN(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=UN(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var Vre=hr({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function K3(e,t){if(t){if(Vre[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(We(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(We(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(We(61))}if(t.style!=null&&typeof t.style!="object")throw Error(We(62))}}function q3(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var G3=null;function I4(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Y3=null,xd=null,wd=null;function Xk(e){if(e=hm(e)){if(typeof Y3!="function")throw Error(We(280));var t=e.stateNode;t&&(t=Px(t),Y3(e.stateNode,e.type,t))}}function WN(e){xd?wd?wd.push(e):wd=[e]:xd=e}function HN(){if(xd){var e=xd,t=wd;if(wd=xd=null,Xk(e),t)for(e=0;e>>=0,e===0?32:31-(eie(e)/tie|0)|0}var jv=64,Bv=4194304;function t0(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function c1(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~i;s!==0?r=t0(s):(o&=a,o!==0&&(r=t0(o)))}else a=n&~i,a!==0?r=t0(a):o!==0&&(r=t0(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function fm(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Va(t),e[t]=n}function oie(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=d0),aT=" ",sT=!1;function fL(e,t){switch(e){case"keyup":return Die.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dL(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var od=!1;function Iie(e,t){switch(e){case"compositionend":return dL(t);case"keypress":return t.which!==32?null:(sT=!0,aT);case"textInput":return e=t.data,e===aT&&sT?null:e;default:return null}}function Nie(e,t){if(od)return e==="compositionend"||!V4&&fL(e,t)?(e=lL(),Fy=B4=ol=null,od=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=fT(n)}}function mL(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mL(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vL(){for(var e=window,t=a1();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=a1(e.document)}return t}function W4(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Hie(e){var t=vL(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mL(n.ownerDocument.documentElement,n)){if(r!==null&&W4(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=dT(n,o);var a=dT(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ad=null,tC=null,p0=null,nC=!1;function hT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;nC||ad==null||ad!==a1(r)||(r=ad,"selectionStart"in r&&W4(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),p0&&j0(p0,r)||(p0=r,r=h1(tC,"onSelect"),0ld||(e.current=uC[ld],uC[ld]=null,ld--)}function Wn(e,t){ld++,uC[ld]=e.current,e.current=t}var El={},Di=Fl(El),lo=Fl(!1),Nc=El;function Bd(e,t){var n=e.type.contextTypes;if(!n)return El;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function co(e){return e=e.childContextTypes,e!=null}function g1(){nr(lo),nr(Di)}function xT(e,t,n){if(Di.current!==El)throw Error(We(168));Wn(Di,t),Wn(lo,n)}function OL(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(We(108,Bre(e)||"Unknown",i));return hr({},n,r)}function m1(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||El,Nc=Di.current,Wn(Di,e),Wn(lo,lo.current),!0}function wT(e,t,n){var r=e.stateNode;if(!r)throw Error(We(169));n?(e=OL(e,t,Nc),r.__reactInternalMemoizedMergedChildContext=e,nr(lo),nr(Di),Wn(Di,e)):nr(lo),Wn(lo,n)}var tu=null,kx=!1,H_=!1;function AL(e){tu===null?tu=[e]:tu.push(e)}function roe(e){kx=!0,AL(e)}function jl(){if(!H_&&tu!==null){H_=!0;var e=0,t=Rn;try{var n=tu;for(Rn=1;e>=a,i-=a,ru=1<<32-Va(t)+i|n<M?(N=k,k=null):N=k.sibling;var z=h(w,k,S[M],O);if(z===null){k===null&&(k=N);break}e&&k&&z.alternate===null&&t(w,k),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z,k=N}if(M===S.length)return n(w,k),or&&sc(w,M),E;if(k===null){for(;MM?(N=k,k=null):N=k.sibling;var H=h(w,k,z.value,O);if(H===null){k===null&&(k=N);break}e&&k&&H.alternate===null&&t(w,k),x=o(H,x,M),C===null?E=H:C.sibling=H,C=H,k=N}if(z.done)return n(w,k),or&&sc(w,M),E;if(k===null){for(;!z.done;M++,z=S.next())z=f(w,z.value,O),z!==null&&(x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return or&&sc(w,M),E}for(k=r(w,k);!z.done;M++,z=S.next())z=p(k,w,M,z.value,O),z!==null&&(e&&z.alternate!==null&&k.delete(z.key===null?M:z.key),x=o(z,x,M),C===null?E=z:C.sibling=z,C=z);return e&&k.forEach(function(V){return t(w,V)}),or&&sc(w,M),E}function b(w,x,S,O){if(typeof S=="object"&&S!==null&&S.type===id&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Nv:e:{for(var E=S.key,C=x;C!==null;){if(C.key===E){if(E=S.type,E===id){if(C.tag===7){n(w,C.sibling),x=i(C,S.props.children),x.return=w,w=x;break e}}else if(C.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Zu&&CT(E)===C.type){n(w,C.sibling),x=i(C,S.props),x.ref=Ep(w,C,S),x.return=w,w=x;break e}n(w,C);break}else t(w,C);C=C.sibling}S.type===id?(x=kc(S.props.children,w.mode,O,S.key),x.return=w,w=x):(O=Ky(S.type,S.key,S.props,null,w.mode,O),O.ref=Ep(w,x,S),O.return=w,w=O)}return a(w);case rd:e:{for(C=S.key;x!==null;){if(x.key===C)if(x.tag===4&&x.stateNode.containerInfo===S.containerInfo&&x.stateNode.implementation===S.implementation){n(w,x.sibling),x=i(x,S.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else t(w,x);x=x.sibling}x=J_(S,w.mode,O),x.return=w,w=x}return a(w);case Zu:return C=S._init,b(w,x,C(S._payload),O)}if(e0(S))return m(w,x,S,O);if(xp(S))return v(w,x,S,O);qv(w,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,S),x.return=w,w=x):(n(w,x),x=Q_(S,w.mode,O),x.return=w,w=x),a(w)):n(w,x)}return b}var Ud=ML(!0),RL=ML(!1),b1=Fl(null),x1=null,dd=null,G4=null;function Y4(){G4=dd=x1=null}function Z4(e){var t=b1.current;nr(b1),e._currentValue=t}function fC(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sd(e,t){x1=e,G4=dd=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(ao=!0),e.firstContext=null)}function ga(e){var t=e._currentValue;if(G4!==e)if(e={context:e,memoizedValue:t,next:null},dd===null){if(x1===null)throw Error(We(308));dd=e,x1.dependencies={lanes:0,firstContext:e}}else dd=dd.next=e;return t}var yc=null;function X4(e){yc===null?yc=[e]:yc.push(e)}function DL(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,X4(t)):(n.next=i.next,i.next=n),t.interleaved=n,mu(e,r)}function mu(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Xu=!1;function Q4(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $L(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function uu(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function yl(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,vn&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,mu(e,n)}return i=r.interleaved,i===null?(t.next=t,X4(r)):(t.next=i.next,i.next=t),r.interleaved=t,mu(e,n)}function By(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}function ET(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function w1(e,t,n,r){var i=e.updateQueue;Xu=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var u=s,l=u.next;u.next=null,a===null?o=l:a.next=l,a=u;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==a&&(s===null?c.firstBaseUpdate=l:s.next=l,c.lastBaseUpdate=u))}if(o!==null){var f=i.baseState;a=0,c=l=u=null,s=o;do{var h=s.lane,p=s.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var m=e,v=s;switch(h=t,p=n,v.tag){case 1:if(m=v.payload,typeof m=="function"){f=m.call(p,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=v.payload,h=typeof m=="function"?m.call(p,f,h):m,h==null)break e;f=hr({},f,h);break e;case 2:Xu=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,h=i.effects,h===null?i.effects=[s]:h.push(s))}else p={eventTime:p,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(l=c=p,u=f):c=c.next=p,a|=h;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;h=s,s=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);if(c===null&&(u=f),i.baseState=u,i.firstBaseUpdate=l,i.lastBaseUpdate=c,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else o===null&&(i.shared.lanes=0);jc|=a,e.lanes=a,e.memoizedState=f}}function OT(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=q_.transition;q_.transition={};try{e(!1),t()}finally{Rn=n,q_.transition=r}}function XL(){return ma().memoizedState}function soe(e,t,n){var r=xl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},QL(e))JL(t,n);else if(n=DL(e,t,n,r),n!==null){var i=Wi();Wa(n,e,r,i),eF(n,t,r)}}function uoe(e,t,n){var r=xl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(QL(e))JL(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,Ga(s,a)){var u=t.interleaved;u===null?(i.next=i,X4(t)):(i.next=u.next,u.next=i),t.interleaved=i;return}}catch{}finally{}n=DL(e,t,i,r),n!==null&&(i=Wi(),Wa(n,e,r,i),eF(n,t,r))}}function QL(e){var t=e.alternate;return e===dr||t!==null&&t===dr}function JL(e,t){g0=S1=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function eF(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}var C1={readContext:ga,useCallback:Si,useContext:Si,useEffect:Si,useImperativeHandle:Si,useInsertionEffect:Si,useLayoutEffect:Si,useMemo:Si,useReducer:Si,useRef:Si,useState:Si,useDebugValue:Si,useDeferredValue:Si,useTransition:Si,useMutableSource:Si,useSyncExternalStore:Si,useId:Si,unstable_isNewReconciler:!1},loe={readContext:ga,useCallback:function(e,t){return cs().memoizedState=[e,t===void 0?null:t],e},useContext:ga,useEffect:PT,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Uy(4194308,4,KL.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Uy(4194308,4,e,t)},useInsertionEffect:function(e,t){return Uy(4,2,e,t)},useMemo:function(e,t){var n=cs();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=cs();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=soe.bind(null,dr,e),[r.memoizedState,e]},useRef:function(e){var t=cs();return e={current:e},t.memoizedState=e},useState:AT,useDebugValue:aO,useDeferredValue:function(e){return cs().memoizedState=e},useTransition:function(){var e=AT(!1),t=e[0];return e=aoe.bind(null,e[1]),cs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=dr,i=cs();if(or){if(n===void 0)throw Error(We(407));n=n()}else{if(n=t(),ri===null)throw Error(We(349));Fc&30||FL(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,PT(BL.bind(null,r,o,e),[e]),r.flags|=2048,q0(9,jL.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=cs(),t=ri.identifierPrefix;if(or){var n=iu,r=ru;n=(r&~(1<<32-Va(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=H0++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ds]=t,e[U0]=r,lF(e,t,!1,!1),t.stateNode=e;e:{switch(a=q3(n,r),n){case"dialog":Jn("cancel",e),Jn("close",e),i=r;break;case"iframe":case"object":case"embed":Jn("load",e),i=r;break;case"video":case"audio":for(i=0;iHd&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304)}else{if(!r)if(e=w1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Op(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!or)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Hd&&n!==1073741824&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=fr.current,Wn(fr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return dO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ko&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(We(156,t.tag))}function voe(e,t){switch(K4(t),t.tag){case 1:return co(t.type)&&p1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vd(),nr(lo),nr(Di),tO(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eO(t),null;case 13:if(nr(fr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(We(340));zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nr(fr),null;case 4:return Vd(),null;case 10:return Z4(t.type._context),null;case 22:case 23:return dO(),null;case 24:return null;default:return null}}var Gv=!1,Pi=!1,yoe=typeof WeakSet=="function"?WeakSet:Set,at=null;function hd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gr(e,t,r)}else n.current=null}function xC(e,t,n){try{n()}catch(r){gr(e,t,r)}}var FT=!1;function boe(e,t){if(rC=c1,e=mL(),W4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++l===i&&(s=a),h===o&&++c===r&&(u=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(iC={focusedElem:e,selectionRange:n},c1=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ma(t.type,v),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(We(163))}}catch(O){gr(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return m=FT,FT=!1,m}function m0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&xC(t,n,o)}i=i.next}while(i!==r)}}function Rx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function dF(e){var t=e.alternate;t!==null&&(e.alternate=null,dF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ds],delete t[U0],delete t[sC],delete t[toe],delete t[noe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function hF(e){return e.tag===5||e.tag===3||e.tag===4}function jT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||hF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _C(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=h1));else if(r!==4&&(e=e.child,e!==null))for(_C(e,t,n),e=e.sibling;e!==null;)_C(e,t,n),e=e.sibling}function SC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(SC(e,t,n),e=e.sibling;e!==null;)SC(e,t,n),e=e.sibling}var hi=null,Ra=!1;function Vu(e,t,n){for(n=n.child;n!==null;)pF(e,t,n),n=n.sibling}function pF(e,t,n){if(Ss&&typeof Ss.onCommitFiberUnmount=="function")try{Ss.onCommitFiberUnmount(Cx,n)}catch{}switch(n.tag){case 5:Pi||hd(n,t);case 6:var r=hi,i=Ra;hi=null,Vu(e,t,n),hi=r,Ra=i,hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?W_(e.parentNode,n):e.nodeType===1&&W_(e,n),L0(e)):W_(hi,n.stateNode));break;case 4:r=hi,i=Ra,hi=n.stateNode.containerInfo,Ra=!0,Vu(e,t,n),hi=r,Ra=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&xC(n,t,a),i=i.next}while(i!==r)}Vu(e,t,n);break;case 1:if(!Pi&&(hd(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gr(n,t,s)}Vu(e,t,n);break;case 21:Vu(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Vu(e,t,n),Pi=r):Vu(e,t,n);break;default:Vu(e,t,n)}}function BT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yoe),t.forEach(function(r){var i=Poe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*woe(r/1960))-r,10e?16:e,al===null)var r=!1;else{if(e=al,al=null,O1=0,vn&6)throw Error(We(331));var i=vn;for(vn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uCr()-cO?Pc(e,0):lO|=n),fo(e,t)}function _F(e,t){t===0&&(e.mode&1?(t=jv,jv<<=1,!(jv&130023424)&&(jv=4194304)):t=1);var n=Wi();e=mu(e,t),e!==null&&(cm(e,t,n),fo(e,n))}function Aoe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_F(e,n)}function Poe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(We(314))}r!==null&&r.delete(t),_F(e,n)}var SF;SF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lo.current)ao=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ao=!1,goe(e,t,n);ao=!!(e.flags&131072)}else ao=!1,or&&t.flags&1048576&&AL(t,v1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Uy(e,t),e=t.pendingProps;var i=Bd(t,Di.current);Sd(t,n),i=rO(null,t,r,e,i,n);var o=iO();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,co(r)?(o=!0,g1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Q4(t),i.updater=Mx,t.stateNode=i,i._reactInternals=t,hC(t,r,e,n),t=mC(null,t,r,!0,o,n)):(t.tag=0,or&&o&&H4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Uy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Toe(r),e=Ma(r,e),i){case 0:t=gC(null,t,r,e,n);break e;case 1:t=IT(null,t,r,e,n);break e;case 11:t=DT(null,t,r,e,n);break e;case 14:t=$T(null,t,r,Ma(r.type,e),n);break e}throw Error(We(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),gC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),IT(e,t,r,i,n);case 3:e:{if(aF(t),e===null)throw Error(We(387));r=t.pendingProps,o=t.memoizedState,i=o.element,DL(e,t),x1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wd(Error(We(423)),t),t=NT(e,t,r,n,i);break e}else if(r!==i){i=Wd(Error(We(424)),t),t=NT(e,t,r,n,i);break e}else for($o=vl(t.stateNode.containerInfo.firstChild),Io=t,or=!0,Na=null,n=ML(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zd(),r===i){t=vu(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return $L(t),e===null&&cC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,oC(r,i)?a=null:o!==null&&oC(r,o)&&(t.flags|=32),oF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&cC(t),null;case 13:return sF(e,t,n);case 4:return J4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ud(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),DT(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(y1,r._currentValue),r._currentValue=a,o!==null)if(Ga(o.value,a)){if(o.children===i.children&&!lo.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=uu(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),fC(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(We(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),fC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sd(t,n),i=ga(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=Ma(r,t.pendingProps),i=Ma(r.type,i),$T(e,t,r,i,n);case 15:return rF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),Uy(e,t),t.tag=1,co(r)?(e=!0,g1(t)):e=!1,Sd(t,n),eF(t,r,i),hC(t,r,i,n),mC(null,t,r,!0,e,n);case 19:return uF(e,t,n);case 22:return iF(e,t,n)}throw Error(We(156,t.tag))};function CF(e,t){return XN(e,t)}function koe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ca(e,t,n,r){return new koe(e,t,n,r)}function pO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Toe(e){if(typeof e=="function")return pO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===D4)return 11;if(e===$4)return 14}return 2}function wl(e,t){var n=e.alternate;return n===null?(n=ca(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Hy(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")pO(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case id:return kc(n.children,i,o,t);case R4:a=8,i|=8;break;case L3:return e=ca(12,n,t,i|2),e.elementType=L3,e.lanes=o,e;case F3:return e=ca(13,n,t,i),e.elementType=F3,e.lanes=o,e;case j3:return e=ca(19,n,t,i),e.elementType=j3,e.lanes=o,e;case $N:return $x(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case RN:a=10;break e;case DN:a=9;break e;case D4:a=11;break e;case $4:a=14;break e;case Zu:a=16,r=null;break e}throw Error(We(130,e==null?e:typeof e,""))}return t=ca(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function kc(e,t,n,r){return e=ca(7,e,r,t),e.lanes=n,e}function $x(e,t,n,r){return e=ca(22,e,r,t),e.elementType=$N,e.lanes=n,e.stateNode={isHidden:!1},e}function Q_(e,t,n){return e=ca(6,e,null,t),e.lanes=n,e}function J_(e,t,n){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Moe(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=D_(0),this.expirationTimes=D_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=D_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gO(e,t,n,r,i,o,a,s,u){return e=new Moe(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ca(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q4(o),e}function Roe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(PF)}catch(e){console.error(e)}}PF(),PN.exports=Ho;var Au=PN.exports;const jx=Pn(Au),Noe=mN({__proto__:null,default:jx},[Au]);var GT=Au;Uk.createRoot=GT.createRoot,Uk.hydrateRoot=GT.hydrateRoot;/** +`+o.stack}return{value:e,source:t,stack:i,digest:null}}function Z_(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function pC(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var doe=typeof WeakMap=="function"?WeakMap:Map;function nF(e,t,n){n=uu(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){O1||(O1=!0,CC=r),pC(e,t)},n}function rF(e,t,n){n=uu(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){pC(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){pC(e,t),typeof r!="function"&&(bl===null?bl=new Set([this]):bl.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function MT(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new doe;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Ooe.bind(null,e,t,n),t.then(e,e))}function RT(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function DT(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=uu(-1,1),t.tag=2,yl(n,t,1))),n.lanes|=1),e)}var hoe=Ou.ReactCurrentOwner,ao=!1;function Bi(e,t,n,r){t.child=e===null?RL(t,null,n,r):Ud(t,e.child,n,r)}function $T(e,t,n,r,i){n=n.render;var o=t.ref;return Sd(t,i),r=rO(e,t,n,r,o,i),n=iO(),e!==null&&!ao?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vu(e,t,i)):(or&&n&&H4(t),t.flags|=1,Bi(e,t,r,i),t.child)}function IT(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!pO(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,iF(e,t,o,r,i)):(e=Ky(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:j0,n(a,r)&&e.ref===t.ref)return vu(e,t,i)}return t.flags|=1,e=wl(o,r),e.ref=t.ref,e.return=t,t.child=e}function iF(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(j0(o,r)&&e.ref===t.ref)if(ao=!1,t.pendingProps=r=o,(e.lanes&i)!==0)e.flags&131072&&(ao=!0);else return t.lanes=e.lanes,vu(e,t,i)}return gC(e,t,n,r,i)}function oF(e,t,n){var r=t.pendingProps,i=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Wn(pd,ko),ko|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Wn(pd,ko),ko|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,Wn(pd,ko),ko|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,Wn(pd,ko),ko|=r;return Bi(e,t,i,n),t.child}function aF(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function gC(e,t,n,r,i){var o=co(n)?Nc:Di.current;return o=Bd(t,o),Sd(t,i),n=rO(e,t,n,r,o,i),r=iO(),e!==null&&!ao?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vu(e,t,i)):(or&&r&&H4(t),t.flags|=1,Bi(e,t,n,i),t.child)}function NT(e,t,n,r,i){if(co(n)){var o=!0;m1(t)}else o=!1;if(Sd(t,i),t.stateNode===null)Vy(e,t),tF(t,n,r),hC(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,s=t.memoizedProps;a.props=s;var u=a.context,l=n.contextType;typeof l=="object"&&l!==null?l=ga(l):(l=co(n)?Nc:Di.current,l=Bd(t,l));var c=n.getDerivedStateFromProps,f=typeof c=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==r||u!==l)&&TT(t,a,r,l),Xu=!1;var h=t.memoizedState;a.state=h,w1(t,r,a,i),u=t.memoizedState,s!==r||h!==u||lo.current||Xu?(typeof c=="function"&&(dC(t,n,c,r),u=t.memoizedState),(s=Xu||kT(t,n,s,r,h,u,l))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=l,r=s):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,$L(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ma(t.type,s),a.props=l,f=t.pendingProps,h=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=ga(u):(u=co(n)?Nc:Di.current,u=Bd(t,u));var p=n.getDerivedStateFromProps;(c=typeof p=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s!==f||h!==u)&&TT(t,a,r,u),Xu=!1,h=t.memoizedState,a.state=h,w1(t,r,a,i);var m=t.memoizedState;s!==f||h!==m||lo.current||Xu?(typeof p=="function"&&(dC(t,n,p,r),m=t.memoizedState),(l=Xu||kT(t,n,l,r,h,m,u)||!1)?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,m,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,m,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=u,r=l):(typeof a.componentDidUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return mC(e,t,n,r,o,i)}function mC(e,t,n,r,i,o){aF(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&wT(t,n,!1),vu(e,t,o);r=t.stateNode,hoe.current=t;var s=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ud(t,e.child,null,o),t.child=Ud(t,null,s,o)):Bi(e,t,s,o),t.memoizedState=r.state,i&&wT(t,n,!0),t.child}function sF(e){var t=e.stateNode;t.pendingContext?xT(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xT(e,t.context,!1),J4(e,t.containerInfo)}function LT(e,t,n,r,i){return zd(),q4(i),t.flags|=256,Bi(e,t,n,r),t.child}var vC={dehydrated:null,treeContext:null,retryLane:0};function yC(e){return{baseLanes:e,cachePool:null,transitions:null}}function uF(e,t,n){var r=t.pendingProps,i=fr.current,o=!1,a=(t.flags&128)!==0,s;if((s=a)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!==0),s?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Wn(fr,i&1),e===null)return cC(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,o?(r=t.mode,o=t.child,a={mode:"hidden",children:a},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=a):o=$x(a,r,0,null),e=kc(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=yC(n),t.memoizedState=vC,e):sO(t,a));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return poe(e,t,a,r,s,i,n);if(o){o=r.fallback,a=t.mode,i=e.child,s=i.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=wl(i,u),r.subtreeFlags=i.subtreeFlags&14680064),s!==null?o=wl(s,o):(o=kc(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,a=e.child.memoizedState,a=a===null?yC(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},o.memoizedState=a,o.childLanes=e.childLanes&~n,t.memoizedState=vC,r}return o=e.child,e=o.sibling,r=wl(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function sO(e,t){return t=$x({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Gv(e,t,n,r){return r!==null&&q4(r),Ud(t,e.child,null,n),e=sO(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function poe(e,t,n,r,i,o,a){if(n)return t.flags&256?(t.flags&=-257,r=Z_(Error(We(422))),Gv(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=$x({mode:"visible",children:r.children},i,0,null),o=kc(o,i,a,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&Ud(t,e.child,null,a),t.child.memoizedState=yC(a),t.memoizedState=vC,o);if(!(t.mode&1))return Gv(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var s=r.dgst;return r=s,o=Error(We(419)),r=Z_(o,r,void 0),Gv(e,t,a,r)}if(s=(a&e.childLanes)!==0,ao||s){if(r=ri,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==o.retryLane&&(o.retryLane=i,mu(e,i),Wa(r,e,i,-1))}return hO(),r=Z_(Error(We(421))),Gv(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=Aoe.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,$o=vl(i.nextSibling),Io=t,or=!0,Na=null,e!==null&&(sa[ua++]=ru,sa[ua++]=iu,sa[ua++]=Lc,ru=e.id,iu=e.overflow,Lc=t),t=sO(t,r.children),t.flags|=4096,t)}function FT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),fC(e.return,t,n)}function X_(e,t,n,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function lF(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Bi(e,t,r.children,n),r=fr.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&FT(e,n,t);else if(e.tag===19)FT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Wn(fr,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&_1(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),X_(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&_1(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}X_(t,!0,n,null,o);break;case"together":X_(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vy(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vu(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),jc|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(We(153));if(t.child!==null){for(e=t.child,n=wl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function goe(e,t,n){switch(t.tag){case 3:sF(t),zd();break;case 5:IL(t);break;case 1:co(t.type)&&m1(t);break;case 4:J4(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Wn(b1,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Wn(fr,fr.current&1),t.flags|=128,null):n&t.child.childLanes?uF(e,t,n):(Wn(fr,fr.current&1),e=vu(e,t,n),e!==null?e.sibling:null);Wn(fr,fr.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return lF(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Wn(fr,fr.current),r)break;return null;case 22:case 23:return t.lanes=0,oF(e,t,n)}return vu(e,t,n)}var cF,bC,fF,dF;cF=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};bC=function(){};fF=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,bc(Cs.current);var o=null;switch(n){case"input":i=z3(e,i),r=z3(e,r),o=[];break;case"select":i=hr({},i,{value:void 0}),r=hr({},r,{value:void 0}),o=[];break;case"textarea":i=W3(e,i),r=W3(e,r),o=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=p1)}K3(n,r);var a;n=null;for(l in i)if(!r.hasOwnProperty(l)&&i.hasOwnProperty(l)&&i[l]!=null)if(l==="style"){var s=i[l];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else l!=="dangerouslySetInnerHTML"&&l!=="children"&&l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&l!=="autoFocus"&&(R0.hasOwnProperty(l)?o||(o=[]):(o=o||[]).push(l,null));for(l in r){var u=r[l];if(s=i?.[l],r.hasOwnProperty(l)&&u!==s&&(u!=null||s!=null))if(l==="style")if(s){for(a in s)!s.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&s[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(o||(o=[]),o.push(l,n)),n=u;else l==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,s=s?s.__html:void 0,u!=null&&s!==u&&(o=o||[]).push(l,u)):l==="children"?typeof u!="string"&&typeof u!="number"||(o=o||[]).push(l,""+u):l!=="suppressContentEditableWarning"&&l!=="suppressHydrationWarning"&&(R0.hasOwnProperty(l)?(u!=null&&l==="onScroll"&&Jn("scroll",e),o||s===u||(o=[])):(o=o||[]).push(l,u))}n&&(o=o||[]).push("style",n);var l=o;(t.updateQueue=l)&&(t.flags|=4)}};dF=function(e,t,n,r){n!==r&&(t.flags|=4)};function Op(e,t){if(!or)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ci(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function moe(e,t,n){var r=t.pendingProps;switch(K4(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ci(t),null;case 1:return co(t.type)&&g1(),Ci(t),null;case 3:return r=t.stateNode,Vd(),nr(lo),nr(Di),tO(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Kv(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Na!==null&&(AC(Na),Na=null))),bC(e,t),Ci(t),null;case 5:eO(t);var i=bc(W0.current);if(n=t.type,e!==null&&t.stateNode!=null)fF(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(We(166));return Ci(t),null}if(e=bc(Cs.current),Kv(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ds]=t,r[U0]=o,e=(t.mode&1)!==0,n){case"dialog":Jn("cancel",r),Jn("close",r);break;case"iframe":case"object":case"embed":Jn("load",r);break;case"video":case"audio":for(i=0;i<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[ds]=t,e[U0]=r,cF(e,t,!1,!1),t.stateNode=e;e:{switch(a=q3(n,r),n){case"dialog":Jn("cancel",e),Jn("close",e),i=r;break;case"iframe":case"object":case"embed":Jn("load",e),i=r;break;case"video":case"audio":for(i=0;iHd&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304)}else{if(!r)if(e=_1(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Op(o,!0),o.tail===null&&o.tailMode==="hidden"&&!a.alternate&&!or)return Ci(t),null}else 2*Cr()-o.renderingStartTime>Hd&&n!==1073741824&&(t.flags|=128,r=!0,Op(o,!1),t.lanes=4194304);o.isBackwards?(a.sibling=t.child,t.child=a):(n=o.last,n!==null?n.sibling=a:t.child=a,o.last=a)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Cr(),t.sibling=null,n=fr.current,Wn(fr,r?n&1|2:n&1),t):(Ci(t),null);case 22:case 23:return dO(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ko&1073741824&&(Ci(t),t.subtreeFlags&6&&(t.flags|=8192)):Ci(t),null;case 24:return null;case 25:return null}throw Error(We(156,t.tag))}function voe(e,t){switch(K4(t),t.tag){case 1:return co(t.type)&&g1(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vd(),nr(lo),nr(Di),tO(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return eO(t),null;case 13:if(nr(fr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(We(340));zd()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return nr(fr),null;case 4:return Vd(),null;case 10:return Z4(t.type._context),null;case 22:case 23:return dO(),null;case 24:return null;default:return null}}var Yv=!1,Pi=!1,yoe=typeof WeakSet=="function"?WeakSet:Set,at=null;function hd(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){gr(e,t,r)}else n.current=null}function xC(e,t,n){try{n()}catch(r){gr(e,t,r)}}var jT=!1;function boe(e,t){if(rC=f1,e=vL(),W4(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,s=-1,u=-1,l=0,c=0,f=e,h=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(s=a+i),f!==o||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++l===i&&(s=a),h===o&&++c===r&&(u=a),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(iC={focusedElem:e,selectionRange:n},f1=!1,at=t;at!==null;)if(t=at,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,at=e;else for(;at!==null;){t=at;try{var m=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var v=m.memoizedProps,b=m.memoizedState,w=t.stateNode,x=w.getSnapshotBeforeUpdate(t.elementType===t.type?v:Ma(t.type,v),b);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var S=t.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(We(163))}}catch(O){gr(t,t.return,O)}if(e=t.sibling,e!==null){e.return=t.return,at=e;break}at=t.return}return m=jT,jT=!1,m}function m0(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&xC(t,n,o)}i=i.next}while(i!==r)}}function Rx(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function wC(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function hF(e){var t=e.alternate;t!==null&&(e.alternate=null,hF(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[ds],delete t[U0],delete t[sC],delete t[toe],delete t[noe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function pF(e){return e.tag===5||e.tag===3||e.tag===4}function BT(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pF(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function _C(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=p1));else if(r!==4&&(e=e.child,e!==null))for(_C(e,t,n),e=e.sibling;e!==null;)_C(e,t,n),e=e.sibling}function SC(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(SC(e,t,n),e=e.sibling;e!==null;)SC(e,t,n),e=e.sibling}var hi=null,Ra=!1;function Vu(e,t,n){for(n=n.child;n!==null;)gF(e,t,n),n=n.sibling}function gF(e,t,n){if(Ss&&typeof Ss.onCommitFiberUnmount=="function")try{Ss.onCommitFiberUnmount(Cx,n)}catch{}switch(n.tag){case 5:Pi||hd(n,t);case 6:var r=hi,i=Ra;hi=null,Vu(e,t,n),hi=r,Ra=i,hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):hi.removeChild(n.stateNode));break;case 18:hi!==null&&(Ra?(e=hi,n=n.stateNode,e.nodeType===8?W_(e.parentNode,n):e.nodeType===1&&W_(e,n),L0(e)):W_(hi,n.stateNode));break;case 4:r=hi,i=Ra,hi=n.stateNode.containerInfo,Ra=!0,Vu(e,t,n),hi=r,Ra=i;break;case 0:case 11:case 14:case 15:if(!Pi&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,a!==void 0&&(o&2||o&4)&&xC(n,t,a),i=i.next}while(i!==r)}Vu(e,t,n);break;case 1:if(!Pi&&(hd(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){gr(n,t,s)}Vu(e,t,n);break;case 21:Vu(e,t,n);break;case 22:n.mode&1?(Pi=(r=Pi)||n.memoizedState!==null,Vu(e,t,n),Pi=r):Vu(e,t,n);break;default:Vu(e,t,n)}}function zT(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new yoe),t.forEach(function(r){var i=Poe.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Pa(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=a),r&=~o}if(r=i,r=Cr()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*woe(r/1960))-r,10e?16:e,al===null)var r=!1;else{if(e=al,al=null,A1=0,vn&6)throw Error(We(331));var i=vn;for(vn|=4,at=e.current;at!==null;){var o=at,a=o.child;if(at.flags&16){var s=o.deletions;if(s!==null){for(var u=0;uCr()-cO?Pc(e,0):lO|=n),fo(e,t)}function SF(e,t){t===0&&(e.mode&1?(t=Bv,Bv<<=1,!(Bv&130023424)&&(Bv=4194304)):t=1);var n=Wi();e=mu(e,t),e!==null&&(fm(e,t,n),fo(e,n))}function Aoe(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),SF(e,n)}function Poe(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(We(314))}r!==null&&r.delete(t),SF(e,n)}var CF;CF=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||lo.current)ao=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ao=!1,goe(e,t,n);ao=!!(e.flags&131072)}else ao=!1,or&&t.flags&1048576&&PL(t,y1,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vy(e,t),e=t.pendingProps;var i=Bd(t,Di.current);Sd(t,n),i=rO(null,t,r,e,i,n);var o=iO();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,co(r)?(o=!0,m1(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Q4(t),i.updater=Mx,t.stateNode=i,i._reactInternals=t,hC(t,r,e,n),t=mC(null,t,r,!0,o,n)):(t.tag=0,or&&o&&H4(t),Bi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vy(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Toe(r),e=Ma(r,e),i){case 0:t=gC(null,t,r,e,n);break e;case 1:t=NT(null,t,r,e,n);break e;case 11:t=$T(null,t,r,e,n);break e;case 14:t=IT(null,t,r,Ma(r.type,e),n);break e}throw Error(We(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),gC(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),NT(e,t,r,i,n);case 3:e:{if(sF(t),e===null)throw Error(We(387));r=t.pendingProps,o=t.memoizedState,i=o.element,$L(e,t),w1(t,r,null,n);var a=t.memoizedState;if(r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Wd(Error(We(423)),t),t=LT(e,t,r,n,i);break e}else if(r!==i){i=Wd(Error(We(424)),t),t=LT(e,t,r,n,i);break e}else for($o=vl(t.stateNode.containerInfo.firstChild),Io=t,or=!0,Na=null,n=RL(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(zd(),r===i){t=vu(e,t,n);break e}Bi(e,t,r,n)}t=t.child}return t;case 5:return IL(t),e===null&&cC(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,a=i.children,oC(r,i)?a=null:o!==null&&oC(r,o)&&(t.flags|=32),aF(e,t),Bi(e,t,a,n),t.child;case 6:return e===null&&cC(t),null;case 13:return uF(e,t,n);case 4:return J4(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ud(t,null,r,n):Bi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),$T(e,t,r,i,n);case 7:return Bi(e,t,t.pendingProps,n),t.child;case 8:return Bi(e,t,t.pendingProps.children,n),t.child;case 12:return Bi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,a=i.value,Wn(b1,r._currentValue),r._currentValue=a,o!==null)if(Ga(o.value,a)){if(o.children===i.children&&!lo.current){t=vu(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var s=o.dependencies;if(s!==null){a=o.child;for(var u=s.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=uu(-1,n&-n),u.tag=2;var l=o.updateQueue;if(l!==null){l=l.shared;var c=l.pending;c===null?u.next=u:(u.next=c.next,c.next=u),l.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),fC(o.return,n,t),s.lanes|=n;break}u=u.next}}else if(o.tag===10)a=o.type===t.type?null:o.child;else if(o.tag===18){if(a=o.return,a===null)throw Error(We(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),fC(a,n,t),a=o.sibling}else a=o.child;if(a!==null)a.return=o;else for(a=o;a!==null;){if(a===t){a=null;break}if(o=a.sibling,o!==null){o.return=a.return,a=o;break}a=a.return}o=a}Bi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sd(t,n),i=ga(i),r=r(i),t.flags|=1,Bi(e,t,r,n),t.child;case 14:return r=t.type,i=Ma(r,t.pendingProps),i=Ma(r.type,i),IT(e,t,r,i,n);case 15:return iF(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:Ma(r,i),Vy(e,t),t.tag=1,co(r)?(e=!0,m1(t)):e=!1,Sd(t,n),tF(t,r,i),hC(t,r,i,n),mC(null,t,r,!0,e,n);case 19:return lF(e,t,n);case 22:return oF(e,t,n)}throw Error(We(156,t.tag))};function EF(e,t){return QN(e,t)}function koe(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ca(e,t,n,r){return new koe(e,t,n,r)}function pO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Toe(e){if(typeof e=="function")return pO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===D4)return 11;if(e===$4)return 14}return 2}function wl(e,t){var n=e.alternate;return n===null?(n=ca(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ky(e,t,n,r,i,o){var a=2;if(r=e,typeof e=="function")pO(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case id:return kc(n.children,i,o,t);case R4:a=8,i|=8;break;case L3:return e=ca(12,n,t,i|2),e.elementType=L3,e.lanes=o,e;case F3:return e=ca(13,n,t,i),e.elementType=F3,e.lanes=o,e;case j3:return e=ca(19,n,t,i),e.elementType=j3,e.lanes=o,e;case IN:return $x(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case DN:a=10;break e;case $N:a=9;break e;case D4:a=11;break e;case $4:a=14;break e;case Zu:a=16,r=null;break e}throw Error(We(130,e==null?e:typeof e,""))}return t=ca(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function kc(e,t,n,r){return e=ca(7,e,r,t),e.lanes=n,e}function $x(e,t,n,r){return e=ca(22,e,r,t),e.elementType=IN,e.lanes=n,e.stateNode={isHidden:!1},e}function Q_(e,t,n){return e=ca(6,e,null,t),e.lanes=n,e}function J_(e,t,n){return t=ca(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Moe(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=D_(0),this.expirationTimes=D_(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=D_(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gO(e,t,n,r,i,o,a,s,u){return e=new Moe(e,t,n,s,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ca(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Q4(o),e}function Roe(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(kF)}catch(e){console.error(e)}}kF(),kN.exports=Ho;var Au=kN.exports;const jx=Pn(Au),Noe=vN({__proto__:null,default:jx},[Au]);var YT=Au;Vk.createRoot=YT.createRoot,Vk.hydrateRoot=YT.hydrateRoot;/** * @remix-run/router v1.21.0 * * Copyright (c) Remix Software Inc. @@ -46,8 +46,8 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Foe(){return Math.random().toString(36).substr(2,8)}function ZT(e,t){return{usr:e.state,key:e.key,idx:t}}function Y0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:n,key:t&&t.key||r||Foe()})}function Uc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Pu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function joe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Y0(v.location,b,w);n(x,b),l=c()+1;let S=ZT(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Y0(v.location,b,w);n(x,b),l=c();let S=ZT(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Uc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(YT,f),u=b,()=>{i.removeEventListener(YT,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const Boe=new Set(["lazy","caseSensitive","path","id","index","children"]);function zoe(e){return e.index===!0}function k1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),zoe(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=k1(i.children,t,a,r)),u}})}function gc(e,t,n){return n===void 0&&(n="/"),Ky(e,t,n,!1)}function Ky(e,t,n,r){let i=typeof t=="string"?Pu(t):t,o=Mh(i.pathname||"/",n);if(o==null)return null;let a=kF(e);Voe(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),kF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Zoe(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of TF(o.path))i(o,a,u)}),t}function TF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=TF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Voe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Xoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Woe=/^:[\w-]+$/,Hoe=3,Koe=2,qoe=1,Goe=10,Yoe=-2,XT=e=>e==="*";function Zoe(e,t){let n=e.split("/"),r=n.length;return n.some(XT)&&(r+=Yoe),t&&(r+=Koe),n.filter(i=>!XT(i)).reduce((i,o)=>i+(Woe.test(o)?Hoe:o===""?qoe:Goe),r)}function Xoe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Qoe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Joe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function eae(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function tae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Pu(e):e;return{pathname:n?n.startsWith("/")?n:nae(n,t):t,search:iae(r),hash:oae(i)}}function nae(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function eS(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function MF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bO(e,t){let n=MF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xO(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Pu(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),eS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),eS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),eS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=tae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),rae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class T1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Bx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const RF=["post","put","patch","delete"],aae=new Set(RF),sae=["get",...RF],uae=new Set(sae),lae=new Set([301,302,303,307,308]),cae=new Set([307,308]),tS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),DF="remix-router-transitions";function hae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ae=e.detectErrorBoundary;i=le=>({hasErrorBoundary:ae(le)})}else i=dae;let o={},a=k1(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||vae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=gc(a,e.history.location,u),S=null;if(x==null&&!c){let ae=ro(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=lM(a);x=le,S={[xe.id]:ae}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(ae=>ae.route.lazy))O=!1;else if(!x.some(ae=>ae.route.loader))O=!0;else if(f.v7_partialHydration){let ae=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(T=>le[T.route.id]!==void 0);O=x.slice(0,xe+1).every(T=>!kC(T.route,ae,le))}else O=x.every(xe=>!kC(xe.route,ae,le))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let ae=Xr(null,a,e.history.location.pathname);ae.active&&ae.matches&&(x=ae.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:tS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,N,z=!1,H=new Map,V=null,ne=!1,Z=!1,G=[],q=new Set,W=new Map,j=0,K=-1,Y=new Map,oe=new Set,Q=new Map,J=new Map,ue=new Set,de=new Map,Se=new Map,me;function Ze(){if(h=e.history.listen(ae=>{let{action:le,location:xe,delta:T}=ae;if(me){me(),me=void 0;return}zc(Se.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&T!=null){let $=new Promise(A=>{me=A});e.history.go(T*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set(D,Pp),$e({blockers:A})}});return}return Nt(le,xe)}),n){Mae(t,H);let ae=()=>Rae(t,H);t.addEventListener("pagehide",ae),V=()=>t.removeEventListener("pagehide",ae)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function Ae(){h&&h(),V&&V(),p.clear(),N&&N.abort(),C.fetchers.forEach((ae,le)=>br(le)),C.blockers.forEach((ae,le)=>yo(le))}function Le(ae){return p.add(ae),()=>p.delete(ae)}function $e(ae,le){le===void 0&&(le={}),C=ir({},C,ae);let xe=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(ue.has($)?T.push($):xe.push($))}),[...p].forEach(D=>D(C,{deletedFetchers:T,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),f.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),T.forEach(D=>br(D)))}function be(ae,le,xe){var T,D;let{flushSync:$}=xe===void 0?{}:xe,A=C.actionData!=null&&C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=ae.state)==null?void 0:T._isRedirect)!==!0,L;le.actionData?Object.keys(le.actionData).length>0?L=le.actionData:L=null:A?L=C.actionData:L=null;let ee=le.loaderData?sM(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,re=C.blockers;re.size>0&&(re=new Map(re),re.forEach((Be,He)=>re.set(He,Pp)));let he=M===!0||C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&((D=ae.state)==null?void 0:D._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(ae,ae.state):k===kr.Replace&&e.history.replace(ae,ae.state));let Ce;if(k===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(ae.pathname)?Ce={currentLocation:C.location,nextLocation:ae}:H.has(ae.pathname)&&(Ce={currentLocation:ae,nextLocation:C.location})}else if(z){let Be=H.get(C.location.pathname);Be?Be.add(ae.pathname):(Be=new Set([ae.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:ae}}$e(ir({},le,{actionData:L,loaderData:ee,historyAction:k,location:ae,initialized:!0,navigation:tS,revalidation:"idle",restoreScrollPosition:ur(ae,le.matches||C.matches),preventScrollReset:he,blockers:re}),{viewTransitionOpts:Ce,flushSync:$===!0}),k=kr.Pop,M=!1,z=!1,ne=!1,Z=!1,G=[]}async function yt(ae,le){if(typeof ae=="number"){e.history.go(ae);return}let xe=PC(C.location,C.matches,u,f.v7_prependBasename,ae,f.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:T,submission:D,error:$}=JT(f.v7_normalizeFormMethod,!1,xe,le),A=C.location,L=Y0(C.location,T,le&&le.state);L=ir({},L,e.history.encodeLocation(L));let ee=le&&le.replace!=null?le.replace:void 0,re=kr.Push;ee===!0?re=kr.Replace:ee===!1||D!=null&&Da(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(re=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:A,nextLocation:L,historyAction:re});if(Be){xi(Be,{state:"blocked",location:L,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),yt(ae,le)},reset(){let He=new Map(C.blockers);He.set(Be,Pp),$e({blockers:He})}});return}return await Nt(re,L,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(xn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:z===!0})}}async function Nt(ae,le,xe){N&&N.abort(),N=null,k=ae,ne=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,z=(xe&&xe.enableViewTransition)===!0;let T=s||a,D=xe&&xe.overrideNavigation,$=gc(T,le,u),A=(xe&&xe.flushSync)===!0,L=Xr($,T,le.pathname);if(L.active&&L.matches&&($=L.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=Sa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&Sae(C.location,le)&&!(xe&&xe.submission&&Da(xe.submission.formMethod))){be(le,{matches:$},{flushSync:A});return}N=new AbortController;let ee=Ff(e.history,le,N.signal,xe&&xe.submission),re;if(xe&&xe.pendingError)re=[mc($).route.id,{type:In.error,error:xe.pendingError}];else if(xe&&xe.submission&&Da(xe.submission.formMethod)){let ct=await yn(ee,le,xe.submission,$,L.active,{replace:xe.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(Mo(rt)&&Bx(rt.error)&&rt.error.status===404){N=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,re=ct.pendingActionResult,D=nS(le,xe.submission),A=!1,L.active=!1,ee=Ff(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await nn(ee,le,$,L.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,A,re);he||(N=null,be(le,ir({matches:Ce||$},uM(re),{loaderData:Be,errors:He})))}async function yn(ae,le,xe,T,D,$){$===void 0&&($={}),xn();let A=kae(le,xe);if($e({navigation:A},{flushSync:$.flushSync===!0}),D){let re=await bo(T,le.pathname,ae.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){let he=mc(re.partialMatches).route.id;return{matches:re.partialMatches,pendingActionResult:[he,{type:In.error,error:re.error}]}}else if(re.matches)T=re.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=Sa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:In.error,error:Ce}]}}}let L,ee=r0(T,le);if(!ee.route.action&&!ee.route.lazy)L={type:In.error,error:ro(405,{method:ae.method,pathname:le.pathname,routeId:ee.route.id})};else if(L=(await nt("action",C,ae,[ee],T,null))[ee.route.id],ae.signal.aborted)return{shortCircuited:!0};if(xc(L)){let re;return $&&$.replace!=null?re=$.replace:re=iM(L.response.headers.get("Location"),new URL(ae.url),u)===C.location.pathname+C.location.search,await ke(ae,L,!0,{submission:xe,replace:re}),{shortCircuited:!0}}if(sl(L))throw ro(400,{type:"defer-action"});if(Mo(L)){let re=mc(T,ee.route.id);return($&&$.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[re.route.id,L]}}return{matches:T,pendingActionResult:[ee.route.id,L]}}async function nn(ae,le,xe,T,D,$,A,L,ee,re,he){let Ce=D||nS(le,$),Be=$||A||fM(Ce),He=!ne&&(!f.v7_partialHydration||!ee);if(T){if(He){let Ke=ie(he);$e(ir({navigation:Ce},Ke!==void 0?{actionData:Ke}:{}),{flushSync:re})}let Fe=await bo(xe,le.pathname,ae.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let Ke=mc(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Ke]:Fe.error}}}else if(Fe.matches)xe=Fe.matches;else{let{error:Ke,notFoundMatches:Ge,route:ve}=Sa(le.pathname);return{matches:Ge,loaderData:{},errors:{[ve.id]:Ke}}}}let ct=s||a,[Ne,rt]=tM(e.history,C,xe,Be,le,f.v7_partialHydration&&ee===!0,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,ct,u,he);if(_t(Fe=>!(xe&&xe.some(Ke=>Ke.route.id===Fe))||Ne&&Ne.some(Ke=>Ke.route.id===Fe)),K=++j,Ne.length===0&&rt.length===0){let Fe=bi();return be(le,ir({matches:xe,loaderData:{},errors:he&&Mo(he[1])?{[he[0]]:he[1].error}:null},uM(he),Fe?{fetchers:new Map(C.fetchers)}:{}),{flushSync:re}),{shortCircuited:!0}}if(He){let Fe={};if(!T){Fe.navigation=Ce;let Ke=ie(he);Ke!==void 0&&(Fe.actionData=Ke)}rt.length>0&&(Fe.fetchers=pe(rt)),$e(Fe,{flushSync:re})}rt.forEach(Fe=>{sr(Fe.key),Fe.controller&&W.set(Fe.key,Fe.controller)});let bt=()=>rt.forEach(Fe=>sr(Fe.key));N&&N.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,xe,Ne,rt,ae);if(ae.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",bt),rt.forEach(Fe=>W.delete(Fe.key));let ht=Xv(Ot);if(ht)return await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};if(ht=Xv(gt),ht)return oe.add(ht.key),await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=aM(C,xe,Ot,he,rt,gt,de);de.forEach((Fe,Ke)=>{Fe.subscribe(Ge=>{(Ge||Fe.done)&&de.delete(Ke)})}),f.v7_partialHydration&&ee&&C.errors&&(wt=ir({},C.errors,wt));let Je=bi(),ut=Rr(K),Qe=Je||ut||rt.length>0;return ir({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function ie(ae){if(ae&&!Mo(ae[1]))return{[ae[0]]:ae[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(ae){return ae.forEach(le=>{let xe=C.fetchers.get(le.key),T=kp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,T)}),new Map(C.fetchers)}function ye(ae,le,xe,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(ae);let D=(T&&T.flushSync)===!0,$=s||a,A=PC(C.location,C.matches,u,f.v7_prependBasename,xe,f.v7_relativeSplatPath,le,T?.relative),L=gc($,A,u),ee=Xr(L,$,A);if(ee.active&&ee.matches&&(L=ee.matches),!L){wn(ae,le,ro(404,{pathname:A}),{flushSync:D});return}let{path:re,submission:he,error:Ce}=JT(f.v7_normalizeFormMethod,!0,A,T);if(Ce){wn(ae,le,Ce,{flushSync:D});return}let Be=r0(L,re),He=(T&&T.preventScrollReset)===!0;if(he&&Da(he.formMethod)){Ue(ae,le,re,Be,L,ee.active,D,He,he);return}Q.set(ae,{routeId:le,path:re}),je(ae,le,re,Be,L,ee.active,D,He,he)}async function Ue(ae,le,xe,T,D,$,A,L,ee){xn(),Q.delete(ae);function re(ge){if(!ge.route.action&&!ge.route.lazy){let De=ro(405,{method:ee.formMethod,pathname:xe,routeId:le});return wn(ae,le,De,{flushSync:A}),!0}return!1}if(!$&&re(T))return;let he=C.fetchers.get(ae);Ht(ae,Tae(ee,he),{flushSync:A});let Ce=new AbortController,Be=Ff(e.history,xe,Ce.signal,ee);if($){let ge=await bo(D,xe,Be.signal);if(ge.type==="aborted")return;if(ge.type==="error"){wn(ae,le,ge.error,{flushSync:A});return}else if(ge.matches){if(D=ge.matches,T=r0(D,xe),re(T))return}else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,Ce);let He=j,Ne=(await nt("action",C,Be,[T],D,ae))[T.route.id];if(Be.signal.aborted){W.get(ae)===Ce&&W.delete(ae);return}if(f.v7_fetcherPersist&&ue.has(ae)){if(xc(Ne)||Mo(Ne)){Ht(ae,qu(void 0));return}}else{if(xc(Ne))if(W.delete(ae),K>He){Ht(ae,qu(void 0));return}else return oe.add(ae),Ht(ae,kp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:L});if(Mo(Ne)){wn(ae,le,Ne.error);return}}if(sl(Ne))throw ro(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Ff(e.history,rt,Ce.signal),Ot=s||a,gt=C.navigation.state!=="idle"?gc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++j;Y.set(ae,ht);let xt=kp(ee,Ne.data);C.fetchers.set(ae,xt);let[wt,Je]=tM(e.history,C,gt,ee,rt,!1,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,Ot,u,[T.route.id,Ne]);Je.filter(ge=>ge.key!==ae).forEach(ge=>{let De=ge.key,Pe=C.fetchers.get(De),Te=kp(void 0,Pe?Pe.data:void 0);C.fetchers.set(De,Te),sr(De),ge.controller&&W.set(De,ge.controller)}),$e({fetchers:new Map(C.fetchers)});let ut=()=>Je.forEach(ge=>sr(ge.key));Ce.signal.addEventListener("abort",ut);let{loaderResults:Qe,fetcherResults:Fe}=await mt(C,gt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",ut),Y.delete(ae),W.delete(ae),Je.forEach(ge=>W.delete(ge.key));let Ke=Xv(Qe);if(Ke)return ke(bt,Ke.result,!1,{preventScrollReset:L});if(Ke=Xv(Fe),Ke)return oe.add(Ke.key),ke(bt,Ke.result,!1,{preventScrollReset:L});let{loaderData:Ge,errors:ve}=aM(C,gt,Qe,void 0,Je,Fe,de);if(C.fetchers.has(ae)){let ge=qu(Ne.data);C.fetchers.set(ae,ge)}Rr(ht),C.navigation.state==="loading"&&ht>K?(fn(k,"Expected pending action"),N&&N.abort(),be(C.navigation.location,{matches:gt,loaderData:Ge,errors:ve,fetchers:new Map(C.fetchers)})):($e({errors:ve,loaderData:sM(C.loaderData,Ge,gt,ve),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(ae,le,xe,T,D,$,A,L,ee){let re=C.fetchers.get(ae);Ht(ae,kp(ee,re?re.data:void 0),{flushSync:A});let he=new AbortController,Ce=Ff(e.history,xe,he.signal);if($){let Ne=await bo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){wn(ae,le,Ne.error,{flushSync:A});return}else if(Ne.matches)D=Ne.matches,T=r0(D,xe);else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,he);let Be=j,ct=(await nt("loader",C,Ce,[T],D,ae))[T.route.id];if(sl(ct)&&(ct=await _O(ct,Ce.signal,!0)||ct),W.get(ae)===he&&W.delete(ae),!Ce.signal.aborted){if(ue.has(ae)){Ht(ae,qu(void 0));return}if(xc(ct))if(K>Be){Ht(ae,qu(void 0));return}else{oe.add(ae),await ke(Ce,ct,!1,{preventScrollReset:L});return}if(Mo(ct)){wn(ae,le,ct.error);return}fn(!sl(ct),"Unhandled fetcher deferred data"),Ht(ae,qu(ct.data))}}async function ke(ae,le,xe,T){let{submission:D,fetcherSubmission:$,preventScrollReset:A,replace:L}=T===void 0?{}:T;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");fn(ee,"Expected a Location header on the redirect Response"),ee=iM(ee,new URL(ae.url),u);let re=Y0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(wO.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Mh(rt.pathname,u)==null}if(Ne){L?t.location.replace(ee):t.location.assign(ee);return}}N=null;let he=L===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=fM(C.navigation));let ct=D||$;if(cae.has(le.response.status)&&ct&&Da(ct.formMethod))await Nt(he,re,{submission:ir({},ct,{formAction:ee}),preventScrollReset:A||M,enableViewTransition:xe?z:void 0});else{let Ne=nS(re,D);await Nt(he,re,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:A||M,enableViewTransition:xe?z:void 0})}}async function nt(ae,le,xe,T,D,$){let A,L={};try{A=await yae(l,ae,le,xe,T,D,$,o,i)}catch(ee){return T.forEach(re=>{L[re.route.id]={type:In.error,error:ee}}),L}for(let[ee,re]of Object.entries(A))if(Cae(re)){let he=re.result;L[ee]={type:In.redirect,response:wae(he,xe,ee,D,u,f.v7_relativeSplatPath)}}else L[ee]=await xae(re);return L}async function mt(ae,le,xe,T,D){let $=ae.matches,A=nt("loader",ae,D,xe,le,null),L=Promise.all(T.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",ae,Ff(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:In.error,error:ro(404,{pathname:he.path})}})})),ee=await A,re=(await L).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Aae(le,ee,D.signal,$,ae.loaderData),Pae(le,re,T)]),{loaderResults:ee,fetcherResults:re}}function xn(){Z=!0,G.push(..._t()),Q.forEach((ae,le)=>{W.has(le)&&q.add(le),sr(le)})}function Ht(ae,le,xe){xe===void 0&&(xe={}),C.fetchers.set(ae,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function wn(ae,le,xe,T){T===void 0&&(T={});let D=mc(C.matches,le);br(ae),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(ae){return f.v7_fetcherPersist&&(J.set(ae,(J.get(ae)||0)+1),ue.has(ae)&&ue.delete(ae)),C.fetchers.get(ae)||fae}function br(ae){let le=C.fetchers.get(ae);W.has(ae)&&!(le&&le.state==="loading"&&Y.has(ae))&&sr(ae),Q.delete(ae),Y.delete(ae),oe.delete(ae),ue.delete(ae),q.delete(ae),C.fetchers.delete(ae)}function yi(ae){if(f.v7_fetcherPersist){let le=(J.get(ae)||0)-1;le<=0?(J.delete(ae),ue.add(ae)):J.set(ae,le)}else br(ae);$e({fetchers:new Map(C.fetchers)})}function sr(ae){let le=W.get(ae);le&&(le.abort(),W.delete(ae))}function si(ae){for(let le of ae){let xe=Ii(le),T=qu(xe.data);C.fetchers.set(le,T)}}function bi(){let ae=[],le=!1;for(let xe of oe){let T=C.fetchers.get(xe);fn(T,"Expected fetcher: "+xe),T.state==="loading"&&(oe.delete(xe),ae.push(xe),le=!0)}return si(ae),le}function Rr(ae){let le=[];for(let[xe,T]of Y)if(T0}function Xi(ae,le){let xe=C.blockers.get(ae)||Pp;return Se.get(ae)!==le&&Se.set(ae,le),xe}function yo(ae){C.blockers.delete(ae),Se.delete(ae)}function xi(ae,le){let xe=C.blockers.get(ae)||Pp;fn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let T=new Map(C.blockers);T.set(ae,le),$e({blockers:T})}function Dr(ae){let{currentLocation:le,nextLocation:xe,historyAction:T}=ae;if(Se.size===0)return;Se.size>1&&zc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,A]=D[D.length-1],L=C.blockers.get($);if(!(L&&L.state==="proceeding")&&A({currentLocation:le,nextLocation:xe,historyAction:T}))return $}function Sa(ae){let le=ro(404,{pathname:ae}),xe=s||a,{matches:T,route:D}=lM(xe);return _t(),{notFoundMatches:T,route:D,error:le}}function _t(ae){let le=[];return de.forEach((xe,T)=>{(!ae||ae(T))&&(xe.cancel(),le.push(T),de.delete(T))}),le}function hn(ae,le,xe){if(m=ae,b=le,v=xe||null,!w&&C.navigation===tS){w=!0;let T=ur(C.location,C.matches);T!=null&&$e({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(ae,le){return v&&v(ae,le.map(T=>Uoe(T,C.loaderData)))||ae.key}function qn(ae,le){if(m&&b){let xe=_n(ae,le);m[xe]=b()}}function ur(ae,le){if(m){let xe=_n(ae,le),T=m[xe];if(typeof T=="number")return T}return null}function Xr(ae,le,xe){if(c)if(ae){if(Object.keys(ae[0].params).length>0)return{active:!0,matches:Ky(le,xe,u,!0)}}else return{active:!0,matches:Ky(le,xe,u,!0)||[]};return{active:!1,matches:null}}async function bo(ae,le,xe){if(!c)return{type:"success",matches:ae};let T=ae;for(;;){let D=s==null,$=s||a,A=o;try{await c({path:le,matches:T,patch:(re,he)=>{xe.aborted||rM(re,he,$,A,i)}})}catch(re){return{type:"error",error:re,partialMatches:T}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let L=gc($,le,u);if(L)return{type:"success",matches:L};let ee=Ky($,le,u,!0);if(!ee||T.length===ee.length&&T.every((re,he)=>re.route.id===ee[he].route.id))return{type:"success",matches:null};T=ee}}function Zl(ae){o={},s=k1(ae,i,void 0,o)}function Sf(ae,le){let xe=s==null;rM(ae,le,s||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ye,revalidate:lt,createHref:ae=>e.history.createHref(ae),encodeLocation:ae=>e.history.encodeLocation(ae),getFetcher:Ii,deleteFetcher:yi,dispose:Ae,getBlocker:Xi,deleteBlocker:yo,patchRoutes:Sf,_internalFetchControllers:W,_internalActiveDeferreds:de,_internalSetRoutes:Zl},E}function pae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function PC(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=xO(i||".",bO(u,o),Mh(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=SO(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Uc(c)}function JT(e,t,n,r){if(!r||!pae(r))return{path:n};if(r.formMethod&&!Oae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=NF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Da(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` -`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Da(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}fn(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=TC(r.formData),l=r.formData;else if(r.body instanceof FormData)u=TC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=oM(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=oM(u)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Da(c.formMethod))return{path:n,submission:c};let f=Pu(n);return t&&f.search&&SO(f.search)&&u.append("index",""),f.search="?"+u,{path:Uc(f),submission:c}}function eM(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function tM(e,t,n,r,i,o,a,s,u,l,c,f,h,p,m,v){let b=v?Mo(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=eM(n,Object.keys(t.errors)[0],!0):v&&Mo(v[1])&&(S=eM(n,v[0]));let O=v?v[1].statusCode:void 0,E=a&&O&&O>=400,C=S.filter((M,N)=>{let{route:z}=M;if(z.lazy)return!0;if(z.loader==null)return!1;if(o)return kC(z,t.loaderData,t.errors);if(gae(t.loaderData,t.matches[N],M)||u.some(ne=>ne===M.route.id))return!0;let H=t.matches[N],V=M;return nM(M,ir({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:V.params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||$F(H,V)}))}),k=[];return f.forEach((M,N)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(N))return;let z=gc(p,M.path,m);if(!z){k.push({key:N,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(N),V=r0(z,M.path),ne=!1;h.has(N)?ne=!1:l.has(N)?(l.delete(N),ne=!0):H&&H.state!=="idle"&&H.data===void 0?ne=s:ne=nM(V,ir({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s})),ne&&k.push({key:N,routeId:M.routeId,path:M.path,matches:z,match:V,controller:new AbortController})}),[C,k]}function kC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function gae(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function $F(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function nM(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function rM(e,t,n,r,i){var o;let a;if(e){let l=r[e];fn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let s=t.filter(l=>!a.some(c=>IF(l,c))),u=k1(s,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...u)}function IF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>IF(n,o))}):!1}async function mae(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];fn(i,"No route found in manifest");let o={};for(let a in r){let u=i[a]!==void 0&&a!=="hasErrorBoundary";zc(!u,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!Boe.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,ir({},t(i),{lazy:void 0}))}async function vae(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function yae(e,t,n,r,i,o,a,s,u,l){let c=o.map(p=>p.route.lazy?mae(p.route,u,s):void 0),f=o.map((p,m)=>{let v=c[m],b=i.some(x=>x.route.id===p.route.id);return ir({},p,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?bae(t,r,p,v,x,l):Promise.resolve({type:In.data,result:void 0}))})}),h=await e({matches:f,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function bae(e,t,n,r,i,o){let a,s,u=l=>{let c,f=new Promise((m,v)=>c=v);s=()=>c(),t.signal.addEventListener("abort",s);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let l=n.route[e];if(r)if(l){let c,[f]=await Promise.all([u(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=f}else if(await r,l=n.route[e],l)a=await u(l);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw ro(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:In.data,result:void 0};else if(l)a=await u(l);else{let c=new URL(t.url),f=c.pathname+c.search;throw ro(404,{pathname:f})}fn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:In.error,result:l}}finally{s&&t.signal.removeEventListener("abort",s)}return a}async function xae(e){let{result:t,type:n}=e;if(LF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:In.error,error:c}}return n===In.error?{type:In.error,error:new T1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:In.data,data:l,statusCode:t.status,headers:t.headers}}if(n===In.error){if(cM(t)){var r;if(t.data instanceof Error){var i;return{type:In.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new T1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:In.error,error:t,statusCode:Bx(t)?t.status:void 0}}if(Eae(t)){var o,a;return{type:In.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(cM(t)){var s,u;return{type:In.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:In.data,data:t}}function wae(e,t,n,r,i,o){let a=e.headers.get("Location");if(fn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!wO.test(a)){let s=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=PC(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function iM(e,t,n){if(wO.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mh(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Ff(e,t,n,r){let i=e.createURL(NF(t)).toString(),o={signal:n};if(r&&Da(r.formMethod)){let{formMethod:a,formEncType:s}=r;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=TC(r.formData):o.body=r.formData}return new Request(i,o)}function TC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function oM(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _ae(e,t,n,r,i){let o={},a=null,s,u=!1,l={},c=n&&Mo(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(fn(!xc(p),"Cannot handle redirect results in processLoaderData"),Mo(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),a=a||{};{let v=mc(e,h);a[v.route.id]==null&&(a[v.route.id]=m)}o[h]=void 0,u||(u=!0,s=Bx(p.error)?p.error.status:500),p.headers&&(l[h]=p.headers)}else sl(p)?(r.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function aM(e,t,n,r,i,o,a){let{loaderData:s,errors:u}=_ae(t,n,r,a);return i.forEach(l=>{let{key:c,match:f,controller:h}=l,p=o[c];if(fn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Mo(p)){let m=mc(e.matches,f?.route.id);u&&u[m.route.id]||(u=ir({},u,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(xc(p))fn(!1,"Unhandled fetcher revalidation redirect");else if(sl(p))fn(!1,"Unhandled fetcher deferred data");else{let m=qu(p.data);e.fetchers.set(c,m)}}),{loaderData:s,errors:u}}function sM(e,t,n,r){let i=ir({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function uM(e){return e?Mo(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function mc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function lM(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ro(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new T1(e||500,s,new Error(u),!0)}function Xv(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(xc(i))return{key:r,result:i}}}function NF(e){let t=typeof e=="string"?Pu(e):e;return Uc(ir({},t,{hash:""}))}function Sae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cae(e){return LF(e.result)&&lae.has(e.result.status)}function sl(e){return e.type===In.deferred}function Mo(e){return e.type===In.error}function xc(e){return(e&&e.type)===In.redirect}function cM(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Eae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function LF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Oae(e){return uae.has(e.toLowerCase())}function Da(e){return aae.has(e.toLowerCase())}async function Aae(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===s);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),f=c!=null&&!$F(c,l)&&(i&&i[l.route.id])!==void 0;sl(u)&&f&&await _O(u,n,!1).then(h=>{h&&(t[s]=h)})}}async function Pae(e,t,n){for(let r=0;rl?.route.id===o)&&sl(s)&&(fn(a,"Expected an AbortController for revalidating fetcher deferred result"),await _O(s,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function _O(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:In.data,data:e.deferredData.unwrappedData}}catch(i){return{type:In.error,error:i}}return{type:In.data,data:e.deferredData.data}}}function SO(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function r0(e,t){let n=typeof t=="string"?Pu(t).search:t.search;if(e[e.length-1].route.index&&SO(n||""))return e[e.length-1];let r=MF(e);return r[r.length-1]}function fM(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function nS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function qu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mae(e,t){try{let n=e.sessionStorage.getItem(DF);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Rae(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(DF,JSON.stringify(n))}catch(r){zc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** + */function ir(){return ir=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function zc(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Foe(){return Math.random().toString(36).substr(2,8)}function XT(e,t){return{usr:e.state,key:e.key,idx:t}}function Y0(e,t,n,r){return n===void 0&&(n=null),ir({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Pu(t):t,{state:n,key:t&&t.key||r||Foe()})}function Uc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Pu(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function joe(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,a=i.history,s=kr.Pop,u=null,l=c();l==null&&(l=0,a.replaceState(ir({},a.state,{idx:l}),""));function c(){return(a.state||{idx:null}).idx}function f(){s=kr.Pop;let b=c(),w=b==null?null:b-l;l=b,u&&u({action:s,location:v.location,delta:w})}function h(b,w){s=kr.Push;let x=Y0(v.location,b,w);n(x,b),l=c()+1;let S=XT(x,l),O=v.createHref(x);try{a.pushState(S,"",O)}catch(E){if(E instanceof DOMException&&E.name==="DataCloneError")throw E;i.location.assign(O)}o&&u&&u({action:s,location:v.location,delta:1})}function p(b,w){s=kr.Replace;let x=Y0(v.location,b,w);n(x,b),l=c();let S=XT(x,l),O=v.createHref(x);a.replaceState(S,"",O),o&&u&&u({action:s,location:v.location,delta:0})}function m(b){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof b=="string"?b:Uc(b);return x=x.replace(/ $/,"%20"),fn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return s},get location(){return e(i,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return i.addEventListener(ZT,f),u=b,()=>{i.removeEventListener(ZT,f),u=null}},createHref(b){return t(i,b)},createURL:m,encodeLocation(b){let w=m(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:h,replace:p,go(b){return a.go(b)}};return v}var In;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(In||(In={}));const Boe=new Set(["lazy","caseSensitive","path","id","index","children"]);function zoe(e){return e.index===!0}function T1(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,o)=>{let a=[...n,String(o)],s=typeof i.id=="string"?i.id:a.join("-");if(fn(i.index!==!0||!i.children,"Cannot specify children on an index route"),fn(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),zoe(i)){let u=ir({},i,t(i),{id:s});return r[s]=u,u}else{let u=ir({},i,t(i),{id:s,children:void 0});return r[s]=u,i.children&&(u.children=T1(i.children,t,a,r)),u}})}function gc(e,t,n){return n===void 0&&(n="/"),qy(e,t,n,!1)}function qy(e,t,n,r){let i=typeof t=="string"?Pu(t):t,o=Mh(i.pathname||"/",n);if(o==null)return null;let a=TF(e);Voe(a);let s=null;for(let u=0;s==null&&u{let u={relativePath:s===void 0?o.path||"":s,caseSensitive:o.caseSensitive===!0,childrenIndex:a,route:o};u.relativePath.startsWith("/")&&(fn(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let l=lu([r,u.relativePath]),c=n.concat(u);o.children&&o.children.length>0&&(fn(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+l+'".')),TF(o.children,t,c,l)),!(o.path==null&&!o.index)&&t.push({path:l,score:Zoe(l,o.index),routesMeta:c})};return e.forEach((o,a)=>{var s;if(o.path===""||!((s=o.path)!=null&&s.includes("?")))i(o,a);else for(let u of MF(o.path))i(o,a,u)}),t}function MF(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let a=MF(r.join("/")),s=[];return s.push(...a.map(u=>u===""?o:[o,u].join("/"))),i&&s.push(...a),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function Voe(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Xoe(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Woe=/^:[\w-]+$/,Hoe=3,Koe=2,qoe=1,Goe=10,Yoe=-2,QT=e=>e==="*";function Zoe(e,t){let n=e.split("/"),r=n.length;return n.some(QT)&&(r+=Yoe),t&&(r+=Koe),n.filter(i=>!QT(i)).reduce((i,o)=>i+(Woe.test(o)?Hoe:o===""?qoe:Goe),r)}function Xoe(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function Qoe(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},o="/",a=[];for(let s=0;s{let{paramName:h,isOptional:p}=c;if(h==="*"){let v=s[f]||"";a=o.slice(0,o.length-v.length).replace(/(.)\/+$/,"$1")}const m=s[f];return p&&!m?l[h]=void 0:l[h]=(m||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:a,pattern:e}}function Joe(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),zc(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,s,u)=>(r.push({paramName:s,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function eae(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return zc(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mh(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function tae(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Pu(e):e;return{pathname:n?n.startsWith("/")?n:nae(n,t):t,search:iae(r),hash:oae(i)}}function nae(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function eS(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function RF(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function bO(e,t){let n=RF(e);return t?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xO(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Pu(e):(i=ir({},e),fn(!i.pathname||!i.pathname.includes("?"),eS("?","pathname","search",i)),fn(!i.pathname||!i.pathname.includes("#"),eS("#","pathname","hash",i)),fn(!i.search||!i.search.includes("#"),eS("#","search","hash",i)));let o=e===""||i.pathname==="",a=o?"/":i.pathname,s;if(a==null)s=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let h=a.split("/");for(;h[0]==="..";)h.shift(),f-=1;i.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=tae(i,s),l=a&&a!=="/"&&a.endsWith("/"),c=(o||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(l||c)&&(u.pathname+="/"),u}const lu=e=>e.join("/").replace(/\/\/+/g,"/"),rae=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),iae=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,oae=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class M1{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Bx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const DF=["post","put","patch","delete"],aae=new Set(DF),sae=["get",...DF],uae=new Set(sae),lae=new Set([301,302,303,307,308]),cae=new Set([307,308]),tS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},fae={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Pp={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},wO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dae=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),$F="remix-router-transitions";function hae(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;fn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let ae=e.detectErrorBoundary;i=le=>({hasErrorBoundary:ae(le)})}else i=dae;let o={},a=T1(e.routes,i,void 0,o),s,u=e.basename||"/",l=e.dataStrategy||vae,c=e.patchRoutesOnNavigation,f=ir({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),h=null,p=new Set,m=null,v=null,b=null,w=e.hydrationData!=null,x=gc(a,e.history.location,u),S=null;if(x==null&&!c){let ae=ro(404,{pathname:e.history.location.pathname}),{matches:le,route:xe}=cM(a);x=le,S={[xe.id]:ae}}x&&!e.hydrationData&&Xr(x,a,e.history.location.pathname).active&&(x=null);let O;if(x)if(x.some(ae=>ae.route.lazy))O=!1;else if(!x.some(ae=>ae.route.loader))O=!0;else if(f.v7_partialHydration){let ae=e.hydrationData?e.hydrationData.loaderData:null,le=e.hydrationData?e.hydrationData.errors:null;if(le){let xe=x.findIndex(T=>le[T.route.id]!==void 0);O=x.slice(0,xe+1).every(T=>!kC(T.route,ae,le))}else O=x.every(xe=>!kC(xe.route,ae,le))}else O=e.hydrationData!=null;else if(O=!1,x=[],f.v7_partialHydration){let ae=Xr(null,a,e.history.location.pathname);ae.active&&ae.matches&&(x=ae.matches)}let E,C={historyAction:e.history.action,location:e.history.location,matches:x,initialized:O,navigation:tS,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||S,fetchers:new Map,blockers:new Map},k=kr.Pop,M=!1,N,z=!1,H=new Map,V=null,ne=!1,Z=!1,G=[],q=new Set,W=new Map,j=0,K=-1,Y=new Map,oe=new Set,Q=new Map,J=new Map,ue=new Set,de=new Map,Se=new Map,me;function Ze(){if(h=e.history.listen(ae=>{let{action:le,location:xe,delta:T}=ae;if(me){me(),me=void 0;return}zc(Se.size===0||T!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let D=Dr({currentLocation:C.location,nextLocation:xe,historyAction:le});if(D&&T!=null){let $=new Promise(A=>{me=A});e.history.go(T*-1),xi(D,{state:"blocked",location:xe,proceed(){xi(D,{state:"proceeding",proceed:void 0,reset:void 0,location:xe}),$.then(()=>e.history.go(T))},reset(){let A=new Map(C.blockers);A.set(D,Pp),$e({blockers:A})}});return}return Nt(le,xe)}),n){Mae(t,H);let ae=()=>Rae(t,H);t.addEventListener("pagehide",ae),V=()=>t.removeEventListener("pagehide",ae)}return C.initialized||Nt(kr.Pop,C.location,{initialHydration:!0}),E}function Ae(){h&&h(),V&&V(),p.clear(),N&&N.abort(),C.fetchers.forEach((ae,le)=>br(le)),C.blockers.forEach((ae,le)=>yo(le))}function Le(ae){return p.add(ae),()=>p.delete(ae)}function $e(ae,le){le===void 0&&(le={}),C=ir({},C,ae);let xe=[],T=[];f.v7_fetcherPersist&&C.fetchers.forEach((D,$)=>{D.state==="idle"&&(ue.has($)?T.push($):xe.push($))}),[...p].forEach(D=>D(C,{deletedFetchers:T,viewTransitionOpts:le.viewTransitionOpts,flushSync:le.flushSync===!0})),f.v7_fetcherPersist&&(xe.forEach(D=>C.fetchers.delete(D)),T.forEach(D=>br(D)))}function be(ae,le,xe){var T,D;let{flushSync:$}=xe===void 0?{}:xe,A=C.actionData!=null&&C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&C.navigation.state==="loading"&&((T=ae.state)==null?void 0:T._isRedirect)!==!0,L;le.actionData?Object.keys(le.actionData).length>0?L=le.actionData:L=null:A?L=C.actionData:L=null;let ee=le.loaderData?uM(C.loaderData,le.loaderData,le.matches||[],le.errors):C.loaderData,re=C.blockers;re.size>0&&(re=new Map(re),re.forEach((Be,He)=>re.set(He,Pp)));let he=M===!0||C.navigation.formMethod!=null&&Da(C.navigation.formMethod)&&((D=ae.state)==null?void 0:D._isRedirect)!==!0;s&&(a=s,s=void 0),ne||k===kr.Pop||(k===kr.Push?e.history.push(ae,ae.state):k===kr.Replace&&e.history.replace(ae,ae.state));let Ce;if(k===kr.Pop){let Be=H.get(C.location.pathname);Be&&Be.has(ae.pathname)?Ce={currentLocation:C.location,nextLocation:ae}:H.has(ae.pathname)&&(Ce={currentLocation:ae,nextLocation:C.location})}else if(z){let Be=H.get(C.location.pathname);Be?Be.add(ae.pathname):(Be=new Set([ae.pathname]),H.set(C.location.pathname,Be)),Ce={currentLocation:C.location,nextLocation:ae}}$e(ir({},le,{actionData:L,loaderData:ee,historyAction:k,location:ae,initialized:!0,navigation:tS,revalidation:"idle",restoreScrollPosition:ur(ae,le.matches||C.matches),preventScrollReset:he,blockers:re}),{viewTransitionOpts:Ce,flushSync:$===!0}),k=kr.Pop,M=!1,z=!1,ne=!1,Z=!1,G=[]}async function yt(ae,le){if(typeof ae=="number"){e.history.go(ae);return}let xe=PC(C.location,C.matches,u,f.v7_prependBasename,ae,f.v7_relativeSplatPath,le?.fromRouteId,le?.relative),{path:T,submission:D,error:$}=eM(f.v7_normalizeFormMethod,!1,xe,le),A=C.location,L=Y0(C.location,T,le&&le.state);L=ir({},L,e.history.encodeLocation(L));let ee=le&&le.replace!=null?le.replace:void 0,re=kr.Push;ee===!0?re=kr.Replace:ee===!1||D!=null&&Da(D.formMethod)&&D.formAction===C.location.pathname+C.location.search&&(re=kr.Replace);let he=le&&"preventScrollReset"in le?le.preventScrollReset===!0:void 0,Ce=(le&&le.flushSync)===!0,Be=Dr({currentLocation:A,nextLocation:L,historyAction:re});if(Be){xi(Be,{state:"blocked",location:L,proceed(){xi(Be,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),yt(ae,le)},reset(){let He=new Map(C.blockers);He.set(Be,Pp),$e({blockers:He})}});return}return await Nt(re,L,{submission:D,pendingError:$,preventScrollReset:he,replace:le&&le.replace,enableViewTransition:le&&le.viewTransition,flushSync:Ce})}function lt(){if(xn(),$e({revalidation:"loading"}),C.navigation.state!=="submitting"){if(C.navigation.state==="idle"){Nt(C.historyAction,C.location,{startUninterruptedRevalidation:!0});return}Nt(k||C.historyAction,C.navigation.location,{overrideNavigation:C.navigation,enableViewTransition:z===!0})}}async function Nt(ae,le,xe){N&&N.abort(),N=null,k=ae,ne=(xe&&xe.startUninterruptedRevalidation)===!0,qn(C.location,C.matches),M=(xe&&xe.preventScrollReset)===!0,z=(xe&&xe.enableViewTransition)===!0;let T=s||a,D=xe&&xe.overrideNavigation,$=gc(T,le,u),A=(xe&&xe.flushSync)===!0,L=Xr($,T,le.pathname);if(L.active&&L.matches&&($=L.matches),!$){let{error:ct,notFoundMatches:Ne,route:rt}=Sa(le.pathname);be(le,{matches:Ne,loaderData:{},errors:{[rt.id]:ct}},{flushSync:A});return}if(C.initialized&&!Z&&Sae(C.location,le)&&!(xe&&xe.submission&&Da(xe.submission.formMethod))){be(le,{matches:$},{flushSync:A});return}N=new AbortController;let ee=Ff(e.history,le,N.signal,xe&&xe.submission),re;if(xe&&xe.pendingError)re=[mc($).route.id,{type:In.error,error:xe.pendingError}];else if(xe&&xe.submission&&Da(xe.submission.formMethod)){let ct=await yn(ee,le,xe.submission,$,L.active,{replace:xe.replace,flushSync:A});if(ct.shortCircuited)return;if(ct.pendingActionResult){let[Ne,rt]=ct.pendingActionResult;if(Mo(rt)&&Bx(rt.error)&&rt.error.status===404){N=null,be(le,{matches:ct.matches,loaderData:{},errors:{[Ne]:rt.error}});return}}$=ct.matches||$,re=ct.pendingActionResult,D=nS(le,xe.submission),A=!1,L.active=!1,ee=Ff(e.history,ee.url,ee.signal)}let{shortCircuited:he,matches:Ce,loaderData:Be,errors:He}=await nn(ee,le,$,L.active,D,xe&&xe.submission,xe&&xe.fetcherSubmission,xe&&xe.replace,xe&&xe.initialHydration===!0,A,re);he||(N=null,be(le,ir({matches:Ce||$},lM(re),{loaderData:Be,errors:He})))}async function yn(ae,le,xe,T,D,$){$===void 0&&($={}),xn();let A=kae(le,xe);if($e({navigation:A},{flushSync:$.flushSync===!0}),D){let re=await bo(T,le.pathname,ae.signal);if(re.type==="aborted")return{shortCircuited:!0};if(re.type==="error"){let he=mc(re.partialMatches).route.id;return{matches:re.partialMatches,pendingActionResult:[he,{type:In.error,error:re.error}]}}else if(re.matches)T=re.matches;else{let{notFoundMatches:he,error:Ce,route:Be}=Sa(le.pathname);return{matches:he,pendingActionResult:[Be.id,{type:In.error,error:Ce}]}}}let L,ee=r0(T,le);if(!ee.route.action&&!ee.route.lazy)L={type:In.error,error:ro(405,{method:ae.method,pathname:le.pathname,routeId:ee.route.id})};else if(L=(await nt("action",C,ae,[ee],T,null))[ee.route.id],ae.signal.aborted)return{shortCircuited:!0};if(xc(L)){let re;return $&&$.replace!=null?re=$.replace:re=oM(L.response.headers.get("Location"),new URL(ae.url),u)===C.location.pathname+C.location.search,await ke(ae,L,!0,{submission:xe,replace:re}),{shortCircuited:!0}}if(sl(L))throw ro(400,{type:"defer-action"});if(Mo(L)){let re=mc(T,ee.route.id);return($&&$.replace)!==!0&&(k=kr.Push),{matches:T,pendingActionResult:[re.route.id,L]}}return{matches:T,pendingActionResult:[ee.route.id,L]}}async function nn(ae,le,xe,T,D,$,A,L,ee,re,he){let Ce=D||nS(le,$),Be=$||A||dM(Ce),He=!ne&&(!f.v7_partialHydration||!ee);if(T){if(He){let Ke=ie(he);$e(ir({navigation:Ce},Ke!==void 0?{actionData:Ke}:{}),{flushSync:re})}let Fe=await bo(xe,le.pathname,ae.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){let Ke=mc(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[Ke]:Fe.error}}}else if(Fe.matches)xe=Fe.matches;else{let{error:Ke,notFoundMatches:Ge,route:ve}=Sa(le.pathname);return{matches:Ge,loaderData:{},errors:{[ve.id]:Ke}}}}let ct=s||a,[Ne,rt]=nM(e.history,C,xe,Be,le,f.v7_partialHydration&&ee===!0,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,ct,u,he);if(_t(Fe=>!(xe&&xe.some(Ke=>Ke.route.id===Fe))||Ne&&Ne.some(Ke=>Ke.route.id===Fe)),K=++j,Ne.length===0&&rt.length===0){let Fe=bi();return be(le,ir({matches:xe,loaderData:{},errors:he&&Mo(he[1])?{[he[0]]:he[1].error}:null},lM(he),Fe?{fetchers:new Map(C.fetchers)}:{}),{flushSync:re}),{shortCircuited:!0}}if(He){let Fe={};if(!T){Fe.navigation=Ce;let Ke=ie(he);Ke!==void 0&&(Fe.actionData=Ke)}rt.length>0&&(Fe.fetchers=pe(rt)),$e(Fe,{flushSync:re})}rt.forEach(Fe=>{sr(Fe.key),Fe.controller&&W.set(Fe.key,Fe.controller)});let bt=()=>rt.forEach(Fe=>sr(Fe.key));N&&N.signal.addEventListener("abort",bt);let{loaderResults:Ot,fetcherResults:gt}=await mt(C,xe,Ne,rt,ae);if(ae.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",bt),rt.forEach(Fe=>W.delete(Fe.key));let ht=Qv(Ot);if(ht)return await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};if(ht=Qv(gt),ht)return oe.add(ht.key),await ke(ae,ht.result,!0,{replace:L}),{shortCircuited:!0};let{loaderData:xt,errors:wt}=sM(C,xe,Ot,he,rt,gt,de);de.forEach((Fe,Ke)=>{Fe.subscribe(Ge=>{(Ge||Fe.done)&&de.delete(Ke)})}),f.v7_partialHydration&&ee&&C.errors&&(wt=ir({},C.errors,wt));let Je=bi(),ut=Rr(K),Qe=Je||ut||rt.length>0;return ir({matches:xe,loaderData:xt,errors:wt},Qe?{fetchers:new Map(C.fetchers)}:{})}function ie(ae){if(ae&&!Mo(ae[1]))return{[ae[0]]:ae[1].data};if(C.actionData)return Object.keys(C.actionData).length===0?null:C.actionData}function pe(ae){return ae.forEach(le=>{let xe=C.fetchers.get(le.key),T=kp(void 0,xe?xe.data:void 0);C.fetchers.set(le.key,T)}),new Map(C.fetchers)}function ye(ae,le,xe,T){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");sr(ae);let D=(T&&T.flushSync)===!0,$=s||a,A=PC(C.location,C.matches,u,f.v7_prependBasename,xe,f.v7_relativeSplatPath,le,T?.relative),L=gc($,A,u),ee=Xr(L,$,A);if(ee.active&&ee.matches&&(L=ee.matches),!L){wn(ae,le,ro(404,{pathname:A}),{flushSync:D});return}let{path:re,submission:he,error:Ce}=eM(f.v7_normalizeFormMethod,!0,A,T);if(Ce){wn(ae,le,Ce,{flushSync:D});return}let Be=r0(L,re),He=(T&&T.preventScrollReset)===!0;if(he&&Da(he.formMethod)){Ue(ae,le,re,Be,L,ee.active,D,He,he);return}Q.set(ae,{routeId:le,path:re}),je(ae,le,re,Be,L,ee.active,D,He,he)}async function Ue(ae,le,xe,T,D,$,A,L,ee){xn(),Q.delete(ae);function re(ge){if(!ge.route.action&&!ge.route.lazy){let De=ro(405,{method:ee.formMethod,pathname:xe,routeId:le});return wn(ae,le,De,{flushSync:A}),!0}return!1}if(!$&&re(T))return;let he=C.fetchers.get(ae);Ht(ae,Tae(ee,he),{flushSync:A});let Ce=new AbortController,Be=Ff(e.history,xe,Ce.signal,ee);if($){let ge=await bo(D,xe,Be.signal);if(ge.type==="aborted")return;if(ge.type==="error"){wn(ae,le,ge.error,{flushSync:A});return}else if(ge.matches){if(D=ge.matches,T=r0(D,xe),re(T))return}else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,Ce);let He=j,Ne=(await nt("action",C,Be,[T],D,ae))[T.route.id];if(Be.signal.aborted){W.get(ae)===Ce&&W.delete(ae);return}if(f.v7_fetcherPersist&&ue.has(ae)){if(xc(Ne)||Mo(Ne)){Ht(ae,qu(void 0));return}}else{if(xc(Ne))if(W.delete(ae),K>He){Ht(ae,qu(void 0));return}else return oe.add(ae),Ht(ae,kp(ee)),ke(Be,Ne,!1,{fetcherSubmission:ee,preventScrollReset:L});if(Mo(Ne)){wn(ae,le,Ne.error);return}}if(sl(Ne))throw ro(400,{type:"defer-action"});let rt=C.navigation.location||C.location,bt=Ff(e.history,rt,Ce.signal),Ot=s||a,gt=C.navigation.state!=="idle"?gc(Ot,C.navigation.location,u):C.matches;fn(gt,"Didn't find any matches after fetcher action");let ht=++j;Y.set(ae,ht);let xt=kp(ee,Ne.data);C.fetchers.set(ae,xt);let[wt,Je]=nM(e.history,C,gt,ee,rt,!1,f.v7_skipActionErrorRevalidation,Z,G,q,ue,Q,oe,Ot,u,[T.route.id,Ne]);Je.filter(ge=>ge.key!==ae).forEach(ge=>{let De=ge.key,Pe=C.fetchers.get(De),Te=kp(void 0,Pe?Pe.data:void 0);C.fetchers.set(De,Te),sr(De),ge.controller&&W.set(De,ge.controller)}),$e({fetchers:new Map(C.fetchers)});let ut=()=>Je.forEach(ge=>sr(ge.key));Ce.signal.addEventListener("abort",ut);let{loaderResults:Qe,fetcherResults:Fe}=await mt(C,gt,wt,Je,bt);if(Ce.signal.aborted)return;Ce.signal.removeEventListener("abort",ut),Y.delete(ae),W.delete(ae),Je.forEach(ge=>W.delete(ge.key));let Ke=Qv(Qe);if(Ke)return ke(bt,Ke.result,!1,{preventScrollReset:L});if(Ke=Qv(Fe),Ke)return oe.add(Ke.key),ke(bt,Ke.result,!1,{preventScrollReset:L});let{loaderData:Ge,errors:ve}=sM(C,gt,Qe,void 0,Je,Fe,de);if(C.fetchers.has(ae)){let ge=qu(Ne.data);C.fetchers.set(ae,ge)}Rr(ht),C.navigation.state==="loading"&&ht>K?(fn(k,"Expected pending action"),N&&N.abort(),be(C.navigation.location,{matches:gt,loaderData:Ge,errors:ve,fetchers:new Map(C.fetchers)})):($e({errors:ve,loaderData:uM(C.loaderData,Ge,gt,ve),fetchers:new Map(C.fetchers)}),Z=!1)}async function je(ae,le,xe,T,D,$,A,L,ee){let re=C.fetchers.get(ae);Ht(ae,kp(ee,re?re.data:void 0),{flushSync:A});let he=new AbortController,Ce=Ff(e.history,xe,he.signal);if($){let Ne=await bo(D,xe,Ce.signal);if(Ne.type==="aborted")return;if(Ne.type==="error"){wn(ae,le,Ne.error,{flushSync:A});return}else if(Ne.matches)D=Ne.matches,T=r0(D,xe);else{wn(ae,le,ro(404,{pathname:xe}),{flushSync:A});return}}W.set(ae,he);let Be=j,ct=(await nt("loader",C,Ce,[T],D,ae))[T.route.id];if(sl(ct)&&(ct=await _O(ct,Ce.signal,!0)||ct),W.get(ae)===he&&W.delete(ae),!Ce.signal.aborted){if(ue.has(ae)){Ht(ae,qu(void 0));return}if(xc(ct))if(K>Be){Ht(ae,qu(void 0));return}else{oe.add(ae),await ke(Ce,ct,!1,{preventScrollReset:L});return}if(Mo(ct)){wn(ae,le,ct.error);return}fn(!sl(ct),"Unhandled fetcher deferred data"),Ht(ae,qu(ct.data))}}async function ke(ae,le,xe,T){let{submission:D,fetcherSubmission:$,preventScrollReset:A,replace:L}=T===void 0?{}:T;le.response.headers.has("X-Remix-Revalidate")&&(Z=!0);let ee=le.response.headers.get("Location");fn(ee,"Expected a Location header on the redirect Response"),ee=oM(ee,new URL(ae.url),u);let re=Y0(C.location,ee,{_isRedirect:!0});if(n){let Ne=!1;if(le.response.headers.has("X-Remix-Reload-Document"))Ne=!0;else if(wO.test(ee)){const rt=e.history.createURL(ee);Ne=rt.origin!==t.location.origin||Mh(rt.pathname,u)==null}if(Ne){L?t.location.replace(ee):t.location.assign(ee);return}}N=null;let he=L===!0||le.response.headers.has("X-Remix-Replace")?kr.Replace:kr.Push,{formMethod:Ce,formAction:Be,formEncType:He}=C.navigation;!D&&!$&&Ce&&Be&&He&&(D=dM(C.navigation));let ct=D||$;if(cae.has(le.response.status)&&ct&&Da(ct.formMethod))await Nt(he,re,{submission:ir({},ct,{formAction:ee}),preventScrollReset:A||M,enableViewTransition:xe?z:void 0});else{let Ne=nS(re,D);await Nt(he,re,{overrideNavigation:Ne,fetcherSubmission:$,preventScrollReset:A||M,enableViewTransition:xe?z:void 0})}}async function nt(ae,le,xe,T,D,$){let A,L={};try{A=await yae(l,ae,le,xe,T,D,$,o,i)}catch(ee){return T.forEach(re=>{L[re.route.id]={type:In.error,error:ee}}),L}for(let[ee,re]of Object.entries(A))if(Cae(re)){let he=re.result;L[ee]={type:In.redirect,response:wae(he,xe,ee,D,u,f.v7_relativeSplatPath)}}else L[ee]=await xae(re);return L}async function mt(ae,le,xe,T,D){let $=ae.matches,A=nt("loader",ae,D,xe,le,null),L=Promise.all(T.map(async he=>{if(he.matches&&he.match&&he.controller){let Be=(await nt("loader",ae,Ff(e.history,he.path,he.controller.signal),[he.match],he.matches,he.key))[he.match.route.id];return{[he.key]:Be}}else return Promise.resolve({[he.key]:{type:In.error,error:ro(404,{pathname:he.path})}})})),ee=await A,re=(await L).reduce((he,Ce)=>Object.assign(he,Ce),{});return await Promise.all([Aae(le,ee,D.signal,$,ae.loaderData),Pae(le,re,T)]),{loaderResults:ee,fetcherResults:re}}function xn(){Z=!0,G.push(..._t()),Q.forEach((ae,le)=>{W.has(le)&&q.add(le),sr(le)})}function Ht(ae,le,xe){xe===void 0&&(xe={}),C.fetchers.set(ae,le),$e({fetchers:new Map(C.fetchers)},{flushSync:(xe&&xe.flushSync)===!0})}function wn(ae,le,xe,T){T===void 0&&(T={});let D=mc(C.matches,le);br(ae),$e({errors:{[D.route.id]:xe},fetchers:new Map(C.fetchers)},{flushSync:(T&&T.flushSync)===!0})}function Ii(ae){return f.v7_fetcherPersist&&(J.set(ae,(J.get(ae)||0)+1),ue.has(ae)&&ue.delete(ae)),C.fetchers.get(ae)||fae}function br(ae){let le=C.fetchers.get(ae);W.has(ae)&&!(le&&le.state==="loading"&&Y.has(ae))&&sr(ae),Q.delete(ae),Y.delete(ae),oe.delete(ae),ue.delete(ae),q.delete(ae),C.fetchers.delete(ae)}function yi(ae){if(f.v7_fetcherPersist){let le=(J.get(ae)||0)-1;le<=0?(J.delete(ae),ue.add(ae)):J.set(ae,le)}else br(ae);$e({fetchers:new Map(C.fetchers)})}function sr(ae){let le=W.get(ae);le&&(le.abort(),W.delete(ae))}function si(ae){for(let le of ae){let xe=Ii(le),T=qu(xe.data);C.fetchers.set(le,T)}}function bi(){let ae=[],le=!1;for(let xe of oe){let T=C.fetchers.get(xe);fn(T,"Expected fetcher: "+xe),T.state==="loading"&&(oe.delete(xe),ae.push(xe),le=!0)}return si(ae),le}function Rr(ae){let le=[];for(let[xe,T]of Y)if(T0}function Xi(ae,le){let xe=C.blockers.get(ae)||Pp;return Se.get(ae)!==le&&Se.set(ae,le),xe}function yo(ae){C.blockers.delete(ae),Se.delete(ae)}function xi(ae,le){let xe=C.blockers.get(ae)||Pp;fn(xe.state==="unblocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="blocked"||xe.state==="blocked"&&le.state==="proceeding"||xe.state==="blocked"&&le.state==="unblocked"||xe.state==="proceeding"&&le.state==="unblocked","Invalid blocker state transition: "+xe.state+" -> "+le.state);let T=new Map(C.blockers);T.set(ae,le),$e({blockers:T})}function Dr(ae){let{currentLocation:le,nextLocation:xe,historyAction:T}=ae;if(Se.size===0)return;Se.size>1&&zc(!1,"A router only supports one blocker at a time");let D=Array.from(Se.entries()),[$,A]=D[D.length-1],L=C.blockers.get($);if(!(L&&L.state==="proceeding")&&A({currentLocation:le,nextLocation:xe,historyAction:T}))return $}function Sa(ae){let le=ro(404,{pathname:ae}),xe=s||a,{matches:T,route:D}=cM(xe);return _t(),{notFoundMatches:T,route:D,error:le}}function _t(ae){let le=[];return de.forEach((xe,T)=>{(!ae||ae(T))&&(xe.cancel(),le.push(T),de.delete(T))}),le}function hn(ae,le,xe){if(m=ae,b=le,v=xe||null,!w&&C.navigation===tS){w=!0;let T=ur(C.location,C.matches);T!=null&&$e({restoreScrollPosition:T})}return()=>{m=null,b=null,v=null}}function _n(ae,le){return v&&v(ae,le.map(T=>Uoe(T,C.loaderData)))||ae.key}function qn(ae,le){if(m&&b){let xe=_n(ae,le);m[xe]=b()}}function ur(ae,le){if(m){let xe=_n(ae,le),T=m[xe];if(typeof T=="number")return T}return null}function Xr(ae,le,xe){if(c)if(ae){if(Object.keys(ae[0].params).length>0)return{active:!0,matches:qy(le,xe,u,!0)}}else return{active:!0,matches:qy(le,xe,u,!0)||[]};return{active:!1,matches:null}}async function bo(ae,le,xe){if(!c)return{type:"success",matches:ae};let T=ae;for(;;){let D=s==null,$=s||a,A=o;try{await c({path:le,matches:T,patch:(re,he)=>{xe.aborted||iM(re,he,$,A,i)}})}catch(re){return{type:"error",error:re,partialMatches:T}}finally{D&&!xe.aborted&&(a=[...a])}if(xe.aborted)return{type:"aborted"};let L=gc($,le,u);if(L)return{type:"success",matches:L};let ee=qy($,le,u,!0);if(!ee||T.length===ee.length&&T.every((re,he)=>re.route.id===ee[he].route.id))return{type:"success",matches:null};T=ee}}function Zl(ae){o={},s=T1(ae,i,void 0,o)}function Sf(ae,le){let xe=s==null;iM(ae,le,s||a,o,i),xe&&(a=[...a],$e({}))}return E={get basename(){return u},get future(){return f},get state(){return C},get routes(){return a},get window(){return t},initialize:Ze,subscribe:Le,enableScrollRestoration:hn,navigate:yt,fetch:ye,revalidate:lt,createHref:ae=>e.history.createHref(ae),encodeLocation:ae=>e.history.encodeLocation(ae),getFetcher:Ii,deleteFetcher:yi,dispose:Ae,getBlocker:Xi,deleteBlocker:yo,patchRoutes:Sf,_internalFetchControllers:W,_internalActiveDeferreds:de,_internalSetRoutes:Zl},E}function pae(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function PC(e,t,n,r,i,o,a,s){let u,l;if(a){u=[];for(let f of t)if(u.push(f),f.route.id===a){l=f;break}}else u=t,l=t[t.length-1];let c=xO(i||".",bO(u,o),Mh(e.pathname,n)||e.pathname,s==="path");if(i==null&&(c.search=e.search,c.hash=e.hash),(i==null||i===""||i===".")&&l){let f=SO(c.search);if(l.route.index&&!f)c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&f){let h=new URLSearchParams(c.search),p=h.getAll("index");h.delete("index"),p.filter(v=>v).forEach(v=>h.append("index",v));let m=h.toString();c.search=m?"?"+m:""}}return r&&n!=="/"&&(c.pathname=c.pathname==="/"?n:lu([n,c.pathname])),Uc(c)}function eM(e,t,n,r){if(!r||!pae(r))return{path:n};if(r.formMethod&&!Oae(r.formMethod))return{path:n,error:ro(405,{method:r.formMethod})};let i=()=>({path:n,error:ro(400,{type:"invalid-body"})}),o=r.formMethod||"get",a=e?o.toUpperCase():o.toLowerCase(),s=LF(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Da(a))return i();let h=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((p,m)=>{let[v,b]=m;return""+p+v+"="+b+` +`},""):String(r.body);return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:h}}}else if(r.formEncType==="application/json"){if(!Da(a))return i();try{let h=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:a,formAction:s,formEncType:r.formEncType,formData:void 0,json:h,text:void 0}}}catch{return i()}}}fn(typeof FormData=="function","FormData is not available in this environment");let u,l;if(r.formData)u=TC(r.formData),l=r.formData;else if(r.body instanceof FormData)u=TC(r.body),l=r.body;else if(r.body instanceof URLSearchParams)u=r.body,l=aM(u);else if(r.body==null)u=new URLSearchParams,l=new FormData;else try{u=new URLSearchParams(r.body),l=aM(u)}catch{return i()}let c={formMethod:a,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:l,json:void 0,text:void 0};if(Da(c.formMethod))return{path:n,submission:c};let f=Pu(n);return t&&f.search&&SO(f.search)&&u.append("index",""),f.search="?"+u,{path:Uc(f),submission:c}}function tM(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(i=>i.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function nM(e,t,n,r,i,o,a,s,u,l,c,f,h,p,m,v){let b=v?Mo(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),x=e.createURL(i),S=n;o&&t.errors?S=tM(n,Object.keys(t.errors)[0],!0):v&&Mo(v[1])&&(S=tM(n,v[0]));let O=v?v[1].statusCode:void 0,E=a&&O&&O>=400,C=S.filter((M,N)=>{let{route:z}=M;if(z.lazy)return!0;if(z.loader==null)return!1;if(o)return kC(z,t.loaderData,t.errors);if(gae(t.loaderData,t.matches[N],M)||u.some(ne=>ne===M.route.id))return!0;let H=t.matches[N],V=M;return rM(M,ir({currentUrl:w,currentParams:H.params,nextUrl:x,nextParams:V.params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s||w.pathname+w.search===x.pathname+x.search||w.search!==x.search||IF(H,V)}))}),k=[];return f.forEach((M,N)=>{if(o||!n.some(Z=>Z.route.id===M.routeId)||c.has(N))return;let z=gc(p,M.path,m);if(!z){k.push({key:N,routeId:M.routeId,path:M.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(N),V=r0(z,M.path),ne=!1;h.has(N)?ne=!1:l.has(N)?(l.delete(N),ne=!0):H&&H.state!=="idle"&&H.data===void 0?ne=s:ne=rM(V,ir({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:x,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:O,defaultShouldRevalidate:E?!1:s})),ne&&k.push({key:N,routeId:M.routeId,path:M.path,matches:z,match:V,controller:new AbortController})}),[C,k]}function kC(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,i=n!=null&&n[e.id]!==void 0;return!r&&i?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!i}function gae(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function IF(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function rM(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function iM(e,t,n,r,i){var o;let a;if(e){let l=r[e];fn(l,"No route found to patch children into: routeId = "+e),l.children||(l.children=[]),a=l.children}else a=n;let s=t.filter(l=>!a.some(c=>NF(l,c))),u=T1(s,i,[e||"_","patch",String(((o=a)==null?void 0:o.length)||"0")],r);a.push(...u)}function NF(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var i;return(i=t.children)==null?void 0:i.some(o=>NF(n,o))}):!1}async function mae(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];fn(i,"No route found in manifest");let o={};for(let a in r){let u=i[a]!==void 0&&a!=="hasErrorBoundary";zc(!u,'Route "'+i.id+'" has a static property "'+a+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+a+'" will be ignored.')),!u&&!Boe.has(a)&&(o[a]=r[a])}Object.assign(i,o),Object.assign(i,ir({},t(i),{lazy:void 0}))}async function vae(e){let{matches:t}=e,n=t.filter(i=>i.shouldLoad);return(await Promise.all(n.map(i=>i.resolve()))).reduce((i,o,a)=>Object.assign(i,{[n[a].route.id]:o}),{})}async function yae(e,t,n,r,i,o,a,s,u,l){let c=o.map(p=>p.route.lazy?mae(p.route,u,s):void 0),f=o.map((p,m)=>{let v=c[m],b=i.some(x=>x.route.id===p.route.id);return ir({},p,{shouldLoad:b,resolve:async x=>(x&&r.method==="GET"&&(p.route.lazy||p.route.loader)&&(b=!0),b?bae(t,r,p,v,x,l):Promise.resolve({type:In.data,result:void 0}))})}),h=await e({matches:f,request:r,params:o[0].params,fetcherKey:a,context:l});try{await Promise.all(c)}catch{}return h}async function bae(e,t,n,r,i,o){let a,s,u=l=>{let c,f=new Promise((m,v)=>c=v);s=()=>c(),t.signal.addEventListener("abort",s);let h=m=>typeof l!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):l({request:t,params:n.params,context:o},...m!==void 0?[m]:[]),p=(async()=>{try{return{type:"data",result:await(i?i(v=>h(v)):h())}}catch(m){return{type:"error",result:m}}})();return Promise.race([p,f])};try{let l=n.route[e];if(r)if(l){let c,[f]=await Promise.all([u(l).catch(h=>{c=h}),r]);if(c!==void 0)throw c;a=f}else if(await r,l=n.route[e],l)a=await u(l);else if(e==="action"){let c=new URL(t.url),f=c.pathname+c.search;throw ro(405,{method:t.method,pathname:f,routeId:n.route.id})}else return{type:In.data,result:void 0};else if(l)a=await u(l);else{let c=new URL(t.url),f=c.pathname+c.search;throw ro(404,{pathname:f})}fn(a.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(l){return{type:In.error,result:l}}finally{s&&t.signal.removeEventListener("abort",s)}return a}async function xae(e){let{result:t,type:n}=e;if(FF(t)){let l;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?l=null:l=await t.json():l=await t.text()}catch(c){return{type:In.error,error:c}}return n===In.error?{type:In.error,error:new M1(t.status,t.statusText,l),statusCode:t.status,headers:t.headers}:{type:In.data,data:l,statusCode:t.status,headers:t.headers}}if(n===In.error){if(fM(t)){var r;if(t.data instanceof Error){var i;return{type:In.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status}}t=new M1(((r=t.init)==null?void 0:r.status)||500,void 0,t.data)}return{type:In.error,error:t,statusCode:Bx(t)?t.status:void 0}}if(Eae(t)){var o,a;return{type:In.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}if(fM(t)){var s,u;return{type:In.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:In.data,data:t}}function wae(e,t,n,r,i,o){let a=e.headers.get("Location");if(fn(a,"Redirects returned/thrown from loaders/actions must have a Location header"),!wO.test(a)){let s=r.slice(0,r.findIndex(u=>u.route.id===n)+1);a=PC(new URL(t.url),s,i,!0,a,o),e.headers.set("Location",a)}return e}function oM(e,t,n){if(wO.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),o=Mh(i.pathname,n)!=null;if(i.origin===t.origin&&o)return i.pathname+i.search+i.hash}return e}function Ff(e,t,n,r){let i=e.createURL(LF(t)).toString(),o={signal:n};if(r&&Da(r.formMethod)){let{formMethod:a,formEncType:s}=r;o.method=a.toUpperCase(),s==="application/json"?(o.headers=new Headers({"Content-Type":s}),o.body=JSON.stringify(r.json)):s==="text/plain"?o.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?o.body=TC(r.formData):o.body=r.formData}return new Request(i,o)}function TC(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function aM(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function _ae(e,t,n,r,i){let o={},a=null,s,u=!1,l={},c=n&&Mo(n[1])?n[1].error:void 0;return e.forEach(f=>{if(!(f.route.id in t))return;let h=f.route.id,p=t[h];if(fn(!xc(p),"Cannot handle redirect results in processLoaderData"),Mo(p)){let m=p.error;c!==void 0&&(m=c,c=void 0),a=a||{};{let v=mc(e,h);a[v.route.id]==null&&(a[v.route.id]=m)}o[h]=void 0,u||(u=!0,s=Bx(p.error)?p.error.status:500),p.headers&&(l[h]=p.headers)}else sl(p)?(r.set(h,p.deferredData),o[h]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers)):(o[h]=p.data,p.statusCode&&p.statusCode!==200&&!u&&(s=p.statusCode),p.headers&&(l[h]=p.headers))}),c!==void 0&&n&&(a={[n[0]]:c},o[n[0]]=void 0),{loaderData:o,errors:a,statusCode:s||200,loaderHeaders:l}}function sM(e,t,n,r,i,o,a){let{loaderData:s,errors:u}=_ae(t,n,r,a);return i.forEach(l=>{let{key:c,match:f,controller:h}=l,p=o[c];if(fn(p,"Did not find corresponding fetcher result"),!(h&&h.signal.aborted))if(Mo(p)){let m=mc(e.matches,f?.route.id);u&&u[m.route.id]||(u=ir({},u,{[m.route.id]:p.error})),e.fetchers.delete(c)}else if(xc(p))fn(!1,"Unhandled fetcher revalidation redirect");else if(sl(p))fn(!1,"Unhandled fetcher deferred data");else{let m=qu(p.data);e.fetchers.set(c,m)}}),{loaderData:s,errors:u}}function uM(e,t,n,r){let i=ir({},t);for(let o of n){let a=o.route.id;if(t.hasOwnProperty(a)?t[a]!==void 0&&(i[a]=t[a]):e[a]!==void 0&&o.route.loader&&(i[a]=e[a]),r&&r.hasOwnProperty(a))break}return i}function lM(e){return e?Mo(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function mc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function cM(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function ro(e,t){let{pathname:n,routeId:r,method:i,type:o,message:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?u="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?u="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(u='Invalid request method "'+i.toUpperCase()+'"')),new M1(e||500,s,new Error(u),!0)}function Qv(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,i]=t[n];if(xc(i))return{key:r,result:i}}}function LF(e){let t=typeof e=="string"?Pu(e):e;return Uc(ir({},t,{hash:""}))}function Sae(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Cae(e){return FF(e.result)&&lae.has(e.result.status)}function sl(e){return e.type===In.deferred}function Mo(e){return e.type===In.error}function xc(e){return(e&&e.type)===In.redirect}function fM(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Eae(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function FF(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Oae(e){return uae.has(e.toLowerCase())}function Da(e){return aae.has(e.toLowerCase())}async function Aae(e,t,n,r,i){let o=Object.entries(t);for(let a=0;ah?.route.id===s);if(!l)continue;let c=r.find(h=>h.route.id===l.route.id),f=c!=null&&!IF(c,l)&&(i&&i[l.route.id])!==void 0;sl(u)&&f&&await _O(u,n,!1).then(h=>{h&&(t[s]=h)})}}async function Pae(e,t,n){for(let r=0;rl?.route.id===o)&&sl(s)&&(fn(a,"Expected an AbortController for revalidating fetcher deferred result"),await _O(s,a.signal,!0).then(l=>{l&&(t[i]=l)}))}}async function _O(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:In.data,data:e.deferredData.unwrappedData}}catch(i){return{type:In.error,error:i}}return{type:In.data,data:e.deferredData.data}}}function SO(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function r0(e,t){let n=typeof t=="string"?Pu(t).search:t.search;if(e[e.length-1].route.index&&SO(n||""))return e[e.length-1];let r=RF(e);return r[r.length-1]}function dM(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:o,json:a}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(a!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:a,text:void 0}}}function nS(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function kae(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function kp(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Tae(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function qu(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Mae(e,t){try{let n=e.sessionStorage.getItem($F);if(n){let r=JSON.parse(n);for(let[i,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(i,new Set(o||[]))}}catch{}}function Rae(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem($F,JSON.stringify(n))}catch(r){zc(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.28.1 * * Copyright (c) Remix Software Inc. @@ -56,7 +56,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function M1(){return M1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=xO(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:lu([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}const Iae=y.createContext(null);function Nae(e){let t=y.useContext(Bl).outlet;return t&&y.createElement(Iae.Provider,{value:e},t)}function UF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(df),{matches:i}=y.useContext(Bl),{pathname:o}=gm(),a=JSON.stringify(bO(i,r.v7_relativeSplatPath));return y.useMemo(()=>xO(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Lae(e,t,n,r){pm()||fn(!1);let{navigator:i}=y.useContext(df),{matches:o}=y.useContext(Bl),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let l=gm(),c;c=l;let f=c.pathname||"/",h=f;if(u!=="/"){let v=u.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=gc(e,{pathname:h});return Uae(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:lu([u,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:lu([u,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function Fae(){let e=Kae(),t=Bx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const jae=y.createElement(Fae,null);class Bae extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Bl.Provider,{value:this.props.routeContext},y.createElement(jF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zae(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(zx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Bl.Provider,{value:t},r)}function Uae(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);c>=0||fn(!1),a=a.slice(0,Math.min(a.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,f,h)=>{let p,m=!1,v=null,b=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||jae,u&&(l<0&&h===0?(Gae("route-fallback"),m=!0,b=null):l===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return p?S=v:m?S=b:f.route.Component?S=y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,y.createElement(zae,{match:f,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(Bae,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var VF=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(VF||{}),R1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(R1||{});function Vae(e){let t=y.useContext(zx);return t||fn(!1),t}function Wae(e){let t=y.useContext(FF);return t||fn(!1),t}function Hae(e){let t=y.useContext(Bl);return t||fn(!1),t}function WF(e){let t=Hae(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function Kae(){var e;let t=y.useContext(jF),n=Wae(R1.UseRouteError),r=WF(R1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function qae(){let{router:e}=Vae(VF.UseNavigateStable),t=WF(R1.UseNavigateStable),n=y.useRef(!1);return BF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,M1({fromRouteId:t},o)))},[e,t])}const dM={};function Gae(e,t,n){dM[e]||(dM[e]=!0)}const hM={};function Yae(e,t){hM[t]||(hM[t]=!0,console.warn(t))}const jf=(e,t,n)=>Yae(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Zae(e,t){e?.v7_startTransition===void 0&&jf("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&jf("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&jf("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&jf("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&jf("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&jf("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function FGe(e){return Nae(e.context)}function Xae(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:s}=e;pm()&&fn(!1);let u=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:u,navigator:o,static:a,future:M1({v7_relativeSplatPath:!1},s)}),[u,s,o,a]);typeof r=="string"&&(r=Pu(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=y.useMemo(()=>{let b=Mh(c,u);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:i}},[u,c,f,h,p,m,i]);return v==null?null:y.createElement(df.Provider,{value:l},y.createElement(CO.Provider,{children:n,value:v}))}new Promise(()=>{});function Qae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + */function R1(){return R1=Object.assign?Object.assign.bind():function(e){for(var t=1;t{s.current=!0}),y.useCallback(function(l,c){if(c===void 0&&(c={}),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=xO(l,JSON.parse(a),o,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:lu([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,a,o,e])}const Iae=y.createContext(null);function Nae(e){let t=y.useContext(Bl).outlet;return t&&y.createElement(Iae.Provider,{value:e},t)}function VF(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(df),{matches:i}=y.useContext(Bl),{pathname:o}=mm(),a=JSON.stringify(bO(i,r.v7_relativeSplatPath));return y.useMemo(()=>xO(e,JSON.parse(a),o,n==="path"),[e,a,o,n])}function Lae(e,t,n,r){gm()||fn(!1);let{navigator:i}=y.useContext(df),{matches:o}=y.useContext(Bl),a=o[o.length-1],s=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let l=mm(),c;c=l;let f=c.pathname||"/",h=f;if(u!=="/"){let v=u.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(v.length).join("/")}let p=gc(e,{pathname:h});return Uae(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},s,v.params),pathname:lu([u,i.encodeLocation?i.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?u:lu([u,i.encodeLocation?i.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n,r)}function Fae(){let e=Kae(),t=Bx(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:i},n):null,null)}const jae=y.createElement(Fae,null);class Bae extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(Bl.Provider,{value:this.props.routeContext},y.createElement(BF.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function zae(e){let{routeContext:t,match:n,children:r}=e,i=y.useContext(zx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(Bl.Provider,{value:t},r)}function Uae(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,s=(i=n)==null?void 0:i.errors;if(s!=null){let c=a.findIndex(f=>f.route.id&&s?.[f.route.id]!==void 0);c>=0||fn(!1),a=a.slice(0,Math.min(a.length,c+1))}let u=!1,l=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?a=a.slice(0,l+1):a=[a[0]];break}}}return a.reduceRight((c,f,h)=>{let p,m=!1,v=null,b=null;n&&(p=s&&f.route.id?s[f.route.id]:void 0,v=f.route.errorElement||jae,u&&(l<0&&h===0?(Gae("route-fallback"),m=!0,b=null):l===h&&(m=!0,b=f.route.hydrateFallbackElement||null)));let w=t.concat(a.slice(0,h+1)),x=()=>{let S;return p?S=v:m?S=b:f.route.Component?S=y.createElement(f.route.Component,null):f.route.element?S=f.route.element:S=c,y.createElement(zae,{match:f,routeContext:{outlet:c,matches:w,isDataRoute:n!=null},children:S})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(Bae,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var WF=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(WF||{}),D1=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(D1||{});function Vae(e){let t=y.useContext(zx);return t||fn(!1),t}function Wae(e){let t=y.useContext(jF);return t||fn(!1),t}function Hae(e){let t=y.useContext(Bl);return t||fn(!1),t}function HF(e){let t=Hae(),n=t.matches[t.matches.length-1];return n.route.id||fn(!1),n.route.id}function Kae(){var e;let t=y.useContext(BF),n=Wae(D1.UseRouteError),r=HF(D1.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function qae(){let{router:e}=Vae(WF.UseNavigateStable),t=HF(D1.UseNavigateStable),n=y.useRef(!1);return zF(()=>{n.current=!0}),y.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,R1({fromRouteId:t},o)))},[e,t])}const hM={};function Gae(e,t,n){hM[e]||(hM[e]=!0)}const pM={};function Yae(e,t){pM[t]||(pM[t]=!0,console.warn(t))}const jf=(e,t,n)=>Yae(e,"⚠️ React Router Future Flag Warning: "+t+". "+("You can use the `"+e+"` future flag to opt-in early. ")+("For more information, see "+n+"."));function Zae(e,t){e?.v7_startTransition===void 0&&jf("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),e?.v7_relativeSplatPath===void 0&&(!t||!t.v7_relativeSplatPath)&&jf("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(t.v7_fetcherPersist===void 0&&jf("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),t.v7_normalizeFormMethod===void 0&&jf("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),t.v7_partialHydration===void 0&&jf("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),t.v7_skipActionErrorRevalidation===void 0&&jf("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}function jGe(e){return Nae(e.context)}function Xae(e){let{basename:t="/",children:n=null,location:r,navigationType:i=kr.Pop,navigator:o,static:a=!1,future:s}=e;gm()&&fn(!1);let u=t.replace(/^\/*/,"/"),l=y.useMemo(()=>({basename:u,navigator:o,static:a,future:R1({v7_relativeSplatPath:!1},s)}),[u,s,o,a]);typeof r=="string"&&(r=Pu(r));let{pathname:c="/",search:f="",hash:h="",state:p=null,key:m="default"}=r,v=y.useMemo(()=>{let b=Mh(c,u);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:m},navigationType:i}},[u,c,f,h,p,m,i]);return v==null?null:y.createElement(df.Provider,{value:l},y.createElement(CO.Provider,{children:n,value:v}))}new Promise(()=>{});function Qae(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:y.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:y.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:y.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.28.1 * * Copyright (c) Remix Software Inc. @@ -65,7 +65,7 @@ Error generating stack: `+o.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ese(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tse(e,t){return e.button===0&&(!t||t==="_self")&&!ese(e)}function MC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function nse(e,t){let n=MC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const rse=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ise="6";try{window.__reactRouterVersion=ise}catch{}function jGe(e,t){return hae({basename:void 0,future:Z0({},void 0,{v7_prependBasename:!0}),history:Loe({window:void 0}),hydrationData:ose(),routes:e,mapRouteProperties:Qae,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ose(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Z0({},t,{errors:ase(t.errors)})),t}function ase(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new T1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const sse=y.createContext({isTransitioning:!1}),use=y.createContext(new Map),lse="startTransition",pM=P4[lse],cse="flushSync",gM=Noe[cse];function fse(e){pM?pM(e):e()}function Tp(e){gM?gM(e):e()}class dse{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function BGe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,s]=y.useState(),[u,l]=y.useState({isTransitioning:!1}),[c,f]=y.useState(),[h,p]=y.useState(),[m,v]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?fse(M):M()},[w]),S=y.useCallback((M,N)=>{let{deletedFetchers:z,flushSync:H,viewTransitionOpts:V}=N;z.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ne=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!V||ne){H?Tp(()=>o(M)):x(()=>o(M));return}if(H){Tp(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let Z=n.window.document.startViewTransition(()=>{Tp(()=>o(M))});Z.finished.finally(()=>{Tp(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Tp(()=>p(Z));return}h?(c&&c.resolve(),h.skipTransition(),v({state:M,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(s(M),l({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new dse)},[u]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,N=c.promise,z=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await N});z.finished.finally(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(z)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!u.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[u.isTransitioning,m]),y.useEffect(()=>{},[]);let O=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,N,z)=>n.navigate(M,{state:N,preventScrollReset:z?.preventScrollReset}),replace:(M,N,z)=>n.navigate(M,{replace:!0,state:N,preventScrollReset:z?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:O,static:!1,basename:E}),[n,O,E]),k=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Zae(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(zx.Provider,{value:C},y.createElement(FF.Provider,{value:i},y.createElement(use.Provider,{value:b.current},y.createElement(sse.Provider,{value:u},y.createElement(Xae,{basename:E,location:i.location,navigationType:i.historyAction,navigator:O,future:k},i.initialized||n.future.v7_partialHydration?y.createElement(hse,{routes:n.routes,future:n.future,state:i}):t))))),null)}const hse=y.memo(pse);function pse(e){let{routes:t,future:n,state:r}=e;return Lae(t,void 0,r,n)}const gse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zGe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:l,preventScrollReset:c,viewTransition:f}=t,h=Jae(t,rse),{basename:p}=y.useContext(df),m,v=!1;if(typeof l=="string"&&mse.test(l)&&(m=l,gse))try{let S=new URL(window.location.href),O=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Mh(O.pathname,p);O.origin===S.origin&&E!=null?l=E+O.search+O.hash:v=!0}catch{}let b=Dae(l,{relative:i}),w=vse(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:i,viewTransition:f});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",Z0({},h,{href:m||b,onClick:v||o?r:x,ref:n,target:u}))});var mM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(mM||(mM={}));var vM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(vM||(vM={}));function vse(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,u=zF(),l=gm(),c=UF(e,{relative:a});return y.useCallback(f=>{if(tse(f,n)){f.preventDefault();let h=r!==void 0?r:Uc(l)===Uc(c);u(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[l,u,c,r,i,n,e,o,a,s])}function UGe(e){let t=y.useRef(MC(e)),n=y.useRef(!1),r=gm(),i=y.useMemo(()=>nse(r.search,n.current?null:t.current),[r.search]),o=zF(),a=y.useCallback((s,u)=>{const l=MC(typeof s=="function"?s(i):s);n.current=!0,o("?"+l,u)},[o,i]);return[i,a]}var HF={exports:{}},KF={};/** + */function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function ese(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function tse(e,t){return e.button===0&&(!t||t==="_self")&&!ese(e)}function MC(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function nse(e,t){let n=MC(e);return t&&t.forEach((r,i)=>{n.has(i)||t.getAll(i).forEach(o=>{n.append(i,o)})}),n}const rse=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],ise="6";try{window.__reactRouterVersion=ise}catch{}function BGe(e,t){return hae({basename:void 0,future:Z0({},void 0,{v7_prependBasename:!0}),history:Loe({window:void 0}),hydrationData:ose(),routes:e,mapRouteProperties:Qae,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function ose(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Z0({},t,{errors:ase(t.errors)})),t}function ase(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,i]of t)if(i&&i.__type==="RouteErrorResponse")n[r]=new M1(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let o=window[i.__subType];if(typeof o=="function")try{let a=new o(i.message);a.stack="",n[r]=a}catch{}}if(n[r]==null){let o=new Error(i.message);o.stack="",n[r]=o}}else n[r]=i;return n}const sse=y.createContext({isTransitioning:!1}),use=y.createContext(new Map),lse="startTransition",gM=P4[lse],cse="flushSync",mM=Noe[cse];function fse(e){gM?gM(e):e()}function Tp(e){mM?mM(e):e()}class dse{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function zGe(e){let{fallbackElement:t,router:n,future:r}=e,[i,o]=y.useState(n.state),[a,s]=y.useState(),[u,l]=y.useState({isTransitioning:!1}),[c,f]=y.useState(),[h,p]=y.useState(),[m,v]=y.useState(),b=y.useRef(new Map),{v7_startTransition:w}=r||{},x=y.useCallback(M=>{w?fse(M):M()},[w]),S=y.useCallback((M,N)=>{let{deletedFetchers:z,flushSync:H,viewTransitionOpts:V}=N;z.forEach(Z=>b.current.delete(Z)),M.fetchers.forEach((Z,G)=>{Z.data!==void 0&&b.current.set(G,Z.data)});let ne=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!V||ne){H?Tp(()=>o(M)):x(()=>o(M));return}if(H){Tp(()=>{h&&(c&&c.resolve(),h.skipTransition()),l({isTransitioning:!0,flushSync:!0,currentLocation:V.currentLocation,nextLocation:V.nextLocation})});let Z=n.window.document.startViewTransition(()=>{Tp(()=>o(M))});Z.finished.finally(()=>{Tp(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})})}),Tp(()=>p(Z));return}h?(c&&c.resolve(),h.skipTransition(),v({state:M,currentLocation:V.currentLocation,nextLocation:V.nextLocation})):(s(M),l({isTransitioning:!0,flushSync:!1,currentLocation:V.currentLocation,nextLocation:V.nextLocation}))},[n.window,h,c,b,x]);y.useLayoutEffect(()=>n.subscribe(S),[n,S]),y.useEffect(()=>{u.isTransitioning&&!u.flushSync&&f(new dse)},[u]),y.useEffect(()=>{if(c&&a&&n.window){let M=a,N=c.promise,z=n.window.document.startViewTransition(async()=>{x(()=>o(M)),await N});z.finished.finally(()=>{f(void 0),p(void 0),s(void 0),l({isTransitioning:!1})}),p(z)}},[x,a,c,n.window]),y.useEffect(()=>{c&&a&&i.location.key===a.location.key&&c.resolve()},[c,h,i.location,a]),y.useEffect(()=>{!u.isTransitioning&&m&&(s(m.state),l({isTransitioning:!0,flushSync:!1,currentLocation:m.currentLocation,nextLocation:m.nextLocation}),v(void 0))},[u.isTransitioning,m]),y.useEffect(()=>{},[]);let O=y.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:M=>n.navigate(M),push:(M,N,z)=>n.navigate(M,{state:N,preventScrollReset:z?.preventScrollReset}),replace:(M,N,z)=>n.navigate(M,{replace:!0,state:N,preventScrollReset:z?.preventScrollReset})}),[n]),E=n.basename||"/",C=y.useMemo(()=>({router:n,navigator:O,static:!1,basename:E}),[n,O,E]),k=y.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return y.useEffect(()=>Zae(r,n.future),[r,n.future]),y.createElement(y.Fragment,null,y.createElement(zx.Provider,{value:C},y.createElement(jF.Provider,{value:i},y.createElement(use.Provider,{value:b.current},y.createElement(sse.Provider,{value:u},y.createElement(Xae,{basename:E,location:i.location,navigationType:i.historyAction,navigator:O,future:k},i.initialized||n.future.v7_partialHydration?y.createElement(hse,{routes:n.routes,future:n.future,state:i}):t))))),null)}const hse=y.memo(pse);function pse(e){let{routes:t,future:n,state:r}=e;return Lae(t,void 0,r,n)}const gse=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",mse=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,UGe=y.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:a,state:s,target:u,to:l,preventScrollReset:c,viewTransition:f}=t,h=Jae(t,rse),{basename:p}=y.useContext(df),m,v=!1;if(typeof l=="string"&&mse.test(l)&&(m=l,gse))try{let S=new URL(window.location.href),O=l.startsWith("//")?new URL(S.protocol+l):new URL(l),E=Mh(O.pathname,p);O.origin===S.origin&&E!=null?l=E+O.search+O.hash:v=!0}catch{}let b=Dae(l,{relative:i}),w=vse(l,{replace:a,state:s,target:u,preventScrollReset:c,relative:i,viewTransition:f});function x(S){r&&r(S),S.defaultPrevented||w(S)}return y.createElement("a",Z0({},h,{href:m||b,onClick:v||o?r:x,ref:n,target:u}))});var vM;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(vM||(vM={}));var yM;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(yM||(yM={}));function vse(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:a,viewTransition:s}=t===void 0?{}:t,u=UF(),l=mm(),c=VF(e,{relative:a});return y.useCallback(f=>{if(tse(f,n)){f.preventDefault();let h=r!==void 0?r:Uc(l)===Uc(c);u(e,{replace:h,state:i,preventScrollReset:o,relative:a,viewTransition:s})}},[l,u,c,r,i,n,e,o,a,s])}function VGe(e){let t=y.useRef(MC(e)),n=y.useRef(!1),r=mm(),i=y.useMemo(()=>nse(r.search,n.current?null:t.current),[r.search]),o=UF(),a=y.useCallback((s,u)=>{const l=MC(typeof s=="function"?s(i):s);n.current=!0,o("?"+l,u)},[o,i]);return[i,a]}var KF={exports:{}},qF={};/** * @license React * use-sync-external-store-with-selector.production.js * @@ -73,18 +73,18 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var mm=y;function yse(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bse=typeof Object.is=="function"?Object.is:yse,xse=mm.useSyncExternalStore,wse=mm.useRef,_se=mm.useEffect,Sse=mm.useMemo,Cse=mm.useDebugValue;KF.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=wse(null);if(o.current===null){var a={hasValue:!1,value:null};o.current=a}else a=o.current;o=Sse(function(){function u(p){if(!l){if(l=!0,c=p,p=r(p),i!==void 0&&a.hasValue){var m=a.value;if(i(m,p))return f=m}return f=p}if(m=f,bse(c,p))return m;var v=r(p);return i!==void 0&&i(m,v)?(c=p,m):(c=p,f=v)}var l=!1,c,f,h=n===void 0?null:n;return[function(){return u(t())},h===null?void 0:function(){return u(h())}]},[t,n,r,i]);var s=xse(e,o[0],o[1]);return _se(function(){a.hasValue=!0,a.value=s},[s]),Cse(s),s};HF.exports=KF;var Ese=HF.exports;function Ose(e){e()}function Ase(){let e=null,t=null;return{clear(){e=null,t=null},notify(){Ose(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var yM={notify(){},get:()=>[]};function Pse(e,t){let n,r=yM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Ase())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=yM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var kse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tse=kse(),Mse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Rse=Mse(),Dse=()=>Tse||Rse?y.useLayoutEffect:y.useEffect,$se=Dse(),Ise=Symbol.for("react-redux-context"),Nse=typeof globalThis<"u"?globalThis:{};function Lse(){if(!y.createContext)return{};const e=Nse[Ise]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Ol=Lse();function Fse(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Pse(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);$se(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Ol;return y.createElement(s.Provider,{value:o},t)}var VGe=Fse;function EO(e=Ol){return function(){return y.useContext(e)}}var qF=EO();function GF(e=Ol){const t=e===Ol?qF:EO(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jse=GF();function Bse(e=Ol){const t=e===Ol?jse:GF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var WGe=Bse(),zse=(e,t)=>e===t;function Use(e=Ol){const t=e===Ol?qF:EO(e),n=(r,i={})=>{const{equalityFn:o=zse}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Ese.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var HGe=Use();function bM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ux(...e){return t=>{let n=!1;const r=e.map(i=>{const o=bM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Vse);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return I.jsx(RC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return I.jsx(RC,{...r,ref:t,children:n})});Al.displayName="Slot";var RC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Hse(n);return y.cloneElement(n,{...Wse(r,n.props),ref:t?Ux(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});RC.displayName="SlotClone";var OO=({children:e})=>I.jsx(I.Fragment,{children:e});function Vse(e){return y.isValidElement(e)&&e.type===OO}function Wse(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Hse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function YF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,wM=dn,KGe=(e,t)=>n=>{var r;if(t?.variants==null)return wM(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=xM(c)||xM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return wM(e,a,u,n?.class,n?.className)},AO="-",Kse=e=>{const t=Gse(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(AO);return s[0]===""&&s.length!==1&&s.shift(),ZF(s,t)||qse(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},ZF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?ZF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(AO);return t.validators.find(({validator:a})=>a(o))?.classGroupId},_M=/^\[(.+)\]$/,qse=e=>{if(_M.test(e)){const t=_M.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gse=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Zse(Object.entries(e.classGroups),n).forEach(([o,a])=>{DC(a,r,o,t)}),r},DC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:SM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Yse(i)){DC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{DC(a,SM(t,o),n,r)})})},SM=(e,t)=>{let n=e;return t.split(AO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yse=e=>e.isThemeGetter,Zse=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,Xse=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},XF="!",Qse=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},Jse=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},eue=e=>({cache:Xse(e.cacheSize),parseClassName:Qse(e),...Kse(e)}),tue=/\s+/,nue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(tue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=Jse(c).join(":"),w=f?b+XF:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function rue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=eue(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=nue(u,n);return i(u,c),c}return function(){return o(rue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},JF=/^\[(?:([a-z-]+):)?(.+)\]$/i,oue=/^\d+\/\d+$/,aue=new Set(["px","full","screen"]),sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=e=>Ed(e)||aue.has(e)||oue.test(e),Wu=e=>Rh(e,"length",bue),Ed=e=>!!e&&!Number.isNaN(Number(e)),rS=e=>Rh(e,"number",Ed),Mp=e=>!!e&&Number.isInteger(Number(e)),due=e=>e.endsWith("%")&&Ed(e.slice(0,-1)),Xt=e=>JF.test(e),Hu=e=>sue.test(e),hue=new Set(["length","size","percentage"]),pue=e=>Rh(e,hue,ej),gue=e=>Rh(e,"position",ej),mue=new Set(["image","url"]),vue=e=>Rh(e,mue,wue),yue=e=>Rh(e,"",xue),Rp=()=>!0,Rh=(e,t,n)=>{const r=JF.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},bue=e=>uue.test(e)&&!lue.test(e),ej=()=>!1,xue=e=>cue.test(e),wue=e=>fue.test(e),_ue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),N=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Xt,t],V=()=>[Xt,t],ne=()=>["",Ks,Wu],Z=()=>["auto",Ed,Xt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Xt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ed,Xt];return{cacheSize:500,separator:":",theme:{colors:[Rp],spacing:[Ks,Wu],blur:["none","",Hu,Xt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Hu,Xt],borderSpacing:V(),borderWidth:ne(),contrast:oe(),grayscale:K(),hueRotate:oe(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[due,Wu],inset:H(),margin:H(),opacity:oe(),padding:V(),saturate:oe(),scale:oe(),sepia:K(),skew:oe(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[Hu]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Xt]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mp,Xt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Mp,Xt]}],"grid-cols":[{"grid-cols":[Rp]}],"col-start-end":[{col:["auto",{span:["full",Mp,Xt]},Xt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Rp]}],"row-start-end":[{row:["auto",{span:[Mp,Xt]},Xt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[Hu]},Hu]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rS]}],"font-family":[{font:[Rp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Xt]}],"line-clamp":[{"line-clamp":["none",Ed,rS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ks,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ks,Wu]}],"underline-offset":[{"underline-offset":["auto",Ks,Xt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),gue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Ks,Xt]}],"outline-w":[{outline:[Ks,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ks,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hu,yue]}],"shadow-color":[{shadow:[Rp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Hu,Xt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Mp,Xt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ks,Wu,rS]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},qGe=iue(_ue);var tj={exports:{}},Sue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Cue=Sue,Eue=Cue;function nj(){}function rj(){}rj.resetWarningCache=nj;var Oue=function(){function e(r,i,o,a,s,u){if(u!==Eue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:rj,resetWarningCache:nj};return n.PropTypes=n,n};tj.exports=Oue();var Aue=tj.exports;const Mt=Pn(Aue);var Pue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},kue=Object.defineProperty,Tue=Object.defineProperties,Mue=Object.getOwnPropertyDescriptors,D1=Object.getOwnPropertySymbols,ij=Object.prototype.hasOwnProperty,oj=Object.prototype.propertyIsEnumerable,CM=(e,t,n)=>t in e?kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EM=(e,t)=>{for(var n in t||(t={}))ij.call(t,n)&&CM(e,n,t[n]);if(D1)for(var n of D1(t))oj.call(t,n)&&CM(e,n,t[n]);return e},Rue=(e,t)=>Tue(e,Mue(t)),Due=(e,t)=>{var n={};for(var r in e)ij.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&D1)for(var r of D1(e))t.indexOf(r)<0&&oj.call(e,r)&&(n[r]=e[r]);return n},En=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Due(a,["color","size","stroke","children"]);return y.createElement("svg",EM(Rue(EM({ref:o},Pue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},GGe=En("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),YGe=En("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),ZGe=En("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),XGe=En("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),QGe=En("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),JGe=En("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),eYe=En("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),tYe=En("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),nYe=En("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),rYe=En("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),iYe=En("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),oYe=En("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),aYe=En("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),sYe=En("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),uYe=En("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),lYe=En("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),cYe=En("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),fYe=En("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),dYe=En("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),hYe=En("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),pYe=En("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),gYe=En("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),mYe=En("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),vYe=En("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),yYe=En("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),bYe=En("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),xYe=En("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),wYe=En("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),_Ye=En("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),SYe=En("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),CYe=En("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $ue=typeof Symbol=="function"&&Symbol.observable||"@@observable",OM=$ue,iS=()=>Math.random().toString(36).substring(7).split("").join("."),Iue={INIT:`@@redux/INIT${iS()}`,REPLACE:`@@redux/REPLACE${iS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${iS()}`},$1=Iue;function PO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function aj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(aj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!PO(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:$1.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[OM](){return this}}}return h({type:$1.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[OM]:m}}function Nue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:$1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:$1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Lue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function I1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Fue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=I1(...s)(i.dispatch),{...i,dispatch:o}}}function jue(e){return PO(e)&&"type"in e&&typeof e.type=="string"}var sj=Symbol.for("immer-nothing"),AM=Symbol.for("immer-draftable"),zo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[zo]}function yu(e){return e?uj(e)||Array.isArray(e)||!!e[AM]||!!e.constructor?.[AM]||Wx(e)||Hx(e):!1}var Bue=Object.prototype.constructor.toString();function uj(e){if(!e||typeof e!="object")return!1;const t=Kd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Bue}function N1(e,t){Vx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Vx(e){const t=e[zo];return t?t.type_:Array.isArray(e)?1:Wx(e)?2:Hx(e)?3:0}function $C(e,t){return Vx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function lj(e,t,n){const r=Vx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function zue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wx(e){return e instanceof Map}function Hx(e){return e instanceof Set}function lc(e){return e.copy_||e.base_}function IC(e,t){if(Wx(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&uj(e))return Kd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Uue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>kO(r,!0))),e}function Uue(){Fa(2)}function Kx(e){return Object.isFrozen(e)}var Vue={};function Wc(e){const t=Vue[e];return t||Fa(0,e),t}var X0;function cj(){return X0}function Wue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function PM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function NC(e){LC(e),e.drafts_.forEach(Hue),e.drafts_=null}function LC(e){e===X0&&(X0=e.parent_)}function kM(e){return X0=Wue(X0,e)}function Hue(e){const t=e[zo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function TM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zo].modified_&&(NC(t),Fa(4)),yu(e)&&(e=L1(t,e),t.parent_||F1(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[zo].base_,e,t.patches_,t.inversePatches_)):e=L1(t,n,[]),NC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==sj?e:void 0}function L1(e,t,n){if(Kx(t))return t;const r=t[zo];if(!r)return N1(t,(i,o)=>MM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return F1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),N1(o,(s,u)=>MM(e,r,i,s,u,n,a)),F1(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function MM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!$C(t.assigned_,r)?o.concat(r):void 0,u=L1(e,i,s);if(lj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(yu(i)&&!Kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;L1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&F1(e,i)}}function F1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kO(t,n)}function Kue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:cj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=TO;n&&(i=[r],o=Q0);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var TO={get(e,t){if(t===zo)return e;const n=lc(e);if(!$C(n,t))return que(e,n,t);const r=n[t];return e.finalized_||!yu(r)?r:r===oS(e.base_,t)?(aS(e),e.copy_[t]=jC(r,e)):r},has(e,t){return t in lc(e)},ownKeys(e){return Reflect.ownKeys(lc(e))},set(e,t,n){const r=fj(lc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=oS(lc(e),t),o=i?.[zo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(zue(n,i)&&(n!==void 0||$C(e.base_,t)))return!0;aS(e),FC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aS(e),FC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Kd(e.base_)},setPrototypeOf(){Fa(12)}},Q0={};N1(TO,(e,t)=>{Q0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q0.deleteProperty=function(e,t){return Q0.set.call(this,e,t,void 0)};Q0.set=function(e,t,n){return TO.set.call(this,e[0],t,n,e[0])};function oS(e,t){const n=e[zo];return(n?lc(n):e)[t]}function que(e,t,n){const r=fj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function fj(e,t){if(!(t in e))return;let n=Kd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kd(n)}}function FC(e){e.modified_||(e.modified_=!0,e.parent_&&FC(e.parent_))}function aS(e){e.copy_||(e.copy_=IC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Gue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(yu(t)){const o=kM(this),a=jC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?NC(o):LC(o)}return PM(o,r),TM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===sj&&(i=void 0),this.autoFreeze_&&kO(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yu(e)||Fa(8),Vc(e)&&(e=Yue(e));const t=kM(this),n=jC(e,void 0);return n[zo].isManual_=!0,LC(t),n}finishDraft(e,t){const n=e&&e[zo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return PM(r,t),TM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jC(e,t){const n=Wx(e)?Wc("MapSet").proxyMap_(e,t):Hx(e)?Wc("MapSet").proxySet_(e,t):Kue(e,t);return(t?t.scope_:cj()).drafts_.push(n),n}function Yue(e){return Vc(e)||Fa(10,e),dj(e)}function dj(e){if(!yu(e)||Kx(e))return e;const t=e[zo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=IC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=IC(e,!0);return N1(n,(r,i)=>{lj(n,r,dj(i))}),t&&(t.finalized_=!1),n}var Uo=new Gue,hj=Uo.produce;Uo.produceWithPatches.bind(Uo);Uo.setAutoFreeze.bind(Uo);Uo.setUseStrictShallowCopy.bind(Uo);Uo.applyPatches.bind(Uo);Uo.createDraft.bind(Uo);Uo.finishDraft.bind(Uo);function Zue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Que(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var RM=e=>Array.isArray(e)?e:[e];function Jue(e){const t=Array.isArray(e[0])?e[0]:e;return Que(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ele(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Qv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ile(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Zue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=pj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=RM(h),w=RM(m),x=Jue(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=ele(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var ole=ile(pj),ale=Object.assign((e,t=ole)=>{Xue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>ale});function gj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var sle=gj(),ule=gj,lle=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?I1:I1.apply(null,arguments)},cle=e=>e&&typeof e.match=="function";function b0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>jue(r)&&r.type===e,n}var mj=class i0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,i0.prototype)}static get[Symbol.species](){return i0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new i0(...t[0].concat(this)):new i0(...t.concat(this))}};function $M(e){return yu(e)?hj(e,()=>{}):e}function IM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function fle(e){return typeof e=="boolean"}var dle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new mj;return n&&(fle(n)?a.push(sle):a.push(ule(n.extraArgument))),a},hle="RTK_autoBatch",NM=e=>t=>{setTimeout(t,e)},ple=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:NM(10):e.type==="callback"?e.queueNotification:NM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[hle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},gle=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new mj(e);return r&&i.push(ple(typeof r=="object"?r:void 0)),i};function EYe(e){const t=dle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(PO(n))s=Lue(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=I1;i&&(l=lle({trace:!1,...typeof i=="object"&&i}));const c=Fue(...u),f=gle(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return aj(s,o,p)}function vj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function mle(e){return typeof e=="function"}function vle(e,t){let[n,r,i]=vj(t),o;if(mle(e))o=()=>$M(e());else{const s=$M(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(yu(c))return hj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var yle=(e,t)=>cle(e)?e.match(t):e(t);function ble(...e){return t=>e.some(n=>yle(n,t))}var xle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wle=(e=21)=>{let t="",n=e;for(;n--;)t+=xle[Math.random()*64|0];return t},_le=["name","message","stack","code"],sS=class{constructor(e,t){this.payload=e,this.meta=t}_type},LM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Sle=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of _le)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},OYe=(()=>{function e(t,n,r){const i=b0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=b0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=b0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||Sle)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):wle(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Ele(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new sS(C,k),fulfillWithValue:(C,k)=>new LM(C,k)})).then(C=>{if(C instanceof sS)throw C;return C instanceof LM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof sS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Cle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:ble(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Cle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ele(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ole=Symbol.for("rtk-slice-createasyncthunk");function Ale(e,t){return`${e}/${t}`}function Ple({creators:e}={}){const t=e?.asyncThunk?.[Ole];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(Tle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:Ale(i,x),createNotation:typeof r.reducers=="function"};Rle(S)?$le(O,S,l,t):Mle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?vj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return vle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=IM(h,S,()=>new WeakMap);return IM(k,C,()=>{const M={};for(const[N,z]of Object.entries(r.selectors??{}))M[N]=kle(z,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function kle(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var AYe=Ple();function Tle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Mle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Dle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?b0(e,a):b0(e))}function Rle(e){return e._reducerDefinitionType==="asyncThunk"}function Dle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $le({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Jv,pending:s||Jv,rejected:u||Jv,settled:l||Jv})}function Jv(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function yj(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ile}=Object.prototype,{getPrototypeOf:MO}=Object,qx=(e=>t=>{const n=Ile.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>qx(t)===e),Gx=e=>t=>typeof t===e,{isArray:Dh}=Array,J0=Gx("undefined");function Nle(e){return e!==null&&!J0(e)&&e.constructor!==null&&!J0(e.constructor)&&No(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const bj=ts("ArrayBuffer");function Lle(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&bj(e.buffer),t}const Fle=Gx("string"),No=Gx("function"),xj=Gx("number"),Yx=e=>e!==null&&typeof e=="object",jle=e=>e===!0||e===!1,qy=e=>{if(qx(e)!=="object")return!1;const t=MO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ble=ts("Date"),zle=ts("File"),Ule=ts("Blob"),Vle=ts("FileList"),Wle=e=>Yx(e)&&No(e.pipe),Hle=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||No(e.append)&&((t=qx(e))==="formdata"||t==="object"&&No(e.toString)&&e.toString()==="[object FormData]"))},Kle=ts("URLSearchParams"),[qle,Gle,Yle,Zle]=["ReadableStream","Request","Response","Headers"].map(ts),Xle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vm(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,_j=e=>!J0(e)&&e!==wc;function BC(){const{caseless:e}=_j(this)&&this||{},t={},n=(r,i)=>{const o=e&&wj(t,i)||i;qy(t[o])&&qy(r)?t[o]=BC(t[o],r):qy(r)?t[o]=BC({},r):Dh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(vm(t,(i,o)=>{n&&No(i)?e[o]=yj(i,n):e[o]=i},{allOwnKeys:r}),e),Jle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ece=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tce=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&MO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rce=e=>{if(!e)return null;if(Dh(e))return e;let t=e.length;if(!xj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ice=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&MO(Uint8Array)),oce=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ace=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sce=ts("HTMLFormElement"),uce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),FM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lce=ts("RegExp"),Sj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vm(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},cce=e=>{Sj(e,(t,n)=>{if(No(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(No(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dh(e)?r(e):r(String(e).split(t)),n},dce=()=>{},hce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uS="abcdefghijklmnopqrstuvwxyz",jM="0123456789",Cj={DIGIT:jM,ALPHA:uS,ALPHA_DIGIT:uS+uS.toUpperCase()+jM},pce=(e=16,t=Cj.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function gce(e){return!!(e&&No(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mce=e=>{const t=new Array(10),n=(r,i)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Dh(r)?[]:{};return vm(r,(a,s)=>{const u=n(a,i+1);!J0(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},vce=ts("AsyncFunction"),yce=e=>e&&(Yx(e)||No(e))&&No(e.then)&&No(e.catch),Ej=((e,t)=>e?setImmediate:t?((n,r)=>(wc.addEventListener("message",({source:i,data:o})=>{i===wc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),wc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",No(wc.postMessage)),bce=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||Ej,_e={isArray:Dh,isArrayBuffer:bj,isBuffer:Nle,isFormData:Hle,isArrayBufferView:Lle,isString:Fle,isNumber:xj,isBoolean:jle,isObject:Yx,isPlainObject:qy,isReadableStream:qle,isRequest:Gle,isResponse:Yle,isHeaders:Zle,isUndefined:J0,isDate:Ble,isFile:zle,isBlob:Ule,isRegExp:lce,isFunction:No,isStream:Wle,isURLSearchParams:Kle,isTypedArray:ice,isFileList:Vle,forEach:vm,merge:BC,extend:Qle,trim:Xle,stripBOM:Jle,inherits:ece,toFlatObject:tce,kindOf:qx,kindOfTest:ts,endsWith:nce,toArray:rce,forEachEntry:oce,matchAll:ace,isHTMLForm:sce,hasOwnProperty:FM,hasOwnProp:FM,reduceDescriptors:Sj,freezeMethods:cce,toObjectSet:fce,toCamelCase:uce,noop:dce,toFiniteNumber:hce,findKey:wj,global:wc,isContextDefined:_j,ALPHABET:Cj,generateString:pce,isSpecCompliantForm:gce,toJSONObject:mce,isAsyncFn:vce,isThenable:yce,setImmediate:Ej,asap:bce};function Kt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_e.inherits(Kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Oj=Kt.prototype,Aj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Aj[e]={value:e}});Object.defineProperties(Kt,Aj);Object.defineProperty(Oj,"isAxiosError",{value:!0});Kt.from=(e,t,n,r,i,o)=>{const a=Object.create(Oj);return _e.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Kt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const xce=null;function zC(e){return _e.isPlainObject(e)||_e.isArray(e)}function Pj(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function BM(e,t,n){return e?e.concat(t).map(function(i,o){return i=Pj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function wce(e){return _e.isArray(e)&&!e.some(zC)}const _ce=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Zx(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!_e.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(_e.isDate(m))return m.toISOString();if(!u&&_e.isBlob(m))throw new Kt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(m)||_e.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(_e.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(_e.isArray(m)&&wce(m)||(_e.isFileList(m)||_e.endsWith(v,"[]"))&&(w=_e.toArray(m)))return v=Pj(v),w.forEach(function(S,O){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?BM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return zC(m)?!0:(t.append(BM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(_ce,{defaultVisitor:c,convertValue:l,isVisitable:zC});function p(m,v){if(!_e.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),_e.forEach(m,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return p(e),t}function zM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function RO(e,t){this._pairs=[],e&&Zx(e,this,t)}const kj=RO.prototype;kj.append=function(t,n){this._pairs.push([t,n])};kj.toString=function(t){const n=t?function(r){return t.call(this,r,zM)}:zM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Sce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tj(e,t,n){if(!t)return e;const r=n&&n.encode||Sce;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new RO(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class UM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Mj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cce=typeof URLSearchParams<"u"?URLSearchParams:RO,Ece=typeof FormData<"u"?FormData:null,Oce=typeof Blob<"u"?Blob:null,Ace={isBrowser:!0,classes:{URLSearchParams:Cce,FormData:Ece,Blob:Oce},protocols:["http","https","file","blob","url","data"]},DO=typeof window<"u"&&typeof document<"u",UC=typeof navigator=="object"&&navigator||void 0,Pce=DO&&(!UC||["ReactNative","NativeScript","NS"].indexOf(UC.product)<0),kce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tce=DO&&window.location.href||"http://localhost",Mce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:DO,hasStandardBrowserEnv:Pce,hasStandardBrowserWebWorkerEnv:kce,navigator:UC,origin:Tce},Symbol.toStringTag,{value:"Module"})),Mi={...Mce,...Ace};function Rce(e,t){return Zx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Dce(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $ce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,u?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=$ce(i[a])),!s)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t(Dce(r),i,n,0)}),n}return null}function Ice(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const ym={transitional:Mj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(Rj(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Rce(t,this.formSerializer).toString();if((s=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zx(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Ice(t)):t}],transformResponse:[function(t){const n=this.transitional||ym.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Kt.from(s,Kt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{ym.headers[e]={}});const Nce=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lce=e=>{const t={};let n,r,i;return e&&e.split(` -`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Nce[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},VM=Symbol("internals");function Dp(e){return e&&String(e).trim().toLowerCase()}function Gy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Gy):String(e)}function Fce(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jce=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lS(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function Bce(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zce(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class ho{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=Dp(u);if(!c)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Gy(s))}const a=(s,u)=>_e.forEach(s,(l,c)=>o(l,c,u));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!jce(t))a(Lce(t),n);else if(_e.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Fce(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Dp(a),a){const s=_e.findKey(r,a);s&&(!n||lS(r,r[s],s,n))&&(delete r[s],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||lS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Gy(i),delete n[o];return}const s=t?Bce(o):String(o).trim();s!==o&&delete n[o],n[s]=Gy(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[VM]=this[VM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dp(a);r[s]||(zce(i,a),r[s]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(ho);function cS(e,t){const n=this||ym,r=t||n,i=ho.from(r.headers);let o=r.data;return _e.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function Dj(e){return!!(e&&e.__CANCEL__)}function $h(e,t,n){Kt.call(this,e??"canceled",Kt.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits($h,Kt,{__CANCEL__:!0});function $j(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Kt("Request failed with status code "+n.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Uce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vce(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const j1=(e,t,n=3)=>{let r=0;const i=Vce(50,250);return Wce(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},WM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},HM=e=>(...t)=>_e.asap(()=>e(...t)),Hce=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Kce=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ij(e,t){return e&&!qce(t)?Gce(e,t):t}const KM=e=>e instanceof ho?{...e}:e;function Hc(e,t){t=t||{};const n={};function r(l,c,f,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,f,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(KM(l),KM(c),f,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);_e.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Nj=e=>{const t=Hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ho.from(a),t.url=Tj(Ij(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&Hce(t.url))){const l=i&&o&&Kce.read(o);l&&a.set(i,l)}return t},Yce=typeof XMLHttpRequest<"u",Zce=Yce&&function(e){return new Promise(function(n,r){const i=Nj(e);let o=i.data;const a=ho.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=ho.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};$j(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Kt("Network Error",Kt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Mj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new Kt(O,E.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=j1(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=j1(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new $h(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Uce(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Kt("Unsupported protocol "+x+":",Kt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Xce=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Kt?c:new $h(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>_e.asap(s),u}},Qce=function*(e,t){let n=e.byteLength;if(n{const i=Jce(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Xx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Lj=Xx&&typeof ReadableStream=="function",tfe=Xx&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Fj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nfe=Lj&&Fj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),GM=64*1024,VC=Lj&&Fj(()=>_e.isReadableStream(new Response("").body)),B1={stream:VC&&(e=>e.body)};Xx&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!B1[t]&&(B1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Kt(`Response type '${t}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})})})(new Response);const rfe=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await tfe(e)).byteLength},ife=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??rfe(t)},ofe=Xx&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Nj(e);l=l?(l+"").toLowerCase():"text";let p=Xce([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&nfe&&n!=="get"&&n!=="head"&&(b=await ife(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=WM(b,j1(HM(u)));r=qM(E.body,GM,k,M)}}_e.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=VC&&(l==="stream"||l==="response");if(VC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(N=>{E[N]=x[N]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&WM(C,j1(HM(s),!0))||[];x=new Response(qM(x.body,GM,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await B1[_e.findKey(B1,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{$j(E,C,{data:O,headers:ho.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,m),{cause:w.cause||w}):Kt.from(w,w&&w.code,e,m)}}),WC={http:xce,xhr:Zce,fetch:ofe};_e.forEach(WC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const YM=e=>`- ${e}`,afe=e=>_e.isFunction(e)||e===null||e===!1,jj={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : -`+o.map(YM).join(` -`):" "+YM(o[0]):"as no adapter specified";throw new Kt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:WC};function fS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $h(null,e)}function ZM(e){return fS(e),e.headers=ho.from(e.headers),e.data=cS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),jj.getAdapter(e.adapter||ym.adapter)(e).then(function(r){return fS(e),r.data=cS.call(e,e.transformResponse,r),r.headers=ho.from(r.headers),r},function(r){return Dj(r)||(fS(e),r&&r.response&&(r.response.data=cS.call(e,e.transformResponse,r.response),r.response.headers=ho.from(r.response.headers))),Promise.reject(r)})}const Bj="1.7.9",Qx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const XM={};Qx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+Bj+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Kt(i(a," has been removed"+(n?" in "+n:"")),Kt.ERR_DEPRECATED);return n&&!XM[a]&&(XM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};Qx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sfe(e,t,n){if(typeof e!="object")throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Kt("option "+o+" must be "+u,Kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Kt("Unknown option "+o,Kt.ERR_BAD_OPTION)}}const Yy={assertOptions:sfe,validators:Qx},ls=Yy.validators;class Tc{constructor(t){this.defaults=t,this.interceptors={request:new UM,response:new UM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` -`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Yy.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Yy.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Yy.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ho.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[ZM.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $h(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $O(function(i){t=i}),cancel:t}}}function ufe(e){return function(n){return e.apply(null,n)}}function lfe(e){return _e.isObject(e)&&e.isAxiosError===!0}const HC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HC).forEach(([e,t])=>{HC[t]=e});function zj(e){const t=new Tc(e),n=yj(Tc.prototype.request,t);return _e.extend(n,Tc.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return zj(Hc(e,i))},n}const qr=zj(ym);qr.Axios=Tc;qr.CanceledError=$h;qr.CancelToken=$O;qr.isCancel=Dj;qr.VERSION=Bj;qr.toFormData=Zx;qr.AxiosError=Kt;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=ufe;qr.isAxiosError=lfe;qr.mergeConfig=Hc;qr.AxiosHeaders=ho;qr.formToJSON=e=>Rj(_e.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=jj.getAdapter;qr.HttpStatusCode=HC;qr.default=qr;var cfe=e=>{switch(e){case"success":return hfe;case"info":return gfe;case"warning":return pfe;case"error":return mfe;default:return null}},ffe=Array(12).fill(0),dfe=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},ffe.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yfe=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},KC=1,bfe=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:KC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async u=>{if(o=["resolve",u],F.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(wfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||KC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Po=new bfe,xfe=(e,t)=>{let n=t?.id||KC++;return Po.addToast({title:e,...t,id:n}),n},wfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_fe=xfe,Sfe=()=>Po.toasts,PYe=Object.assign(_fe,{success:Po.success,info:Po.info,warning:Po.warning,error:Po.error,custom:Po.custom,message:Po.message,promise:Po.promise,dismiss:Po.dismiss,loading:Po.loading},{getHistory:Sfe});function Cfe(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Cfe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} -`);function ey(e){return e.label!==void 0}var Efe=3,Ofe="32px",QM=4e3,Afe=356,Pfe=14,kfe=20,Tfe=200;function Mfe(...e){return e.filter(Boolean).join(" ")}var Rfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:N,cancelButtonStyle:z,actionButtonStyle:H,className:V="",descriptionClassName:ne="",duration:Z,position:G,gap:q,loadingIcon:W,expandByDefault:j,classNames:K,icons:Y,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[ue,de]=F.useState(!1),[Se,me]=F.useState(!1),[Ze,Ae]=F.useState(!1),[Le,$e]=F.useState(!1),[be,yt]=F.useState(!1),[lt,Nt]=F.useState(0),[yn,nn]=F.useState(0),ie=F.useRef(p.duration||Z||QM),pe=F.useRef(null),ye=F.useRef(null),Ue=S===0,je=S+1<=w,ke=p.type,nt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Ht=F.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=F.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);F.useMemo(()=>p.duration||Z||QM,[p.duration,Z]);let Ii=F.useRef(0),br=F.useRef(0),yi=F.useRef(0),sr=F.useRef(null),[si,bi]=G.split("-"),Rr=F.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Ht?_t:_t+hn.height,0),[x,Ht]),Xi=yfe(),yo=p.invert||h,xi=ke==="loading";br.current=F.useMemo(()=>Ht*q+Rr,[Ht,Rr]),F.useEffect(()=>{de(!0)},[]),F.useEffect(()=>{let _t=ye.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(qn=>qn.toastId!==p.id))}},[b,p.id]),F.useLayoutEffect(()=>{if(!ue)return;let _t=ye.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(qn=>qn.find(ur=>ur.toastId===p.id)?qn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...qn])},[ue,p.title,p.description,b,p.id]);let Dr=F.useCallback(()=>{me(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},Tfe)},[p,C,b,br]);F.useEffect(()=>{if(p.promise&&ke==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||Q&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},ie.current)),()=>clearTimeout(_t)},[E,v,p,ke,Q,Xi,Dr]),F.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function Sa(){var _t,hn,_n;return Y!=null&&Y.loading?F.createElement("div",{className:J(K?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):W?F.createElement("div",{className:J(K?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":ke==="loading"},W):F.createElement(dfe,{className:J(K?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:ke==="loading"})}return F.createElement("li",{tabIndex:0,ref:ye,className:J(V,mt,K?.toast,(t=p?.classNames)==null?void 0:t.toast,K?.default,K?.[ke],(n=p?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":ue,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":yo,"data-swipe-out":Le,"data-expanded":!!(E||j&&ue),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":j?"auto":`${yn}px`,...N,...p.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Ae(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,qn;if(Le||!nt)return;sr.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=pe.current)==null?void 0:hn.getTime()),bo=Math.abs(ur)/Xr;if(Math.abs(ur)>=kfe||bo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Ae(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!nt)return;let qn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ye.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?F.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:J(K?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:vfe):null,p.jsx||F.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,ke||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:J(K?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Sa():null,p.type!=="loading"?p.icon||Y?.[ke]||cfe(ke):null):null,F.createElement("div",{"data-content":"",className:J(K?.content,(s=p?.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:J(K?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:J(ne,xn,K?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&ey(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||z,onClick:_t=>{var hn,_n;ey(p.cancel)&&nt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:J(K?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&ey(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:_t=>{var hn,_n;ey(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:J(K?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function JM(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var kYe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Efe,toastOptions:m,dir:v=JM(),gap:b=Pfe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Mfe}=e,[C,k]=F.useState([]),M=F.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[N,z]=F.useState([]),[H,V]=F.useState(!1),[ne,Z]=F.useState(!1),[G,q]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=F.useRef(null),Y=F.useRef(!1),oe=F.useCallback(Q=>{k(J=>{var ue;return(ue=J.find(de=>de.id===Q.id))!=null&&ue.delete||Po.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return F.useEffect(()=>Po.subscribe(Q=>{if(Q.dismiss){k(J=>J.map(ue=>ue.id===Q.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{jx.flushSync(()=>{k(J=>{let ue=J.findIndex(de=>de.id===Q.id);return ue!==-1?[...J.slice(0,ue),{...J[ue],...Q},...J.slice(ue+1)]:[Q,...J]})})})}),[]),F.useEffect(()=>{if(l!=="system"){q(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{q(J?"dark":"light")})}catch{Q.addListener(({matches:ue})=>{try{q(ue?"dark":"light")}catch(de){console.error(de)}})}},[l]),F.useEffect(()=>{C.length<=1&&V(!1)},[C]),F.useEffect(()=>{let Q=J=>{var ue,de;i.every(Se=>J[Se]||J.code===Se)&&(V(!0),(ue=W.current)==null||ue.focus()),J.code==="Escape"&&(document.activeElement===W.current||(de=W.current)!=null&&de.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),F.useEffect(()=>{if(W.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,Y.current=!1)}},[W.current]),F.createElement("section",{"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var ue;let[de,Se]=Q.split("-");return C.length?F.createElement("ol",{key:Q,dir:v==="auto"?JM():v,tabIndex:-1,ref:W,className:s,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((ue=N[0])==null?void 0:ue.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Ofe,"--width":`${Afe}px`,"--gap":`${b}px`,...h},onBlur:me=>{Y.current&&!me.currentTarget.contains(me.relatedTarget)&&(Y.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,K.current=me.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{ne||V(!1)},onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(me=>!me.position&&J===0||me.position===Q).map((me,Ze)=>{var Ae,Le;return F.createElement(Rfe,{key:me.id,icons:x,index:Ze,toast:me,defaultRichColors:c,duration:(Ae=m?.duration)!=null?Ae:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:Q,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter($e=>$e.position==me.position),heights:N.filter($e=>$e.position==me.position),setHeights:z,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Ih=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kc=typeof window>"u"||"Deno"in globalThis;function oa(){}function Dfe(e,t){return typeof e=="function"?e(t):e}function qC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Uj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Od(e,t){return typeof e=="function"?e(t):e}function La(e,t){return typeof e=="function"?e(t):e}function eR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==IO(a,t.options))return!1}else if(!eg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function tR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!eg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function IO(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>GC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!eg(e[n],t[n])):!1}function Vj(e,t){if(e===t)return e;const n=nR(e)&&nR(t);if(n||GC(e)&&GC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function YC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Vj(e,t):t}function Ife(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nfe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var NO=Symbol();function Wj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===NO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Lfe=class extends Ih{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},LO=new Lfe,Ffe=class extends Ih{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},U1=new Ffe;function ZC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function jfe(e){return Math.min(1e3*2**e,3e4)}function Hj(e){return(e??"online")==="online"?U1.isOnline():!0}var Kj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dS(e){return e instanceof Kj}function qj(e){let t=!1,n=0,r=!1,i;const o=ZC(),a=v=>{r||(h(new Kj(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>LO.isFocused()&&(e.networkMode==="always"||U1.isOnline())&&e.canRun(),c=()=>Hj(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??jfe,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function Bfe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=Bfe(),Gj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},zfe=class extends Gj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ufe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=YC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===NO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Uj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=Wj(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{dS(s)&&s.silent||this.#i({type:"error",error:s}),dS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=qj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Yj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return dS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Yj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ufe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??IO(r,t);let o=this.get(i);return o||(o=new zfe({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>eR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>eR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wfe=class extends Gj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Zj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=qj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Zj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Wfe({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=ty(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=ty(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(ty(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(ty(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tR(t,n))}findAll(e={}){return this.getAll().filter(t=>tR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(oa))))}};function ty(e){return e.options.scope?.id??String(e.mutationId)}function iR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=Wj(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?Nfe:Ife;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?Kfe:oR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:oR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function oR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Kfe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var TYe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new Vfe,this.#t=e.mutationCache||new Hfe,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=LO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=U1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Od(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Dfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Od(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oa).catch(oa)}fetchInfiniteQuery(e){return e.behavior=iR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oa).catch(oa)}ensureInfiniteQueryData(e){return e.behavior=iR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return U1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{eg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{eg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=IO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===NO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qfe=class extends Ih{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ZC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),aR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return XC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return XC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!z1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&sR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||Od(this.options.staleTime,this.#t)!==Od(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Yfe(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(oa)),t}#m(){this.#x();const e=Od(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!qC(e))return;const n=Uj(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||La(this.options.enabled,this.#t)===!1||!qC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||LO.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&aR(e,t),N=k&&sR(e,n,t,r);(M||N)&&(c={...c,...Yj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=YC(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=YC(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:FO(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=z=>{C.status==="error"?z.reject(C.error):C.data!==void 0&&z.resolve(C.data)},M=()=>{const z=this.#i=C.promise=ZC();k(z)},N=this.#i;switch(N.status){case"pending":e.queryHash===n.queryHash&&k(N);break;case"fulfilled":(C.status==="error"||C.data!==N.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==N.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),z1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Gfe(e,t){return La(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function aR(e,t){return Gfe(e,t)||e.state.data!==void 0&&XC(e,t,t.refetchOnMount)}function XC(e,t,n){if(La(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&FO(e,t)}return!1}function sR(e,t,n,r){return(e!==t||La(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&FO(e,n)}function FO(e,t){return La(t.enabled,e)!==!1&&e.isStaleByTime(Od(t.staleTime,e))}function Yfe(e,t){return!z1(e.getCurrentResult(),t)}var Zfe=class extends Ih{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),z1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&qc(n.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??Zj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},Xj=y.createContext(void 0),Qj=e=>{const t=y.useContext(Xj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RYe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(Xj.Provider,{value:e,children:t})),Jj=y.createContext(!1),Xfe=()=>y.useContext(Jj);Jj.Provider;function Qfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jfe=y.createContext(Qfe()),ede=()=>y.useContext(Jfe);function eB(e,t){return typeof e=="function"?e(...t):!!e}function QC(){}var tde=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nde=e=>{y.useEffect(()=>{e.clearReset()},[e])},rde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&eB(n,[e.error,r]),ide=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ode=(e,t)=>e.isLoading&&e.isFetching&&!t,ade=(e,t)=>e?.suspense&&t.isPending,uR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sde(e,t,n){const r=Qj(),i=Xfe(),o=ede(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ide(a),tde(a,o),nde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?QC:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ade(a,l))throw uR(a,u,o);if(rde({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&ode(l,i)&&(s?uR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(QC).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function DYe(e,t){return sde(e,qfe)}function $Ye(e,t){const n=Qj(),[r]=y.useState(()=>new Zfe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(QC)},[r]);if(i.error&&eB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",$p=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},lR=e=>e==null?"":""+e,ude=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},lde=/###/g,cR=e=>e&&e.indexOf("###")>-1?e.replace(lde,"."):e,fR=e=>!e||It(e),x0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=x0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=x0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=x0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},cde=(e,t,n,r)=>{const{obj:i,k:o}=x0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},V1=(e,t)=>{const{obj:n,k:r}=x0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fde=(e,t,n)=>{const r=V1(e,n);return r!==void 0?r:V1(t,n)},tB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):tB(e[r],t[r],n):e[r]=t[r]);return e},Bf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var dde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const hde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>dde[t]):e;class pde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const gde=[" ",",","?","!",";"],mde=new pde(20),vde=(e,t,n)=>{t=t||"",n=n||"";const r=gde.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=mde.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},JC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),yde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let bde=class eE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||yde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=V1(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:JC(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),dR(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=V1(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?tB(u,r,o):u={...u,...r},dR(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var nB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const pR={};class H1 extends Jx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ude(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!vde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=H1.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",z=C&&!n.ordinal&&n.count===0,H=z&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=H),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&H!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?H:h),o){const j=this.resolve(a,{...n,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let j=0;j{const oe=k&&Y!==h?Y:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,K,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,u,K,oe,Z,n),this.emit("missingKey",j,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?G.forEach(j=>{const K=this.pluralResolver.getSuffixes(j,n);z&&n[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(Y=>{W([j],a+Y,n[`defaultValue${Y}`]||H)})}):W(G,a,H))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!pR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(pR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class gR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=W1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=W1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const mR={zero:0,one:1,two:2,few:3,many:4,other:5},vR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=W1(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),vR;if(!t.match(/-|_/))return vR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>mR[i]-mR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const yR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=fde(e,t,n);return!o&&i&&It(n)&&(o=JC(e,n,r),o===void 0&&(o=JC(t,n,r))),o},hS=e=>e.replace(/\$/g,"$$$$");class wde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:hde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Bf(o):a||"{{",this.suffix=s?Bf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Bf(h):p||Bf("$t("),this.nestingSuffix=m?Bf(m):v||Bf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=yR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(yR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>hS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?hS(this.escape(p)):hS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=lR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=lR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const _de=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},zf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(W1(r),i),t[a]=s),s(n)}};class Sde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:zf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:zf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:zf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=_de(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Cde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Ede extends Jx{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{cde(u.loaded,[o],a),Cde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const bR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),xR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ny=()=>{},Ode=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let rB=class tE extends Jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=xR(t),this.services={},this.logger=ms,this.modules={external:[]},Ode(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=bR();this.options={...i,...this.options,...xR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Sde;const f=new gR(this.options);this.store=new hR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new xde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new wde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Ede(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ny),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=$p(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ny;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=$p();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ny),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&nB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$p();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=$p();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$p();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new gR(bR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new tE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ny;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new tE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new hR(s,i),o.services.resourceStore=o.store}return o.translator=new H1(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Mc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},wR={},nE=(e,t,n,r)=>{Mc(n)&&wR[n]||(Mc(n)&&(wR[n]=new Date),Ade(e,t,n,r))},iB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rE=(e,t,n)=>{e.loadNamespaces(t,iB(e,n))},_R=(e,t,n,r)=>{if(Mc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,iB(e,r))},Pde=(e,t,n={})=>!t.languages||!t.languages.length?(nE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Mc=e=>typeof e=="string",kde=e=>typeof e=="object"&&e!==null,Tde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rde=e=>Mde[e],Dde=e=>e.replace(Tde,Rde);let iE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Dde};const $de=(e={})=>{iE={...iE,...e}},Ide=()=>iE;let oB;const Nde=e=>{oB=e},Lde=()=>oB,NYe={type:"3rdParty",init(e){$de(e.options.react),Nde(e)}},Fde=y.createContext();class jde{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Bde=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},aB=(e,t,n,r)=>e.getFixedT(t,n,r),zde=(e,t,n,r)=>y.useCallback(aB(e,t,n,r),[e,t,n,r]),LYe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(Fde)||{},o=n||r||Lde();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new jde),!o){nE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Mc(k)?k:kde(k)&&Mc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&nE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Ide(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Mc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Pde(O,o,a)),f=zde(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>aB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=Bde(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?_R(o,t.lng,l,()=>{x.current&&v(p)}):rE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?_R(o,t.lng,l,()=>O()):rE(o,l,()=>O())})},{slice:Ude,forEach:Vde}=[];function Wde(e){return Vde.call(Ude.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const SR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hde=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!SR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!SR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},CR={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Hde(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Ip=null;const ER=()=>{if(Ip!==null)return Ip;try{Ip=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ip=!1}return Ip};var Gde={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&ER())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&ER()&&window.localStorage.setItem(n,e)}};let Np=null;const OR=()=>{if(Np!==null)return Np;try{Np=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Np=!1}return Np};var Yde={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&OR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&OR()&&window.sessionStorage.setItem(n,e)}},Zde={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},Xde={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Qde={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Jde={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let sB=!1;try{document.cookie,sB=!0}catch{}const uB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];sB||uB.splice(1,1);const ehe=()=>({order:uB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class the{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Wde(n,this.options||{},ehe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Kde),this.addDetector(qde),this.addDetector(Gde),this.addDetector(Yde),this.addDetector(Zde),this.addDetector(Xde),this.addDetector(Qde),this.addDetector(Jde)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}the.type="languageDetector";var bm=e=>e.type==="checkbox",_c=e=>e instanceof Date,zi=e=>e==null;const lB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&lB(e)&&!_c(e),cB=e=>Or(e)&&e.target?bm(e.target)?e.target.checked:e.target.value:e,nhe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,fB=(e,t)=>e.has(nhe(t)),rhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},jO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(jO&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!rhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var ew=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Or(e))return n;const r=ew(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},aa=e=>typeof e=="boolean",BO=e=>/^\w*$/.test(e),dB=e=>ew(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=BO(t)?[t]:dB(t),o=i.length,a=o-1;for(;++rF.useContext(hB),FYe=e=>{const{children:t,...n}=e;return F.createElement(hB.Provider,{value:n},t)};var pB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,gB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},w0=e=>Array.isArray(e)?e:[e],mB=(e,t,n)=>!e||!t||e===t||w0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function UO(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function ihe(e){const t=zO(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=F.useState(n._formState),u=F.useRef(!0),l=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=F.useRef(i);return c.current=i,UO({disabled:r,next:f=>u.current&&mB(c.current,f.name,o)&&gB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),F.useMemo(()=>pB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",vB=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function ohe(e){const t=zO(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=F.useRef(r);s.current=r,UO({disabled:o,subject:n._subjects.values,next:c=>{mB(s.current,c.name,a)&&l(no(vB(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=F.useState(n._getWatch(r,i));return F.useEffect(()=>n._removeUnmounted()),u}function ahe(e){const t=zO(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=fB(i._names.array,n),s=ohe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),u=ihe({control:i,name:n,exact:!0}),l=F.useRef(i.register(n,{...e.rules,value:s,...aa(e.disabled)?{disabled:e.disabled}:{}})),c=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(u.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(u.errors,n)}}),[u,n]),f=F.useMemo(()=>({name:n,value:s,...aa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:cB(h),name:n},type:K1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:K1.BLUR}),ref:h=>{const p=Xe(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return F.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Xe(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Xe(i._options.defaultValues,n));An(i._defaultValues,n,m),Sr(Xe(i._formValues,n))&&An(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),F.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),F.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const jYe=e=>e.render(ahe(e));var yB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},AR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),PR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(_0(s,t))break}else if(Or(s)&&_0(s,t))break}}};var she=(e,t,n)=>{const r=w0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},VO=e=>e.type==="file",hs=e=>typeof e=="function",q1=e=>{if(!jO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zy=e=>vs(e),WO=e=>e.type==="radio",G1=e=>e instanceof RegExp;const kR={value:!1,isValid:!1},TR={value:!0,isValid:!0};var bB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?TR:{value:e[0].value,isValid:!0}:TR:kR}return kR};const MR={isValid:!1,value:null};var xB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,MR):MR;function RR(e,t,n="validate"){if(Zy(e)||Array.isArray(e)&&e.every(Zy)||aa(e)&&!e)return{type:n,message:Zy(e)?e:"",ref:t}}var Uf=e=>Or(e)&&!G1(e)?e:{value:e,message:""},DR=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Xe(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=V=>{i&&S.reportValidity&&(S.setCustomValidity(aa(V)?"":V||""),S.reportValidity())},E={},C=WO(a),k=bm(a),M=C||k,N=(b||VO(a))&&Sr(a.value)&&Sr(x)||q1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,z=yB.bind(null,v,r,E),H=(V,ne,Z,G=qs.maxLength,q=qs.minLength)=>{const W=V?ne:Z;E[v]={type:V?G:q,message:W,ref:a,...z(V?G:q,W)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(N||zi(x))||aa(x)&&!x||k&&!bB(s).isValid||C&&!xB(s).isValid)){const{value:V,message:ne}=Zy(u)?{value:!!u,message:u}:Uf(u);if(V&&(E[v]={type:qs.required,message:ne,ref:S,...z(qs.required,ne)},!r))return O(ne),E}if(!N&&(!zi(f)||!zi(h))){let V,ne;const Z=Uf(h),G=Uf(f);if(!zi(x)&&!isNaN(x)){const q=a.valueAsNumber||x&&+x;zi(Z.value)||(V=q>Z.value),zi(G.value)||(ne=qnew Date(new Date().toDateString()+" "+Y),j=a.type=="time",K=a.type=="week";vs(Z.value)&&x&&(V=j?W(x)>W(Z.value):K?x>Z.value:q>new Date(Z.value)),vs(G.value)&&x&&(ne=j?W(x)+V.value,G=!zi(ne.value)&&x.length<+ne.value;if((Z||G)&&(H(Z,V.message,ne.message),!r))return O(E[v].message),E}if(p&&!N&&vs(x)){const{value:V,message:ne}=Uf(p);if(G1(V)&&!x.match(V)&&(E[v]={type:qs.pattern,message:ne,ref:a,...z(qs.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const V=await m(x,n),ne=RR(V,S);if(ne&&(E[v]={...ne,...z(qs.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let V={};for(const ne in m){if(!io(V)&&!r)break;const Z=RR(await m[ne](x,n),S,ne);Z&&(V={...Z,...z(ne,Z.message)},O(Z.message),r&&(E[v]=V))}if(!io(V)&&(E[v]={ref:S,...V},!r))return E}}return O(!0),E};function uhe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},oE=e=>zi(e)||!lB(e);function nl(e,t){if(oE(e)||oE(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(_c(o)&&_c(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!nl(o,a):o!==a)return!1}}return!0}var wB=e=>e.type==="select-multiple",che=e=>WO(e)||bm(e),gS=e=>q1(e)&&e.isConnected,_B=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function Y1(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!_B(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Y1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function SB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!_B(e[i])?Sr(t)||oE(n[i])?n[i]=Array.isArray(e[i])?Y1(e[i],[]):{...Y1(e[i])}:SB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!nl(e[i],t[i]);return n}var Lp=(e,t)=>SB(e,t,Y1(t)),CB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function mS(e){const t=e.ref;return VO(t)?t.files:WO(t)?xB(e.refs).value:wB(t)?[...t.selectedOptions].map(({value:n})=>n):bm(t)?bB(e.refs).value:CB(Sr(t.value)?e.ref.value:t.value,e)}var fhe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fp=e=>Sr(e)?e:G1(e)?e.source:Or(e)?G1(e.value)?e.value.source:e.value:e;const $R="AsyncFunction";var dhe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===$R||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===$R)),hhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function IR(e,t,n){const r=Xe(e,n);if(r||BO(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),s=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var phe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,ghe=(e,t)=>!ew(Xe(e,t)).length&&Br(e,t);const mhe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function vhe(e={}){let t={...mhe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:pS(),array:pS(),state:pS()},h=AR(t.mode),p=AR(t.reValidateMode),m=t.criteriaMode===ja.all,v=ie=>pe=>{clearTimeout(l),l=setTimeout(ie,pe)},b=async ie=>{if(!t.disabled&&(c.isValid||ie)){const pe=t.resolver?io((await M()).errors):await z(r,!0);pe!==n.isValid&&f.state.next({isValid:pe})}},w=(ie,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((ie||Array.from(s.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(ie,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,ie))){const nt=ye(Xe(r,ie),Ue.argA,Ue.argB);je&&An(r,ie,nt)}if(ke&&Array.isArray(Xe(n.errors,ie))){const nt=ye(Xe(n.errors,ie),Ue.argA,Ue.argB);je&&An(n.errors,ie,nt),ghe(n.errors,ie)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,ie))){const nt=ye(Xe(n.touchedFields,ie),Ue.argA,Ue.argB);je&&An(n.touchedFields,ie,nt)}c.dirtyFields&&(n.dirtyFields=Lp(i,o)),f.state.next({name:ie,isDirty:V(ie,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,ie,pe)},S=(ie,pe)=>{An(n.errors,ie,pe),f.state.next({errors:n.errors})},O=ie=>{n.errors=ie,f.state.next({errors:n.errors,isValid:!1})},E=(ie,pe,ye,Ue)=>{const je=Xe(r,ie);if(je){const ke=Xe(o,ie,Sr(ye)?Xe(i,ie):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,ie,pe?ke:mS(je._f)):G(ie,ke),a.mount&&b()}},C=(ie,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const mt={name:ie};if(!t.disabled){const xn=!!(Xe(r,ie)&&Xe(r,ie)._f&&Xe(r,ie)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=mt.isDirty=V(),ke=nt!==mt.isDirty);const Ht=xn||nl(Xe(i,ie),pe);nt=!!(!xn&&Xe(n.dirtyFields,ie)),Ht||xn?Br(n.dirtyFields,ie):An(n.dirtyFields,ie,!0),mt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Ht}if(ye){const Ht=Xe(n.touchedFields,ie);Ht||(An(n.touchedFields,ie,ye),mt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Ht!==ye)}ke&&je&&f.state.next(mt)}return ke?mt:{}},k=(ie,pe,ye,Ue)=>{const je=Xe(n.errors,ie),ke=c.isValid&&aa(pe)&&n.isValid!==pe;if(t.delayError&&ye?(u=v(()=>S(ie,ye)),u(t.delayError)):(clearTimeout(l),u=null,ye?An(n.errors,ie,ye):Br(n.errors,ie)),(ye?!nl(je,ye):je)||!io(Ue)||ke){const nt={...Ue,...ke&&aa(pe)?{isValid:pe}:{},errors:n.errors,name:ie};n={...n,...nt},f.state.next(nt)}},M=async ie=>{w(ie,!0);const pe=await t.resolver(o,t.context,fhe(ie||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(ie),pe},N=async ie=>{const{errors:pe}=await M(ie);if(ie)for(const ye of ie){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},z=async(ie,pe,ye={valid:!0})=>{for(const Ue in ie){const je=ie[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const mt=s.array.has(ke.name),xn=je._f&&dhe(je._f);xn&&c.validatingFields&&w([Ue],!0);const Ht=await DR(je,s.disabled,o,m,t.shouldUseNativeValidation&&!pe,mt);if(xn&&c.validatingFields&&w([Ue]),Ht[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Ht,ke.name)?mt?she(n.errors,Ht,ke.name):An(n.errors,ke.name,Ht[ke.name]):Br(n.errors,ke.name))}!io(nt)&&await z(nt,pe,ye)}}return ye.valid},H=()=>{for(const ie of s.unMount){const pe=Xe(r,ie);pe&&(pe._f.refs?pe._f.refs.every(ye=>!gS(ye)):!gS(pe._f.ref))&&Se(ie)}s.unMount=new Set},V=(ie,pe)=>!t.disabled&&(ie&&pe&&An(o,ie,pe),!nl(oe(),i)),ne=(ie,pe,ye)=>vB(ie,s,{...a.mount?o:Sr(pe)?i:vs(ie)?{[ie]:pe}:pe},ye,pe),Z=ie=>ew(Xe(a.mount?o:i,ie,t.shouldUnregister?Xe(i,ie,[]):[])),G=(ie,pe,ye={})=>{const Ue=Xe(r,ie);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,ie,CB(pe,ke)),je=q1(ke.ref)&&zi(pe)?"":pe,wB(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?bm(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(mt=>mt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):VO(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||f.values.next({name:ie,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(ie,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(ie)},q=(ie,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${ie}.${Ue}`,nt=Xe(r,ke);(s.array.has(ie)||Or(je)||nt&&!nt._f)&&!_c(je)?q(ke,je,ye):G(ke,je,ye)}},W=(ie,pe,ye={})=>{const Ue=Xe(r,ie),je=s.array.has(ie),ke=no(pe);An(o,ie,ke),je?(f.array.next({name:ie,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&f.state.next({name:ie,dirtyFields:Lp(i,o),isDirty:V(ie,ke)})):Ue&&!Ue._f&&!zi(ke)?q(ie,ke,ye):G(ie,ke,ye),PR(ie,s)&&f.state.next({...n}),f.values.next({name:a.mount?ie:void 0,values:{...o}})},j=async ie=>{a.mount=!0;const pe=ie.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?mS(je._f):cB(ie),nt=mt=>{Ue=Number.isNaN(mt)||_c(mt)&&isNaN(mt.getTime())||nl(mt,Xe(o,ye,mt))};if(je){let mt,xn;const Ht=ke(),wn=ie.type===K1.BLUR||ie.type===K1.FOCUS_OUT,Ii=!hhe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||phe(wn,Xe(n.touchedFields,ye),n.isSubmitted,p,h),br=PR(ye,s,wn);An(o,ye,Ht),wn?(je._f.onBlur&&je._f.onBlur(ie),u&&u(0)):je._f.onChange&&je._f.onChange(ie);const yi=C(ye,Ht,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ye,type:ie.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ye,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ye]);if(nt(Ht),Ue){const bi=IR(n.errors,r,ye),Rr=IR(si,r,bi.name||ye);mt=Rr.error,ye=Rr.name,xn=io(si)}}else w([ye],!0),mt=(await DR(je,s.disabled,o,m,t.shouldUseNativeValidation))[ye],w([ye]),nt(Ht),Ue&&(mt?xn=!1:c.isValid&&(xn=await z(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),k(ye,xn,mt,yi))}},K=(ie,pe)=>{if(Xe(n.errors,pe)&&ie.focus)return ie.focus(),1},Y=async(ie,pe={})=>{let ye,Ue;const je=w0(ie);if(t.resolver){const ke=await N(Sr(ie)?ie:je);ye=io(ke),Ue=ie?!je.some(nt=>Xe(ke,nt)):ye}else ie?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await z(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await z(r);return f.state.next({...!vs(ie)||c.isValid&&ye!==n.isValid?{}:{name:ie},...t.resolver||!ie?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&_0(r,K,ie?je:s.mount),Ue},oe=ie=>{const pe={...a.mount?o:i};return Sr(ie)?pe:vs(ie)?Xe(pe,ie):ie.map(ye=>Xe(pe,ye))},Q=(ie,pe)=>({invalid:!!Xe((pe||n).errors,ie),isDirty:!!Xe((pe||n).dirtyFields,ie),error:Xe((pe||n).errors,ie),isValidating:!!Xe(n.validatingFields,ie),isTouched:!!Xe((pe||n).touchedFields,ie)}),J=ie=>{ie&&w0(ie).forEach(pe=>Br(n.errors,pe)),f.state.next({errors:ie?n.errors:{}})},ue=(ie,pe,ye)=>{const Ue=(Xe(r,ie,{_f:{}})._f||{}).ref,je=Xe(n.errors,ie)||{},{ref:ke,message:nt,type:mt,...xn}=je;An(n.errors,ie,{...xn,...pe,ref:Ue}),f.state.next({name:ie,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(ie,pe)=>hs(ie)?f.values.subscribe({next:ye=>ie(ne(void 0,pe),ye)}):ne(ie,pe,!0),Se=(ie,pe={})=>{for(const ye of ie?w0(ie):s.mount)s.mount.delete(ye),s.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);f.values.next({values:{...o}}),f.state.next({...n,...pe.keepDirty?{isDirty:V()}:{}}),!pe.keepIsValid&&b()},me=({disabled:ie,name:pe,field:ye,fields:Ue})=>{(aa(ie)&&a.mount||ie||s.disabled.has(pe))&&(ie?s.disabled.add(pe):s.disabled.delete(pe),C(pe,mS(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(ie,pe={})=>{let ye=Xe(r,ie);const Ue=aa(pe.disabled)||aa(t.disabled);return An(r,ie,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:ie}},name:ie,mount:!0,...pe}}),s.mount.add(ie),ye?me({field:ye,disabled:aa(pe.disabled)?pe.disabled:t.disabled,name:ie}):E(ie,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Fp(pe.min),max:Fp(pe.max),minLength:Fp(pe.minLength),maxLength:Fp(pe.maxLength),pattern:Fp(pe.pattern)}:{},name:ie,onChange:j,onBlur:j,ref:je=>{if(je){Ze(ie,pe),ye=Xe(r,ie);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=che(ke),mt=ye._f.refs||[];if(nt?mt.find(xn=>xn===ke):ke===ye._f.ref)return;An(r,ie,{_f:{...ye._f,...nt?{refs:[...mt.filter(gS),ke,...Array.isArray(Xe(i,ie))?[{}]:[]],ref:{type:ke.type,name:ie}}:{ref:ke}}}),E(ie,!1,void 0,ke)}else ye=Xe(r,ie,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(fB(s.array,ie)&&a.action)&&s.unMount.add(ie)}}},Ae=()=>t.shouldFocusError&&_0(r,K,s.mount),Le=ie=>{aa(ie)&&(f.state.next({disabled:ie}),_0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||ie,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||ie}))},0,!1))},$e=(ie,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=no(o);if(s.disabled.size)for(const ke of s.disabled)An(je,ke,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await z(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await ie(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Ae(),setTimeout(Ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(ie,pe={})=>{Xe(r,ie)&&(Sr(pe.defaultValue)?W(ie,no(Xe(i,ie))):(W(ie,pe.defaultValue),An(i,ie,no(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,ie),pe.keepDirty||(Br(n.dirtyFields,ie),n.isDirty=pe.defaultValue?V(ie,no(Xe(i,ie))):V()),pe.keepError||(Br(n.errors,ie),c.isValid&&b()),f.state.next({...n}))},yt=(ie,pe={})=>{const ye=ie?no(ie):i,Ue=no(ye),je=io(ie),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...s.mount,...Object.keys(Lp(i,o))]);for(const mt of Array.from(nt))Xe(n.dirtyFields,mt)?An(ke,mt,Xe(o,mt)):W(mt,Xe(ke,mt))}else{if(jO&&Sr(ie))for(const nt of s.mount){const mt=Xe(r,nt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(q1(xn)){const Ht=xn.closest("form");if(Ht){Ht.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?no(i):{}:no(ke),f.array.next({values:{...ke}}),f.values.next({values:{...ke}})}s={mount:pe.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!nl(ie,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Lp(i,o):n.dirtyFields:pe.keepDefaultValues&&ie?Lp(i,ie):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(ie,pe)=>yt(hs(ie)?ie(o):ie,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:ue,_executeSchema:M,_getWatch:ne,_getDirty:V,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:me,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(ie=>{lt(ie,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:ie=>{n={...n,...ie}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(ie){a=ie},get _defaultValues(){return i},get _names(){return s},set _names(ie){s=ie},get _formState(){return n},set _formState(ie){n=ie},get _options(){return t},set _options(ie){t={...t,...ie}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:W,getValues:oe,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:ue,setFocus:(ie,pe={})=>{const ye=Xe(r,ie),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&hs(je.select)&&je.select())}},getFieldState:Q}}function BYe(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[r,i]=F.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...vhe(e),formState:r});const o=t.current.control;return o._options=e,UO({subject:o._subjects.state,next:a=>{gB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),F.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),F.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),F.useEffect(()=>{e.values&&!nl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),F.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),F.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=pB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var aE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aE||(aE={}));const it=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},Ve=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Lo.create=e=>new Lo(e);const qd=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let EB=qd;function bhe(e){EB=e}function Z1(){return EB}const X1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},xhe=[];function tt(e,t){const n=Z1(),r=X1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qd?void 0:qd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),gd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),sE=e=>e.status==="aborted",uE=e=>e.status==="dirty",Gc=e=>e.status==="valid",tg=e=>typeof Promise<"u"&&e instanceof Promise;function Q1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function OB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var o0,a0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const NR=(e,t)=>{if(Gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lo(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Jt{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return NR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(tg(i)?i:Promise.resolve(i));return NR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:Ve.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ha.create(this)}promise(){return Yd.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return ag.create(this,t,this._def)}transform(t){return new Ya({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new HO({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dg({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return xm.create(this,t)}readonly(){return hg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const whe=/^c[^\s-]{8,}$/i,_he=/^[0-9a-z]+$/,She=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Che=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ehe=/^[a-z0-9_-]{21}$/i,Ohe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ahe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Phe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,khe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vS;const The=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mhe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Rhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$he=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ihe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,AB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nhe=new RegExp(`^${AB}$`);function PB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Lhe(e){return new RegExp(`^${PB(e)}$`)}function kB(e){let t=`${AB}T${PB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Fhe(e,t){return!!((t==="v4"||!t)&&The.test(e)||(t==="v6"||!t)&&Rhe.test(e))}function jhe(e,t){if(!Ohe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Bhe(e,t){return!!((t==="v4"||!t)&&Mhe.test(e)||(t==="v6"||!t)&&Dhe.test(e))}class za extends Jt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:Ve.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function zhe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?zhe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class kl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class ng extends Jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}ng.create=e=>new ng({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Yc extends Jt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Yc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class J1 extends Jt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}J1.create=e=>new J1({typeName:Tt.ZodSymbol,...qt(e)});class rg extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}rg.create=e=>new rg({typeName:Tt.ZodUndefined,...qt(e)});class ig extends Jt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}ig.create=e=>new ig({typeName:Tt.ZodNull,...qt(e)});class Gd extends Jt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}Gd.create=e=>new Gd({typeName:Tt.ZodAny,...qt(e)});class Rc extends Jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Rc.create=e=>new Rc({typeName:Tt.ZodUnknown,...qt(e)});class bu extends Jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.never,received:n.parsedType}),Dt}}bu.create=e=>new bu({typeName:Tt.ZodNever,...qt(e)});class eb extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}eb.create=e=>new eb({typeName:Tt.ZodVoid,...qt(e)});class Ha extends Jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:Ve.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(tt(n,{code:Ve.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ha({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Ha({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Ha({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ha.create=(e,t)=>new Ha({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function ed(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(ed(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Ha?new Ha({...e._def,type:ed(e.element)}):e instanceof Es?Es.create(ed(e.unwrap())):e instanceof Ml?Ml.create(ed(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>ed(t))):e}class cr extends Jt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:Ve.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof bu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof bu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(tt(i,{code:Ve.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return ed(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return TB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});class og extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Lo(s.ctx.common.issues));return tt(n,{code:Ve.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Lo(u));return tt(n,{code:Ve.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:Tt.ZodUnion,...qt(t)});const Zs=e=>e instanceof ug?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof lg?[e.value]:e instanceof Tl?e.options:e instanceof cg?gn.objectValues(e.enum):e instanceof fg?Zs(e._def.innerType):e instanceof rg?[void 0]:e instanceof ig?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Ml?[null,...Zs(e.unwrap())]:e instanceof HO||e instanceof hg?Zs(e.unwrap()):e instanceof dg?Zs(e._def.innerType):[];class tw extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:Ve.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new tw({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function lE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=lE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(sE(o)||sE(a))return Dt;const s=lE(o.value,a.value);return s.valid?((uE(o)||uE(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:Ve.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ag.create=(e,t,n)=>new ag({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Ts extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:Ve.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class sg extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:Ve.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Jt?new sg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new sg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class tb extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:Ve.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}tb.create=(e,t,n)=>new tb({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Zc extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:Ve.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:Ve.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Zc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Zc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class Ad extends Jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:Ve.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(s,u){return X1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Z1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_arguments,argumentsError:u}})}function i(s,u){return X1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Z1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yd){const s=this;return Hi(async function(...u){const l=new Lo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Hi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Lo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Lo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ad({...this._def,args:Ts.create(t).rest(Rc.create())})}returns(t){return new Ad({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ad({args:t||Ts.create([]).rest(Rc.create()),returns:n||Rc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class ug extends Jt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Tt.ZodLazy,...qt(t)});class lg extends Jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}lg.create=(e,t)=>new lg({value:e,typeName:Tt.ZodLiteral,...qt(t)});function TB(e,t){return new Tl({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Tl extends Jt{constructor(){super(...arguments),o0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:gn.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),Dt}if(Q1(this,o0)||OB(this,o0,new Set(this._def.values)),!Q1(this,o0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Tl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}o0=new WeakMap;Tl.create=TB;class cg extends Jt{constructor(){super(...arguments),a0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=gn.objectValues(n);return tt(r,{expected:gn.joinValues(i),received:r.parsedType,code:Ve.invalid_type}),Dt}if(Q1(this,a0)||OB(this,a0,new Set(gn.getValidEnumValues(this._def.values))),!Q1(this,a0).has(t.data)){const i=gn.objectValues(n);return tt(r,{received:r.data,code:Ve.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}a0=new WeakMap;cg.create=(e,t)=>new cg({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Yd extends Jt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:Ve.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(e,t)=>new Yd({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ya extends Jt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?gd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?gd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class Es extends Jt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Ml extends Jt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class fg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class dg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tg(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dg.create=(e,t)=>new dg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class nb extends Jt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}nb.create=e=>new nb({typeName:Tt.ZodNaN,...qt(e)});const Uhe=Symbol("zod_brand");class HO extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class xm extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),gd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new xm({in:t,out:n,typeName:Tt.ZodPipeline})}}class hg extends Jt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Gc(i)&&(i.value=Object.freeze(i.value)),i);return tg(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hg.create=(e,t)=>new hg({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function MB(e,t={},n){return e?Gd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Gd.create()}const Vhe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Whe=(e,t={message:`Input not instance of ${e.name}`})=>MB(n=>n instanceof e,t),RB=za.create,DB=Pl.create,Hhe=nb.create,Khe=kl.create,$B=ng.create,qhe=Yc.create,Ghe=J1.create,Yhe=rg.create,Zhe=ig.create,Xhe=Gd.create,Qhe=Rc.create,Jhe=bu.create,epe=eb.create,tpe=Ha.create,npe=cr.create,rpe=cr.strictCreate,ipe=og.create,ope=tw.create,ape=ag.create,spe=Ts.create,upe=sg.create,lpe=tb.create,cpe=Zc.create,fpe=Ad.create,dpe=ug.create,hpe=lg.create,ppe=Tl.create,gpe=cg.create,mpe=Yd.create,LR=Ya.create,vpe=Es.create,ype=Ml.create,bpe=Ya.createWithPreprocess,xpe=xm.create,wpe=()=>RB().optional(),_pe=()=>DB().optional(),Spe=()=>$B().optional(),Cpe={string:e=>za.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>ng.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>Yc.create({...e,coerce:!0})},Epe=Dt;var zYe=Object.freeze({__proto__:null,defaultErrorMap:qd,setErrorMap:bhe,getErrorMap:Z1,makeIssue:X1,EMPTY_PATH:xhe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:gd,OK:Hi,isAborted:sE,isDirty:uE,isValid:Gc,isAsync:tg,get util(){return gn},get objectUtil(){return aE},ZodParsedType:it,getParsedType:nu,ZodType:Jt,datetimeRegex:kB,ZodString:za,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:ng,ZodDate:Yc,ZodSymbol:J1,ZodUndefined:rg,ZodNull:ig,ZodAny:Gd,ZodUnknown:Rc,ZodNever:bu,ZodVoid:eb,ZodArray:Ha,ZodObject:cr,ZodUnion:og,ZodDiscriminatedUnion:tw,ZodIntersection:ag,ZodTuple:Ts,ZodRecord:sg,ZodMap:tb,ZodSet:Zc,ZodFunction:Ad,ZodLazy:ug,ZodLiteral:lg,ZodEnum:Tl,ZodNativeEnum:cg,ZodPromise:Yd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Ml,ZodDefault:fg,ZodCatch:dg,ZodNaN:nb,BRAND:Uhe,ZodBranded:HO,ZodPipeline:xm,ZodReadonly:hg,custom:MB,Schema:Jt,ZodSchema:Jt,late:Vhe,get ZodFirstPartyTypeKind(){return Tt},coerce:Cpe,any:Xhe,array:tpe,bigint:Khe,boolean:$B,date:qhe,discriminatedUnion:ope,effect:LR,enum:ppe,function:fpe,instanceof:Whe,intersection:ape,lazy:dpe,literal:hpe,map:lpe,nan:Hhe,nativeEnum:gpe,never:Jhe,null:Zhe,nullable:ype,number:DB,object:npe,oboolean:Spe,onumber:_pe,optional:vpe,ostring:wpe,pipeline:xpe,preprocess:bpe,promise:mpe,record:upe,set:cpe,strictObject:rpe,string:RB,symbol:Ghe,transformer:LR,tuple:spe,undefined:Yhe,union:ipe,unknown:Qhe,void:epe,NEVER:Epe,ZodIssueCode:Ve,quotelessJson:yhe,ZodError:Lo});const FR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},IB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?FR(r.ref,n,e):r.refs&&r.refs.forEach(i=>FR(i,n,e))}},Ope=(e,t)=>{t.shouldUseNativeValidation&&IB(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ape(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Ape=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ppe=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=yB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},UYe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&IB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:Ope(Ppe(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},kpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=kpe.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Al:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function NB(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}var Tpe="Label",LB=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));LB.displayName=Tpe;var VYe=LB,FB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(la,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],q=Z%100;return"["+Z+(G[(q-20)%10]||G[q]||G[0])+"]"}},S=function(Z,G,q){var W=String(Z);return!W||W.length>=G?Z:""+Array(G+1-W.length).join(q)+Z},O={s:S,z:function(Z){var G=-Z.utcOffset(),q=Math.abs(G),W=Math.floor(q/60),j=q%60;return(G<=0?"+":"-")+S(W,2,"0")+":"+S(j,2,"0")},m:function Z(G,q){if(G.date()1)return Z(Y[0])}else{var oe=G.name;C[oe]=G,j=oe}return!W&&j&&(E=j),j||!W&&E},z=function(Z,G){if(M(Z))return Z.clone();var q=typeof G=="object"?G:{};return q.date=Z,q.args=arguments,new V(q)},H=O;H.l=N,H.i=M,H.w=function(Z,G){return z(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var V=function(){function Z(q){this.$L=N(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[k]=!0}var G=Z.prototype;return G.parse=function(q){this.$d=function(W){var j=W.date,K=W.utc;if(j===null)return new Date(NaN);if(H.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var Y=j.match(b);if(Y){var oe=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return K?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(j)}(q),this.init()},G.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==v},G.isSame=function(q,W){var j=z(q);return this.startOf(W)<=j&&j<=this.endOf(W)},G.isAfter=function(q,W){return z(q){let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var bM={notify(){},get:()=>[]};function Pse(e,t){let n,r=bM,i=0,o=!1;function a(v){c();const b=r.subscribe(v);let w=!1;return()=>{w||(w=!0,b(),f())}}function s(){r.notify()}function u(){m.onStateChange&&m.onStateChange()}function l(){return o}function c(){i++,n||(n=e.subscribe(u),r=Ase())}function f(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=bM)}function h(){o||(o=!0,c())}function p(){o&&(o=!1,f())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:u,isSubscribed:l,trySubscribe:h,tryUnsubscribe:p,getListeners:()=>r};return m}var kse=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Tse=kse(),Mse=()=>typeof navigator<"u"&&navigator.product==="ReactNative",Rse=Mse(),Dse=()=>Tse||Rse?y.useLayoutEffect:y.useEffect,$se=Dse(),Ise=Symbol.for("react-redux-context"),Nse=typeof globalThis<"u"?globalThis:{};function Lse(){if(!y.createContext)return{};const e=Nse[Ise]??=new Map;let t=e.get(y.createContext);return t||(t=y.createContext(null),e.set(y.createContext,t)),t}var Ol=Lse();function Fse(e){const{children:t,context:n,serverState:r,store:i}=e,o=y.useMemo(()=>{const u=Pse(i);return{store:i,subscription:u,getServerState:r?()=>r:void 0}},[i,r]),a=y.useMemo(()=>i.getState(),[i]);$se(()=>{const{subscription:u}=o;return u.onStateChange=u.notifyNestedSubs,u.trySubscribe(),a!==i.getState()&&u.notifyNestedSubs(),()=>{u.tryUnsubscribe(),u.onStateChange=void 0}},[o,a]);const s=n||Ol;return y.createElement(s.Provider,{value:o},t)}var WGe=Fse;function EO(e=Ol){return function(){return y.useContext(e)}}var GF=EO();function YF(e=Ol){const t=e===Ol?GF:EO(e),n=()=>{const{store:r}=t();return r};return Object.assign(n,{withTypes:()=>n}),n}var jse=YF();function Bse(e=Ol){const t=e===Ol?jse:YF(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var HGe=Bse(),zse=(e,t)=>e===t;function Use(e=Ol){const t=e===Ol?GF:EO(e),n=(r,i={})=>{const{equalityFn:o=zse}=typeof i=="function"?{equalityFn:i}:i,a=t(),{store:s,subscription:u,getServerState:l}=a;y.useRef(!0);const c=y.useCallback({[r.name](h){return r(h)}}[r.name],[r]),f=Ese.useSyncExternalStoreWithSelector(u.addNestedSub,s.getState,l||s.getState,c,o);return y.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var KGe=Use();function xM(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ux(...e){return t=>{let n=!1;const r=e.map(i=>{const o=xM(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Vse);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return I.jsx(RC,{...r,ref:t,children:y.isValidElement(a)?y.cloneElement(a,void 0,s):null})}return I.jsx(RC,{...r,ref:t,children:n})});Al.displayName="Slot";var RC=y.forwardRef((e,t)=>{const{children:n,...r}=e;if(y.isValidElement(n)){const i=Hse(n);return y.cloneElement(n,{...Wse(r,n.props),ref:t?Ux(t,i):i})}return y.Children.count(n)>1?y.Children.only(null):null});RC.displayName="SlotClone";var OO=({children:e})=>I.jsx(I.Fragment,{children:e});function Vse(e){return y.isValidElement(e)&&e.type===OO}function Wse(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Hse(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ZF(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;ttypeof e=="boolean"?`${e}`:e===0?"0":e,_M=dn,qGe=(e,t)=>n=>{var r;if(t?.variants==null)return _M(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,a=Object.keys(i).map(l=>{const c=n?.[l],f=o?.[l];if(c===null)return null;const h=wM(c)||wM(f);return i[l][h]}),s=n&&Object.entries(n).reduce((l,c)=>{let[f,h]=c;return h===void 0||(l[f]=h),l},{}),u=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,c)=>{let{class:f,className:h,...p}=c;return Object.entries(p).every(m=>{let[v,b]=m;return Array.isArray(b)?b.includes({...o,...s}[v]):{...o,...s}[v]===b})?[...l,f,h]:l},[]);return _M(e,a,u,n?.class,n?.className)},AO="-",Kse=e=>{const t=Gse(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{const s=a.split(AO);return s[0]===""&&s.length!==1&&s.shift(),XF(s,t)||qse(a)},getConflictingClassGroupIds:(a,s)=>{const u=n[a]||[];return s&&r[a]?[...u,...r[a]]:u}}},XF=(e,t)=>{if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),i=r?XF(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;const o=e.join(AO);return t.validators.find(({validator:a})=>a(o))?.classGroupId},SM=/^\[(.+)\]$/,qse=e=>{if(SM.test(e)){const t=SM.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Gse=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Zse(Object.entries(e.classGroups),n).forEach(([o,a])=>{DC(a,r,o,t)}),r},DC=(e,t,n,r)=>{e.forEach(i=>{if(typeof i=="string"){const o=i===""?t:CM(t,i);o.classGroupId=n;return}if(typeof i=="function"){if(Yse(i)){DC(i(r),t,n,r);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([o,a])=>{DC(a,CM(t,o),n,r)})})},CM=(e,t)=>{let n=e;return t.split(AO).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Yse=e=>e.isThemeGetter,Zse=(e,t)=>t?e.map(([n,r])=>{const i=r.map(o=>typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(([a,s])=>[t+a,s])):o);return[n,i]}):e,Xse=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const i=(o,a)=>{n.set(o,a),t++,t>e&&(t=0,r=n,n=new Map)};return{get(o){let a=n.get(o);if(a!==void 0)return a;if((a=r.get(o))!==void 0)return i(o,a),a},set(o,a){n.has(o)?n.set(o,a):i(o,a)}}},QF="!",Qse=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,i=t[0],o=t.length,a=s=>{const u=[];let l=0,c=0,f;for(let b=0;bc?f-c:void 0;return{modifiers:u,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:v}};return n?s=>n({className:s,parseClassName:a}):a},Jse=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},eue=e=>({cache:Xse(e.cacheSize),parseClassName:Qse(e),...Kse(e)}),tue=/\s+/,nue=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=t,o=[],a=e.trim().split(tue);let s="";for(let u=a.length-1;u>=0;u-=1){const l=a[u],{modifiers:c,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let m=!!p,v=r(m?h.substring(0,p):h);if(!v){if(!m){s=l+(s.length>0?" "+s:s);continue}if(v=r(h),!v){s=l+(s.length>0?" "+s:s);continue}m=!1}const b=Jse(c).join(":"),w=f?b+QF:b,x=w+v;if(o.includes(x))continue;o.push(x);const S=i(v,m);for(let O=0;O0?" "+s:s)}return s};function rue(){let e=0,t,n,r="";for(;e{if(typeof e=="string")return e;let t,n="";for(let r=0;rf(c),e());return n=eue(l),r=n.cache.get,i=n.cache.set,o=s,s(u)}function s(u){const l=r(u);if(l)return l;const c=nue(u,n);return i(u,c),c}return function(){return o(rue.apply(null,arguments))}}const Qn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ej=/^\[(?:([a-z-]+):)?(.+)\]$/i,oue=/^\d+\/\d+$/,aue=new Set(["px","full","screen"]),sue=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uue=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,lue=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,cue=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fue=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ks=e=>Ed(e)||aue.has(e)||oue.test(e),Wu=e=>Rh(e,"length",bue),Ed=e=>!!e&&!Number.isNaN(Number(e)),rS=e=>Rh(e,"number",Ed),Mp=e=>!!e&&Number.isInteger(Number(e)),due=e=>e.endsWith("%")&&Ed(e.slice(0,-1)),Xt=e=>ej.test(e),Hu=e=>sue.test(e),hue=new Set(["length","size","percentage"]),pue=e=>Rh(e,hue,tj),gue=e=>Rh(e,"position",tj),mue=new Set(["image","url"]),vue=e=>Rh(e,mue,wue),yue=e=>Rh(e,"",xue),Rp=()=>!0,Rh=(e,t,n)=>{const r=ej.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},bue=e=>uue.test(e)&&!lue.test(e),tj=()=>!1,xue=e=>cue.test(e),wue=e=>fue.test(e),_ue=()=>{const e=Qn("colors"),t=Qn("spacing"),n=Qn("blur"),r=Qn("brightness"),i=Qn("borderColor"),o=Qn("borderRadius"),a=Qn("borderSpacing"),s=Qn("borderWidth"),u=Qn("contrast"),l=Qn("grayscale"),c=Qn("hueRotate"),f=Qn("invert"),h=Qn("gap"),p=Qn("gradientColorStops"),m=Qn("gradientColorStopPositions"),v=Qn("inset"),b=Qn("margin"),w=Qn("opacity"),x=Qn("padding"),S=Qn("saturate"),O=Qn("scale"),E=Qn("sepia"),C=Qn("skew"),k=Qn("space"),M=Qn("translate"),N=()=>["auto","contain","none"],z=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",Xt,t],V=()=>[Xt,t],ne=()=>["",Ks,Wu],Z=()=>["auto",Ed,Xt],G=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],q=()=>["solid","dashed","dotted","double","none"],W=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>["start","end","center","between","around","evenly","stretch"],K=()=>["","0",Xt],Y=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[Ed,Xt];return{cacheSize:500,separator:":",theme:{colors:[Rp],spacing:[Ks,Wu],blur:["none","",Hu,Xt],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Hu,Xt],borderSpacing:V(),borderWidth:ne(),contrast:oe(),grayscale:K(),hueRotate:oe(),invert:K(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[due,Wu],inset:H(),margin:H(),opacity:oe(),padding:V(),saturate:oe(),scale:oe(),sepia:K(),skew:oe(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",Xt]}],container:["container"],columns:[{columns:[Hu]}],"break-after":[{"break-after":Y()}],"break-before":[{"break-before":Y()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...G(),Xt]}],overflow:[{overflow:z()}],"overflow-x":[{"overflow-x":z()}],"overflow-y":[{"overflow-y":z()}],overscroll:[{overscroll:N()}],"overscroll-x":[{"overscroll-x":N()}],"overscroll-y":[{"overscroll-y":N()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Mp,Xt]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Xt]}],grow:[{grow:K()}],shrink:[{shrink:K()}],order:[{order:["first","last","none",Mp,Xt]}],"grid-cols":[{"grid-cols":[Rp]}],"col-start-end":[{col:["auto",{span:["full",Mp,Xt]},Xt]}],"col-start":[{"col-start":Z()}],"col-end":[{"col-end":Z()}],"grid-rows":[{"grid-rows":[Rp]}],"row-start-end":[{row:["auto",{span:[Mp,Xt]},Xt]}],"row-start":[{"row-start":Z()}],"row-end":[{"row-end":Z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Xt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Xt]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...j()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...j(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...j(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Xt,t]}],"min-w":[{"min-w":[Xt,t,"min","max","fit"]}],"max-w":[{"max-w":[Xt,t,"none","full","min","max","fit","prose",{screen:[Hu]},Hu]}],h:[{h:[Xt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Xt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Xt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Hu,Wu]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rS]}],"font-family":[{font:[Rp]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Xt]}],"line-clamp":[{"line-clamp":["none",Ed,rS]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ks,Xt]}],"list-image":[{"list-image":["none",Xt]}],"list-style-type":[{list:["none","disc","decimal",Xt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ks,Wu]}],"underline-offset":[{"underline-offset":["auto",Ks,Xt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Xt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Xt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...G(),gue]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",pue]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vue]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[o]}],"rounded-s":[{"rounded-s":[o]}],"rounded-e":[{"rounded-e":[o]}],"rounded-t":[{"rounded-t":[o]}],"rounded-r":[{"rounded-r":[o]}],"rounded-b":[{"rounded-b":[o]}],"rounded-l":[{"rounded-l":[o]}],"rounded-ss":[{"rounded-ss":[o]}],"rounded-se":[{"rounded-se":[o]}],"rounded-ee":[{"rounded-ee":[o]}],"rounded-es":[{"rounded-es":[o]}],"rounded-tl":[{"rounded-tl":[o]}],"rounded-tr":[{"rounded-tr":[o]}],"rounded-br":[{"rounded-br":[o]}],"rounded-bl":[{"rounded-bl":[o]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...q(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:q()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...q()]}],"outline-offset":[{"outline-offset":[Ks,Xt]}],"outline-w":[{outline:[Ks,Wu]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Ks,Wu]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Hu,yue]}],"shadow-color":[{shadow:[Rp]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...W(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":W()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Hu,Xt]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[f]}],saturate:[{saturate:[S]}],sepia:[{sepia:[E]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[S]}],"backdrop-sepia":[{"backdrop-sepia":[E]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Xt]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",Xt]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",Xt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Mp,Xt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Xt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Xt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Xt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ks,Wu,rS]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},GGe=iue(_ue);var nj={exports:{}},Sue="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",Cue=Sue,Eue=Cue;function rj(){}function ij(){}ij.resetWarningCache=rj;var Oue=function(){function e(r,i,o,a,s,u){if(u!==Eue){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:ij,resetWarningCache:rj};return n.PropTypes=n,n};nj.exports=Oue();var Aue=nj.exports;const Mt=Pn(Aue);var Pue={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},kue=Object.defineProperty,Tue=Object.defineProperties,Mue=Object.getOwnPropertyDescriptors,$1=Object.getOwnPropertySymbols,oj=Object.prototype.hasOwnProperty,aj=Object.prototype.propertyIsEnumerable,EM=(e,t,n)=>t in e?kue(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,OM=(e,t)=>{for(var n in t||(t={}))oj.call(t,n)&&EM(e,n,t[n]);if($1)for(var n of $1(t))aj.call(t,n)&&EM(e,n,t[n]);return e},Rue=(e,t)=>Tue(e,Mue(t)),Due=(e,t)=>{var n={};for(var r in e)oj.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&$1)for(var r of $1(e))t.indexOf(r)<0&&aj.call(e,r)&&(n[r]=e[r]);return n},En=(e,t,n)=>{const r=y.forwardRef((i,o)=>{var a=i,{color:s="currentColor",size:u=24,stroke:l=2,children:c}=a,f=Due(a,["color","size","stroke","children"]);return y.createElement("svg",OM(Rue(OM({ref:o},Pue),{width:u,height:u,stroke:s,strokeWidth:l,className:`tabler-icon tabler-icon-${e}`}),f),[...n.map(([h,p])=>y.createElement(h,p)),...c||[]])});return r.propTypes={color:Mt.string,size:Mt.oneOfType([Mt.string,Mt.number]),stroke:Mt.oneOfType([Mt.string,Mt.number])},r.displayName=`${t}`,r},YGe=En("adjustments","IconAdjustments",[["path",{d:"M4 10a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M6 4v4",key:"svg-1"}],["path",{d:"M6 12v8",key:"svg-2"}],["path",{d:"M10 16a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-3"}],["path",{d:"M12 4v10",key:"svg-4"}],["path",{d:"M12 18v2",key:"svg-5"}],["path",{d:"M16 7a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-6"}],["path",{d:"M18 4v1",key:"svg-7"}],["path",{d:"M18 9v11",key:"svg-8"}]]),ZGe=En("brand-telegram","IconBrandTelegram",[["path",{d:"M15 10l-4 4l6 6l4 -16l-18 7l4 2l2 6l3 -4",key:"svg-0"}]]),XGe=En("building-store","IconBuildingStore",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M3 7v1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1m0 1a3 3 0 0 0 6 0v-1h-18l2 -4h14l2 4",key:"svg-1"}],["path",{d:"M5 21l0 -10.15",key:"svg-2"}],["path",{d:"M19 21l0 -10.15",key:"svg-3"}],["path",{d:"M9 21v-4a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v4",key:"svg-4"}]]),QGe=En("building","IconBuilding",[["path",{d:"M3 21l18 0",key:"svg-0"}],["path",{d:"M9 8l1 0",key:"svg-1"}],["path",{d:"M9 12l1 0",key:"svg-2"}],["path",{d:"M9 16l1 0",key:"svg-3"}],["path",{d:"M14 8l1 0",key:"svg-4"}],["path",{d:"M14 12l1 0",key:"svg-5"}],["path",{d:"M14 16l1 0",key:"svg-6"}],["path",{d:"M5 21v-16a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v16",key:"svg-7"}]]),JGe=En("cash","IconCash",[["path",{d:"M7 9m0 2a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M14 14m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-1"}],["path",{d:"M17 9v-2a2 2 0 0 0 -2 -2h-10a2 2 0 0 0 -2 2v6a2 2 0 0 0 2 2h2",key:"svg-2"}]]),eYe=En("chevron-down","IconChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]),tYe=En("chevrons-left","IconChevronsLeft",[["path",{d:"M11 7l-5 5l5 5",key:"svg-0"}],["path",{d:"M17 7l-5 5l5 5",key:"svg-1"}]]),nYe=En("copy","IconCopy",[["path",{d:"M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z",key:"svg-0"}],["path",{d:"M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1",key:"svg-1"}]]),rYe=En("credit-card","IconCreditCard",[["path",{d:"M3 5m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v8a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 10l18 0",key:"svg-1"}],["path",{d:"M7 15l.01 0",key:"svg-2"}],["path",{d:"M11 15l2 0",key:"svg-3"}]]),iYe=En("dashboard","IconDashboard",[["path",{d:"M12 13m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0",key:"svg-0"}],["path",{d:"M13.45 11.55l2.05 -2.05",key:"svg-1"}],["path",{d:"M6.4 20a9 9 0 1 1 11.2 0z",key:"svg-2"}]]),oYe=En("device-desktop","IconDeviceDesktop",[["path",{d:"M3 5a1 1 0 0 1 1 -1h16a1 1 0 0 1 1 1v10a1 1 0 0 1 -1 1h-16a1 1 0 0 1 -1 -1v-10z",key:"svg-0"}],["path",{d:"M7 20h10",key:"svg-1"}],["path",{d:"M9 16v4",key:"svg-2"}],["path",{d:"M15 16v4",key:"svg-3"}]]),aYe=En("discount-check","IconDiscountCheck",[["path",{d:"M5 7.2a2.2 2.2 0 0 1 2.2 -2.2h1a2.2 2.2 0 0 0 1.55 -.64l.7 -.7a2.2 2.2 0 0 1 3.12 0l.7 .7c.412 .41 .97 .64 1.55 .64h1a2.2 2.2 0 0 1 2.2 2.2v1c0 .58 .23 1.138 .64 1.55l.7 .7a2.2 2.2 0 0 1 0 3.12l-.7 .7a2.2 2.2 0 0 0 -.64 1.55v1a2.2 2.2 0 0 1 -2.2 2.2h-1a2.2 2.2 0 0 0 -1.55 .64l-.7 .7a2.2 2.2 0 0 1 -3.12 0l-.7 -.7a2.2 2.2 0 0 0 -1.55 -.64h-1a2.2 2.2 0 0 1 -2.2 -2.2v-1a2.2 2.2 0 0 0 -.64 -1.55l-.7 -.7a2.2 2.2 0 0 1 0 -3.12l.7 -.7a2.2 2.2 0 0 0 .64 -1.55v-1",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]),sYe=En("eye-off","IconEyeOff",[["path",{d:"M10.585 10.587a2 2 0 0 0 2.829 2.828",key:"svg-0"}],["path",{d:"M16.681 16.673a8.717 8.717 0 0 1 -4.681 1.327c-3.6 0 -6.6 -2 -9 -6c1.272 -2.12 2.712 -3.678 4.32 -4.674m2.86 -1.146a9.055 9.055 0 0 1 1.82 -.18c3.6 0 6.6 2 9 6c-.666 1.11 -1.379 2.067 -2.138 2.87",key:"svg-1"}],["path",{d:"M3 3l18 18",key:"svg-2"}]]),uYe=En("eye","IconEye",[["path",{d:"M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6",key:"svg-1"}]]),lYe=En("file-text","IconFileText",[["path",{d:"M14 3v4a1 1 0 0 0 1 1h4",key:"svg-0"}],["path",{d:"M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z",key:"svg-1"}],["path",{d:"M9 9l1 0",key:"svg-2"}],["path",{d:"M9 13l6 0",key:"svg-3"}],["path",{d:"M9 17l6 0",key:"svg-4"}]]),cYe=En("loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]]),fYe=En("lock","IconLock",[["path",{d:"M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z",key:"svg-0"}],["path",{d:"M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0",key:"svg-1"}],["path",{d:"M8 11v-4a4 4 0 1 1 8 0v4",key:"svg-2"}]]),dYe=En("mail","IconMail",[["path",{d:"M3 7a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-10z",key:"svg-0"}],["path",{d:"M3 7l9 6l9 -6",key:"svg-1"}]]),hYe=En("menu-2","IconMenu2",[["path",{d:"M4 6l16 0",key:"svg-0"}],["path",{d:"M4 12l16 0",key:"svg-1"}],["path",{d:"M4 18l16 0",key:"svg-2"}]]),pYe=En("moon","IconMoon",[["path",{d:"M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z",key:"svg-0"}]]),gYe=En("news","IconNews",[["path",{d:"M16 6h3a1 1 0 0 1 1 1v11a2 2 0 0 1 -4 0v-13a1 1 0 0 0 -1 -1h-10a1 1 0 0 0 -1 1v12a3 3 0 0 0 3 3h11",key:"svg-0"}],["path",{d:"M8 8l4 0",key:"svg-1"}],["path",{d:"M8 12l4 0",key:"svg-2"}],["path",{d:"M8 16l4 0",key:"svg-3"}]]),mYe=En("route","IconRoute",[["path",{d:"M3 19a2 2 0 1 0 4 0a2 2 0 0 0 -4 0",key:"svg-0"}],["path",{d:"M19 7a2 2 0 1 0 0 -4a2 2 0 0 0 0 4z",key:"svg-1"}],["path",{d:"M11 19h5.5a3.5 3.5 0 0 0 0 -7h-8a3.5 3.5 0 0 1 0 -7h4.5",key:"svg-2"}]]),vYe=En("server-bolt","IconServerBolt",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M15 20h-9a3 3 0 0 1 -3 -3v-2a3 3 0 0 1 3 -3h12",key:"svg-1"}],["path",{d:"M7 8v.01",key:"svg-2"}],["path",{d:"M7 16v.01",key:"svg-3"}],["path",{d:"M20 15l-2 3h3l-2 3",key:"svg-4"}]]),yYe=En("server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]]),bYe=En("settings","IconSettings",[["path",{d:"M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065z",key:"svg-0"}],["path",{d:"M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",key:"svg-1"}]]),xYe=En("sun","IconSun",[["path",{d:"M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7",key:"svg-1"}]]),wYe=En("ticket","IconTicket",[["path",{d:"M15 5l0 2",key:"svg-0"}],["path",{d:"M15 11l0 2",key:"svg-1"}],["path",{d:"M15 17l0 2",key:"svg-2"}],["path",{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2",key:"svg-3"}]]),_Ye=En("user-circle","IconUserCircle",[["path",{d:"M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M12 10m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0",key:"svg-1"}],["path",{d:"M6.168 18.849a4 4 0 0 1 3.832 -2.849h4a4 4 0 0 1 3.834 2.855",key:"svg-2"}]]),SYe=En("user","IconUser",[["path",{d:"M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",key:"svg-0"}],["path",{d:"M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}]]),CYe=En("users","IconUsers",[["path",{d:"M9 7m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",key:"svg-0"}],["path",{d:"M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",key:"svg-1"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"svg-2"}],["path",{d:"M21 21v-2a4 4 0 0 0 -3 -3.85",key:"svg-3"}]]),EYe=En("x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function fi(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $ue=typeof Symbol=="function"&&Symbol.observable||"@@observable",AM=$ue,iS=()=>Math.random().toString(36).substring(7).split("").join("."),Iue={INIT:`@@redux/INIT${iS()}`,REPLACE:`@@redux/REPLACE${iS()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${iS()}`},I1=Iue;function PO(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function sj(e,t,n){if(typeof e!="function")throw new Error(fi(2));if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(fi(0));if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(fi(1));return n(sj)(e,t)}let r=e,i=t,o=new Map,a=o,s=0,u=!1;function l(){a===o&&(a=new Map,o.forEach((b,w)=>{a.set(w,b)}))}function c(){if(u)throw new Error(fi(3));return i}function f(b){if(typeof b!="function")throw new Error(fi(4));if(u)throw new Error(fi(5));let w=!0;l();const x=s++;return a.set(x,b),function(){if(w){if(u)throw new Error(fi(6));w=!1,l(),a.delete(x),o=null}}}function h(b){if(!PO(b))throw new Error(fi(7));if(typeof b.type>"u")throw new Error(fi(8));if(typeof b.type!="string")throw new Error(fi(17));if(u)throw new Error(fi(9));try{u=!0,i=r(i,b)}finally{u=!1}return(o=a).forEach(x=>{x()}),b}function p(b){if(typeof b!="function")throw new Error(fi(10));r=b,h({type:I1.REPLACE})}function m(){const b=f;return{subscribe(w){if(typeof w!="object"||w===null)throw new Error(fi(11));function x(){const O=w;O.next&&O.next(c())}return x(),{unsubscribe:b(x)}},[AM](){return this}}}return h({type:I1.INIT}),{dispatch:h,subscribe:f,getState:c,replaceReducer:p,[AM]:m}}function Nue(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:I1.INIT})>"u")throw new Error(fi(12));if(typeof n(void 0,{type:I1.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(fi(13))})}function Lue(e){const t=Object.keys(e),n={};for(let o=0;o"u")throw s&&s.type,new Error(fi(14));l[f]=m,u=u||m!==p}return u=u||r.length!==Object.keys(a).length,u?l:a}}function N1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...r)=>t(n(...r)))}function Fue(...e){return t=>(n,r)=>{const i=t(n,r);let o=()=>{throw new Error(fi(15))};const a={getState:i.getState,dispatch:(u,...l)=>o(u,...l)},s=e.map(u=>u(a));return o=N1(...s)(i.dispatch),{...i,dispatch:o}}}function jue(e){return PO(e)&&"type"in e&&typeof e.type=="string"}var uj=Symbol.for("immer-nothing"),PM=Symbol.for("immer-draftable"),zo=Symbol.for("immer-state");function Fa(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Kd=Object.getPrototypeOf;function Vc(e){return!!e&&!!e[zo]}function yu(e){return e?lj(e)||Array.isArray(e)||!!e[PM]||!!e.constructor?.[PM]||Wx(e)||Hx(e):!1}var Bue=Object.prototype.constructor.toString();function lj(e){if(!e||typeof e!="object")return!1;const t=Kd(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Bue}function L1(e,t){Vx(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Vx(e){const t=e[zo];return t?t.type_:Array.isArray(e)?1:Wx(e)?2:Hx(e)?3:0}function $C(e,t){return Vx(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function cj(e,t,n){const r=Vx(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function zue(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Wx(e){return e instanceof Map}function Hx(e){return e instanceof Set}function lc(e){return e.copy_||e.base_}function IC(e,t){if(Wx(e))return new Map(e);if(Hx(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&lj(e))return Kd(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[zo];let r=Reflect.ownKeys(n);for(let i=0;i1&&(e.set=e.add=e.clear=e.delete=Uue),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>kO(r,!0))),e}function Uue(){Fa(2)}function Kx(e){return Object.isFrozen(e)}var Vue={};function Wc(e){const t=Vue[e];return t||Fa(0,e),t}var X0;function fj(){return X0}function Wue(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function kM(e,t){t&&(Wc("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function NC(e){LC(e),e.drafts_.forEach(Hue),e.drafts_=null}function LC(e){e===X0&&(X0=e.parent_)}function TM(e){return X0=Wue(X0,e)}function Hue(e){const t=e[zo];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function MM(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[zo].modified_&&(NC(t),Fa(4)),yu(e)&&(e=F1(t,e),t.parent_||j1(t,e)),t.patches_&&Wc("Patches").generateReplacementPatches_(n[zo].base_,e,t.patches_,t.inversePatches_)):e=F1(t,n,[]),NC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==uj?e:void 0}function F1(e,t,n){if(Kx(t))return t;const r=t[zo];if(!r)return L1(t,(i,o)=>RM(e,r,t,i,o,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return j1(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let o=i,a=!1;r.type_===3&&(o=new Set(i),i.clear(),a=!0),L1(o,(s,u)=>RM(e,r,i,s,u,n,a)),j1(e,i,!1),n&&e.patches_&&Wc("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function RM(e,t,n,r,i,o,a){if(Vc(i)){const s=o&&t&&t.type_!==3&&!$C(t.assigned_,r)?o.concat(r):void 0,u=F1(e,i,s);if(cj(n,r,u),Vc(u))e.canAutoFreeze_=!1;else return}else a&&n.add(i);if(yu(i)&&!Kx(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;F1(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&j1(e,i)}}function j1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kO(t,n)}function Kue(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:fj(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,o=TO;n&&(i=[r],o=Q0);const{revoke:a,proxy:s}=Proxy.revocable(i,o);return r.draft_=s,r.revoke_=a,s}var TO={get(e,t){if(t===zo)return e;const n=lc(e);if(!$C(n,t))return que(e,n,t);const r=n[t];return e.finalized_||!yu(r)?r:r===oS(e.base_,t)?(aS(e),e.copy_[t]=jC(r,e)):r},has(e,t){return t in lc(e)},ownKeys(e){return Reflect.ownKeys(lc(e))},set(e,t,n){const r=dj(lc(e),t);if(r?.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=oS(lc(e),t),o=i?.[zo];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(zue(n,i)&&(n!==void 0||$C(e.base_,t)))return!0;aS(e),FC(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return oS(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,aS(e),FC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=lc(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Fa(11)},getPrototypeOf(e){return Kd(e.base_)},setPrototypeOf(){Fa(12)}},Q0={};L1(TO,(e,t)=>{Q0[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Q0.deleteProperty=function(e,t){return Q0.set.call(this,e,t,void 0)};Q0.set=function(e,t,n){return TO.set.call(this,e[0],t,n,e[0])};function oS(e,t){const n=e[zo];return(n?lc(n):e)[t]}function que(e,t,n){const r=dj(t,n);return r?"value"in r?r.value:r.get?.call(e.draft_):void 0}function dj(e,t){if(!(t in e))return;let n=Kd(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Kd(n)}}function FC(e){e.modified_||(e.modified_=!0,e.parent_&&FC(e.parent_))}function aS(e){e.copy_||(e.copy_=IC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Gue=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const o=n;n=t;const a=this;return function(u=o,...l){return a.produce(u,c=>n.call(this,c,...l))}}typeof n!="function"&&Fa(6),r!==void 0&&typeof r!="function"&&Fa(7);let i;if(yu(t)){const o=TM(this),a=jC(t,void 0);let s=!0;try{i=n(a),s=!1}finally{s?NC(o):LC(o)}return kM(o,r),MM(i,o)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===uj&&(i=void 0),this.autoFreeze_&&kO(i,!0),r){const o=[],a=[];Wc("Patches").generateReplacementPatches_(t,i,o,a),r(o,a)}return i}else Fa(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(a,...s)=>this.produceWithPatches(a,u=>t(u,...s));let r,i;return[this.produce(t,n,(a,s)=>{r=a,i=s}),r,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){yu(e)||Fa(8),Vc(e)&&(e=Yue(e));const t=TM(this),n=jC(e,void 0);return n[zo].isManual_=!0,LC(t),n}finishDraft(e,t){const n=e&&e[zo];(!n||!n.isManual_)&&Fa(9);const{scope_:r}=n;return kM(r,t),MM(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=Wc("Patches").applyPatches_;return Vc(e)?r(e,t):this.produce(e,i=>r(i,t))}};function jC(e,t){const n=Wx(e)?Wc("MapSet").proxyMap_(e,t):Hx(e)?Wc("MapSet").proxySet_(e,t):Kue(e,t);return(t?t.scope_:fj()).drafts_.push(n),n}function Yue(e){return Vc(e)||Fa(10,e),hj(e)}function hj(e){if(!yu(e)||Kx(e))return e;const t=e[zo];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=IC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=IC(e,!0);return L1(n,(r,i)=>{cj(n,r,hj(i))}),t&&(t.finalized_=!1),n}var Uo=new Gue,pj=Uo.produce;Uo.produceWithPatches.bind(Uo);Uo.setAutoFreeze.bind(Uo);Uo.setUseStrictShallowCopy.bind(Uo);Uo.applyPatches.bind(Uo);Uo.createDraft.bind(Uo);Uo.finishDraft.bind(Uo);function Zue(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Xue(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Que(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var DM=e=>Array.isArray(e)?e:[e];function Jue(e){const t=Array.isArray(e[0])?e[0]:e;return Que(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function ele(e,t){const n=[],{length:r}=e;for(let i=0;i{n=Jv(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function ile(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,s,u={},l=i.pop();typeof l=="object"&&(u=l,l=i.pop()),Zue(l,`createSelector expects an output function after the inputs, but received: [${typeof l}]`);const c={...n,...u},{memoize:f,memoizeOptions:h=[],argsMemoize:p=gj,argsMemoizeOptions:m=[],devModeChecks:v={}}=c,b=DM(h),w=DM(m),x=Jue(i),S=f(function(){return o++,l.apply(null,arguments)},...b),O=p(function(){a++;const C=ele(x,arguments);return s=S.apply(null,C),s},...w);return Object.assign(O,{resultFunc:l,memoizedResultFunc:S,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>s,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:f,argsMemoize:p})};return Object.assign(r,{withTypes:()=>r}),r}var ole=ile(gj),ale=Object.assign((e,t=ole)=>{Xue(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,s,u)=>(a[n[u]]=s,a),{}))},{withTypes:()=>ale});function mj(e){return({dispatch:n,getState:r})=>i=>o=>typeof o=="function"?o(n,r,e):i(o)}var sle=mj(),ule=mj,lle=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?N1:N1.apply(null,arguments)},cle=e=>e&&typeof e.match=="function";function b0(e,t){function n(...r){if(t){let i=t(...r);if(!i)throw new Error(cu(0));return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:r[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=r=>jue(r)&&r.type===e,n}var vj=class i0 extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,i0.prototype)}static get[Symbol.species](){return i0}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new i0(...t[0].concat(this)):new i0(...t.concat(this))}};function IM(e){return yu(e)?pj(e,()=>{}):e}function NM(e,t,n){return e.has(t)?e.get(t):e.set(t,n(t)).get(t)}function fle(e){return typeof e=="boolean"}var dle=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new vj;return n&&(fle(n)?a.push(sle):a.push(ule(n.extraArgument))),a},hle="RTK_autoBatch",LM=e=>t=>{setTimeout(t,e)},ple=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,u=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:LM(10):e.type==="callback"?e.queueNotification:LM(e.timeout),l=()=>{a=!1,o&&(o=!1,s.forEach(c=>c()))};return Object.assign({},r,{subscribe(c){const f=()=>i&&c(),h=r.subscribe(f);return s.add(c),()=>{h(),s.delete(c)}},dispatch(c){try{return i=!c?.meta?.[hle],o=!i,o&&(a||(a=!0,u(l))),r.dispatch(c)}finally{i=!0}}})},gle=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new vj(e);return r&&i.push(ple(typeof r=="object"?r:void 0)),i};function OYe(e){const t=dle(),{reducer:n=void 0,middleware:r,devTools:i=!0,preloadedState:o=void 0,enhancers:a=void 0}=e;let s;if(typeof n=="function")s=n;else if(PO(n))s=Lue(n);else throw new Error(cu(1));let u;typeof r=="function"?u=r(t):u=t();let l=N1;i&&(l=lle({trace:!1,...typeof i=="object"&&i}));const c=Fue(...u),f=gle(c);let h=typeof a=="function"?a(f):f();const p=l(...h);return sj(s,o,p)}function yj(e){const t={},n=[];let r;const i={addCase(o,a){const s=typeof o=="string"?o:o.type;if(!s)throw new Error(cu(28));if(s in t)throw new Error(cu(29));return t[s]=a,i},addMatcher(o,a){return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){return r=o,i}};return e(i),[t,n,r]}function mle(e){return typeof e=="function"}function vle(e,t){let[n,r,i]=yj(t),o;if(mle(e))o=()=>IM(e());else{const s=IM(e);o=()=>s}function a(s=o(),u){let l=[n[u.type],...r.filter(({matcher:c})=>c(u)).map(({reducer:c})=>c)];return l.filter(c=>!!c).length===0&&(l=[i]),l.reduce((c,f)=>{if(f)if(Vc(c)){const p=f(c,u);return p===void 0?c:p}else{if(yu(c))return pj(c,h=>f(h,u));{const h=f(c,u);if(h===void 0){if(c===null)return c;throw Error("A case reducer on a non-draftable value must not return undefined")}return h}}return c},s)}return a.getInitialState=o,a}var yle=(e,t)=>cle(e)?e.match(t):e(t);function ble(...e){return t=>e.some(n=>yle(n,t))}var xle="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",wle=(e=21)=>{let t="",n=e;for(;n--;)t+=xle[Math.random()*64|0];return t},_le=["name","message","stack","code"],sS=class{constructor(e,t){this.payload=e,this.meta=t}_type},FM=class{constructor(e,t){this.payload=e,this.meta=t}_type},Sle=e=>{if(typeof e=="object"&&e!==null){const t={};for(const n of _le)typeof e[n]=="string"&&(t[n]=e[n]);return t}return{message:String(e)}},AYe=(()=>{function e(t,n,r){const i=b0(t+"/fulfilled",(u,l,c,f)=>({payload:u,meta:{...f||{},arg:c,requestId:l,requestStatus:"fulfilled"}})),o=b0(t+"/pending",(u,l,c)=>({payload:void 0,meta:{...c||{},arg:l,requestId:u,requestStatus:"pending"}})),a=b0(t+"/rejected",(u,l,c,f,h)=>({payload:f,error:(r&&r.serializeError||Sle)(u||"Rejected"),meta:{...h||{},arg:c,requestId:l,rejectedWithValue:!!f,requestStatus:"rejected",aborted:u?.name==="AbortError",condition:u?.name==="ConditionError"}}));function s(u){return(l,c,f)=>{const h=r?.idGenerator?r.idGenerator(u):wle(),p=new AbortController;let m,v;function b(x){v=x,p.abort()}const w=async function(){let x;try{let O=r?.condition?.(u,{getState:c,extra:f});if(Ele(O)&&(O=await O),O===!1||p.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const E=new Promise((C,k)=>{m=()=>{k({name:"AbortError",message:v||"Aborted"})},p.signal.addEventListener("abort",m)});l(o(h,u,r?.getPendingMeta?.({requestId:h,arg:u},{getState:c,extra:f}))),x=await Promise.race([E,Promise.resolve(n(u,{dispatch:l,getState:c,extra:f,requestId:h,signal:p.signal,abort:b,rejectWithValue:(C,k)=>new sS(C,k),fulfillWithValue:(C,k)=>new FM(C,k)})).then(C=>{if(C instanceof sS)throw C;return C instanceof FM?i(C.payload,h,u,C.meta):i(C,h,u)})])}catch(O){x=O instanceof sS?a(null,h,u,O.payload,O.meta):a(O,h,u)}finally{m&&p.signal.removeEventListener("abort",m)}return r&&!r.dispatchConditionRejection&&a.match(x)&&x.meta.condition||l(x),x}();return Object.assign(w,{abort:b,requestId:h,arg:u,unwrap(){return w.then(Cle)}})}}return Object.assign(s,{pending:o,rejected:a,fulfilled:i,settled:ble(a,i),typePrefix:t})}return e.withTypes=()=>e,e})();function Cle(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function Ele(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var Ole=Symbol.for("rtk-slice-createasyncthunk");function Ale(e,t){return`${e}/${t}`}function Ple({creators:e}={}){const t=e?.asyncThunk?.[Ole];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(cu(11));const a=(typeof r.reducers=="function"?r.reducers(Tle()):r.reducers)||{},s=Object.keys(a),u={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},l={addCase(x,S){const O=typeof x=="string"?x:x.type;if(!O)throw new Error(cu(12));if(O in u.sliceCaseReducersByType)throw new Error(cu(13));return u.sliceCaseReducersByType[O]=S,l},addMatcher(x,S){return u.sliceMatchers.push({matcher:x,reducer:S}),l},exposeAction(x,S){return u.actionCreators[x]=S,l},exposeCaseReducer(x,S){return u.sliceCaseReducersByName[x]=S,l}};s.forEach(x=>{const S=a[x],O={reducerName:x,type:Ale(i,x),createNotation:typeof r.reducers=="function"};Rle(S)?$le(O,S,l,t):Mle(O,S,l)});function c(){const[x={},S=[],O=void 0]=typeof r.extraReducers=="function"?yj(r.extraReducers):[r.extraReducers],E={...x,...u.sliceCaseReducersByType};return vle(r.initialState,C=>{for(let k in E)C.addCase(k,E[k]);for(let k of u.sliceMatchers)C.addMatcher(k.matcher,k.reducer);for(let k of S)C.addMatcher(k.matcher,k.reducer);O&&C.addDefaultCase(O)})}const f=x=>x,h=new Map;let p;function m(x,S){return p||(p=c()),p(x,S)}function v(){return p||(p=c()),p.getInitialState()}function b(x,S=!1){function O(C){let k=C[x];return typeof k>"u"&&S&&(k=v()),k}function E(C=f){const k=NM(h,S,()=>new WeakMap);return NM(k,C,()=>{const M={};for(const[N,z]of Object.entries(r.selectors??{}))M[N]=kle(z,C,v,S);return M})}return{reducerPath:x,getSelectors:E,get selectors(){return E(O)},selectSlice:O}}const w={name:i,reducer:m,actions:u.actionCreators,caseReducers:u.sliceCaseReducersByName,getInitialState:v,...b(o),injectInto(x,{reducerPath:S,...O}={}){const E=S??o;return x.inject({reducerPath:E,reducer:m},O),{...w,...b(E,!0)}}};return w}}function kle(e,t,n,r){function i(o,...a){let s=t(o);return typeof s>"u"&&r&&(s=n()),e(s,...a)}return i.unwrapped=e,i}var PYe=Ple();function Tle(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Mle({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Dle(r))throw new Error(cu(17));o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?b0(e,a):b0(e))}function Rle(e){return e._reducerDefinitionType==="asyncThunk"}function Dle(e){return e._reducerDefinitionType==="reducerWithPrepare"}function $le({type:e,reducerName:t},n,r,i){if(!i)throw new Error(cu(18));const{payloadCreator:o,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,f=i(e,o,c);r.exposeAction(t,f),a&&r.addCase(f.fulfilled,a),s&&r.addCase(f.pending,s),u&&r.addCase(f.rejected,u),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:a||ey,pending:s||ey,rejected:u||ey,settled:l||ey})}function ey(){}function cu(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}function bj(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ile}=Object.prototype,{getPrototypeOf:MO}=Object,qx=(e=>t=>{const n=Ile.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ts=e=>(e=e.toLowerCase(),t=>qx(t)===e),Gx=e=>t=>typeof t===e,{isArray:Dh}=Array,J0=Gx("undefined");function Nle(e){return e!==null&&!J0(e)&&e.constructor!==null&&!J0(e.constructor)&&No(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xj=ts("ArrayBuffer");function Lle(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xj(e.buffer),t}const Fle=Gx("string"),No=Gx("function"),wj=Gx("number"),Yx=e=>e!==null&&typeof e=="object",jle=e=>e===!0||e===!1,Gy=e=>{if(qx(e)!=="object")return!1;const t=MO(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ble=ts("Date"),zle=ts("File"),Ule=ts("Blob"),Vle=ts("FileList"),Wle=e=>Yx(e)&&No(e.pipe),Hle=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||No(e.append)&&((t=qx(e))==="formdata"||t==="object"&&No(e.toString)&&e.toString()==="[object FormData]"))},Kle=ts("URLSearchParams"),[qle,Gle,Yle,Zle]=["ReadableStream","Request","Response","Headers"].map(ts),Xle=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ym(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),Dh(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const wc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Sj=e=>!J0(e)&&e!==wc;function BC(){const{caseless:e}=Sj(this)&&this||{},t={},n=(r,i)=>{const o=e&&_j(t,i)||i;Gy(t[o])&&Gy(r)?t[o]=BC(t[o],r):Gy(r)?t[o]=BC({},r):Dh(r)?t[o]=r.slice():t[o]=r};for(let r=0,i=arguments.length;r(ym(t,(i,o)=>{n&&No(i)?e[o]=bj(i,n):e[o]=i},{allOwnKeys:r}),e),Jle=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),ece=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},tce=(e,t,n,r)=>{let i,o,a;const s={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),o=i.length;o-- >0;)a=i[o],(!r||r(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=n!==!1&&MO(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},nce=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},rce=e=>{if(!e)return null;if(Dh(e))return e;let t=e.length;if(!wj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},ice=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&MO(Uint8Array)),oce=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const o=i.value;t.call(e,o[0],o[1])}},ace=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sce=ts("HTMLFormElement"),uce=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),jM=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),lce=ts("RegExp"),Cj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ym(n,(i,o)=>{let a;(a=t(i,o,e))!==!1&&(r[o]=a||i)}),Object.defineProperties(e,r)},cce=e=>{Cj(e,(t,n)=>{if(No(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(No(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},fce=(e,t)=>{const n={},r=i=>{i.forEach(o=>{n[o]=!0})};return Dh(e)?r(e):r(String(e).split(t)),n},dce=()=>{},hce=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,uS="abcdefghijklmnopqrstuvwxyz",BM="0123456789",Ej={DIGIT:BM,ALPHA:uS,ALPHA_DIGIT:uS+uS.toUpperCase()+BM},pce=(e=16,t=Ej.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function gce(e){return!!(e&&No(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const mce=e=>{const t=new Array(10),n=(r,i)=>{if(Yx(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const o=Dh(r)?[]:{};return ym(r,(a,s)=>{const u=n(a,i+1);!J0(u)&&(o[s]=u)}),t[i]=void 0,o}}return r};return n(e,0)},vce=ts("AsyncFunction"),yce=e=>e&&(Yx(e)||No(e))&&No(e.then)&&No(e.catch),Oj=((e,t)=>e?setImmediate:t?((n,r)=>(wc.addEventListener("message",({source:i,data:o})=>{i===wc&&o===n&&r.length&&r.shift()()},!1),i=>{r.push(i),wc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",No(wc.postMessage)),bce=typeof queueMicrotask<"u"?queueMicrotask.bind(wc):typeof process<"u"&&process.nextTick||Oj,_e={isArray:Dh,isArrayBuffer:xj,isBuffer:Nle,isFormData:Hle,isArrayBufferView:Lle,isString:Fle,isNumber:wj,isBoolean:jle,isObject:Yx,isPlainObject:Gy,isReadableStream:qle,isRequest:Gle,isResponse:Yle,isHeaders:Zle,isUndefined:J0,isDate:Ble,isFile:zle,isBlob:Ule,isRegExp:lce,isFunction:No,isStream:Wle,isURLSearchParams:Kle,isTypedArray:ice,isFileList:Vle,forEach:ym,merge:BC,extend:Qle,trim:Xle,stripBOM:Jle,inherits:ece,toFlatObject:tce,kindOf:qx,kindOfTest:ts,endsWith:nce,toArray:rce,forEachEntry:oce,matchAll:ace,isHTMLForm:sce,hasOwnProperty:jM,hasOwnProp:jM,reduceDescriptors:Cj,freezeMethods:cce,toObjectSet:fce,toCamelCase:uce,noop:dce,toFiniteNumber:hce,findKey:_j,global:wc,isContextDefined:Sj,ALPHABET:Ej,generateString:pce,isSpecCompliantForm:gce,toJSONObject:mce,isAsyncFn:vce,isThenable:yce,setImmediate:Oj,asap:bce};function Kt(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status?i.status:null)}_e.inherits(Kt,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:_e.toJSONObject(this.config),code:this.code,status:this.status}}});const Aj=Kt.prototype,Pj={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Pj[e]={value:e}});Object.defineProperties(Kt,Pj);Object.defineProperty(Aj,"isAxiosError",{value:!0});Kt.from=(e,t,n,r,i,o)=>{const a=Object.create(Aj);return _e.toFlatObject(e,a,function(u){return u!==Error.prototype},s=>s!=="isAxiosError"),Kt.call(a,e.message,t,n,r,i),a.cause=e,a.name=e.name,o&&Object.assign(a,o),a};const xce=null;function zC(e){return _e.isPlainObject(e)||_e.isArray(e)}function kj(e){return _e.endsWith(e,"[]")?e.slice(0,-2):e}function zM(e,t,n){return e?e.concat(t).map(function(i,o){return i=kj(i),!n&&o?"["+i+"]":i}).join(n?".":""):t}function wce(e){return _e.isArray(e)&&!e.some(zC)}const _ce=_e.toFlatObject(_e,{},null,function(t){return/^is[A-Z]/.test(t)});function Zx(e,t,n){if(!_e.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=_e.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!_e.isUndefined(b[v])});const r=n.metaTokens,i=n.visitor||c,o=n.dots,a=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&_e.isSpecCompliantForm(t);if(!_e.isFunction(i))throw new TypeError("visitor must be a function");function l(m){if(m===null)return"";if(_e.isDate(m))return m.toISOString();if(!u&&_e.isBlob(m))throw new Kt("Blob is not supported. Use a Buffer instead.");return _e.isArrayBuffer(m)||_e.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function c(m,v,b){let w=m;if(m&&!b&&typeof m=="object"){if(_e.endsWith(v,"{}"))v=r?v:v.slice(0,-2),m=JSON.stringify(m);else if(_e.isArray(m)&&wce(m)||(_e.isFileList(m)||_e.endsWith(v,"[]"))&&(w=_e.toArray(m)))return v=kj(v),w.forEach(function(S,O){!(_e.isUndefined(S)||S===null)&&t.append(a===!0?zM([v],O,o):a===null?v:v+"[]",l(S))}),!1}return zC(m)?!0:(t.append(zM(b,v,o),l(m)),!1)}const f=[],h=Object.assign(_ce,{defaultVisitor:c,convertValue:l,isVisitable:zC});function p(m,v){if(!_e.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(m),_e.forEach(m,function(w,x){(!(_e.isUndefined(w)||w===null)&&i.call(t,w,_e.isString(x)?x.trim():x,v,h))===!0&&p(w,v?v.concat(x):[x])}),f.pop()}}if(!_e.isObject(e))throw new TypeError("data must be an object");return p(e),t}function UM(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function RO(e,t){this._pairs=[],e&&Zx(e,this,t)}const Tj=RO.prototype;Tj.append=function(t,n){this._pairs.push([t,n])};Tj.toString=function(t){const n=t?function(r){return t.call(this,r,UM)}:UM;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Sce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Mj(e,t,n){if(!t)return e;const r=n&&n.encode||Sce;_e.isFunction(n)&&(n={serialize:n});const i=n&&n.serialize;let o;if(i?o=i(t,n):o=_e.isURLSearchParams(t)?t.toString():new RO(t,n).toString(r),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class VM{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){_e.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Rj={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cce=typeof URLSearchParams<"u"?URLSearchParams:RO,Ece=typeof FormData<"u"?FormData:null,Oce=typeof Blob<"u"?Blob:null,Ace={isBrowser:!0,classes:{URLSearchParams:Cce,FormData:Ece,Blob:Oce},protocols:["http","https","file","blob","url","data"]},DO=typeof window<"u"&&typeof document<"u",UC=typeof navigator=="object"&&navigator||void 0,Pce=DO&&(!UC||["ReactNative","NativeScript","NS"].indexOf(UC.product)<0),kce=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Tce=DO&&window.location.href||"http://localhost",Mce=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:DO,hasStandardBrowserEnv:Pce,hasStandardBrowserWebWorkerEnv:kce,navigator:UC,origin:Tce},Symbol.toStringTag,{value:"Module"})),Mi={...Mce,...Ace};function Rce(e,t){return Zx(e,new Mi.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,o){return Mi.isNode&&_e.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function Dce(e){return _e.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $ce(e){const t={},n=Object.keys(e);let r;const i=n.length;let o;for(r=0;r=n.length;return a=!a&&_e.isArray(i)?i.length:a,u?(_e.hasOwnProp(i,a)?i[a]=[i[a],r]:i[a]=r,!s):((!i[a]||!_e.isObject(i[a]))&&(i[a]=[]),t(n,r,i[a],o)&&_e.isArray(i[a])&&(i[a]=$ce(i[a])),!s)}if(_e.isFormData(e)&&_e.isFunction(e.entries)){const n={};return _e.forEachEntry(e,(r,i)=>{t(Dce(r),i,n,0)}),n}return null}function Ice(e,t,n){if(_e.isString(e))try{return(t||JSON.parse)(e),_e.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(0,JSON.stringify)(e)}const bm={transitional:Rj,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,o=_e.isObject(t);if(o&&_e.isHTMLForm(t)&&(t=new FormData(t)),_e.isFormData(t))return i?JSON.stringify(Dj(t)):t;if(_e.isArrayBuffer(t)||_e.isBuffer(t)||_e.isStream(t)||_e.isFile(t)||_e.isBlob(t)||_e.isReadableStream(t))return t;if(_e.isArrayBufferView(t))return t.buffer;if(_e.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Rce(t,this.formSerializer).toString();if((s=_e.isFileList(t))||r.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Zx(s?{"files[]":t}:t,u&&new u,this.formSerializer)}}return o||i?(n.setContentType("application/json",!1),Ice(t)):t}],transformResponse:[function(t){const n=this.transitional||bm.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(_e.isResponse(t)||_e.isReadableStream(t))return t;if(t&&_e.isString(t)&&(r&&!this.responseType||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?Kt.from(s,Kt.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Mi.classes.FormData,Blob:Mi.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};_e.forEach(["delete","get","head","post","put","patch"],e=>{bm.headers[e]={}});const Nce=_e.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Lce=e=>{const t={};let n,r,i;return e&&e.split(` +`).forEach(function(a){i=a.indexOf(":"),n=a.substring(0,i).trim().toLowerCase(),r=a.substring(i+1).trim(),!(!n||t[n]&&Nce[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},WM=Symbol("internals");function Dp(e){return e&&String(e).trim().toLowerCase()}function Yy(e){return e===!1||e==null?e:_e.isArray(e)?e.map(Yy):String(e)}function Fce(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jce=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function lS(e,t,n,r,i){if(_e.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!_e.isString(t)){if(_e.isString(r))return t.indexOf(r)!==-1;if(_e.isRegExp(r))return r.test(t)}}function Bce(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function zce(e,t){const n=_e.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,o,a){return this[r].call(this,t,i,o,a)},configurable:!0})})}class ho{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function o(s,u,l){const c=Dp(u);if(!c)throw new Error("header name must be a non-empty string");const f=_e.findKey(i,c);(!f||i[f]===void 0||l===!0||l===void 0&&i[f]!==!1)&&(i[f||u]=Yy(s))}const a=(s,u)=>_e.forEach(s,(l,c)=>o(l,c,u));if(_e.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(_e.isString(t)&&(t=t.trim())&&!jce(t))a(Lce(t),n);else if(_e.isHeaders(t))for(const[s,u]of t.entries())o(u,s,r);else t!=null&&o(n,t,r);return this}get(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return Fce(i);if(_e.isFunction(n))return n.call(this,i,r);if(_e.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Dp(t),t){const r=_e.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||lS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function o(a){if(a=Dp(a),a){const s=_e.findKey(r,a);s&&(!n||lS(r,r[s],s,n))&&(delete r[s],i=!0)}}return _e.isArray(t)?t.forEach(o):o(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const o=n[r];(!t||lS(this,this[o],o,t,!0))&&(delete this[o],i=!0)}return i}normalize(t){const n=this,r={};return _e.forEach(this,(i,o)=>{const a=_e.findKey(r,o);if(a){n[a]=Yy(i),delete n[o];return}const s=t?Bce(o):String(o).trim();s!==o&&delete n[o],n[s]=Yy(i),r[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return _e.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&_e.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[WM]=this[WM]={accessors:{}}).accessors,i=this.prototype;function o(a){const s=Dp(a);r[s]||(zce(i,a),r[s]=!0)}return _e.isArray(t)?t.forEach(o):o(t),this}}ho.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);_e.reduceDescriptors(ho.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});_e.freezeMethods(ho);function cS(e,t){const n=this||bm,r=t||n,i=ho.from(r.headers);let o=r.data;return _e.forEach(e,function(s){o=s.call(n,o,i.normalize(),t?t.status:void 0)}),i.normalize(),o}function $j(e){return!!(e&&e.__CANCEL__)}function $h(e,t,n){Kt.call(this,e??"canceled",Kt.ERR_CANCELED,t,n),this.name="CanceledError"}_e.inherits($h,Kt,{__CANCEL__:!0});function Ij(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Kt("Request failed with status code "+n.status,[Kt.ERR_BAD_REQUEST,Kt.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Uce(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Vce(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,o=0,a;return t=t!==void 0?t:1e3,function(u){const l=Date.now(),c=r[o];a||(a=l),n[i]=u,r[i]=l;let f=o,h=0;for(;f!==i;)h+=n[f++],f=f%e;if(i=(i+1)%e,i===o&&(o=(o+1)%e),l-a{n=c,i=null,o&&(clearTimeout(o),o=null),e.apply(null,l)};return[(...l)=>{const c=Date.now(),f=c-n;f>=r?a(l,c):(i=l,o||(o=setTimeout(()=>{o=null,a(i)},r-f)))},()=>i&&a(i)]}const B1=(e,t,n=3)=>{let r=0;const i=Vce(50,250);return Wce(o=>{const a=o.loaded,s=o.lengthComputable?o.total:void 0,u=a-r,l=i(u),c=a<=s;r=a;const f={loaded:a,total:s,progress:s?a/s:void 0,bytes:u,rate:l||void 0,estimated:l&&s&&c?(s-a)/l:void 0,event:o,lengthComputable:s!=null,[t?"download":"upload"]:!0};e(f)},n)},HM=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},KM=e=>(...t)=>_e.asap(()=>e(...t)),Hce=Mi.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Mi.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Mi.origin),Mi.navigator&&/(msie|trident)/i.test(Mi.navigator.userAgent)):()=>!0,Kce=Mi.hasStandardBrowserEnv?{write(e,t,n,r,i,o){const a=[e+"="+encodeURIComponent(t)];_e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),_e.isString(r)&&a.push("path="+r),_e.isString(i)&&a.push("domain="+i),o===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qce(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Gce(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Nj(e,t){return e&&!qce(t)?Gce(e,t):t}const qM=e=>e instanceof ho?{...e}:e;function Hc(e,t){t=t||{};const n={};function r(l,c,f,h){return _e.isPlainObject(l)&&_e.isPlainObject(c)?_e.merge.call({caseless:h},l,c):_e.isPlainObject(c)?_e.merge({},c):_e.isArray(c)?c.slice():c}function i(l,c,f,h){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l,f,h)}else return r(l,c,f,h)}function o(l,c){if(!_e.isUndefined(c))return r(void 0,c)}function a(l,c){if(_e.isUndefined(c)){if(!_e.isUndefined(l))return r(void 0,l)}else return r(void 0,c)}function s(l,c,f){if(f in t)return r(l,c);if(f in e)return r(void 0,l)}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,c,f)=>i(qM(l),qM(c),f,!0)};return _e.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||i,h=f(e[c],t[c],c);_e.isUndefined(h)&&f!==s||(n[c]=h)}),n}const Lj=e=>{const t=Hc({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:o,headers:a,auth:s}=t;t.headers=a=ho.from(a),t.url=Mj(Nj(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let u;if(_e.isFormData(n)){if(Mi.hasStandardBrowserEnv||Mi.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[l,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...c].join("; "))}}if(Mi.hasStandardBrowserEnv&&(r&&_e.isFunction(r)&&(r=r(t)),r||r!==!1&&Hce(t.url))){const l=i&&o&&Kce.read(o);l&&a.set(i,l)}return t},Yce=typeof XMLHttpRequest<"u",Zce=Yce&&function(e){return new Promise(function(n,r){const i=Lj(e);let o=i.data;const a=ho.from(i.headers).normalize();let{responseType:s,onUploadProgress:u,onDownloadProgress:l}=i,c,f,h,p,m;function v(){p&&p(),m&&m(),i.cancelToken&&i.cancelToken.unsubscribe(c),i.signal&&i.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function w(){if(!b)return;const S=ho.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),E={data:!s||s==="text"||s==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};Ij(function(k){n(k),v()},function(k){r(k),v()},E),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new Kt("Request aborted",Kt.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new Kt("Network Error",Kt.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let O=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const E=i.transitional||Rj;i.timeoutErrorMessage&&(O=i.timeoutErrorMessage),r(new Kt(O,E.clarifyTimeoutError?Kt.ETIMEDOUT:Kt.ECONNABORTED,e,b)),b=null},o===void 0&&a.setContentType(null),"setRequestHeader"in b&&_e.forEach(a.toJSON(),function(O,E){b.setRequestHeader(E,O)}),_e.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),s&&s!=="json"&&(b.responseType=i.responseType),l&&([h,m]=B1(l,!0),b.addEventListener("progress",h)),u&&b.upload&&([f,p]=B1(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(i.cancelToken||i.signal)&&(c=S=>{b&&(r(!S||S.type?new $h(null,e,b):S),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(c),i.signal&&(i.signal.aborted?c():i.signal.addEventListener("abort",c)));const x=Uce(i.url);if(x&&Mi.protocols.indexOf(x)===-1){r(new Kt("Unsupported protocol "+x+":",Kt.ERR_BAD_REQUEST,e));return}b.send(o||null)})},Xce=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,i;const o=function(l){if(!i){i=!0,s();const c=l instanceof Error?l:this.reason;r.abort(c instanceof Kt?c:new $h(c instanceof Error?c.message:c))}};let a=t&&setTimeout(()=>{a=null,o(new Kt(`timeout ${t} of ms exceeded`,Kt.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(o):l.removeEventListener("abort",o)}),e=null)};e.forEach(l=>l.addEventListener("abort",o));const{signal:u}=r;return u.unsubscribe=()=>_e.asap(s),u}},Qce=function*(e,t){let n=e.byteLength;if(n{const i=Jce(e,t);let o=0,a,s=u=>{a||(a=!0,r&&r(u))};return new ReadableStream({async pull(u){try{const{done:l,value:c}=await i.next();if(l){s(),u.close();return}let f=c.byteLength;if(n){let h=o+=f;n(h)}u.enqueue(new Uint8Array(c))}catch(l){throw s(l),l}},cancel(u){return s(u),i.return()}},{highWaterMark:2})},Xx=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Fj=Xx&&typeof ReadableStream=="function",tfe=Xx&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),jj=(e,...t)=>{try{return!!e(...t)}catch{return!1}},nfe=Fj&&jj(()=>{let e=!1;const t=new Request(Mi.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),YM=64*1024,VC=Fj&&jj(()=>_e.isReadableStream(new Response("").body)),z1={stream:VC&&(e=>e.body)};Xx&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!z1[t]&&(z1[t]=_e.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Kt(`Response type '${t}' is not supported`,Kt.ERR_NOT_SUPPORT,r)})})})(new Response);const rfe=async e=>{if(e==null)return 0;if(_e.isBlob(e))return e.size;if(_e.isSpecCompliantForm(e))return(await new Request(Mi.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(_e.isArrayBufferView(e)||_e.isArrayBuffer(e))return e.byteLength;if(_e.isURLSearchParams(e)&&(e=e+""),_e.isString(e))return(await tfe(e)).byteLength},ife=async(e,t)=>{const n=_e.toFiniteNumber(e.getContentLength());return n??rfe(t)},ofe=Xx&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:o,timeout:a,onDownloadProgress:s,onUploadProgress:u,responseType:l,headers:c,withCredentials:f="same-origin",fetchOptions:h}=Lj(e);l=l?(l+"").toLowerCase():"text";let p=Xce([i,o&&o.toAbortSignal()],a),m;const v=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&nfe&&n!=="get"&&n!=="head"&&(b=await ife(c,r))!==0){let E=new Request(t,{method:"POST",body:r,duplex:"half"}),C;if(_e.isFormData(r)&&(C=E.headers.get("content-type"))&&c.setContentType(C),E.body){const[k,M]=HM(b,B1(KM(u)));r=GM(E.body,YM,k,M)}}_e.isString(f)||(f=f?"include":"omit");const w="credentials"in Request.prototype;m=new Request(t,{...h,signal:p,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:r,duplex:"half",credentials:w?f:void 0});let x=await fetch(m);const S=VC&&(l==="stream"||l==="response");if(VC&&(s||S&&v)){const E={};["status","statusText","headers"].forEach(N=>{E[N]=x[N]});const C=_e.toFiniteNumber(x.headers.get("content-length")),[k,M]=s&&HM(C,B1(KM(s),!0))||[];x=new Response(GM(x.body,YM,k,()=>{M&&M(),v&&v()}),E)}l=l||"text";let O=await z1[_e.findKey(z1,l)||"text"](x,e);return!S&&v&&v(),await new Promise((E,C)=>{Ij(E,C,{data:O,headers:ho.from(x.headers),status:x.status,statusText:x.statusText,config:e,request:m})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/fetch/i.test(w.message)?Object.assign(new Kt("Network Error",Kt.ERR_NETWORK,e,m),{cause:w.cause||w}):Kt.from(w,w&&w.code,e,m)}}),WC={http:xce,xhr:Zce,fetch:ofe};_e.forEach(WC,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const ZM=e=>`- ${e}`,afe=e=>_e.isFunction(e)||e===null||e===!1,Bj={getAdapter:e=>{e=_e.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let o=0;o`adapter ${s} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?o.length>1?`since : +`+o.map(ZM).join(` +`):" "+ZM(o[0]):"as no adapter specified";throw new Kt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return r},adapters:WC};function fS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new $h(null,e)}function XM(e){return fS(e),e.headers=ho.from(e.headers),e.data=cS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Bj.getAdapter(e.adapter||bm.adapter)(e).then(function(r){return fS(e),r.data=cS.call(e,e.transformResponse,r),r.headers=ho.from(r.headers),r},function(r){return $j(r)||(fS(e),r&&r.response&&(r.response.data=cS.call(e,e.transformResponse,r.response),r.response.headers=ho.from(r.response.headers))),Promise.reject(r)})}const zj="1.7.9",Qx={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Qx[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const QM={};Qx.transitional=function(t,n,r){function i(o,a){return"[Axios v"+zj+"] Transitional option '"+o+"'"+a+(r?". "+r:"")}return(o,a,s)=>{if(t===!1)throw new Kt(i(a," has been removed"+(n?" in "+n:"")),Kt.ERR_DEPRECATED);return n&&!QM[a]&&(QM[a]=!0,console.warn(i(a," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,a,s):!0}};Qx.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function sfe(e,t,n){if(typeof e!="object")throw new Kt("options must be an object",Kt.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const o=r[i],a=t[o];if(a){const s=e[o],u=s===void 0||a(s,o,e);if(u!==!0)throw new Kt("option "+o+" must be "+u,Kt.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Kt("Unknown option "+o,Kt.ERR_BAD_OPTION)}}const Zy={assertOptions:sfe,validators:Qx},ls=Zy.validators;class Tc{constructor(t){this.defaults=t,this.interceptors={request:new VM,response:new VM}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const o=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?o&&!String(r.stack).endsWith(o.replace(/^.+\n.+\n/,""))&&(r.stack+=` +`+o):r.stack=o}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Hc(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:o}=n;r!==void 0&&Zy.assertOptions(r,{silentJSONParsing:ls.transitional(ls.boolean),forcedJSONParsing:ls.transitional(ls.boolean),clarifyTimeoutError:ls.transitional(ls.boolean)},!1),i!=null&&(_e.isFunction(i)?n.paramsSerializer={serialize:i}:Zy.assertOptions(i,{encode:ls.function,serialize:ls.function},!0)),Zy.assertOptions(n,{baseUrl:ls.spelling("baseURL"),withXsrfToken:ls.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let a=o&&_e.merge(o.common,o[n.method]);o&&_e.forEach(["delete","get","head","post","put","patch","common"],m=>{delete o[m]}),n.headers=ho.concat(a,o);const s=[];let u=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(u=u&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const l=[];this.interceptors.response.forEach(function(v){l.push(v.fulfilled,v.rejected)});let c,f=0,h;if(!u){const m=[XM.bind(this),void 0];for(m.unshift.apply(m,s),m.push.apply(m,l),h=m.length,c=Promise.resolve(n);f{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](i);r._listeners=null}),this.promise.then=i=>{let o;const a=new Promise(s=>{r.subscribe(s),o=s}).then(i);return a.cancel=function(){r.unsubscribe(o)},a},t(function(o,a,s){r.reason||(r.reason=new $h(o,a,s),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new $O(function(i){t=i}),cancel:t}}}function ufe(e){return function(n){return e.apply(null,n)}}function lfe(e){return _e.isObject(e)&&e.isAxiosError===!0}const HC={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(HC).forEach(([e,t])=>{HC[t]=e});function Uj(e){const t=new Tc(e),n=bj(Tc.prototype.request,t);return _e.extend(n,Tc.prototype,t,{allOwnKeys:!0}),_e.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Uj(Hc(e,i))},n}const qr=Uj(bm);qr.Axios=Tc;qr.CanceledError=$h;qr.CancelToken=$O;qr.isCancel=$j;qr.VERSION=zj;qr.toFormData=Zx;qr.AxiosError=Kt;qr.Cancel=qr.CanceledError;qr.all=function(t){return Promise.all(t)};qr.spread=ufe;qr.isAxiosError=lfe;qr.mergeConfig=Hc;qr.AxiosHeaders=ho;qr.formToJSON=e=>Dj(_e.isHTMLForm(e)?new FormData(e):e);qr.getAdapter=Bj.getAdapter;qr.HttpStatusCode=HC;qr.default=qr;var cfe=e=>{switch(e){case"success":return hfe;case"info":return gfe;case"warning":return pfe;case"error":return mfe;default:return null}},ffe=Array(12).fill(0),dfe=({visible:e,className:t})=>F.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},F.createElement("div",{className:"sonner-spinner"},ffe.map((n,r)=>F.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),hfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),pfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),gfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),mfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},F.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),vfe=F.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},F.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),F.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),yfe=()=>{let[e,t]=F.useState(document.hidden);return F.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},KC=1,bfe=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,i=typeof e?.id=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:KC++,o=this.toasts.find(s=>s.id===i),a=e.dismissible===void 0?!0:e.dismissible;return o?this.toasts=this.toasts.map(s=>s.id===i?(this.publish({...s,...e,id:i,title:n}),{...s,...e,id:i,dismissible:a,title:n}):s):this.addToast({title:n,...r,dismissible:a,id:i}),i},this.dismiss=e=>(e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),i=n!==void 0,o,a=r.then(async u=>{if(o=["resolve",u],F.isValidElement(u))i=!1,this.create({id:n,type:"default",message:u});else if(wfe(u)&&!u.ok){i=!1;let l=typeof t.error=="function"?await t.error(`HTTP error! status: ${u.status}`):t.error,c=typeof t.description=="function"?await t.description(`HTTP error! status: ${u.status}`):t.description;this.create({id:n,type:"error",message:l,description:c})}else if(t.success!==void 0){i=!1;let l=typeof t.success=="function"?await t.success(u):t.success,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"success",message:l,description:c})}}).catch(async u=>{if(o=["reject",u],t.error!==void 0){i=!1;let l=typeof t.error=="function"?await t.error(u):t.error,c=typeof t.description=="function"?await t.description(u):t.description;this.create({id:n,type:"error",message:l,description:c})}}).finally(()=>{var u;i&&(this.dismiss(n),n=void 0),(u=t.finally)==null||u.call(t)}),s=()=>new Promise((u,l)=>a.then(()=>o[0]==="reject"?l(o[1]):u(o[1])).catch(l));return typeof n!="string"&&typeof n!="number"?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||KC++;return this.create({jsx:e(n),id:n,...t}),n},this.subscribers=[],this.toasts=[]}},Po=new bfe,xfe=(e,t)=>{let n=t?.id||KC++;return Po.addToast({title:e,...t,id:n}),n},wfe=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",_fe=xfe,Sfe=()=>Po.toasts,kYe=Object.assign(_fe,{success:Po.success,info:Po.info,warning:Po.warning,error:Po.error,custom:Po.custom,message:Po.message,promise:Po.promise,dismiss:Po.dismiss,loading:Po.loading},{getHistory:Sfe});function Cfe(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}Cfe(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} +`);function ty(e){return e.label!==void 0}var Efe=3,Ofe="32px",JM=4e3,Afe=356,Pfe=14,kfe=20,Tfe=200;function Mfe(...e){return e.filter(Boolean).join(" ")}var Rfe=e=>{var t,n,r,i,o,a,s,u,l,c,f;let{invert:h,toast:p,unstyled:m,interacting:v,setHeights:b,visibleToasts:w,heights:x,index:S,toasts:O,expanded:E,removeToast:C,defaultRichColors:k,closeButton:M,style:N,cancelButtonStyle:z,actionButtonStyle:H,className:V="",descriptionClassName:ne="",duration:Z,position:G,gap:q,loadingIcon:W,expandByDefault:j,classNames:K,icons:Y,closeButtonAriaLabel:oe="Close toast",pauseWhenPageIsHidden:Q,cn:J}=e,[ue,de]=F.useState(!1),[Se,me]=F.useState(!1),[Ze,Ae]=F.useState(!1),[Le,$e]=F.useState(!1),[be,yt]=F.useState(!1),[lt,Nt]=F.useState(0),[yn,nn]=F.useState(0),ie=F.useRef(p.duration||Z||JM),pe=F.useRef(null),ye=F.useRef(null),Ue=S===0,je=S+1<=w,ke=p.type,nt=p.dismissible!==!1,mt=p.className||"",xn=p.descriptionClassName||"",Ht=F.useMemo(()=>x.findIndex(_t=>_t.toastId===p.id)||0,[x,p.id]),wn=F.useMemo(()=>{var _t;return(_t=p.closeButton)!=null?_t:M},[p.closeButton,M]);F.useMemo(()=>p.duration||Z||JM,[p.duration,Z]);let Ii=F.useRef(0),br=F.useRef(0),yi=F.useRef(0),sr=F.useRef(null),[si,bi]=G.split("-"),Rr=F.useMemo(()=>x.reduce((_t,hn,_n)=>_n>=Ht?_t:_t+hn.height,0),[x,Ht]),Xi=yfe(),yo=p.invert||h,xi=ke==="loading";br.current=F.useMemo(()=>Ht*q+Rr,[Ht,Rr]),F.useEffect(()=>{de(!0)},[]),F.useEffect(()=>{let _t=ye.current;if(_t){let hn=_t.getBoundingClientRect().height;return nn(hn),b(_n=>[{toastId:p.id,height:hn,position:p.position},..._n]),()=>b(_n=>_n.filter(qn=>qn.toastId!==p.id))}},[b,p.id]),F.useLayoutEffect(()=>{if(!ue)return;let _t=ye.current,hn=_t.style.height;_t.style.height="auto";let _n=_t.getBoundingClientRect().height;_t.style.height=hn,nn(_n),b(qn=>qn.find(ur=>ur.toastId===p.id)?qn.map(ur=>ur.toastId===p.id?{...ur,height:_n}:ur):[{toastId:p.id,height:_n,position:p.position},...qn])},[ue,p.title,p.description,b,p.id]);let Dr=F.useCallback(()=>{me(!0),Nt(br.current),b(_t=>_t.filter(hn=>hn.toastId!==p.id)),setTimeout(()=>{C(p)},Tfe)},[p,C,b,br]);F.useEffect(()=>{if(p.promise&&ke==="loading"||p.duration===1/0||p.type==="loading")return;let _t;return E||v||Q&&Xi?(()=>{if(yi.current{var hn;(hn=p.onAutoClose)==null||hn.call(p,p),Dr()},ie.current)),()=>clearTimeout(_t)},[E,v,p,ke,Q,Xi,Dr]),F.useEffect(()=>{p.delete&&Dr()},[Dr,p.delete]);function Sa(){var _t,hn,_n;return Y!=null&&Y.loading?F.createElement("div",{className:J(K?.loader,(_t=p?.classNames)==null?void 0:_t.loader,"sonner-loader"),"data-visible":ke==="loading"},Y.loading):W?F.createElement("div",{className:J(K?.loader,(hn=p?.classNames)==null?void 0:hn.loader,"sonner-loader"),"data-visible":ke==="loading"},W):F.createElement(dfe,{className:J(K?.loader,(_n=p?.classNames)==null?void 0:_n.loader),visible:ke==="loading"})}return F.createElement("li",{tabIndex:0,ref:ye,className:J(V,mt,K?.toast,(t=p?.classNames)==null?void 0:t.toast,K?.default,K?.[ke],(n=p?.classNames)==null?void 0:n[ke]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:k,"data-styled":!(p.jsx||p.unstyled||m),"data-mounted":ue,"data-promise":!!p.promise,"data-swiped":be,"data-removed":Se,"data-visible":je,"data-y-position":si,"data-x-position":bi,"data-index":S,"data-front":Ue,"data-swiping":Ze,"data-dismissible":nt,"data-type":ke,"data-invert":yo,"data-swipe-out":Le,"data-expanded":!!(E||j&&ue),style:{"--index":S,"--toasts-before":S,"--z-index":O.length-S,"--offset":`${Se?lt:br.current}px`,"--initial-height":j?"auto":`${yn}px`,...N,...p.style},onPointerDown:_t=>{xi||!nt||(pe.current=new Date,Nt(br.current),_t.target.setPointerCapture(_t.pointerId),_t.target.tagName!=="BUTTON"&&(Ae(!0),sr.current={x:_t.clientX,y:_t.clientY}))},onPointerUp:()=>{var _t,hn,_n,qn;if(Le||!nt)return;sr.current=null;let ur=Number(((_t=ye.current)==null?void 0:_t.style.getPropertyValue("--swipe-amount").replace("px",""))||0),Xr=new Date().getTime()-((hn=pe.current)==null?void 0:hn.getTime()),bo=Math.abs(ur)/Xr;if(Math.abs(ur)>=kfe||bo>.11){Nt(br.current),(_n=p.onDismiss)==null||_n.call(p,p),Dr(),$e(!0),yt(!1);return}(qn=ye.current)==null||qn.style.setProperty("--swipe-amount","0px"),Ae(!1)},onPointerMove:_t=>{var hn,_n;if(!sr.current||!nt)return;let qn=_t.clientY-sr.current.y,ur=((hn=window.getSelection())==null?void 0:hn.toString().length)>0,Xr=si==="top"?Math.min(0,qn):Math.max(0,qn);Math.abs(Xr)>0&&yt(!0),!ur&&((_n=ye.current)==null||_n.style.setProperty("--swipe-amount",`${Xr}px`))}},wn&&!p.jsx?F.createElement("button",{"aria-label":oe,"data-disabled":xi,"data-close-button":!0,onClick:xi||!nt?()=>{}:()=>{var _t;Dr(),(_t=p.onDismiss)==null||_t.call(p,p)},className:J(K?.closeButton,(i=p?.classNames)==null?void 0:i.closeButton)},(o=Y?.close)!=null?o:vfe):null,p.jsx||F.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:F.createElement(F.Fragment,null,ke||p.icon||p.promise?F.createElement("div",{"data-icon":"",className:J(K?.icon,(a=p?.classNames)==null?void 0:a.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||Sa():null,p.type!=="loading"?p.icon||Y?.[ke]||cfe(ke):null):null,F.createElement("div",{"data-content":"",className:J(K?.content,(s=p?.classNames)==null?void 0:s.content)},F.createElement("div",{"data-title":"",className:J(K?.title,(u=p?.classNames)==null?void 0:u.title)},typeof p.title=="function"?p.title():p.title),p.description?F.createElement("div",{"data-description":"",className:J(ne,xn,K?.description,(l=p?.classNames)==null?void 0:l.description)},typeof p.description=="function"?p.description():p.description):null),F.isValidElement(p.cancel)?p.cancel:p.cancel&&ty(p.cancel)?F.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||z,onClick:_t=>{var hn,_n;ty(p.cancel)&&nt&&((_n=(hn=p.cancel).onClick)==null||_n.call(hn,_t),Dr())},className:J(K?.cancelButton,(c=p?.classNames)==null?void 0:c.cancelButton)},p.cancel.label):null,F.isValidElement(p.action)?p.action:p.action&&ty(p.action)?F.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||H,onClick:_t=>{var hn,_n;ty(p.action)&&((_n=(hn=p.action).onClick)==null||_n.call(hn,_t),!_t.defaultPrevented&&Dr())},className:J(K?.actionButton,(f=p?.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function eR(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}var TYe=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:a,className:s,offset:u,theme:l="light",richColors:c,duration:f,style:h,visibleToasts:p=Efe,toastOptions:m,dir:v=eR(),gap:b=Pfe,loadingIcon:w,icons:x,containerAriaLabel:S="Notifications",pauseWhenPageIsHidden:O,cn:E=Mfe}=e,[C,k]=F.useState([]),M=F.useMemo(()=>Array.from(new Set([r].concat(C.filter(Q=>Q.position).map(Q=>Q.position)))),[C,r]),[N,z]=F.useState([]),[H,V]=F.useState(!1),[ne,Z]=F.useState(!1),[G,q]=F.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),W=F.useRef(null),j=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),K=F.useRef(null),Y=F.useRef(!1),oe=F.useCallback(Q=>{k(J=>{var ue;return(ue=J.find(de=>de.id===Q.id))!=null&&ue.delete||Po.dismiss(Q.id),J.filter(({id:de})=>de!==Q.id)})},[]);return F.useEffect(()=>Po.subscribe(Q=>{if(Q.dismiss){k(J=>J.map(ue=>ue.id===Q.id?{...ue,delete:!0}:ue));return}setTimeout(()=>{jx.flushSync(()=>{k(J=>{let ue=J.findIndex(de=>de.id===Q.id);return ue!==-1?[...J.slice(0,ue),{...J[ue],...Q},...J.slice(ue+1)]:[Q,...J]})})})}),[]),F.useEffect(()=>{if(l!=="system"){q(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),typeof window>"u")return;let Q=window.matchMedia("(prefers-color-scheme: dark)");try{Q.addEventListener("change",({matches:J})=>{q(J?"dark":"light")})}catch{Q.addListener(({matches:ue})=>{try{q(ue?"dark":"light")}catch(de){console.error(de)}})}},[l]),F.useEffect(()=>{C.length<=1&&V(!1)},[C]),F.useEffect(()=>{let Q=J=>{var ue,de;i.every(Se=>J[Se]||J.code===Se)&&(V(!0),(ue=W.current)==null||ue.focus()),J.code==="Escape"&&(document.activeElement===W.current||(de=W.current)!=null&&de.contains(document.activeElement))&&V(!1)};return document.addEventListener("keydown",Q),()=>document.removeEventListener("keydown",Q)},[i]),F.useEffect(()=>{if(W.current)return()=>{K.current&&(K.current.focus({preventScroll:!0}),K.current=null,Y.current=!1)}},[W.current]),F.createElement("section",{"aria-label":`${S} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false"},M.map((Q,J)=>{var ue;let[de,Se]=Q.split("-");return C.length?F.createElement("ol",{key:Q,dir:v==="auto"?eR():v,tabIndex:-1,ref:W,className:s,"data-sonner-toaster":!0,"data-theme":G,"data-y-position":de,"data-lifted":H&&C.length>1&&!o,"data-x-position":Se,style:{"--front-toast-height":`${((ue=N[0])==null?void 0:ue.height)||0}px`,"--offset":typeof u=="number"?`${u}px`:u||Ofe,"--width":`${Afe}px`,"--gap":`${b}px`,...h},onBlur:me=>{Y.current&&!me.currentTarget.contains(me.relatedTarget)&&(Y.current=!1,K.current&&(K.current.focus({preventScroll:!0}),K.current=null))},onFocus:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Y.current||(Y.current=!0,K.current=me.relatedTarget)},onMouseEnter:()=>V(!0),onMouseMove:()=>V(!0),onMouseLeave:()=>{ne||V(!1)},onPointerDown:me=>{me.target instanceof HTMLElement&&me.target.dataset.dismissible==="false"||Z(!0)},onPointerUp:()=>Z(!1)},C.filter(me=>!me.position&&J===0||me.position===Q).map((me,Ze)=>{var Ae,Le;return F.createElement(Rfe,{key:me.id,icons:x,index:Ze,toast:me,defaultRichColors:c,duration:(Ae=m?.duration)!=null?Ae:f,className:m?.className,descriptionClassName:m?.descriptionClassName,invert:n,visibleToasts:p,closeButton:(Le=m?.closeButton)!=null?Le:a,interacting:ne,position:Q,style:m?.style,unstyled:m?.unstyled,classNames:m?.classNames,cancelButtonStyle:m?.cancelButtonStyle,actionButtonStyle:m?.actionButtonStyle,removeToast:oe,toasts:C.filter($e=>$e.position==me.position),heights:N.filter($e=>$e.position==me.position),setHeights:z,expandByDefault:o,gap:b,loadingIcon:w,expanded:H,pauseWhenPageIsHidden:O,cn:E})})):null}))}),Ih=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Kc=typeof window>"u"||"Deno"in globalThis;function oa(){}function Dfe(e,t){return typeof e=="function"?e(t):e}function qC(e){return typeof e=="number"&&e>=0&&e!==1/0}function Vj(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Od(e,t){return typeof e=="function"?e(t):e}function La(e,t){return typeof e=="function"?e(t):e}function tR(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:s}=e;if(a){if(r){if(t.queryHash!==IO(a,t.options))return!1}else if(!eg(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||i&&i!==t.state.fetchStatus||o&&!o(t))}function nR(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(qc(t.options.mutationKey)!==qc(o))return!1}else if(!eg(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function IO(e,t){return(t?.queryKeyHashFn||qc)(e)}function qc(e){return JSON.stringify(e,(t,n)=>GC(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function eg(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!eg(e[n],t[n])):!1}function Wj(e,t){if(e===t)return e;const n=rR(e)&&rR(t);if(n||GC(e)&&GC(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),a=o.length,s=n?[]:{};let u=0;for(let l=0;l{setTimeout(t,e)})}function YC(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Wj(e,t):t}function Ife(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function Nfe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var NO=Symbol();function Hj(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===NO?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Lfe=class extends Ih{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},LO=new Lfe,Ffe=class extends Ih{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Kc&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},V1=new Ffe;function ZC(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}function jfe(e){return Math.min(1e3*2**e,3e4)}function Kj(e){return(e??"online")==="online"?V1.isOnline():!0}var qj=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function dS(e){return e instanceof qj}function Gj(e){let t=!1,n=0,r=!1,i;const o=ZC(),a=v=>{r||(h(new qj(v)),e.abort?.())},s=()=>{t=!0},u=()=>{t=!1},l=()=>LO.isFocused()&&(e.networkMode==="always"||V1.isOnline())&&e.canRun(),c=()=>Kj(e.networkMode)&&e.canRun(),f=v=>{r||(r=!0,e.onSuccess?.(v),i?.(),o.resolve(v))},h=v=>{r||(r=!0,e.onError?.(v),i?.(),o.reject(v))},p=()=>new Promise(v=>{i=b=>{(r||l())&&v(b)},e.onPause?.()}).then(()=>{i=void 0,r||e.onContinue?.()}),m=()=>{if(r)return;let v;const b=n===0?e.initialPromise:void 0;try{v=b??e.fn()}catch(w){v=Promise.reject(w)}Promise.resolve(v).then(f).catch(w=>{if(r)return;const x=e.retry??(Kc?0:3),S=e.retryDelay??jfe,O=typeof S=="function"?S(n,w):S,E=x===!0||typeof x=="number"&&nl()?void 0:p()).then(()=>{t?h(w):m()})})};return{promise:o,cancel:a,continue:()=>(i?.(),o),cancelRetry:s,continueRetry:u,canStart:c,start:()=>(c()?m():p().then(m),o)}}function Bfe(){let e=[],t=0,n=s=>{s()},r=s=>{s()},i=s=>setTimeout(s,0);const o=s=>{t?e.push(s):i(()=>{n(s)})},a=()=>{const s=e;e=[],s.length&&i(()=>{r(()=>{s.forEach(u=>{n(u)})})})};return{batch:s=>{let u;t++;try{u=s()}finally{t--,t||a()}return u},batchCalls:s=>(...u)=>{o(()=>{s(...u)})},schedule:o,setNotifyFunction:s=>{n=s},setBatchNotifyFunction:s=>{r=s},setScheduler:s=>{i=s}}}var Ur=Bfe(),Yj=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),qC(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Kc?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}},zfe=class extends Yj{#e;#t;#r;#n;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.cache,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ufe(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#n?.promise}setOptions(e){this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){const n=YC(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#n?.promise;return this.#n?.cancel(e),t?t.then(oa).catch(oa):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>La(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===NO||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Vj(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#n&&(this.#o?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(e&&this.setOptions(e),!this.options.queryFn){const s=this.observers.find(u=>u.options.queryFn);s&&this.setOptions(s.options)}const n=new AbortController,r=s=>{Object.defineProperty(s,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{const s=Hj(this.options,t),u={queryKey:this.queryKey,meta:this.meta};return r(u),this.#o=!1,this.options.persister?this.options.persister(s,u,this):s(u)},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:i};r(o),this.options.behavior?.onFetch(o,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#i({type:"fetch",meta:o.fetchOptions?.meta});const a=s=>{dS(s)&&s.silent||this.#i({type:"error",error:s}),dS(s)||(this.#r.config.onError?.(s,this),this.#r.config.onSettled?.(this.state.data,s,this)),this.scheduleGc()};return this.#n=Gj({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:n.abort.bind(n),onSuccess:s=>{if(s===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(s)}catch(u){a(u);return}this.#r.config.onSuccess?.(s,this),this.#r.config.onSettled?.(s,this.state.error,this),this.scheduleGc()},onError:a,onFail:(s,u)=>{this.#i({type:"failed",failureCount:s,error:u})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#n.start()}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,...Zj(n.data,this.options),fetchMeta:e.meta??null};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const r=e.error;return dS(r)&&r.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...n,error:r,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Ur.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Zj(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Kj(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ufe(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Vfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const r=t.queryKey,i=t.queryHash??IO(r,t);let o=this.get(i);return o||(o=new zfe({cache:this,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>tR(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>tR(e,n)):t}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Ur.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Wfe=class extends Yj{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Xj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=Gj({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(r,i)=>{this.#n({type:"failed",failureCount:r,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});const t=this.state.status==="pending",n=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:n}),await this.#t.config.onMutate?.(e,this);const i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:n})}const r=await this.#r.start();return await this.#t.config.onSuccess?.(r,e,this.state.context,this),await this.options.onSuccess?.(r,e,this.state.context),await this.#t.config.onSettled?.(r,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(r,null,e,this.state.context),this.#n({type:"success",data:r}),r}catch(r){try{throw await this.#t.config.onError?.(r,e,this.state.context,this),await this.options.onError?.(r,e,this.state.context),await this.#t.config.onSettled?.(void 0,r,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,r,e,this.state.context),r}finally{this.#n({type:"error",error:r})}}finally{this.#t.runNext(this)}}#n(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Ur.batch(()=>{this.#e.forEach(n=>{n.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Xj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Hfe=class extends Ih{constructor(e={}){super(),this.config=e,this.#e=new Map,this.#t=Date.now()}#e;#t;build(e,t,n){const r=new Wfe({mutationCache:this,mutationId:++this.#t,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){const t=ny(e),n=this.#e.get(t)??[];n.push(e),this.#e.set(t,n),this.notify({type:"added",mutation:e})}remove(e){const t=ny(e);if(this.#e.has(t)){const n=this.#e.get(t)?.filter(r=>r!==e);n&&(n.length===0?this.#e.delete(t):this.#e.set(t,n))}this.notify({type:"removed",mutation:e})}canRun(e){const t=this.#e.get(ny(e))?.find(n=>n.state.status==="pending");return!t||t===e}runNext(e){return this.#e.get(ny(e))?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve()}clear(){Ur.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...this.#e.values()].flat()}find(e){const t={exact:!0,...e};return this.getAll().find(n=>nR(t,n))}findAll(e={}){return this.getAll().filter(t=>nR(e,t))}notify(e){Ur.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Ur.batch(()=>Promise.all(e.map(t=>t.continue().catch(oa))))}};function ny(e){return e.options.scope?.id??String(e.mutationId)}function oR(e){return{onFetch:(t,n)=>{const r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],a=t.state.data?.pageParams||[];let s={pages:[],pageParams:[]},u=0;const l=async()=>{let c=!1;const f=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},h=Hj(t.options,t.fetchOptions),p=async(m,v,b)=>{if(c)return Promise.reject();if(v==null&&m.pages.length)return Promise.resolve(m);const w={queryKey:t.queryKey,pageParam:v,direction:b?"backward":"forward",meta:t.options.meta};f(w);const x=await h(w),{maxPages:S}=t.options,O=b?Nfe:Ife;return{pages:O(m.pages,x,S),pageParams:O(m.pageParams,v,S)}};if(i&&o.length){const m=i==="backward",v=m?Kfe:aR,b={pages:o,pageParams:a},w=v(r,b);s=await p(b,w,m)}else{const m=e??o.length;do{const v=u===0?a[0]??r.initialPageParam:aR(r,s);if(u>0&&v==null)break;s=await p(s,v),u++}while(ut.options.persister?.(l,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=l}}}function aR(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Kfe(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var MYe=class{#e;#t;#r;#n;#a;#o;#i;#s;constructor(e={}){this.#e=e.queryCache||new Vfe,this.#t=e.mutationCache||new Hfe,this.#r=e.defaultOptions||{},this.#n=new Map,this.#a=new Map,this.#o=0}mount(){this.#o++,this.#o===1&&(this.#i=LO.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=V1.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#o--,this.#o===0&&(this.#i?.(),this.#i=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Od(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,a=Dfe(t,o);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Ur.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Ur.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e,r={type:"active",...e};return Ur.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=Ur.batch(()=>this.#e.findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(oa).catch(oa)}invalidateQueries(e,t={}){return Ur.batch(()=>{if(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none")return Promise.resolve();const n={...e,type:e?.refetchType??e?.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=Ur.batch(()=>this.#e.findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(oa)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(oa)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Od(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(oa).catch(oa)}fetchInfiniteQuery(e){return e.behavior=oR(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(oa).catch(oa)}ensureInfiniteQueryData(e){return e.behavior=oR(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return V1.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(qc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#n.values()],n={};return t.forEach(r=>{eg(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#a.set(qc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#a.values()];let n={};return t.forEach(r=>{eg(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=IO(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===NO&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},qfe=class extends Ih{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#i=ZC(),this.options.experimental_prefetchInRender||this.#i.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#r=void 0;#n=void 0;#a;#o;#i;#s;#g;#d;#h;#l;#c;#u;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),sR(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return XC(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return XC(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#x(),this.#w(),this.#t.removeObserver(this)}setOptions(e,t){const n=this.options,r=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof La(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#_(),this.#t.setOptions(this.options),n._defaulted&&!U1(this.options,n)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&uR(this.#t,r,this.options,n)&&this.#f(),this.updateResult(t),i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||Od(this.options.staleTime,this.#t)!==Od(n.staleTime,this.#t))&&this.#m();const o=this.#v();i&&(this.#t!==r||La(this.options.enabled,this.#t)!==La(n.enabled,this.#t)||o!==this.#u)&&this.#y(o)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Yfe(this,n)&&(this.#n=n,this.#o=this.options,this.#a=this.#t.state),n}getCurrentResult(){return this.#n}trackResult(e,t){const n={};return Object.keys(e).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(r),t?.(r),e[r])})}),n}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#_();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(oa)),t}#m(){this.#x();const e=Od(this.options.staleTime,this.#t);if(Kc||this.#n.isStale||!qC(e))return;const n=Vj(this.#n.dataUpdatedAt,e)+1;this.#l=setTimeout(()=>{this.#n.isStale||this.updateResult()},n)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#w(),this.#u=e,!(Kc||La(this.options.enabled,this.#t)===!1||!qC(this.#u)||this.#u===0)&&(this.#c=setInterval(()=>{(this.options.refetchIntervalInBackground||LO.isFocused())&&this.#f()},this.#u))}#b(){this.#m(),this.#y(this.#v())}#x(){this.#l&&(clearTimeout(this.#l),this.#l=void 0)}#w(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,r=this.options,i=this.#n,o=this.#a,a=this.#o,u=e!==n?e.state:this.#r,{state:l}=e;let c={...l},f=!1,h;if(t._optimisticResults){const k=this.hasListeners(),M=!k&&sR(e,t),N=k&&uR(e,n,t,r);(M||N)&&(c={...c,...Zj(l.data,e.options)}),t._optimisticResults==="isRestoring"&&(c.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:v}=c;if(t.select&&c.data!==void 0)if(i&&c.data===o?.data&&t.select===this.#g)h=this.#d;else try{this.#g=t.select,h=t.select(c.data),h=YC(i?.data,h,t),this.#d=h,this.#s=null}catch(k){this.#s=k}else h=c.data;if(t.placeholderData!==void 0&&h===void 0&&v==="pending"){let k;if(i?.isPlaceholderData&&t.placeholderData===a?.placeholderData)k=i.data;else if(k=typeof t.placeholderData=="function"?t.placeholderData(this.#h?.state.data,this.#h):t.placeholderData,t.select&&k!==void 0)try{k=t.select(k),this.#s=null}catch(M){this.#s=M}k!==void 0&&(v="success",h=YC(i?.data,k,t),f=!0)}this.#s&&(p=this.#s,h=this.#d,m=Date.now(),v="error");const b=c.fetchStatus==="fetching",w=v==="pending",x=v==="error",S=w&&b,O=h!==void 0,C={status:v,fetchStatus:c.fetchStatus,isPending:w,isSuccess:v==="success",isError:x,isInitialLoading:S,isLoading:S,data:h,dataUpdatedAt:c.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:c.fetchFailureCount,failureReason:c.fetchFailureReason,errorUpdateCount:c.errorUpdateCount,isFetched:c.dataUpdateCount>0||c.errorUpdateCount>0,isFetchedAfterMount:c.dataUpdateCount>u.dataUpdateCount||c.errorUpdateCount>u.errorUpdateCount,isFetching:b,isRefetching:b&&!w,isLoadingError:x&&!O,isPaused:c.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&O,isStale:FO(e,t),refetch:this.refetch,promise:this.#i};if(this.options.experimental_prefetchInRender){const k=z=>{C.status==="error"?z.reject(C.error):C.data!==void 0&&z.resolve(C.data)},M=()=>{const z=this.#i=C.promise=ZC();k(z)},N=this.#i;switch(N.status){case"pending":e.queryHash===n.queryHash&&k(N);break;case"fulfilled":(C.status==="error"||C.data!==N.value)&&M();break;case"rejected":(C.status!=="error"||C.error!==N.reason)&&M();break}}return C}updateResult(e){const t=this.#n,n=this.createResult(this.#t,this.options);if(this.#a=this.#t.state,this.#o=this.options,this.#a.data!==void 0&&(this.#h=this.#t),U1(n,t))return;this.#n=n;const r={},i=()=>{if(!t)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.#p.size)return!0;const s=new Set(a??this.#p);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(u=>{const l=u;return this.#n[l]!==t[l]&&s.has(l)})};e?.listeners!==!1&&i()&&(r.listeners=!0),this.#S({...r,...e})}#_(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#r=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){Ur.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#n)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function Gfe(e,t){return La(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function sR(e,t){return Gfe(e,t)||e.state.data!==void 0&&XC(e,t,t.refetchOnMount)}function XC(e,t,n){if(La(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&FO(e,t)}return!1}function uR(e,t,n,r){return(e!==t||La(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&FO(e,n)}function FO(e,t){return La(t.enabled,e)!==!1&&e.isStaleByTime(Od(t.staleTime,e))}function Yfe(e,t){return!U1(e.getCurrentResult(),t)}var Zfe=class extends Ih{#e;#t=void 0;#r;#n;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#a()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),U1(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#r,observer:this}),n?.mutationKey&&this.options.mutationKey&&qc(n.mutationKey)!==qc(this.options.mutationKey)?this.reset():this.#r?.state.status==="pending"&&this.#r.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#r?.removeObserver(this)}onMutationUpdate(t){this.#a(),this.#o(t)}getCurrentResult(){return this.#t}reset(){this.#r?.removeObserver(this),this.#r=void 0,this.#a(),this.#o()}mutate(t,n){return this.#n=n,this.#r?.removeObserver(this),this.#r=this.#e.getMutationCache().build(this.#e,this.options),this.#r.addObserver(this),this.#r.execute(t)}#a(){const t=this.#r?.state??Xj();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#o(t){Ur.batch(()=>{if(this.#n&&this.hasListeners()){const n=this.#t.variables,r=this.#t.context;t?.type==="success"?(this.#n.onSuccess?.(t.data,n,r),this.#n.onSettled?.(t.data,null,n,r)):t?.type==="error"&&(this.#n.onError?.(t.error,n,r),this.#n.onSettled?.(void 0,t.error,n,r))}this.listeners.forEach(n=>{n(this.#t)})})}},Qj=y.createContext(void 0),Jj=e=>{const t=y.useContext(Qj);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},DYe=({client:e,children:t})=>(y.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),I.jsx(Qj.Provider,{value:e,children:t})),eB=y.createContext(!1),Xfe=()=>y.useContext(eB);eB.Provider;function Qfe(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Jfe=y.createContext(Qfe()),ede=()=>y.useContext(Jfe);function tB(e,t){return typeof e=="function"?e(...t):!!e}function QC(){}var tde=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},nde=e=>{y.useEffect(()=>{e.clearReset()},[e])},rde=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&tB(n,[e.error,r]),ide=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},ode=(e,t)=>e.isLoading&&e.isFetching&&!t,ade=(e,t)=>e?.suspense&&t.isPending,lR=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sde(e,t,n){const r=Jj(),i=Xfe(),o=ede(),a=r.defaultQueryOptions(e);r.getDefaultOptions().queries?._experimental_beforeQuery?.(a),a._optimisticResults=i?"isRestoring":"optimistic",ide(a),tde(a,o),nde(o);const s=!r.getQueryCache().get(a.queryHash),[u]=y.useState(()=>new t(r,a)),l=u.getOptimisticResult(a);if(y.useSyncExternalStore(y.useCallback(c=>{const f=i?QC:u.subscribe(Ur.batchCalls(c));return u.updateResult(),f},[u,i]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),y.useEffect(()=>{u.setOptions(a,{listeners:!1})},[a,u]),ade(a,l))throw lR(a,u,o);if(rde({result:l,errorResetBoundary:o,throwOnError:a.throwOnError,query:r.getQueryCache().get(a.queryHash)}))throw l.error;return r.getDefaultOptions().queries?._experimental_afterQuery?.(a,l),a.experimental_prefetchInRender&&!Kc&&ode(l,i)&&(s?lR(a,u,o):r.getQueryCache().get(a.queryHash)?.promise)?.catch(QC).finally(()=>{u.updateResult()}),a.notifyOnChangeProps?l:u.trackResult(l)}function $Ye(e,t){return sde(e,qfe)}function IYe(e,t){const n=Jj(),[r]=y.useState(()=>new Zfe(n,e));y.useEffect(()=>{r.setOptions(e)},[r,e]);const i=y.useSyncExternalStore(y.useCallback(a=>r.subscribe(Ur.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=y.useCallback((a,s)=>{r.mutate(a,s).catch(QC)},[r]);if(i.error&&tB(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}const It=e=>typeof e=="string",$p=()=>{let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n},cR=e=>e==null?"":""+e,ude=(e,t,n)=>{e.forEach(r=>{t[r]&&(n[r]=t[r])})},lde=/###/g,fR=e=>e&&e.indexOf("###")>-1?e.replace(lde,"."):e,dR=e=>!e||It(e),x0=(e,t,n)=>{const r=It(t)?t.split("."):t;let i=0;for(;i{const{obj:r,k:i}=x0(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let o=t[t.length-1],a=t.slice(0,t.length-1),s=x0(e,a,Object);for(;s.obj===void 0&&a.length;)o=`${a[a.length-1]}.${o}`,a=a.slice(0,a.length-1),s=x0(e,a,Object),s?.obj&&typeof s.obj[`${s.k}.${o}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},cde=(e,t,n,r)=>{const{obj:i,k:o}=x0(e,t,Object);i[o]=i[o]||[],i[o].push(n)},W1=(e,t)=>{const{obj:n,k:r}=x0(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},fde=(e,t,n)=>{const r=W1(e,n);return r!==void 0?r:W1(t,n)},nB=(e,t,n)=>{for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?It(e[r])||e[r]instanceof String||It(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):nB(e[r],t[r],n):e[r]=t[r]);return e},Bf=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var dde={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const hde=e=>It(e)?e.replace(/[&<>"'\/]/g,t=>dde[t]):e;class pde{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const gde=[" ",",","?","!",";"],mde=new pde(20),vde=(e,t,n)=>{t=t||"",n=n||"";const r=gde.filter(a=>t.indexOf(a)<0&&n.indexOf(a)<0);if(r.length===0)return!0;const i=mde.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let o=!i.test(e);if(!o){const a=e.indexOf(n);a>0&&!i.test(e.substring(0,a))&&(o=!0)}return o},JC=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const r=t.split(n);let i=e;for(let o=0;o-1&&ue?.replace("_","-"),yde={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};let bde=class eE{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||yde,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i{let[s,u]=a;for(let l=0;l{let[s,u]=a;for(let l=0;l1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;t.indexOf(".")>-1?s=t.split("."):(s=[t,n],r&&(Array.isArray(r)?s.push(...r):It(r)&&o?s.push(...r.split(o)):s.push(r)));const u=W1(this.data,s);return!u&&!n&&!r&&t.indexOf(".")>-1&&(t=s[0],n=s[1],r=s.slice(2).join(".")),u||!a||!It(r)?u:JC(this.data?.[t]?.[n],r,o)}addResource(t,n,r,i){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let s=[t,n];r&&(s=s.concat(a?r.split(a):r)),t.indexOf(".")>-1&&(s=t.split("."),i=n,n=s[1]),this.addNamespaces(n),hR(this.data,s,i),o.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in r)(It(r[o])||Array.isArray(r[o]))&&this.addResource(t,n,o,r[o],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},s=[t,n];t.indexOf(".")>-1&&(s=t.split("."),i=r,r=n,n=s[1]),this.addNamespaces(n);let u=W1(this.data,s)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?nB(u,r,o):u={...u,...r},hR(this.data,s,u),a.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var rB={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(o=>{t=this.processors[o]?.process(t,n,r,i)??t}),t}};const gR={};class K1 extends Jx{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ude(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ms.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};return t==null?!1:this.resolve(t,n)?.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const a=r&&t.indexOf(r)>-1,s=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!vde(t,r,i);if(a&&!s){const u=t.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:t,namespaces:It(o)?[o]:o};const l=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),t=l.join(i)}return{key:t,namespaces:It(o)?[o]:o}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:a,namespaces:s}=this.extractFromKey(t[t.length-1],n),u=s[s.length-1],l=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(l?.toLowerCase()==="cimode"){if(c){const O=n.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${O}${a}`,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:`${u}${O}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:l,usedNS:u,usedParams:this.getUsedParamsDetails(n)}:a}const f=this.resolve(t,n);let h=f?.res;const p=f?.usedKey||a,m=f?.exactUsedKey||a,v=Object.prototype.toString.apply(h),b=["[object Number]","[object Function]","[object RegExp]"],w=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,S=!It(h)&&typeof h!="boolean"&&typeof h!="number";if(x&&h&&S&&b.indexOf(v)<0&&!(It(w)&&Array.isArray(h))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,h,{...n,ns:s}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(f.res=O,f.usedParams=this.getUsedParamsDetails(n),f):O}if(o){const O=Array.isArray(h),E=O?[]:{},C=O?m:p;for(const k in h)if(Object.prototype.hasOwnProperty.call(h,k)){const M=`${C}${o}${k}`;E[k]=this.translate(M,{...n,joinArrays:!1,ns:s}),E[k]===M&&(E[k]=h[k])}h=E}}else if(x&&It(w)&&Array.isArray(h))h=h.join(w),h&&(h=this.extendTranslation(h,t,n,r));else{let O=!1,E=!1;const C=n.count!==void 0&&!It(n.count),k=K1.hasDefaultValue(n),M=C?this.pluralResolver.getSuffix(l,n.count,n):"",N=n.ordinal&&C?this.pluralResolver.getSuffix(l,n.count,{ordinal:!1}):"",z=C&&!n.ordinal&&n.count===0,H=z&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${M}`]||n[`defaultValue${N}`]||n.defaultValue;!this.isValidLookup(h)&&k&&(O=!0,h=H),this.isValidLookup(h)||(E=!0,h=a);const ne=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:h,Z=k&&H!==h&&this.options.updateMissing;if(E||O||Z){if(this.logger.log(Z?"updateKey":"missingKey",l,u,a,Z?H:h),o){const j=this.resolve(a,{...n,keySeparator:!1});j&&j.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let G=[];const q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&q&&q[0])for(let j=0;j{const oe=k&&Y!==h?Y:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(j,u,K,oe,Z,n):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(j,u,K,oe,Z,n),this.emit("missingKey",j,u,K,h)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?G.forEach(j=>{const K=this.pluralResolver.getSuffixes(j,n);z&&n[`defaultValue${this.options.pluralSeparator}zero`]&&K.indexOf(`${this.options.pluralSeparator}zero`)<0&&K.push(`${this.options.pluralSeparator}zero`),K.forEach(Y=>{W([j],a+Y,n[`defaultValue${Y}`]||H)})}):W(G,a,H))}h=this.extendTranslation(h,t,n,f,r),E&&h===a&&this.options.appendNamespaceToMissingKey&&(h=`${u}:${a}`),(E||O)&&this.options.parseMissingKeyHandler&&(h=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${a}`:a,O?h:void 0))}return i?(f.res=h,f.usedParams=this.getUsedParamsDetails(n),f):h}extendTranslation(t,n,r,i,o){var a=this;if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const l=It(t)&&(r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(l){const h=t.match(this.interpolator.nestingRegexp);c=h&&h.length}let f=r.replace&&!It(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),t=this.interpolator.interpolate(t,f,r.lng||this.language||i.usedLng,r),l){const h=t.match(this.interpolator.nestingRegexp),p=h&&h.length;c1&&arguments[1]!==void 0?arguments[1]:{},r,i,o,a,s;return It(t)&&(t=[t]),t.forEach(u=>{if(this.isValidLookup(r))return;const l=this.extractFromKey(u,n),c=l.key;i=c;let f=l.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!It(n.count),p=h&&!n.ordinal&&n.count===0,m=n.context!==void 0&&(It(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(b=>{this.isValidLookup(r)||(s=b,!gR[`${v[0]}-${b}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(s)&&(gR[`${v[0]}-${b}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(w=>{if(this.isValidLookup(r))return;a=w;const x=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(x,c,w,b,n);else{let O;h&&(O=this.pluralResolver.getSuffix(w,n.count,n));const E=`${this.options.pluralSeparator}zero`,C=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(x.push(c+O),n.ordinal&&O.indexOf(C)===0&&x.push(c+O.replace(C,this.options.pluralSeparator)),p&&x.push(c+E)),m){const k=`${c}${this.options.contextSeparator}${n.context}`;x.push(k),h&&(x.push(k+O),n.ordinal&&O.indexOf(C)===0&&x.push(k+O.replace(C,this.options.pluralSeparator)),p&&x.push(k+E))}}let S;for(;S=x.pop();)this.isValidLookup(r)||(o=S,r=this.getResource(w,b,S,n))}))})}),{res:r,usedKey:i,exactUsedKey:o,usedLng:a,usedNS:s}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&!It(t.replace);let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const o of n)delete i[o]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}class mR{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ms.create("languageUtils")}getScriptPartFromCode(t){if(t=H1(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=H1(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(It(t)&&t.indexOf("-")>-1){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(o=>{if(o===i)return o;if(!(o.indexOf("-")<0&&i.indexOf("-")<0)&&(o.indexOf("-")>0&&i.indexOf("-")<0&&o.substring(0,o.indexOf("-"))===i||o.indexOf(i)===0&&i.length>1))return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),It(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],o=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return It(t)&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(t))):It(t)&&o(this.formatLanguageCode(t)),r.forEach(a=>{i.indexOf(a)<0&&o(this.formatLanguageCode(a))}),i}}const vR={zero:0,one:1,two:2,few:3,many:4,other:5},yR={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class xde{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=ms.create("pluralResolver"),this.pluralRulesCache={}}addRule(t,n){this.rules[t]=n}clearCache(){this.pluralRulesCache={}}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=H1(t==="dev"?"en":t),i=n.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:i});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),yR;if(!t.match(/-|_/))return yR;const u=this.languageUtils.getLanguagePartFromCode(t);a=this.getRule(u,n)}return this.pluralRulesCache[o]=a,a}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=this.getRule(t,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,o)=>vR[i]-vR[o]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,r))}}const bR=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=fde(e,t,n);return!o&&i&&It(n)&&(o=JC(e,n,r),o===void 0&&(o=JC(t,n,r))),o},hS=e=>e.replace(/\$/g,"$$$$");class wde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("interpolator"),this.options=t,this.format=t?.interpolation?.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:o,prefixEscaped:a,suffix:s,suffixEscaped:u,formatSeparator:l,unescapeSuffix:c,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:p,nestingSuffix:m,nestingSuffixEscaped:v,nestingOptionsSeparator:b,maxReplaces:w,alwaysFormat:x}=t.interpolation;this.escape=n!==void 0?n:hde,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=o?Bf(o):a||"{{",this.suffix=s?Bf(s):u||"}}",this.formatSeparator=l||",",this.unescapePrefix=c?"":f||"-",this.unescapeSuffix=this.unescapePrefix?"":c||"",this.nestingPrefix=h?Bf(h):p||Bf("$t("),this.nestingSuffix=m?Bf(m):v||Bf(")"),this.nestingOptionsSeparator=b||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n?.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let o,a,s;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=p=>{if(p.indexOf(this.formatSeparator)<0){const w=bR(n,u,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,r,{...i,...n,interpolationkey:p}):w}const m=p.split(this.formatSeparator),v=m.shift().trim(),b=m.join(this.formatSeparator).trim();return this.format(bR(n,u,v,this.options.keySeparator,this.options.ignoreJSONStructure),b,r,{...i,...n,interpolationkey:v})};this.resetRegExp();const c=i?.missingInterpolationHandler||this.options.missingInterpolationHandler,f=i?.interpolation?.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>hS(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?hS(this.escape(p)):hS(p)}].forEach(p=>{for(s=0;o=p.regex.exec(t);){const m=o[1].trim();if(a=l(m),a===void 0)if(typeof c=="function"){const b=c(t,o,i);a=It(b)?b:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))a="";else if(f){a=o[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${t}`),a="";else!It(a)&&!this.useRawValueToEscape&&(a=cR(a));const v=p.safeValue(a);if(t=t.replace(o[0],v),f?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=o[0].length):p.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,o,a;const s=(u,l)=>{const c=this.nestingOptionsSeparator;if(u.indexOf(c)<0)return u;const f=u.split(new RegExp(`${c}[ ]*{`));let h=`{${f[1]}`;u=f[0],h=this.interpolate(h,a);const p=h.match(/'/g),m=h.match(/"/g);((p?.length??0)%2===0&&!m||m.length%2!==0)&&(h=h.replace(/'/g,'"'));try{a=JSON.parse(h),l&&(a={...l,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,v),`${u}${c}${h}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,u};for(;i=this.nestingRegexp.exec(t);){let u=[];a={...r},a=a.replace&&!It(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let l=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const c=i[1].split(this.formatSeparator).map(f=>f.trim());i[1]=c.shift(),u=c,l=!0}if(o=n(s.call(this,i[1].trim(),a),a),o&&i[0]===t&&!It(o))return o;It(o)||(o=cR(o)),o||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),o=""),l&&(o=u.reduce((c,f)=>this.format(c,f,r.lng,{...r,interpolationkey:i[1].trim()}),o.trim())),t=t.replace(i[0],o),this.regexp.lastIndex=0}return t}}const _de=e=>{let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[s,...u]=a.split(":"),l=u.join(":").trim().replace(/^'+|'+$/g,""),c=s.trim();n[c]||(n[c]=l),l==="false"&&(n[c]=!1),l==="true"&&(n[c]=!0),isNaN(l)||(n[c]=parseInt(l,10))}})}return{formatName:t,formatOptions:n}},zf=e=>{const t={};return(n,r,i)=>{let o=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(o={...o,[i.interpolationkey]:void 0});const a=r+JSON.stringify(o);let s=t[a];return s||(s=e(H1(r),i),t[a]=s),s(n)}};class Sde{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ms.create("formatter"),this.options=t,this.formats={number:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return o=>i.format(o)}),currency:zf((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return o=>i.format(o)}),datetime:zf((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return o=>i.format(o)}),relativetime:zf((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return o=>i.format(o,r.range||"day")}),list:zf((n,r)=>{const i=new Intl.ListFormat(n,{...r});return o=>i.format(o)})},this.init(t)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};this.formatSeparator=n.interpolation.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=zf(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=n.split(this.formatSeparator);if(o.length>1&&o[0].indexOf("(")>1&&o[0].indexOf(")")<0&&o.find(s=>s.indexOf(")")>-1)){const s=o.findIndex(u=>u.indexOf(")")>-1);o[0]=[o[0],...o.splice(1,s)].join(this.formatSeparator)}return o.reduce((s,u)=>{const{formatName:l,formatOptions:c}=_de(u);if(this.formats[l]){let f=s;try{const h=i?.formatParams?.[i.interpolationkey]||{},p=h.locale||h.lng||i.locale||i.lng||r;f=this.formats[l](s,p,{...c,...i,...h})}catch(h){this.logger.warn(h)}return f}else this.logger.warn(`there was no format function for ${l}`);return s},t)}}const Cde=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class Ede extends Jx{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=ms.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(r,i.backend,i)}queueLoad(t,n,r,i){const o={},a={},s={},u={};return t.forEach(l=>{let c=!0;n.forEach(f=>{const h=`${l}|${f}`;!r.reload&&this.store.hasResourceBundle(l,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?a[h]===void 0&&(a[h]=!0):(this.state[h]=1,c=!1,a[h]===void 0&&(a[h]=!0),o[h]===void 0&&(o[h]=!0),u[f]===void 0&&(u[f]=!0)))}),c||(s[l]=!0)}),(Object.keys(o).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(o),pending:Object.keys(a),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(u)}}loaded(t,n,r){const i=t.split("|"),o=i[0],a=i[1];n&&this.emit("failedLoading",o,a,n),!n&&r&&this.store.addResourceBundle(o,a,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&r&&(this.state[t]=0);const s={};this.queue.forEach(u=>{cde(u.loaded,[o],a),Cde(u,t),n&&u.errors.push(n),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(l=>{s[l]||(s[l]={});const c=u.loaded[l];c.length&&c.forEach(f=>{s[l][f]===void 0&&(s[l][f]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(u=>!u.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,a=arguments.length>5?arguments[5]:void 0;if(!t.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:o,callback:a});return}this.readingCalls++;const s=(l,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(l&&c&&i{this.read.call(this,t,n,r,i+1,o*2,a)},o);return}a(l,c)},u=this.backend[r].bind(this.backend);if(u.length===2){try{const l=u(t,n);l&&typeof l.then=="function"?l.then(c=>s(null,c)).catch(s):s(null,l)}catch(l){s(l)}return}return u(t,n,s)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();It(t)&&(t=this.languageUtils.toResolveHierarchy(t)),It(n)&&(n=[n]);const o=this.queueLoad(t,n,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(a=>{this.loadOne(a)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(a,s)=>{a&&this.logger.warn(`${n}loading namespace ${o} for language ${i} failed`,a),!a&&s&&this.logger.log(`${n}loaded namespace ${o} for language ${i}`,s),this.loaded(t,a,s)})}saveMissing(t,n,r,i,o){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if(this.backend?.create){const u={...a,isUpdate:o},l=this.backend.create.bind(this.backend);if(l.length<6)try{let c;l.length===5?c=l(t,n,r,i,u):c=l(t,n,r,i),c&&typeof c.then=="function"?c.then(f=>s(null,f)).catch(s):s(null,c)}catch(c){s(c)}else l(t,n,r,i,s,u)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}const xR=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),It(e[1])&&(t.defaultValue=e[1]),It(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(r=>{t[r]=n[r]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),wR=e=>(It(e.ns)&&(e.ns=[e.ns]),It(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),It(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),typeof e.initImmediate=="boolean"&&(e.initAsync=e.initImmediate),e),ry=()=>{},Ode=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};let iB=class tE extends Jx{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=wR(t),this.services={},this.logger=ms,this.modules={external:[]},Ode(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),n.defaultNS==null&&n.ns&&(It(n.ns)?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=xR();this.options={...i,...this.options,...wR(n)},this.options.interpolation={...i.interpolation,...this.options.interpolation},n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);const o=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?ms.init(o(this.modules.logger),this.options):ms.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=Sde;const f=new mR(this.options);this.store=new pR(this.options.resources,this.options);const h=this.services;h.logger=ms,h.resourceStore=this.store,h.languageUtils=f,h.pluralResolver=new xde(f,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(h.formatter=o(c),h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new wde(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new Ede(o(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",function(p){for(var m=arguments.length,v=new Array(m>1?m-1:0),b=1;b1?m-1:0),b=1;b{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,r||(r=ry),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=function(){return t.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return t.store[c](...arguments),t}});const u=$p(),l=()=>{const c=(f,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(h),r(f,h)};if(this.languages&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),u}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ry;const i=It(t)?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],a=s=>{if(!s||s==="cimode")return;this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&o.indexOf(l)<0&&o.push(l)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>a(u)),this.options.preload?.forEach?.(s=>a(s)),this.services.backendConnector.load(o,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(s)})}else r(null)}reloadResources(t,n,r){const i=$p();return typeof t=="function"&&(r=t,t=void 0),typeof n=="function"&&(r=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),r||(r=ry),this.services.backendConnector.reload(t,n,o=>{i.resolve(),r(o)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&rB.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=$p();this.emit("languageChanging",t);const o=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},a=(u,l)=>{l?(o(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(u,function(){return r.t(...arguments)})},s=u=>{!t&&!u&&this.services.languageDetector&&(u=[]);const l=It(u)?u:this.services.languageUtils.getBestMatchFromCodes(u);l&&(this.language||o(l),this.translator.language||this.translator.changeLanguage(l),this.services.languageDetector?.cacheUserLanguage?.(l)),this.loadResources(l,c=>{a(c,l)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?s(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(s):this.services.languageDetector.detect(s):s(t),i}getFixedT(t,n,r){var i=this;const o=function(a,s){let u;if(typeof s!="object"){for(var l=arguments.length,c=new Array(l>2?l-2:0),f=2;f`${u.keyPrefix}${h}${m}`):p=u.keyPrefix?`${u.keyPrefix}${h}${a}`:a,i.t(p,u)};return It(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=r,o}t(){for(var t=arguments.length,n=new Array(t),r=0;r1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(s,u)=>{const l=this.services.backendConnector.state[`${s}|${u}`];return l===-1||l===0||l===2};if(n.precheck){const s=n.precheck(this,a);if(s!==void 0)return s}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,t)&&(!i||a(o,t)))}loadNamespaces(t,n){const r=$p();return this.options.ns?(It(t)&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=$p();It(t)&&(t=[t]);const i=this.options.preload||[],o=t.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return o.length?(this.options.preload=i.concat(o),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=this.services?.languageUtils||new mR(xR());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new tE(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ry;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},o=new tE(i);if((t.debug!==void 0||t.prefix!==void 0)&&(o.logger=o.logger.clone(t)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},r){const s=Object.keys(this.store.data).reduce((u,l)=>(u[l]={...this.store.data[l]},Object.keys(u[l]).reduce((c,f)=>(c[f]={...u[l][f]},c),{})),{});o.store=new pR(s,i),o.services.resourceStore=o.store}return o.translator=new K1(o.services,i),o.translator.on("*",function(s){for(var u=arguments.length,l=new Array(u>1?u-1:0),c=1;c{const i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,"warn","react-i18next::",!0);Mc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},_R={},nE=(e,t,n,r)=>{Mc(n)&&_R[n]||(Mc(n)&&(_R[n]=new Date),Ade(e,t,n,r))},oB=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}},rE=(e,t,n)=>{e.loadNamespaces(t,oB(e,n))},SR=(e,t,n,r)=>{if(Mc(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return rE(e,n,r);n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,oB(e,r))},Pde=(e,t,n={})=>!t.languages||!t.languages.length?(nE(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n?.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,e))return!1}}),Mc=e=>typeof e=="string",kde=e=>typeof e=="object"&&e!==null,Tde=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mde={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rde=e=>Mde[e],Dde=e=>e.replace(Tde,Rde);let iE={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Dde};const $de=(e={})=>{iE={...iE,...e}},Ide=()=>iE;let aB;const Nde=e=>{aB=e},Lde=()=>aB,LYe={type:"3rdParty",init(e){$de(e.options.react),Nde(e)}},Fde=y.createContext();class jde{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const Bde=(e,t)=>{const n=y.useRef();return y.useEffect(()=>{n.current=e},[e,t]),n.current},sB=(e,t,n,r)=>e.getFixedT(t,n,r),zde=(e,t,n,r)=>y.useCallback(sB(e,t,n,r),[e,t,n,r]),FYe=(e,t={})=>{const{i18n:n}=t,{i18n:r,defaultNS:i}=y.useContext(Fde)||{},o=n||r||Lde();if(o&&!o.reportNamespaces&&(o.reportNamespaces=new jde),!o){nE(o,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const O=(C,k)=>Mc(k)?k:kde(k)&&Mc(k.defaultValue)?k.defaultValue:Array.isArray(C)?C[C.length-1]:C,E=[O,{},!1];return E.t=O,E.i18n={},E.ready=!1,E}o.options.react?.wait&&nE(o,"DEPRECATED_OPTION","useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Ide(),...o.options.react,...t},{useSuspense:s,keyPrefix:u}=a;let l=e||i||o.options?.defaultNS;l=Mc(l)?[l]:l||["translation"],o.reportNamespaces.addUsedNamespaces?.(l);const c=(o.isInitialized||o.initializedStoreOnce)&&l.every(O=>Pde(O,o,a)),f=zde(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),h=()=>f,p=()=>sB(o,t.lng||null,a.nsMode==="fallback"?l:l[0],u),[m,v]=y.useState(h);let b=l.join();t.lng&&(b=`${t.lng}${b}`);const w=Bde(b),x=y.useRef(!0);y.useEffect(()=>{const{bindI18n:O,bindI18nStore:E}=a;x.current=!0,!c&&!s&&(t.lng?SR(o,t.lng,l,()=>{x.current&&v(p)}):rE(o,l,()=>{x.current&&v(p)})),c&&w&&w!==b&&x.current&&v(p);const C=()=>{x.current&&v(p)};return O&&o?.on(O,C),E&&o?.store.on(E,C),()=>{x.current=!1,o&&O?.split(" ").forEach(k=>o.off(k,C)),E&&o&&E.split(" ").forEach(k=>o.store.off(k,C))}},[o,b]),y.useEffect(()=>{x.current&&c&&v(h)},[o,u,c]);const S=[m,o,c];if(S.t=m,S.i18n=o,S.ready=c,c||!c&&!s)return S;throw new Promise(O=>{t.lng?SR(o,t.lng,l,()=>O()):rE(o,l,()=>O())})},{slice:Ude,forEach:Vde}=[];function Wde(e){return Vde.call(Ude.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const CR=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Hde=function(e,t){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(t);let o=`${e}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");o+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!CR.test(r.domain))throw new TypeError("option domain is invalid");o+=`; Domain=${r.domain}`}if(r.path){if(!CR.test(r.path))throw new TypeError("option path is invalid");o+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},ER={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Hde(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let a=0;a0&&o[a].substring(0,s)===t&&(n=o[a].substring(s+1))}}return n}};let Ip=null;const OR=()=>{if(Ip!==null)return Ip;try{Ip=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ip=!1}return Ip};var Gde={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&OR())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&OR()&&window.localStorage.setItem(n,e)}};let Np=null;const AR=()=>{if(Np!==null)return Np;try{Np=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Np=!1}return Np};var Yde={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&AR())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&AR()&&window.sessionStorage.setItem(n,e)}},Zde={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let o=0;o0?t:void 0}},Xde={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},Qde={name:"path",lookup(e){let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?n[typeof t=="number"?t:0]?.replace("/",""):void 0}},Jde={name:"subdomain",lookup(e){let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(r)return r[n]}};let uB=!1;try{document.cookie,uB=!0}catch{}const lB=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];uB||lB.splice(1,1);const ehe=()=>({order:lB,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e});class the{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t,this.options=Wde(n,this.options||{},ehe()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Kde),this.addDetector(qde),this.addDetector(Gde),this.addDetector(Yde),this.addDetector(Zde),this.addDetector(Xde),this.addDetector(Qde),this.addDetector(Jde)}addDetector(t){return this.detectors[t.name]=t,this}detect(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}the.type="languageDetector";var xm=e=>e.type==="checkbox",_c=e=>e instanceof Date,zi=e=>e==null;const cB=e=>typeof e=="object";var Or=e=>!zi(e)&&!Array.isArray(e)&&cB(e)&&!_c(e),fB=e=>Or(e)&&e.target?xm(e.target)?e.target.checked:e.target.value:e,nhe=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,dB=(e,t)=>e.has(nhe(t)),rhe=e=>{const t=e.constructor&&e.constructor.prototype;return Or(t)&&t.hasOwnProperty("isPrototypeOf")},jO=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function no(e){let t;const n=Array.isArray(e),r=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else if(!(jO&&(e instanceof Blob||r))&&(n||Or(e)))if(t=n?[]:{},!n&&!rhe(e))t=e;else for(const i in e)e.hasOwnProperty(i)&&(t[i]=no(e[i]));else return e;return t}var ew=e=>Array.isArray(e)?e.filter(Boolean):[],Sr=e=>e===void 0,Xe=(e,t,n)=>{if(!t||!Or(e))return n;const r=ew(t.split(/[,[\].]+?/)).reduce((i,o)=>zi(i)?i:i[o],e);return Sr(r)||r===e?Sr(e[t])?n:e[t]:r},aa=e=>typeof e=="boolean",BO=e=>/^\w*$/.test(e),hB=e=>ew(e.replace(/["|']|\]/g,"").split(/\.|\[/)),An=(e,t,n)=>{let r=-1;const i=BO(t)?[t]:hB(t),o=i.length,a=o-1;for(;++rF.useContext(pB),jYe=e=>{const{children:t,...n}=e;return F.createElement(pB.Provider,{value:n},t)};var gB=(e,t,n,r=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const a=o;return t._proxyFormState[a]!==ja.all&&(t._proxyFormState[a]=!r||ja.all),n&&(n[a]=!0),e[a]}});return i},io=e=>Or(e)&&!Object.keys(e).length,mB=(e,t,n,r)=>{n(e);const{name:i,...o}=e;return io(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find(a=>t[a]===(!r||ja.all))},w0=e=>Array.isArray(e)?e:[e],vB=(e,t,n)=>!e||!t||e===t||w0(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function UO(e){const t=F.useRef(e);t.current=e,F.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function ihe(e){const t=zO(),{control:n=t.control,disabled:r,name:i,exact:o}=e,[a,s]=F.useState(n._formState),u=F.useRef(!0),l=F.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1}),c=F.useRef(i);return c.current=i,UO({disabled:r,next:f=>u.current&&vB(c.current,f.name,o)&&mB(f,l.current,n._updateFormState)&&s({...n._formState,...f}),subject:n._subjects.state}),F.useEffect(()=>(u.current=!0,l.current.isValid&&n._updateValid(!0),()=>{u.current=!1}),[n]),F.useMemo(()=>gB(a,n,l.current,!1),[a,n])}var vs=e=>typeof e=="string",yB=(e,t,n,r,i)=>vs(e)?(r&&t.watch.add(e),Xe(n,e,i)):Array.isArray(e)?e.map(o=>(r&&t.watch.add(o),Xe(n,o))):(r&&(t.watchAll=!0),n);function ohe(e){const t=zO(),{control:n=t.control,name:r,defaultValue:i,disabled:o,exact:a}=e,s=F.useRef(r);s.current=r,UO({disabled:o,subject:n._subjects.values,next:c=>{vB(s.current,c.name,a)&&l(no(yB(s.current,n._names,c.values||n._formValues,!1,i)))}});const[u,l]=F.useState(n._getWatch(r,i));return F.useEffect(()=>n._removeUnmounted()),u}function ahe(e){const t=zO(),{name:n,disabled:r,control:i=t.control,shouldUnregister:o}=e,a=dB(i._names.array,n),s=ohe({control:i,name:n,defaultValue:Xe(i._formValues,n,Xe(i._defaultValues,n,e.defaultValue)),exact:!0}),u=ihe({control:i,name:n,exact:!0}),l=F.useRef(i.register(n,{...e.rules,value:s,...aa(e.disabled)?{disabled:e.disabled}:{}})),c=F.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Xe(u.errors,n)},isDirty:{enumerable:!0,get:()=>!!Xe(u.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Xe(u.touchedFields,n)},isValidating:{enumerable:!0,get:()=>!!Xe(u.validatingFields,n)},error:{enumerable:!0,get:()=>Xe(u.errors,n)}}),[u,n]),f=F.useMemo(()=>({name:n,value:s,...aa(r)||u.disabled?{disabled:u.disabled||r}:{},onChange:h=>l.current.onChange({target:{value:fB(h),name:n},type:q1.CHANGE}),onBlur:()=>l.current.onBlur({target:{value:Xe(i._formValues,n),name:n},type:q1.BLUR}),ref:h=>{const p=Xe(i._fields,n);p&&h&&(p._f.ref={focus:()=>h.focus(),select:()=>h.select(),setCustomValidity:m=>h.setCustomValidity(m),reportValidity:()=>h.reportValidity()})}}),[n,i._formValues,r,u.disabled,s,i._fields]);return F.useEffect(()=>{const h=i._options.shouldUnregister||o,p=(m,v)=>{const b=Xe(i._fields,m);b&&b._f&&(b._f.mount=v)};if(p(n,!0),h){const m=no(Xe(i._options.defaultValues,n));An(i._defaultValues,n,m),Sr(Xe(i._formValues,n))&&An(i._formValues,n,m)}return!a&&i.register(n),()=>{(a?h&&!i._state.action:h)?i.unregister(n):p(n,!1)}},[n,i,a,o]),F.useEffect(()=>{i._updateDisabledField({disabled:r,fields:i._fields,name:n})},[r,n,i]),F.useMemo(()=>({field:f,formState:u,fieldState:c}),[f,u,c])}const BYe=e=>e.render(ahe(e));var bB=(e,t,n,r,i)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:i||!0}}:{},PR=e=>({isOnSubmit:!e||e===ja.onSubmit,isOnBlur:e===ja.onBlur,isOnChange:e===ja.onChange,isOnAll:e===ja.all,isOnTouch:e===ja.onTouched}),kR=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const _0=(e,t,n,r)=>{for(const i of n||Object.keys(e)){const o=Xe(e,i);if(o){const{_f:a,...s}=o;if(a){if(a.refs&&a.refs[0]&&t(a.refs[0],i)&&!r)return!0;if(a.ref&&t(a.ref,a.name)&&!r)return!0;if(_0(s,t))break}else if(Or(s)&&_0(s,t))break}}};var she=(e,t,n)=>{const r=w0(Xe(e,n));return An(r,"root",t[n]),An(e,n,r),e},VO=e=>e.type==="file",hs=e=>typeof e=="function",G1=e=>{if(!jO)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Xy=e=>vs(e),WO=e=>e.type==="radio",Y1=e=>e instanceof RegExp;const TR={value:!1,isValid:!1},MR={value:!0,isValid:!0};var xB=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Sr(e[0].attributes.value)?Sr(e[0].value)||e[0].value===""?MR:{value:e[0].value,isValid:!0}:MR:TR}return TR};const RR={isValid:!1,value:null};var wB=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,RR):RR;function DR(e,t,n="validate"){if(Xy(e)||Array.isArray(e)&&e.every(Xy)||aa(e)&&!e)return{type:n,message:Xy(e)?e:"",ref:t}}var Uf=e=>Or(e)&&!Y1(e)?e:{value:e,message:""},$R=async(e,t,n,r,i,o)=>{const{ref:a,refs:s,required:u,maxLength:l,minLength:c,min:f,max:h,pattern:p,validate:m,name:v,valueAsNumber:b,mount:w}=e._f,x=Xe(n,v);if(!w||t.has(v))return{};const S=s?s[0]:a,O=V=>{i&&S.reportValidity&&(S.setCustomValidity(aa(V)?"":V||""),S.reportValidity())},E={},C=WO(a),k=xm(a),M=C||k,N=(b||VO(a))&&Sr(a.value)&&Sr(x)||G1(a)&&a.value===""||x===""||Array.isArray(x)&&!x.length,z=bB.bind(null,v,r,E),H=(V,ne,Z,G=qs.maxLength,q=qs.minLength)=>{const W=V?ne:Z;E[v]={type:V?G:q,message:W,ref:a,...z(V?G:q,W)}};if(o?!Array.isArray(x)||!x.length:u&&(!M&&(N||zi(x))||aa(x)&&!x||k&&!xB(s).isValid||C&&!wB(s).isValid)){const{value:V,message:ne}=Xy(u)?{value:!!u,message:u}:Uf(u);if(V&&(E[v]={type:qs.required,message:ne,ref:S,...z(qs.required,ne)},!r))return O(ne),E}if(!N&&(!zi(f)||!zi(h))){let V,ne;const Z=Uf(h),G=Uf(f);if(!zi(x)&&!isNaN(x)){const q=a.valueAsNumber||x&&+x;zi(Z.value)||(V=q>Z.value),zi(G.value)||(ne=qnew Date(new Date().toDateString()+" "+Y),j=a.type=="time",K=a.type=="week";vs(Z.value)&&x&&(V=j?W(x)>W(Z.value):K?x>Z.value:q>new Date(Z.value)),vs(G.value)&&x&&(ne=j?W(x)+V.value,G=!zi(ne.value)&&x.length<+ne.value;if((Z||G)&&(H(Z,V.message,ne.message),!r))return O(E[v].message),E}if(p&&!N&&vs(x)){const{value:V,message:ne}=Uf(p);if(Y1(V)&&!x.match(V)&&(E[v]={type:qs.pattern,message:ne,ref:a,...z(qs.pattern,ne)},!r))return O(ne),E}if(m){if(hs(m)){const V=await m(x,n),ne=DR(V,S);if(ne&&(E[v]={...ne,...z(qs.validate,ne.message)},!r))return O(ne.message),E}else if(Or(m)){let V={};for(const ne in m){if(!io(V)&&!r)break;const Z=DR(await m[ne](x,n),S,ne);Z&&(V={...Z,...z(ne,Z.message)},O(Z.message),r&&(E[v]=V))}if(!io(V)&&(E[v]={ref:S,...V},!r))return E}}return O(!0),E};function uhe(e,t){const n=t.slice(0,-1).length;let r=0;for(;r{let e=[];return{get observers(){return e},next:i=>{for(const o of e)o.next&&o.next(i)},subscribe:i=>(e.push(i),{unsubscribe:()=>{e=e.filter(o=>o!==i)}}),unsubscribe:()=>{e=[]}}},oE=e=>zi(e)||!cB(e);function nl(e,t){if(oE(e)||oE(t))return e===t;if(_c(e)&&_c(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const o=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const a=t[i];if(_c(o)&&_c(a)||Or(o)&&Or(a)||Array.isArray(o)&&Array.isArray(a)?!nl(o,a):o!==a)return!1}}return!0}var _B=e=>e.type==="select-multiple",che=e=>WO(e)||xm(e),gS=e=>G1(e)&&e.isConnected,SB=e=>{for(const t in e)if(hs(e[t]))return!0;return!1};function Z1(e,t={}){const n=Array.isArray(e);if(Or(e)||n)for(const r in e)Array.isArray(e[r])||Or(e[r])&&!SB(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Z1(e[r],t[r])):zi(e[r])||(t[r]=!0);return t}function CB(e,t,n){const r=Array.isArray(e);if(Or(e)||r)for(const i in e)Array.isArray(e[i])||Or(e[i])&&!SB(e[i])?Sr(t)||oE(n[i])?n[i]=Array.isArray(e[i])?Z1(e[i],[]):{...Z1(e[i])}:CB(e[i],zi(t)?{}:t[i],n[i]):n[i]=!nl(e[i],t[i]);return n}var Lp=(e,t)=>CB(e,t,Z1(t)),EB=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Sr(e)?e:t?e===""?NaN:e&&+e:n&&vs(e)?new Date(e):r?r(e):e;function mS(e){const t=e.ref;return VO(t)?t.files:WO(t)?wB(e.refs).value:_B(t)?[...t.selectedOptions].map(({value:n})=>n):xm(t)?xB(e.refs).value:EB(Sr(t.value)?e.ref.value:t.value,e)}var fhe=(e,t,n,r)=>{const i={};for(const o of e){const a=Xe(t,o);a&&An(i,o,a._f)}return{criteriaMode:n,names:[...e],fields:i,shouldUseNativeValidation:r}},Fp=e=>Sr(e)?e:Y1(e)?e.source:Or(e)?Y1(e.value)?e.value.source:e.value:e;const IR="AsyncFunction";var dhe=e=>!!e&&!!e.validate&&!!(hs(e.validate)&&e.validate.constructor.name===IR||Or(e.validate)&&Object.values(e.validate).find(t=>t.constructor.name===IR)),hhe=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function NR(e,t,n){const r=Xe(e,n);if(r||BO(n))return{error:r,name:n};const i=n.split(".");for(;i.length;){const o=i.join("."),a=Xe(t,o),s=Xe(e,o);if(a&&!Array.isArray(a)&&n!==o)return{name:n};if(s&&s.type)return{name:o,error:s};i.pop()}return{name:n}}var phe=(e,t,n,r,i)=>i.isOnAll?!1:!n&&i.isOnTouch?!(t||e):(n?r.isOnBlur:i.isOnBlur)?!e:(n?r.isOnChange:i.isOnChange)?e:!0,ghe=(e,t)=>!ew(Xe(e,t)).length&&Br(e,t);const mhe={mode:ja.onSubmit,reValidateMode:ja.onChange,shouldFocusError:!0};function vhe(e={}){let t={...mhe,...e},n={submitCount:0,isDirty:!1,isLoading:hs(t.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:t.errors||{},disabled:t.disabled||!1},r={},i=Or(t.defaultValues)||Or(t.values)?no(t.defaultValues||t.values)||{}:{},o=t.shouldUnregister?{}:no(i),a={action:!1,mount:!1,watch:!1},s={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},u,l=0;const c={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:pS(),array:pS(),state:pS()},h=PR(t.mode),p=PR(t.reValidateMode),m=t.criteriaMode===ja.all,v=ie=>pe=>{clearTimeout(l),l=setTimeout(ie,pe)},b=async ie=>{if(!t.disabled&&(c.isValid||ie)){const pe=t.resolver?io((await M()).errors):await z(r,!0);pe!==n.isValid&&f.state.next({isValid:pe})}},w=(ie,pe)=>{!t.disabled&&(c.isValidating||c.validatingFields)&&((ie||Array.from(s.mount)).forEach(ye=>{ye&&(pe?An(n.validatingFields,ye,pe):Br(n.validatingFields,ye))}),f.state.next({validatingFields:n.validatingFields,isValidating:!io(n.validatingFields)}))},x=(ie,pe=[],ye,Ue,je=!0,ke=!0)=>{if(Ue&&ye&&!t.disabled){if(a.action=!0,ke&&Array.isArray(Xe(r,ie))){const nt=ye(Xe(r,ie),Ue.argA,Ue.argB);je&&An(r,ie,nt)}if(ke&&Array.isArray(Xe(n.errors,ie))){const nt=ye(Xe(n.errors,ie),Ue.argA,Ue.argB);je&&An(n.errors,ie,nt),ghe(n.errors,ie)}if(c.touchedFields&&ke&&Array.isArray(Xe(n.touchedFields,ie))){const nt=ye(Xe(n.touchedFields,ie),Ue.argA,Ue.argB);je&&An(n.touchedFields,ie,nt)}c.dirtyFields&&(n.dirtyFields=Lp(i,o)),f.state.next({name:ie,isDirty:V(ie,pe),dirtyFields:n.dirtyFields,errors:n.errors,isValid:n.isValid})}else An(o,ie,pe)},S=(ie,pe)=>{An(n.errors,ie,pe),f.state.next({errors:n.errors})},O=ie=>{n.errors=ie,f.state.next({errors:n.errors,isValid:!1})},E=(ie,pe,ye,Ue)=>{const je=Xe(r,ie);if(je){const ke=Xe(o,ie,Sr(ye)?Xe(i,ie):ye);Sr(ke)||Ue&&Ue.defaultChecked||pe?An(o,ie,pe?ke:mS(je._f)):G(ie,ke),a.mount&&b()}},C=(ie,pe,ye,Ue,je)=>{let ke=!1,nt=!1;const mt={name:ie};if(!t.disabled){const xn=!!(Xe(r,ie)&&Xe(r,ie)._f&&Xe(r,ie)._f.disabled);if(!ye||Ue){c.isDirty&&(nt=n.isDirty,n.isDirty=mt.isDirty=V(),ke=nt!==mt.isDirty);const Ht=xn||nl(Xe(i,ie),pe);nt=!!(!xn&&Xe(n.dirtyFields,ie)),Ht||xn?Br(n.dirtyFields,ie):An(n.dirtyFields,ie,!0),mt.dirtyFields=n.dirtyFields,ke=ke||c.dirtyFields&&nt!==!Ht}if(ye){const Ht=Xe(n.touchedFields,ie);Ht||(An(n.touchedFields,ie,ye),mt.touchedFields=n.touchedFields,ke=ke||c.touchedFields&&Ht!==ye)}ke&&je&&f.state.next(mt)}return ke?mt:{}},k=(ie,pe,ye,Ue)=>{const je=Xe(n.errors,ie),ke=c.isValid&&aa(pe)&&n.isValid!==pe;if(t.delayError&&ye?(u=v(()=>S(ie,ye)),u(t.delayError)):(clearTimeout(l),u=null,ye?An(n.errors,ie,ye):Br(n.errors,ie)),(ye?!nl(je,ye):je)||!io(Ue)||ke){const nt={...Ue,...ke&&aa(pe)?{isValid:pe}:{},errors:n.errors,name:ie};n={...n,...nt},f.state.next(nt)}},M=async ie=>{w(ie,!0);const pe=await t.resolver(o,t.context,fhe(ie||s.mount,r,t.criteriaMode,t.shouldUseNativeValidation));return w(ie),pe},N=async ie=>{const{errors:pe}=await M(ie);if(ie)for(const ye of ie){const Ue=Xe(pe,ye);Ue?An(n.errors,ye,Ue):Br(n.errors,ye)}else n.errors=pe;return pe},z=async(ie,pe,ye={valid:!0})=>{for(const Ue in ie){const je=ie[Ue];if(je){const{_f:ke,...nt}=je;if(ke){const mt=s.array.has(ke.name),xn=je._f&&dhe(je._f);xn&&c.validatingFields&&w([Ue],!0);const Ht=await $R(je,s.disabled,o,m,t.shouldUseNativeValidation&&!pe,mt);if(xn&&c.validatingFields&&w([Ue]),Ht[ke.name]&&(ye.valid=!1,pe))break;!pe&&(Xe(Ht,ke.name)?mt?she(n.errors,Ht,ke.name):An(n.errors,ke.name,Ht[ke.name]):Br(n.errors,ke.name))}!io(nt)&&await z(nt,pe,ye)}}return ye.valid},H=()=>{for(const ie of s.unMount){const pe=Xe(r,ie);pe&&(pe._f.refs?pe._f.refs.every(ye=>!gS(ye)):!gS(pe._f.ref))&&Se(ie)}s.unMount=new Set},V=(ie,pe)=>!t.disabled&&(ie&&pe&&An(o,ie,pe),!nl(oe(),i)),ne=(ie,pe,ye)=>yB(ie,s,{...a.mount?o:Sr(pe)?i:vs(ie)?{[ie]:pe}:pe},ye,pe),Z=ie=>ew(Xe(a.mount?o:i,ie,t.shouldUnregister?Xe(i,ie,[]):[])),G=(ie,pe,ye={})=>{const Ue=Xe(r,ie);let je=pe;if(Ue){const ke=Ue._f;ke&&(!ke.disabled&&An(o,ie,EB(pe,ke)),je=G1(ke.ref)&&zi(pe)?"":pe,_B(ke.ref)?[...ke.ref.options].forEach(nt=>nt.selected=je.includes(nt.value)):ke.refs?xm(ke.ref)?ke.refs.length>1?ke.refs.forEach(nt=>(!nt.defaultChecked||!nt.disabled)&&(nt.checked=Array.isArray(je)?!!je.find(mt=>mt===nt.value):je===nt.value)):ke.refs[0]&&(ke.refs[0].checked=!!je):ke.refs.forEach(nt=>nt.checked=nt.value===je):VO(ke.ref)?ke.ref.value="":(ke.ref.value=je,ke.ref.type||f.values.next({name:ie,values:{...o}})))}(ye.shouldDirty||ye.shouldTouch)&&C(ie,je,ye.shouldTouch,ye.shouldDirty,!0),ye.shouldValidate&&Y(ie)},q=(ie,pe,ye)=>{for(const Ue in pe){const je=pe[Ue],ke=`${ie}.${Ue}`,nt=Xe(r,ke);(s.array.has(ie)||Or(je)||nt&&!nt._f)&&!_c(je)?q(ke,je,ye):G(ke,je,ye)}},W=(ie,pe,ye={})=>{const Ue=Xe(r,ie),je=s.array.has(ie),ke=no(pe);An(o,ie,ke),je?(f.array.next({name:ie,values:{...o}}),(c.isDirty||c.dirtyFields)&&ye.shouldDirty&&f.state.next({name:ie,dirtyFields:Lp(i,o),isDirty:V(ie,ke)})):Ue&&!Ue._f&&!zi(ke)?q(ie,ke,ye):G(ie,ke,ye),kR(ie,s)&&f.state.next({...n}),f.values.next({name:a.mount?ie:void 0,values:{...o}})},j=async ie=>{a.mount=!0;const pe=ie.target;let ye=pe.name,Ue=!0;const je=Xe(r,ye),ke=()=>pe.type?mS(je._f):fB(ie),nt=mt=>{Ue=Number.isNaN(mt)||_c(mt)&&isNaN(mt.getTime())||nl(mt,Xe(o,ye,mt))};if(je){let mt,xn;const Ht=ke(),wn=ie.type===q1.BLUR||ie.type===q1.FOCUS_OUT,Ii=!hhe(je._f)&&!t.resolver&&!Xe(n.errors,ye)&&!je._f.deps||phe(wn,Xe(n.touchedFields,ye),n.isSubmitted,p,h),br=kR(ye,s,wn);An(o,ye,Ht),wn?(je._f.onBlur&&je._f.onBlur(ie),u&&u(0)):je._f.onChange&&je._f.onChange(ie);const yi=C(ye,Ht,wn,!1),sr=!io(yi)||br;if(!wn&&f.values.next({name:ye,type:ie.type,values:{...o}}),Ii)return c.isValid&&(t.mode==="onBlur"&&wn?b():wn||b()),sr&&f.state.next({name:ye,...br?{}:yi});if(!wn&&br&&f.state.next({...n}),t.resolver){const{errors:si}=await M([ye]);if(nt(Ht),Ue){const bi=NR(n.errors,r,ye),Rr=NR(si,r,bi.name||ye);mt=Rr.error,ye=Rr.name,xn=io(si)}}else w([ye],!0),mt=(await $R(je,s.disabled,o,m,t.shouldUseNativeValidation))[ye],w([ye]),nt(Ht),Ue&&(mt?xn=!1:c.isValid&&(xn=await z(r,!0)));Ue&&(je._f.deps&&Y(je._f.deps),k(ye,xn,mt,yi))}},K=(ie,pe)=>{if(Xe(n.errors,pe)&&ie.focus)return ie.focus(),1},Y=async(ie,pe={})=>{let ye,Ue;const je=w0(ie);if(t.resolver){const ke=await N(Sr(ie)?ie:je);ye=io(ke),Ue=ie?!je.some(nt=>Xe(ke,nt)):ye}else ie?(Ue=(await Promise.all(je.map(async ke=>{const nt=Xe(r,ke);return await z(nt&&nt._f?{[ke]:nt}:nt)}))).every(Boolean),!(!Ue&&!n.isValid)&&b()):Ue=ye=await z(r);return f.state.next({...!vs(ie)||c.isValid&&ye!==n.isValid?{}:{name:ie},...t.resolver||!ie?{isValid:ye}:{},errors:n.errors}),pe.shouldFocus&&!Ue&&_0(r,K,ie?je:s.mount),Ue},oe=ie=>{const pe={...a.mount?o:i};return Sr(ie)?pe:vs(ie)?Xe(pe,ie):ie.map(ye=>Xe(pe,ye))},Q=(ie,pe)=>({invalid:!!Xe((pe||n).errors,ie),isDirty:!!Xe((pe||n).dirtyFields,ie),error:Xe((pe||n).errors,ie),isValidating:!!Xe(n.validatingFields,ie),isTouched:!!Xe((pe||n).touchedFields,ie)}),J=ie=>{ie&&w0(ie).forEach(pe=>Br(n.errors,pe)),f.state.next({errors:ie?n.errors:{}})},ue=(ie,pe,ye)=>{const Ue=(Xe(r,ie,{_f:{}})._f||{}).ref,je=Xe(n.errors,ie)||{},{ref:ke,message:nt,type:mt,...xn}=je;An(n.errors,ie,{...xn,...pe,ref:Ue}),f.state.next({name:ie,errors:n.errors,isValid:!1}),ye&&ye.shouldFocus&&Ue&&Ue.focus&&Ue.focus()},de=(ie,pe)=>hs(ie)?f.values.subscribe({next:ye=>ie(ne(void 0,pe),ye)}):ne(ie,pe,!0),Se=(ie,pe={})=>{for(const ye of ie?w0(ie):s.mount)s.mount.delete(ye),s.array.delete(ye),pe.keepValue||(Br(r,ye),Br(o,ye)),!pe.keepError&&Br(n.errors,ye),!pe.keepDirty&&Br(n.dirtyFields,ye),!pe.keepTouched&&Br(n.touchedFields,ye),!pe.keepIsValidating&&Br(n.validatingFields,ye),!t.shouldUnregister&&!pe.keepDefaultValue&&Br(i,ye);f.values.next({values:{...o}}),f.state.next({...n,...pe.keepDirty?{isDirty:V()}:{}}),!pe.keepIsValid&&b()},me=({disabled:ie,name:pe,field:ye,fields:Ue})=>{(aa(ie)&&a.mount||ie||s.disabled.has(pe))&&(ie?s.disabled.add(pe):s.disabled.delete(pe),C(pe,mS(ye?ye._f:Xe(Ue,pe)._f),!1,!1,!0))},Ze=(ie,pe={})=>{let ye=Xe(r,ie);const Ue=aa(pe.disabled)||aa(t.disabled);return An(r,ie,{...ye||{},_f:{...ye&&ye._f?ye._f:{ref:{name:ie}},name:ie,mount:!0,...pe}}),s.mount.add(ie),ye?me({field:ye,disabled:aa(pe.disabled)?pe.disabled:t.disabled,name:ie}):E(ie,!0,pe.value),{...Ue?{disabled:pe.disabled||t.disabled}:{},...t.progressive?{required:!!pe.required,min:Fp(pe.min),max:Fp(pe.max),minLength:Fp(pe.minLength),maxLength:Fp(pe.maxLength),pattern:Fp(pe.pattern)}:{},name:ie,onChange:j,onBlur:j,ref:je=>{if(je){Ze(ie,pe),ye=Xe(r,ie);const ke=Sr(je.value)&&je.querySelectorAll&&je.querySelectorAll("input,select,textarea")[0]||je,nt=che(ke),mt=ye._f.refs||[];if(nt?mt.find(xn=>xn===ke):ke===ye._f.ref)return;An(r,ie,{_f:{...ye._f,...nt?{refs:[...mt.filter(gS),ke,...Array.isArray(Xe(i,ie))?[{}]:[]],ref:{type:ke.type,name:ie}}:{ref:ke}}}),E(ie,!1,void 0,ke)}else ye=Xe(r,ie,{}),ye._f&&(ye._f.mount=!1),(t.shouldUnregister||pe.shouldUnregister)&&!(dB(s.array,ie)&&a.action)&&s.unMount.add(ie)}}},Ae=()=>t.shouldFocusError&&_0(r,K,s.mount),Le=ie=>{aa(ie)&&(f.state.next({disabled:ie}),_0(r,(pe,ye)=>{const Ue=Xe(r,ye);Ue&&(pe.disabled=Ue._f.disabled||ie,Array.isArray(Ue._f.refs)&&Ue._f.refs.forEach(je=>{je.disabled=Ue._f.disabled||ie}))},0,!1))},$e=(ie,pe)=>async ye=>{let Ue;ye&&(ye.preventDefault&&ye.preventDefault(),ye.persist&&ye.persist());let je=no(o);if(s.disabled.size)for(const ke of s.disabled)An(je,ke,void 0);if(f.state.next({isSubmitting:!0}),t.resolver){const{errors:ke,values:nt}=await M();n.errors=ke,je=nt}else await z(r);if(Br(n.errors,"root"),io(n.errors)){f.state.next({errors:{}});try{await ie(je,ye)}catch(ke){Ue=ke}}else pe&&await pe({...n.errors},ye),Ae(),setTimeout(Ae);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:io(n.errors)&&!Ue,submitCount:n.submitCount+1,errors:n.errors}),Ue)throw Ue},be=(ie,pe={})=>{Xe(r,ie)&&(Sr(pe.defaultValue)?W(ie,no(Xe(i,ie))):(W(ie,pe.defaultValue),An(i,ie,no(pe.defaultValue))),pe.keepTouched||Br(n.touchedFields,ie),pe.keepDirty||(Br(n.dirtyFields,ie),n.isDirty=pe.defaultValue?V(ie,no(Xe(i,ie))):V()),pe.keepError||(Br(n.errors,ie),c.isValid&&b()),f.state.next({...n}))},yt=(ie,pe={})=>{const ye=ie?no(ie):i,Ue=no(ye),je=io(ie),ke=je?i:Ue;if(pe.keepDefaultValues||(i=ye),!pe.keepValues){if(pe.keepDirtyValues){const nt=new Set([...s.mount,...Object.keys(Lp(i,o))]);for(const mt of Array.from(nt))Xe(n.dirtyFields,mt)?An(ke,mt,Xe(o,mt)):W(mt,Xe(ke,mt))}else{if(jO&&Sr(ie))for(const nt of s.mount){const mt=Xe(r,nt);if(mt&&mt._f){const xn=Array.isArray(mt._f.refs)?mt._f.refs[0]:mt._f.ref;if(G1(xn)){const Ht=xn.closest("form");if(Ht){Ht.reset();break}}}}r={}}o=t.shouldUnregister?pe.keepDefaultValues?no(i):{}:no(ke),f.array.next({values:{...ke}}),f.values.next({values:{...ke}})}s={mount:pe.keepDirtyValues?s.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},a.mount=!c.isValid||!!pe.keepIsValid||!!pe.keepDirtyValues,a.watch=!!t.shouldUnregister,f.state.next({submitCount:pe.keepSubmitCount?n.submitCount:0,isDirty:je?!1:pe.keepDirty?n.isDirty:!!(pe.keepDefaultValues&&!nl(ie,i)),isSubmitted:pe.keepIsSubmitted?n.isSubmitted:!1,dirtyFields:je?{}:pe.keepDirtyValues?pe.keepDefaultValues&&o?Lp(i,o):n.dirtyFields:pe.keepDefaultValues&&ie?Lp(i,ie):pe.keepDirty?n.dirtyFields:{},touchedFields:pe.keepTouched?n.touchedFields:{},errors:pe.keepErrors?n.errors:{},isSubmitSuccessful:pe.keepIsSubmitSuccessful?n.isSubmitSuccessful:!1,isSubmitting:!1})},lt=(ie,pe)=>yt(hs(ie)?ie(o):ie,pe);return{control:{register:Ze,unregister:Se,getFieldState:Q,handleSubmit:$e,setError:ue,_executeSchema:M,_getWatch:ne,_getDirty:V,_updateValid:b,_removeUnmounted:H,_updateFieldArray:x,_updateDisabledField:me,_getFieldArray:Z,_reset:yt,_resetDefaultValues:()=>hs(t.defaultValues)&&t.defaultValues().then(ie=>{lt(ie,t.resetOptions),f.state.next({isLoading:!1})}),_updateFormState:ie=>{n={...n,...ie}},_disableForm:Le,_subjects:f,_proxyFormState:c,_setErrors:O,get _fields(){return r},get _formValues(){return o},get _state(){return a},set _state(ie){a=ie},get _defaultValues(){return i},get _names(){return s},set _names(ie){s=ie},get _formState(){return n},set _formState(ie){n=ie},get _options(){return t},set _options(ie){t={...t,...ie}}},trigger:Y,register:Ze,handleSubmit:$e,watch:de,setValue:W,getValues:oe,reset:lt,resetField:be,clearErrors:J,unregister:Se,setError:ue,setFocus:(ie,pe={})=>{const ye=Xe(r,ie),Ue=ye&&ye._f;if(Ue){const je=Ue.refs?Ue.refs[0]:Ue.ref;je.focus&&(je.focus(),pe.shouldSelect&&hs(je.select)&&je.select())}},getFieldState:Q}}function zYe(e={}){const t=F.useRef(void 0),n=F.useRef(void 0),[r,i]=F.useState({isDirty:!1,isValidating:!1,isLoading:hs(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hs(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...vhe(e),formState:r});const o=t.current.control;return o._options=e,UO({subject:o._subjects.state,next:a=>{mB(a,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),F.useEffect(()=>o._disableForm(e.disabled),[o,e.disabled]),F.useEffect(()=>{if(o._proxyFormState.isDirty){const a=o._getDirty();a!==r.isDirty&&o._subjects.state.next({isDirty:a})}},[o,r.isDirty]),F.useEffect(()=>{e.values&&!nl(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,i(a=>({...a}))):o._resetDefaultValues()},[e.values,o]),F.useEffect(()=>{e.errors&&o._setErrors(e.errors)},[e.errors,o]),F.useEffect(()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()}),F.useEffect(()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})},[e.shouldUnregister,o]),t.current.formState=gB(r,o),t.current}var gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const a of i)o[a]=a;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(s=>typeof i[i[s]]!="number"),a={};for(const s of o)a[s]=i[s];return e.objectValues(a)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&o.push(a);return o},e.find=(i,o)=>{for(const a of i)if(o(a))return a},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(gn||(gn={}));var aE;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(aE||(aE={}));const it=gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),nu=e=>{switch(typeof e){case"undefined":return it.undefined;case"string":return it.string;case"number":return isNaN(e)?it.nan:it.number;case"boolean":return it.boolean;case"function":return it.function;case"bigint":return it.bigint;case"symbol":return it.symbol;case"object":return Array.isArray(e)?it.array:e===null?it.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?it.promise:typeof Map<"u"&&e instanceof Map?it.map:typeof Set<"u"&&e instanceof Set?it.set:typeof Date<"u"&&e instanceof Date?it.date:it.object;default:return it.unknown}},Ve=gn.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),yhe=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Lo extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const a of o.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let s=r,u=0;for(;un.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Lo.create=e=>new Lo(e);const qd=(e,t)=>{let n;switch(e.code){case Ve.invalid_type:e.received===it.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ve.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,gn.jsonStringifyReplacer)}`;break;case Ve.unrecognized_keys:n=`Unrecognized key(s) in object: ${gn.joinValues(e.keys,", ")}`;break;case Ve.invalid_union:n="Invalid input";break;case Ve.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${gn.joinValues(e.options)}`;break;case Ve.invalid_enum_value:n=`Invalid enum value. Expected ${gn.joinValues(e.options)}, received '${e.received}'`;break;case Ve.invalid_arguments:n="Invalid function arguments";break;case Ve.invalid_return_type:n="Invalid function return type";break;case Ve.invalid_date:n="Invalid date";break;case Ve.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ve.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ve.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ve.custom:n="Invalid input";break;case Ve.invalid_intersection_types:n="Intersection results could not be merged";break;case Ve.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ve.not_finite:n="Number must be finite";break;default:n=t.defaultError,gn.assertNever(e)}return{message:n}};let OB=qd;function bhe(e){OB=e}function X1(){return OB}const Q1=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],a={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let s="";const u=r.filter(l=>!!l).slice().reverse();for(const l of u)s=l(a,{data:t,defaultError:s}).message;return{...i,path:o,message:s}},xhe=[];function tt(e,t){const n=X1(),r=Q1({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qd?void 0:qd].filter(i=>!!i)});e.common.issues.push(r)}class $i{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return Dt;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,a=await i.value;r.push({key:o,value:a})}return $i.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:a}=i;if(o.status==="aborted"||a.status==="aborted")return Dt;o.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[o.value]=a.value)}return{status:t.value,value:r}}}const Dt=Object.freeze({status:"aborted"}),gd=e=>({status:"dirty",value:e}),Hi=e=>({status:"valid",value:e}),sE=e=>e.status==="aborted",uE=e=>e.status==="dirty",Gc=e=>e.status==="valid",tg=e=>typeof Promise<"u"&&e instanceof Promise;function J1(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function AB(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var dt;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t?.message})(dt||(dt={}));var o0,a0;class ks{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const LR=(e,t)=>{if(Gc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Lo(e.common.issues);return this._error=n,this._error}}};function qt(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(a,s)=>{var u,l;const{message:c}=e;return a.code==="invalid_enum_value"?{message:c??s.defaultError}:typeof s.data>"u"?{message:(u=c??r)!==null&&u!==void 0?u:s.defaultError}:a.code!=="invalid_type"?{message:s.defaultError}:{message:(l=c??n)!==null&&l!==void 0?l:s.defaultError}},description:i}}class Jt{get description(){return this._def.description}_getType(t){return nu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new $i,ctx:{common:t.parent.common,data:t.data,parsedType:nu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(tg(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n?.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n?.errorMap},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return LR(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return Gc(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o?.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>Gc(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n?.errorMap,async:!0},path:n?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:nu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(tg(i)?i:Promise.resolve(i));return LR(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const a=t(i),s=()=>o.addIssue({code:Ve.custom,...r(i)});return typeof Promise<"u"&&a instanceof Promise?a.then(u=>u?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new Ya({schema:this,typeName:Tt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Es.create(this,this._def)}nullable(){return Ml.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ha.create(this)}promise(){return Yd.create(this,this._def)}or(t){return og.create([this,t],this._def)}and(t){return ag.create(this,t,this._def)}transform(t){return new Ya({...qt(this._def),schema:this,typeName:Tt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fg({...qt(this._def),innerType:this,defaultValue:n,typeName:Tt.ZodDefault})}brand(){return new HO({typeName:Tt.ZodBranded,type:this,...qt(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dg({...qt(this._def),innerType:this,catchValue:n,typeName:Tt.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return wm.create(this,t)}readonly(){return hg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const whe=/^c[^\s-]{8,}$/i,_he=/^[0-9a-z]+$/,She=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Che=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ehe=/^[a-z0-9_-]{21}$/i,Ohe=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Ahe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Phe=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,khe="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vS;const The=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Mhe=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Rhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Dhe=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$he=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ihe=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,PB="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Nhe=new RegExp(`^${PB}$`);function kB(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Lhe(e){return new RegExp(`^${kB(e)}$`)}function TB(e){let t=`${PB}T${kB(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Fhe(e,t){return!!((t==="v4"||!t)&&The.test(e)||(t==="v6"||!t)&&Rhe.test(e))}function jhe(e,t){if(!Ohe.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function Bhe(e,t){return!!((t==="v4"||!t)&&Mhe.test(e)||(t==="v6"||!t)&&Dhe.test(e))}class za extends Jt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==it.string){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.string,received:o.parsedType}),Dt}const r=new $i;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.lengtho.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const a=t.data.length>o.value,s=t.data.lengtht.test(i),{validation:n,code:Ve.invalid_string,...dt.errToObj(r)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...dt.errToObj(t)})}url(t){return this._addCheck({kind:"url",...dt.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...dt.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...dt.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...dt.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...dt.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...dt.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...dt.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...dt.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...dt.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...dt.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...dt.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...dt.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof t?.precision>"u"?null:t?.precision,offset:(n=t?.offset)!==null&&n!==void 0?n:!1,local:(r=t?.local)!==null&&r!==void 0?r:!1,...dt.errToObj(t?.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof t?.precision>"u"?null:t?.precision,...dt.errToObj(t?.message)})}duration(t){return this._addCheck({kind:"duration",...dt.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...dt.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n?.position,...dt.errToObj(n?.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...dt.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...dt.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...dt.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...dt.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...dt.errToObj(n)})}nonempty(t){return this.min(1,dt.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new za({checks:[],typeName:Tt.ZodString,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};function zhe(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),a=parseInt(t.toFixed(i).replace(".",""));return o%a/Math.pow(10,i)}class Pl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==it.number){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.number,received:o.parsedType}),Dt}let r;const i=new $i;for(const o of this._def.checks)o.kind==="int"?gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?zhe(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_finite,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new Pl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new Pl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:dt.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:dt.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:dt.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:dt.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuet.kind==="int"||t.kind==="multipleOf"&&gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.valuenew Pl({checks:[],typeName:Tt.ZodNumber,coerce:e?.coerce||!1,...qt(e)});class kl extends Jt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==it.bigint)return this._getInvalidInput(t);let r;const i=new $i;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.datao.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),tt(r,{code:Ve.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.bigint,received:n.parsedType}),Dt}gte(t,n){return this.setLimit("min",t,!0,dt.toString(n))}gt(t,n){return this.setLimit("min",t,!1,dt.toString(n))}lte(t,n){return this.setLimit("max",t,!0,dt.toString(n))}lt(t,n){return this.setLimit("max",t,!1,dt.toString(n))}setLimit(t,n,r,i){return new kl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:dt.toString(i)}]})}_addCheck(t){return new kl({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:dt.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:dt.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:dt.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value{var t;return new kl({checks:[],typeName:Tt.ZodBigInt,coerce:(t=e?.coerce)!==null&&t!==void 0?t:!1,...qt(e)})};class ng extends Jt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==it.boolean){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.boolean,received:r.parsedType}),Dt}return Hi(t.data)}}ng.create=e=>new ng({typeName:Tt.ZodBoolean,coerce:e?.coerce||!1,...qt(e)});class Yc extends Jt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==it.date){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_type,expected:it.date,received:o.parsedType}),Dt}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return tt(o,{code:Ve.invalid_date}),Dt}const r=new $i;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()o.value&&(i=this._getOrReturnCtx(t,i),tt(i,{code:Ve.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Yc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:dt.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:dt.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.valuenew Yc({checks:[],coerce:e?.coerce||!1,typeName:Tt.ZodDate,...qt(e)});class eb extends Jt{_parse(t){if(this._getType(t)!==it.symbol){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.symbol,received:r.parsedType}),Dt}return Hi(t.data)}}eb.create=e=>new eb({typeName:Tt.ZodSymbol,...qt(e)});class rg extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.undefined,received:r.parsedType}),Dt}return Hi(t.data)}}rg.create=e=>new rg({typeName:Tt.ZodUndefined,...qt(e)});class ig extends Jt{_parse(t){if(this._getType(t)!==it.null){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.null,received:r.parsedType}),Dt}return Hi(t.data)}}ig.create=e=>new ig({typeName:Tt.ZodNull,...qt(e)});class Gd extends Jt{constructor(){super(...arguments),this._any=!0}_parse(t){return Hi(t.data)}}Gd.create=e=>new Gd({typeName:Tt.ZodAny,...qt(e)});class Rc extends Jt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Hi(t.data)}}Rc.create=e=>new Rc({typeName:Tt.ZodUnknown,...qt(e)});class bu extends Jt{_parse(t){const n=this._getOrReturnCtx(t);return tt(n,{code:Ve.invalid_type,expected:it.never,received:n.parsedType}),Dt}}bu.create=e=>new bu({typeName:Tt.ZodNever,...qt(e)});class tb extends Jt{_parse(t){if(this._getType(t)!==it.undefined){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.void,received:r.parsedType}),Dt}return Hi(t.data)}}tb.create=e=>new tb({typeName:Tt.ZodVoid,...qt(e)});class Ha extends Jt{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==it.array)return tt(n,{code:Ve.invalid_type,expected:it.array,received:n.parsedType}),Dt;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,s=n.data.lengthi.maxLength.value&&(tt(n,{code:Ve.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,s)=>i.type._parseAsync(new ks(n,a,n.path,s)))).then(a=>$i.mergeArray(r,a));const o=[...n.data].map((a,s)=>i.type._parseSync(new ks(n,a,n.path,s)));return $i.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Ha({...this._def,minLength:{value:t,message:dt.toString(n)}})}max(t,n){return new Ha({...this._def,maxLength:{value:t,message:dt.toString(n)}})}length(t,n){return new Ha({...this._def,exactLength:{value:t,message:dt.toString(n)}})}nonempty(t){return this.min(1,t)}}Ha.create=(e,t)=>new Ha({type:e,minLength:null,maxLength:null,exactLength:null,typeName:Tt.ZodArray,...qt(t)});function ed(e){if(e instanceof cr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Es.create(ed(r))}return new cr({...e._def,shape:()=>t})}else return e instanceof Ha?new Ha({...e._def,type:ed(e.element)}):e instanceof Es?Es.create(ed(e.unwrap())):e instanceof Ml?Ml.create(ed(e.unwrap())):e instanceof Ts?Ts.create(e.items.map(t=>ed(t))):e}class cr extends Jt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==it.object){const l=this._getOrReturnCtx(t);return tt(l,{code:Ve.invalid_type,expected:it.object,received:l.parsedType}),Dt}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof bu&&this._def.unknownKeys==="strip"))for(const l in i.data)a.includes(l)||s.push(l);const u=[];for(const l of a){const c=o[l],f=i.data[l];u.push({key:{status:"valid",value:l},value:c._parse(new ks(i,f,i.path,l)),alwaysSet:l in i.data})}if(this._def.catchall instanceof bu){const l=this._def.unknownKeys;if(l==="passthrough")for(const c of s)u.push({key:{status:"valid",value:c},value:{status:"valid",value:i.data[c]}});else if(l==="strict")s.length>0&&(tt(i,{code:Ve.unrecognized_keys,keys:s}),r.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const c of s){const f=i.data[c];u.push({key:{status:"valid",value:c},value:l._parse(new ks(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const l=[];for(const c of u){const f=await c.key,h=await c.value;l.push({key:f,value:h,alwaysSet:c.alwaysSet})}return l}).then(l=>$i.mergeObjectSync(r,l)):$i.mergeObjectSync(r,u)}get shape(){return this._def.shape()}strict(t){return dt.errToObj,new cr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,a,s;const u=(a=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(s=dt.errToObj(t).message)!==null&&s!==void 0?s:u}:{message:u}}}:{}})}strip(){return new cr({...this._def,unknownKeys:"strip"})}passthrough(){return new cr({...this._def,unknownKeys:"passthrough"})}extend(t){return new cr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new cr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:Tt.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new cr({...this._def,catchall:t})}pick(t){const n={};return gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}omit(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new cr({...this._def,shape:()=>n})}deepPartial(){return ed(this)}partial(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new cr({...this._def,shape:()=>n})}required(t){const n={};return gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Es;)o=o._def.innerType;n[r]=o}}),new cr({...this._def,shape:()=>n})}keyof(){return MB(gn.objectKeys(this.shape))}}cr.create=(e,t)=>new cr({shape:()=>e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.strictCreate=(e,t)=>new cr({shape:()=>e,unknownKeys:"strict",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});cr.lazycreate=(e,t)=>new cr({shape:e,unknownKeys:"strip",catchall:bu.create(),typeName:Tt.ZodObject,...qt(t)});class og extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const s of o)if(s.result.status==="valid")return s.result;for(const s of o)if(s.result.status==="dirty")return n.common.issues.push(...s.ctx.common.issues),s.result;const a=o.map(s=>new Lo(s.ctx.common.issues));return tt(n,{code:Ve.invalid_union,unionErrors:a}),Dt}if(n.common.async)return Promise.all(r.map(async o=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let o;const a=[];for(const u of r){const l={...n,common:{...n.common,issues:[]},parent:null},c=u._parseSync({data:n.data,path:n.path,parent:l});if(c.status==="valid")return c;c.status==="dirty"&&!o&&(o={result:c,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const s=a.map(u=>new Lo(u));return tt(n,{code:Ve.invalid_union,unionErrors:s}),Dt}}get options(){return this._def.options}}og.create=(e,t)=>new og({options:e,typeName:Tt.ZodUnion,...qt(t)});const Zs=e=>e instanceof ug?Zs(e.schema):e instanceof Ya?Zs(e.innerType()):e instanceof lg?[e.value]:e instanceof Tl?e.options:e instanceof cg?gn.objectValues(e.enum):e instanceof fg?Zs(e._def.innerType):e instanceof rg?[void 0]:e instanceof ig?[null]:e instanceof Es?[void 0,...Zs(e.unwrap())]:e instanceof Ml?[null,...Zs(e.unwrap())]:e instanceof HO||e instanceof hg?Zs(e.unwrap()):e instanceof dg?Zs(e._def.innerType):[];class tw extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.object)return tt(n,{code:Ve.invalid_type,expected:it.object,received:n.parsedType}),Dt;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(tt(n,{code:Ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Dt)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const a=Zs(o.shape[t]);if(!a.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(i.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);i.set(s,o)}}return new tw({typeName:Tt.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...qt(r)})}}function lE(e,t){const n=nu(e),r=nu(t);if(e===t)return{valid:!0,data:e};if(n===it.object&&r===it.object){const i=gn.objectKeys(t),o=gn.objectKeys(e).filter(s=>i.indexOf(s)!==-1),a={...e,...t};for(const s of o){const u=lE(e[s],t[s]);if(!u.valid)return{valid:!1};a[s]=u.data}return{valid:!0,data:a}}else if(n===it.array&&r===it.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o{if(sE(o)||sE(a))return Dt;const s=lE(o.value,a.value);return s.valid?((uE(o)||uE(a))&&n.dirty(),{status:n.value,value:s.data}):(tt(r,{code:Ve.invalid_intersection_types}),Dt)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,a])=>i(o,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ag.create=(e,t,n)=>new ag({left:e,right:t,typeName:Tt.ZodIntersection,...qt(n)});class Ts extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.array)return tt(r,{code:Ve.invalid_type,expected:it.array,received:r.parsedType}),Dt;if(r.data.lengththis._def.items.length&&(tt(r,{code:Ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((a,s)=>{const u=this._def.items[s]||this._def.rest;return u?u._parse(new ks(r,a,r.path,s)):null}).filter(a=>!!a);return r.common.async?Promise.all(o).then(a=>$i.mergeArray(n,a)):$i.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new Ts({...this._def,rest:t})}}Ts.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ts({items:e,typeName:Tt.ZodTuple,rest:null,...qt(t)})};class sg extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.object)return tt(r,{code:Ve.invalid_type,expected:it.object,received:r.parsedType}),Dt;const i=[],o=this._def.keyType,a=this._def.valueType;for(const s in r.data)i.push({key:o._parse(new ks(r,s,r.path,s)),value:a._parse(new ks(r,r.data[s],r.path,s)),alwaysSet:s in r.data});return r.common.async?$i.mergeObjectAsync(n,i):$i.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof Jt?new sg({keyType:t,valueType:n,typeName:Tt.ZodRecord,...qt(r)}):new sg({keyType:za.create(),valueType:t,typeName:Tt.ZodRecord,...qt(n)})}}class nb extends Jt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.map)return tt(r,{code:Ve.invalid_type,expected:it.map,received:r.parsedType}),Dt;const i=this._def.keyType,o=this._def.valueType,a=[...r.data.entries()].map(([s,u],l)=>({key:i._parse(new ks(r,s,r.path,[l,"key"])),value:o._parse(new ks(r,u,r.path,[l,"value"]))}));if(r.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const u of a){const l=await u.key,c=await u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}})}else{const s=new Map;for(const u of a){const l=u.key,c=u.value;if(l.status==="aborted"||c.status==="aborted")return Dt;(l.status==="dirty"||c.status==="dirty")&&n.dirty(),s.set(l.value,c.value)}return{status:n.value,value:s}}}}nb.create=(e,t,n)=>new nb({valueType:t,keyType:e,typeName:Tt.ZodMap,...qt(n)});class Zc extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==it.set)return tt(r,{code:Ve.invalid_type,expected:it.set,received:r.parsedType}),Dt;const i=this._def;i.minSize!==null&&r.data.sizei.maxSize.value&&(tt(r,{code:Ve.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function a(u){const l=new Set;for(const c of u){if(c.status==="aborted")return Dt;c.status==="dirty"&&n.dirty(),l.add(c.value)}return{status:n.value,value:l}}const s=[...r.data.values()].map((u,l)=>o._parse(new ks(r,u,r.path,l)));return r.common.async?Promise.all(s).then(u=>a(u)):a(s)}min(t,n){return new Zc({...this._def,minSize:{value:t,message:dt.toString(n)}})}max(t,n){return new Zc({...this._def,maxSize:{value:t,message:dt.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Zc.create=(e,t)=>new Zc({valueType:e,minSize:null,maxSize:null,typeName:Tt.ZodSet,...qt(t)});class Ad extends Jt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.function)return tt(n,{code:Ve.invalid_type,expected:it.function,received:n.parsedType}),Dt;function r(s,u){return Q1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,X1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_arguments,argumentsError:u}})}function i(s,u){return Q1({data:s,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,X1(),qd].filter(l=>!!l),issueData:{code:Ve.invalid_return_type,returnTypeError:u}})}const o={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Yd){const s=this;return Hi(async function(...u){const l=new Lo([]),c=await s._def.args.parseAsync(u,o).catch(p=>{throw l.addIssue(r(u,p)),l}),f=await Reflect.apply(a,this,c);return await s._def.returns._def.type.parseAsync(f,o).catch(p=>{throw l.addIssue(i(f,p)),l})})}else{const s=this;return Hi(function(...u){const l=s._def.args.safeParse(u,o);if(!l.success)throw new Lo([r(u,l.error)]);const c=Reflect.apply(a,this,l.data),f=s._def.returns.safeParse(c,o);if(!f.success)throw new Lo([i(c,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ad({...this._def,args:Ts.create(t).rest(Rc.create())})}returns(t){return new Ad({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new Ad({args:t||Ts.create([]).rest(Rc.create()),returns:n||Rc.create(),typeName:Tt.ZodFunction,...qt(r)})}}class ug extends Jt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ug.create=(e,t)=>new ug({getter:e,typeName:Tt.ZodLazy,...qt(t)});class lg extends Jt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return tt(n,{received:n.data,code:Ve.invalid_literal,expected:this._def.value}),Dt}return{status:"valid",value:t.data}}get value(){return this._def.value}}lg.create=(e,t)=>new lg({value:e,typeName:Tt.ZodLiteral,...qt(t)});function MB(e,t){return new Tl({values:e,typeName:Tt.ZodEnum,...qt(t)})}class Tl extends Jt{constructor(){super(...arguments),o0.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{expected:gn.joinValues(r),received:n.parsedType,code:Ve.invalid_type}),Dt}if(J1(this,o0)||AB(this,o0,new Set(this._def.values)),!J1(this,o0).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return tt(n,{received:n.data,code:Ve.invalid_enum_value,options:r}),Dt}return Hi(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return Tl.create(t,{...this._def,...n})}exclude(t,n=this._def){return Tl.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}o0=new WeakMap;Tl.create=MB;class cg extends Jt{constructor(){super(...arguments),a0.set(this,void 0)}_parse(t){const n=gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==it.string&&r.parsedType!==it.number){const i=gn.objectValues(n);return tt(r,{expected:gn.joinValues(i),received:r.parsedType,code:Ve.invalid_type}),Dt}if(J1(this,a0)||AB(this,a0,new Set(gn.getValidEnumValues(this._def.values))),!J1(this,a0).has(t.data)){const i=gn.objectValues(n);return tt(r,{received:r.data,code:Ve.invalid_enum_value,options:i}),Dt}return Hi(t.data)}get enum(){return this._def.values}}a0=new WeakMap;cg.create=(e,t)=>new cg({values:e,typeName:Tt.ZodNativeEnum,...qt(t)});class Yd extends Jt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==it.promise&&n.common.async===!1)return tt(n,{code:Ve.invalid_type,expected:it.promise,received:n.parsedType}),Dt;const r=n.parsedType===it.promise?n.data:Promise.resolve(n.data);return Hi(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Yd.create=(e,t)=>new Yd({type:e,typeName:Tt.ZodPromise,...qt(t)});class Ya extends Jt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Tt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:a=>{tt(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const a=i.transform(r.data,o);if(r.common.async)return Promise.resolve(a).then(async s=>{if(n.value==="aborted")return Dt;const u=await this._def.schema._parseAsync({data:s,path:r.path,parent:r});return u.status==="aborted"?Dt:u.status==="dirty"||n.value==="dirty"?gd(u.value):u});{if(n.value==="aborted")return Dt;const s=this._def.schema._parseSync({data:a,path:r.path,parent:r});return s.status==="aborted"?Dt:s.status==="dirty"||n.value==="dirty"?gd(s.value):s}}if(i.type==="refinement"){const a=s=>{const u=i.refinement(s,o);if(r.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value),{status:n.value,value:s.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>s.status==="aborted"?Dt:(s.status==="dirty"&&n.dirty(),a(s.value).then(()=>({status:n.value,value:s.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Gc(a))return a;const s=i.transform(a.value,o);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:s}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>Gc(a)?Promise.resolve(i.transform(a.value,o)).then(s=>({status:n.value,value:s})):a);gn.assertNever(i)}}Ya.create=(e,t,n)=>new Ya({schema:e,typeName:Tt.ZodEffects,effect:t,...qt(n)});Ya.createWithPreprocess=(e,t,n)=>new Ya({schema:t,effect:{type:"preprocess",transform:e},typeName:Tt.ZodEffects,...qt(n)});class Es extends Jt{_parse(t){return this._getType(t)===it.undefined?Hi(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Es.create=(e,t)=>new Es({innerType:e,typeName:Tt.ZodOptional,...qt(t)});class Ml extends Jt{_parse(t){return this._getType(t)===it.null?Hi(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ml.create=(e,t)=>new Ml({innerType:e,typeName:Tt.ZodNullable,...qt(t)});class fg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===it.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fg.create=(e,t)=>new fg({innerType:e,typeName:Tt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...qt(t)});class dg extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return tg(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Lo(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}dg.create=(e,t)=>new dg({innerType:e,typeName:Tt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...qt(t)});class rb extends Jt{_parse(t){if(this._getType(t)!==it.nan){const r=this._getOrReturnCtx(t);return tt(r,{code:Ve.invalid_type,expected:it.nan,received:r.parsedType}),Dt}return{status:"valid",value:t.data}}}rb.create=e=>new rb({typeName:Tt.ZodNaN,...qt(e)});const Uhe=Symbol("zod_brand");class HO extends Jt{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class wm extends Jt{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Dt:o.status==="dirty"?(n.dirty(),gd(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?Dt:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new wm({in:t,out:n,typeName:Tt.ZodPipeline})}}class hg extends Jt{_parse(t){const n=this._def.innerType._parse(t),r=i=>(Gc(i)&&(i.value=Object.freeze(i.value)),i);return tg(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}hg.create=(e,t)=>new hg({innerType:e,typeName:Tt.ZodReadonly,...qt(t)});function RB(e,t={},n){return e?Gd.create().superRefine((r,i)=>{var o,a;if(!e(r)){const s=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,u=(a=(o=s.fatal)!==null&&o!==void 0?o:n)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;i.addIssue({code:"custom",...l,fatal:u})}}):Gd.create()}const Vhe={object:cr.lazycreate};var Tt;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(Tt||(Tt={}));const Whe=(e,t={message:`Input not instance of ${e.name}`})=>RB(n=>n instanceof e,t),DB=za.create,$B=Pl.create,Hhe=rb.create,Khe=kl.create,IB=ng.create,qhe=Yc.create,Ghe=eb.create,Yhe=rg.create,Zhe=ig.create,Xhe=Gd.create,Qhe=Rc.create,Jhe=bu.create,epe=tb.create,tpe=Ha.create,npe=cr.create,rpe=cr.strictCreate,ipe=og.create,ope=tw.create,ape=ag.create,spe=Ts.create,upe=sg.create,lpe=nb.create,cpe=Zc.create,fpe=Ad.create,dpe=ug.create,hpe=lg.create,ppe=Tl.create,gpe=cg.create,mpe=Yd.create,FR=Ya.create,vpe=Es.create,ype=Ml.create,bpe=Ya.createWithPreprocess,xpe=wm.create,wpe=()=>DB().optional(),_pe=()=>$B().optional(),Spe=()=>IB().optional(),Cpe={string:e=>za.create({...e,coerce:!0}),number:e=>Pl.create({...e,coerce:!0}),boolean:e=>ng.create({...e,coerce:!0}),bigint:e=>kl.create({...e,coerce:!0}),date:e=>Yc.create({...e,coerce:!0})},Epe=Dt;var UYe=Object.freeze({__proto__:null,defaultErrorMap:qd,setErrorMap:bhe,getErrorMap:X1,makeIssue:Q1,EMPTY_PATH:xhe,addIssueToContext:tt,ParseStatus:$i,INVALID:Dt,DIRTY:gd,OK:Hi,isAborted:sE,isDirty:uE,isValid:Gc,isAsync:tg,get util(){return gn},get objectUtil(){return aE},ZodParsedType:it,getParsedType:nu,ZodType:Jt,datetimeRegex:TB,ZodString:za,ZodNumber:Pl,ZodBigInt:kl,ZodBoolean:ng,ZodDate:Yc,ZodSymbol:eb,ZodUndefined:rg,ZodNull:ig,ZodAny:Gd,ZodUnknown:Rc,ZodNever:bu,ZodVoid:tb,ZodArray:Ha,ZodObject:cr,ZodUnion:og,ZodDiscriminatedUnion:tw,ZodIntersection:ag,ZodTuple:Ts,ZodRecord:sg,ZodMap:nb,ZodSet:Zc,ZodFunction:Ad,ZodLazy:ug,ZodLiteral:lg,ZodEnum:Tl,ZodNativeEnum:cg,ZodPromise:Yd,ZodEffects:Ya,ZodTransformer:Ya,ZodOptional:Es,ZodNullable:Ml,ZodDefault:fg,ZodCatch:dg,ZodNaN:rb,BRAND:Uhe,ZodBranded:HO,ZodPipeline:wm,ZodReadonly:hg,custom:RB,Schema:Jt,ZodSchema:Jt,late:Vhe,get ZodFirstPartyTypeKind(){return Tt},coerce:Cpe,any:Xhe,array:tpe,bigint:Khe,boolean:IB,date:qhe,discriminatedUnion:ope,effect:FR,enum:ppe,function:fpe,instanceof:Whe,intersection:ape,lazy:dpe,literal:hpe,map:lpe,nan:Hhe,nativeEnum:gpe,never:Jhe,null:Zhe,nullable:ype,number:$B,object:npe,oboolean:Spe,onumber:_pe,optional:vpe,ostring:wpe,pipeline:xpe,preprocess:bpe,promise:mpe,record:upe,set:cpe,strictObject:rpe,string:DB,symbol:Ghe,transformer:FR,tuple:spe,undefined:Yhe,union:ipe,unknown:Qhe,void:epe,NEVER:Epe,ZodIssueCode:Ve,quotelessJson:yhe,ZodError:Lo});const jR=(e,t,n)=>{if(e&&"reportValidity"in e){const r=Xe(n,t);e.setCustomValidity(r&&r.message||""),e.reportValidity()}},NB=(e,t)=>{for(const n in t.fields){const r=t.fields[n];r&&r.ref&&"reportValidity"in r.ref?jR(r.ref,n,e):r.refs&&r.refs.forEach(i=>jR(i,n,e))}},Ope=(e,t)=>{t.shouldUseNativeValidation&&NB(e,t);const n={};for(const r in e){const i=Xe(t.fields,r),o=Object.assign(e[r]||{},{ref:i&&i.ref});if(Ape(t.names||Object.keys(e),r)){const a=Object.assign({},Xe(n,r));An(a,"root",o),An(n,r,a)}else An(n,r,o)}return n},Ape=(e,t)=>e.some(n=>n.startsWith(t+"."));var Ppe=function(e,t){for(var n={};e.length;){var r=e[0],i=r.code,o=r.message,a=r.path.join(".");if(!n[a])if("unionErrors"in r){var s=r.unionErrors[0].errors[0];n[a]={message:s.message,type:s.code}}else n[a]={message:o,type:i};if("unionErrors"in r&&r.unionErrors.forEach(function(c){return c.errors.forEach(function(f){return e.push(f)})}),t){var u=n[a].types,l=u&&u[r.code];n[a]=bB(a,t,n,i,l?[].concat(l,r.message):r.message)}e.shift()}return n},VYe=function(e,t,n){return n===void 0&&(n={}),function(r,i,o){try{return Promise.resolve(function(a,s){try{var u=Promise.resolve(e[n.mode==="sync"?"parse":"parseAsync"](r,t)).then(function(l){return o.shouldUseNativeValidation&&NB({},o),{errors:{},values:n.raw?r:l}})}catch(l){return s(l)}return u&&u.then?u.then(void 0,s):u}(0,function(a){if(function(s){return Array.isArray(s?.errors)}(a))return{values:{},errors:Ope(Ppe(a.errors,!o.shouldUseNativeValidation&&o.criteriaMode==="all"),o)};throw a}))}catch(a){return Promise.reject(a)}}},kpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],pt=kpe.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Al:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),I.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function LB(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}var Tpe="Label",FB=y.forwardRef((e,t)=>I.jsx(pt.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));FB.displayName=Tpe;var WYe=FB,jB={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(la,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",u="hour",l="day",c="week",f="month",h="quarter",p="year",m="date",v="Invalid Date",b=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Z){var G=["th","st","nd","rd"],q=Z%100;return"["+Z+(G[(q-20)%10]||G[q]||G[0])+"]"}},S=function(Z,G,q){var W=String(Z);return!W||W.length>=G?Z:""+Array(G+1-W.length).join(q)+Z},O={s:S,z:function(Z){var G=-Z.utcOffset(),q=Math.abs(G),W=Math.floor(q/60),j=q%60;return(G<=0?"+":"-")+S(W,2,"0")+":"+S(j,2,"0")},m:function Z(G,q){if(G.date()1)return Z(Y[0])}else{var oe=G.name;C[oe]=G,j=oe}return!W&&j&&(E=j),j||!W&&E},z=function(Z,G){if(M(Z))return Z.clone();var q=typeof G=="object"?G:{};return q.date=Z,q.args=arguments,new V(q)},H=O;H.l=N,H.i=M,H.w=function(Z,G){return z(Z,{locale:G.$L,utc:G.$u,x:G.$x,$offset:G.$offset})};var V=function(){function Z(q){this.$L=N(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[k]=!0}var G=Z.prototype;return G.parse=function(q){this.$d=function(W){var j=W.date,K=W.utc;if(j===null)return new Date(NaN);if(H.u(j))return new Date;if(j instanceof Date)return new Date(j);if(typeof j=="string"&&!/Z$/i.test(j)){var Y=j.match(b);if(Y){var oe=Y[2]-1||0,Q=(Y[7]||"0").substring(0,3);return K?new Date(Date.UTC(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)):new Date(Y[1],oe,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,Q)}}return new Date(j)}(q),this.init()},G.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},G.$utils=function(){return H},G.isValid=function(){return this.$d.toString()!==v},G.isSame=function(q,W){var j=z(q);return this.startOf(W)<=j&&j<=this.endOf(W)},G.isAfter=function(q,W){return z(q)1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,ue):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,ue):(de=p()(J),m("copy")),de},O=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(ue){return typeof ue}:E=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=J.action,de=ue===void 0?"copy":ue,Se=J.container,me=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&E(me)==="object"&&me.nodeType===1){if(de==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return O(Ze,{container:Se});if(me)return de==="cut"?b(me):O(me,{container:Se})},k=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(ue){return typeof ue}:M=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},M(Q)}function N(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function z(Q,J){for(var ue=0;ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(Q){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},j(Q)}function K(Q,J){var ue="data-clipboard-".concat(Q);if(J.hasAttribute(ue))return J.getAttribute(ue)}var Y=function(Q){V(ue,Q);var J=Z(ue);function ue(de,Se){var me;return N(this,ue),me=J.call(this),me.resolveOptions(Se),me.listenClick(de),me}return H(ue,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var me=this;this.listener=f()(Se,"click",function(Ze){return me.onClick(Ze)})}},{key:"onClick",value:function(Se){var me=Se.delegateTarget||Se.currentTarget,Ze=this.action(me)||"copy",Ae=k({action:Ze,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:Ze,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return K("action",Se)}},{key:"defaultTarget",value:function(Se){var me=K("target",Se);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(Se){return K("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return O(Se,me)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return me.forEach(function(Ae){Ze=Ze&&!!document.queryCommandSupported(Ae)}),Ze}}]),ue}(l()),oe=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function u(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=u},438:function(o,a,s){var u=s(828);function l(h,p,m,v,b){var w=f.apply(this,arguments);return h.addEventListener(m,w,b),{destroy:function(){h.removeEventListener(m,w,b)}}}function c(h,p,m,v,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof m=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,p,m,v,b)}))}function f(h,p,m,v){return function(b){b.delegateTarget=u(b.target,p),b.delegateTarget&&v.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},a.nodeList=function(s){var u=Object.prototype.toString.call(s);return s!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in s&&(s.length===0||a.node(s[0]))},a.string=function(s){return typeof s=="string"||s instanceof String},a.fn=function(s){var u=Object.prototype.toString.call(s);return u==="[object Function]"}},370:function(o,a,s){var u=s(879),l=s(438);function c(m,v,b){if(!m&&!v&&!b)throw new Error("Missing required arguments");if(!u.string(v))throw new TypeError("Second argument must be a String");if(!u.fn(b))throw new TypeError("Third argument must be a Function");if(u.node(m))return f(m,v,b);if(u.nodeList(m))return h(m,v,b);if(u.string(m))return p(m,v,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(m,v,b){return m.addEventListener(v,b),{destroy:function(){m.removeEventListener(v,b)}}}function h(m,v,b){return Array.prototype.forEach.call(m,function(w){w.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(m,function(w){w.removeEventListener(v,b)})}}}function p(m,v,b){return l(document.body,m,v,b)}o.exports=c},817:function(o){function a(s){var u;if(s.nodeName==="SELECT")s.focus(),u=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var l=s.hasAttribute("readonly");l||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),l||s.removeAttribute("readonly"),u=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}o.exports=a},279:function(o){function a(){}a.prototype={on:function(s,u,l){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:u,ctx:l}),this},once:function(s,u,l){var c=this;function f(){c.off(s,f),u.apply(l,arguments)}return f._=u,this.on(s,f,l)},emit:function(s){var u=[].slice.call(arguments,1),l=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=l.length;for(c;c{const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return I.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,$pe(i,...t)]}function $pe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ipe=globalThis?.document?y.useLayoutEffect:()=>{},Npe=P4.useId||(()=>{}),Lpe=0;function Fo(e){const[t,n]=y.useState(Npe());return Ipe(()=>{e||n(r=>r??String(Lpe++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Fpe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Vr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Fpe({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Vr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function jpe(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Bpe(e,t=globalThis?.document){const n=jpe(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zpe="DismissableLayer",cE="dismissableLayer.update",Upe="dismissableLayer.pointerDownOutside",Vpe="dismissableLayer.focusOutside",jR,BB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(BB),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Gt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=Kpe(k=>{const M=k.target,N=[...l.branches].some(z=>z.contains(M));!O||N||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=qpe(k=>{const M=k.target;[...l.branches].some(z=>z.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return Bpe(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(jR=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),BR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=jR)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),BR())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(cE,k),()=>document.removeEventListener(cE,k)},[]),I.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});Nh.displayName=zpe;var Wpe="DismissableLayerBranch",Hpe=y.forwardRef((e,t)=>{const n=y.useContext(BB),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Hpe.displayName=Wpe;function Kpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){zB(Upe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&zB(Vpe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function BR(){const e=new CustomEvent(cE);document.dispatchEvent(e)}function zB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?NB(i,o):i.dispatchEvent(o)}var yS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",zR={bubbles:!1,cancelable:!0},Gpe="FocusScope",wm=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Vr(i),c=Vr(o),f=y.useRef(null),h=Gt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Gu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Gu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Gu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){VR.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(yS,zR);s.addEventListener(yS,l),s.dispatchEvent(w),w.defaultPrevented||(Ype(e0e(UB(s)),{select:!0}),document.activeElement===v&&Gu(s))}return()=>{s.removeEventListener(yS,l),setTimeout(()=>{const w=new CustomEvent(bS,zR);s.addEventListener(bS,c),s.dispatchEvent(w),w.defaultPrevented||Gu(v??document.body,{select:!0}),s.removeEventListener(bS,c),VR.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=Zpe(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Gu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Gu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});wm.displayName=Gpe;function Ype(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gu(r,{select:t}),document.activeElement!==n)return}function Zpe(e){const t=UB(e),n=UR(t,e),r=UR(t.reverse(),e);return[n,r]}function UB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function UR(e,t){for(const n of e)if(!Xpe(n,{upTo:t}))return n}function Xpe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qpe(e){return e instanceof HTMLInputElement&&"select"in e}function Gu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qpe(e)&&t&&e.select()}}var VR=Jpe();function Jpe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=WR(e,t),e.unshift(t)},remove(t){e=WR(e,t),e[0]?.resume()}}}function WR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function e0e(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},t0e="Portal",Lh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?jx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Lh.displayName=t0e;function n0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=r0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Gt(r.ref,i0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function r0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=n0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=ry(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=ry(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=ry(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=ry(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ry(e){return e?.animationName||"none"}function i0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xS=0;function nw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??HR()),document.body.insertAdjacentElement("beforeend",e[1]??HR()),xS++,()=>{xS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xS--}},[])}function HR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return y0e;var t=b0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},w0e=v0e(),Pd="data-scroll-locked",_0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` + */(function(e,t){(function(r,i){e.exports=i()})(la,function(){return function(){var n={686:function(o,a,s){s.d(a,{default:function(){return oe}});var u=s(279),l=s.n(u),c=s(370),f=s.n(c),h=s(817),p=s.n(h);function m(Q){try{return document.execCommand(Q)}catch{return!1}}var v=function(J){var ue=p()(J);return m("cut"),ue},b=v;function w(Q){var J=document.documentElement.getAttribute("dir")==="rtl",ue=document.createElement("textarea");ue.style.fontSize="12pt",ue.style.border="0",ue.style.padding="0",ue.style.margin="0",ue.style.position="absolute",ue.style[J?"right":"left"]="-9999px";var de=window.pageYOffset||document.documentElement.scrollTop;return ue.style.top="".concat(de,"px"),ue.setAttribute("readonly",""),ue.value=Q,ue}var x=function(J,ue){var de=w(J);ue.container.appendChild(de);var Se=p()(de);return m("copy"),de.remove(),Se},S=function(J){var ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},de="";return typeof J=="string"?de=x(J,ue):J instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(J?.type)?de=x(J.value,ue):(de=p()(J),m("copy")),de},O=S;function E(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?E=function(ue){return typeof ue}:E=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},E(Q)}var C=function(){var J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ue=J.action,de=ue===void 0?"copy":ue,Se=J.container,me=J.target,Ze=J.text;if(de!=="copy"&&de!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(me!==void 0)if(me&&E(me)==="object"&&me.nodeType===1){if(de==="copy"&&me.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(de==="cut"&&(me.hasAttribute("readonly")||me.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ze)return O(Ze,{container:Se});if(me)return de==="cut"?b(me):O(me,{container:Se})},k=C;function M(Q){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(ue){return typeof ue}:M=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},M(Q)}function N(Q,J){if(!(Q instanceof J))throw new TypeError("Cannot call a class as a function")}function z(Q,J){for(var ue=0;ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function j(Q){return j=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},j(Q)}function K(Q,J){var ue="data-clipboard-".concat(Q);if(J.hasAttribute(ue))return J.getAttribute(ue)}var Y=function(Q){V(ue,Q);var J=Z(ue);function ue(de,Se){var me;return N(this,ue),me=J.call(this),me.resolveOptions(Se),me.listenClick(de),me}return H(ue,[{key:"resolveOptions",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof Se.action=="function"?Se.action:this.defaultAction,this.target=typeof Se.target=="function"?Se.target:this.defaultTarget,this.text=typeof Se.text=="function"?Se.text:this.defaultText,this.container=M(Se.container)==="object"?Se.container:document.body}},{key:"listenClick",value:function(Se){var me=this;this.listener=f()(Se,"click",function(Ze){return me.onClick(Ze)})}},{key:"onClick",value:function(Se){var me=Se.delegateTarget||Se.currentTarget,Ze=this.action(me)||"copy",Ae=k({action:Ze,container:this.container,target:this.target(me),text:this.text(me)});this.emit(Ae?"success":"error",{action:Ze,text:Ae,trigger:me,clearSelection:function(){me&&me.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(Se){return K("action",Se)}},{key:"defaultTarget",value:function(Se){var me=K("target",Se);if(me)return document.querySelector(me)}},{key:"defaultText",value:function(Se){return K("text",Se)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(Se){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return O(Se,me)}},{key:"cut",value:function(Se){return b(Se)}},{key:"isSupported",value:function(){var Se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],me=typeof Se=="string"?[Se]:Se,Ze=!!document.queryCommandSupported;return me.forEach(function(Ae){Ze=Ze&&!!document.queryCommandSupported(Ae)}),Ze}}]),ue}(l()),oe=Y},828:function(o){var a=9;if(typeof Element<"u"&&!Element.prototype.matches){var s=Element.prototype;s.matches=s.matchesSelector||s.mozMatchesSelector||s.msMatchesSelector||s.oMatchesSelector||s.webkitMatchesSelector}function u(l,c){for(;l&&l.nodeType!==a;){if(typeof l.matches=="function"&&l.matches(c))return l;l=l.parentNode}}o.exports=u},438:function(o,a,s){var u=s(828);function l(h,p,m,v,b){var w=f.apply(this,arguments);return h.addEventListener(m,w,b),{destroy:function(){h.removeEventListener(m,w,b)}}}function c(h,p,m,v,b){return typeof h.addEventListener=="function"?l.apply(null,arguments):typeof m=="function"?l.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(w){return l(w,p,m,v,b)}))}function f(h,p,m,v){return function(b){b.delegateTarget=u(b.target,p),b.delegateTarget&&v.call(h,b)}}o.exports=c},879:function(o,a){a.node=function(s){return s!==void 0&&s instanceof HTMLElement&&s.nodeType===1},a.nodeList=function(s){var u=Object.prototype.toString.call(s);return s!==void 0&&(u==="[object NodeList]"||u==="[object HTMLCollection]")&&"length"in s&&(s.length===0||a.node(s[0]))},a.string=function(s){return typeof s=="string"||s instanceof String},a.fn=function(s){var u=Object.prototype.toString.call(s);return u==="[object Function]"}},370:function(o,a,s){var u=s(879),l=s(438);function c(m,v,b){if(!m&&!v&&!b)throw new Error("Missing required arguments");if(!u.string(v))throw new TypeError("Second argument must be a String");if(!u.fn(b))throw new TypeError("Third argument must be a Function");if(u.node(m))return f(m,v,b);if(u.nodeList(m))return h(m,v,b);if(u.string(m))return p(m,v,b);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function f(m,v,b){return m.addEventListener(v,b),{destroy:function(){m.removeEventListener(v,b)}}}function h(m,v,b){return Array.prototype.forEach.call(m,function(w){w.addEventListener(v,b)}),{destroy:function(){Array.prototype.forEach.call(m,function(w){w.removeEventListener(v,b)})}}}function p(m,v,b){return l(document.body,m,v,b)}o.exports=c},817:function(o){function a(s){var u;if(s.nodeName==="SELECT")s.focus(),u=s.value;else if(s.nodeName==="INPUT"||s.nodeName==="TEXTAREA"){var l=s.hasAttribute("readonly");l||s.setAttribute("readonly",""),s.select(),s.setSelectionRange(0,s.value.length),l||s.removeAttribute("readonly"),u=s.value}else{s.hasAttribute("contenteditable")&&s.focus();var c=window.getSelection(),f=document.createRange();f.selectNodeContents(s),c.removeAllRanges(),c.addRange(f),u=c.toString()}return u}o.exports=a},279:function(o){function a(){}a.prototype={on:function(s,u,l){var c=this.e||(this.e={});return(c[s]||(c[s]=[])).push({fn:u,ctx:l}),this},once:function(s,u,l){var c=this;function f(){c.off(s,f),u.apply(l,arguments)}return f._=u,this.on(s,f,l)},emit:function(s){var u=[].slice.call(arguments,1),l=((this.e||(this.e={}))[s]||[]).slice(),c=0,f=l.length;for(c;c{const{children:a,...s}=o,u=y.useMemo(()=>s,Object.values(s));return I.jsx(n.Provider,{value:u,children:a})};r.displayName=e+"Provider";function i(o){const a=y.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function vi(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];const l=f=>{const{scope:h,children:p,...m}=f,v=h?.[e]?.[u]||s,b=y.useMemo(()=>m,Object.values(m));return I.jsx(v.Provider,{value:b,children:p})};l.displayName=o+"Provider";function c(f,h){const p=h?.[e]?.[u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,$pe(i,...t)]}function $pe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Ipe=globalThis?.document?y.useLayoutEffect:()=>{},Npe=P4.useId||(()=>{}),Lpe=0;function Fo(e){const[t,n]=y.useState(Npe());return Ipe(()=>{e||n(r=>r??String(Lpe++))},[e]),e||(t?`radix-${t}`:"")}function Vr(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Za({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Fpe({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=Vr(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Fpe({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=Vr(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function jpe(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>t.current?.(...n),[])}function Bpe(e,t=globalThis?.document){const n=jpe(e);y.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var zpe="DismissableLayer",cE="dismissableLayer.update",Upe="dismissableLayer.pointerDownOutside",Vpe="dismissableLayer.focusOutside",BR,zB=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nh=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(zB),[c,f]=y.useState(null),h=c?.ownerDocument??globalThis?.document,[,p]=y.useState({}),m=Gt(t,k=>f(k)),v=Array.from(l.layers),[b]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(b),x=c?v.indexOf(c):-1,S=l.layersWithOutsidePointerEventsDisabled.size>0,O=x>=w,E=Kpe(k=>{const M=k.target,N=[...l.branches].some(z=>z.contains(M));!O||N||(i?.(k),a?.(k),k.defaultPrevented||s?.())},h),C=qpe(k=>{const M=k.target;[...l.branches].some(z=>z.contains(M))||(o?.(k),a?.(k),k.defaultPrevented||s?.())},h);return Bpe(k=>{x===l.layers.size-1&&(r?.(k),!k.defaultPrevented&&s&&(k.preventDefault(),s()))},h),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(BR=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),zR(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=BR)}},[c,h,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),zR())},[c,l]),y.useEffect(()=>{const k=()=>p({});return document.addEventListener(cE,k),()=>document.removeEventListener(cE,k)},[]),I.jsx(pt.div,{...u,ref:m,style:{pointerEvents:S?O?"auto":"none":void 0,...e.style},onFocusCapture:Ye(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Ye(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Ye(e.onPointerDownCapture,E.onPointerDownCapture)})});Nh.displayName=zpe;var Wpe="DismissableLayerBranch",Hpe=y.forwardRef((e,t)=>{const n=y.useContext(zB),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),I.jsx(pt.div,{...e,ref:i})});Hpe.displayName=Wpe;function Kpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1),i=y.useRef(()=>{});return y.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let u=function(){UB(Upe,n,l,{discrete:!0})};const l={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=u,t.addEventListener("click",i.current,{once:!0})):u()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function qpe(e,t=globalThis?.document){const n=Vr(e),r=y.useRef(!1);return y.useEffect(()=>{const i=o=>{o.target&&!r.current&&UB(Vpe,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function zR(){const e=new CustomEvent(cE);document.dispatchEvent(e)}function UB(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?LB(i,o):i.dispatchEvent(o)}var yS="focusScope.autoFocusOnMount",bS="focusScope.autoFocusOnUnmount",UR={bubbles:!1,cancelable:!0},Gpe="FocusScope",_m=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=Vr(i),c=Vr(o),f=y.useRef(null),h=Gt(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(S){if(p.paused||!s)return;const O=S.target;s.contains(O)?f.current=O:Gu(f.current,{select:!0})},b=function(S){if(p.paused||!s)return;const O=S.relatedTarget;O!==null&&(s.contains(O)||Gu(f.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const E of S)E.removedNodes.length>0&&Gu(s)};document.addEventListener("focusin",v),document.addEventListener("focusout",b);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b),x.disconnect()}}},[r,s,p.paused]),y.useEffect(()=>{if(s){WR.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(yS,UR);s.addEventListener(yS,l),s.dispatchEvent(w),w.defaultPrevented||(Ype(e0e(VB(s)),{select:!0}),document.activeElement===v&&Gu(s))}return()=>{s.removeEventListener(yS,l),setTimeout(()=>{const w=new CustomEvent(bS,UR);s.addEventListener(bS,c),s.dispatchEvent(w),w.defaultPrevented||Gu(v??document.body,{select:!0}),s.removeEventListener(bS,c),WR.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=Zpe(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&Gu(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&Gu(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return I.jsx(pt.div,{tabIndex:-1,...a,ref:h,onKeyDown:m})});_m.displayName=Gpe;function Ype(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Gu(r,{select:t}),document.activeElement!==n)return}function Zpe(e){const t=VB(e),n=VR(t,e),r=VR(t.reverse(),e);return[n,r]}function VB(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function VR(e,t){for(const n of e)if(!Xpe(n,{upTo:t}))return n}function Xpe(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Qpe(e){return e instanceof HTMLInputElement&&"select"in e}function Gu(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Qpe(e)&&t&&e.select()}}var WR=Jpe();function Jpe(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=HR(e,t),e.unshift(t)},remove(t){e=HR(e,t),e[0]?.resume()}}}function HR(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function e0e(e){return e.filter(t=>t.tagName!=="A")}var ii=globalThis?.document?y.useLayoutEffect:()=>{},t0e="Portal",Lh=y.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=y.useState(!1);ii(()=>o(!0),[]);const a=n||i&&globalThis?.document?.body;return a?jx.createPortal(I.jsx(pt.div,{...r,ref:t}),a):null});Lh.displayName=t0e;function n0e(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var Gr=e=>{const{present:t,children:n}=e,r=r0e(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Gt(r.ref,i0e(i));return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};Gr.displayName="Presence";function r0e(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=n0e(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=iy(r.current);o.current=s==="mounted"?l:"none"},[s]),ii(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=iy(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),ii(()=>{if(t){let l;const c=t.ownerDocument.defaultView??window,f=p=>{const v=iy(r.current).includes(p.animationName);if(p.target===t&&v&&(u("ANIMATION_END"),!i.current)){const b=t.style.animationFillMode;t.style.animationFillMode="forwards",l=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=b)})}},h=p=>{p.target===t&&(o.current=iy(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function iy(e){return e?.animationName||"none"}function i0e(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xS=0;function nw(){y.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??KR()),document.body.insertAdjacentElement("beforeend",e[1]??KR()),xS++,()=>{xS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xS--}},[])}function KR(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Ri=function(){return Ri=Object.assign||function(t){for(var n,r=1,i=arguments.length;r"u")return y0e;var t=b0e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},w0e=v0e(),Pd="data-scroll-locked",_0e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(o0e,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -102,33 +102,33 @@ Error generating stack: `+o.message+` `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(Xy,` { + .`).concat(Qy,` { right: `).concat(s,"px ").concat(r,`; } - .`).concat(Qy,` { + .`).concat(Jy,` { margin-right: `).concat(s,"px ").concat(r,`; } - .`).concat(Xy," .").concat(Xy,` { + .`).concat(Qy," .").concat(Qy,` { right: 0 `).concat(r,`; } - .`).concat(Qy," .").concat(Qy,` { + .`).concat(Jy," .").concat(Jy,` { margin-right: 0 `).concat(r,`; } body[`).concat(Pd,`] { `).concat(a0e,": ").concat(s,`px; } -`)},qR=function(){var e=parseInt(document.body.getAttribute(Pd)||"0",10);return isFinite(e)?e:0},S0e=function(){y.useEffect(function(){return document.body.setAttribute(Pd,(qR()+1).toString()),function(){var e=qR()-1;e<=0?document.body.removeAttribute(Pd):document.body.setAttribute(Pd,e.toString())}},[])},C0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;S0e();var o=y.useMemo(function(){return x0e(i)},[i]);return y.createElement(w0e,{styles:_0e(o,!t,i,n?"":"!important")})};function E0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=GB();return t&&e.setAttribute("nonce",t),e}function O0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function A0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var P0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=E0e())&&(O0e(t,n),A0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},k0e=function(){var e=P0e();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qO=function(){var e=k0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},fE=!1;if(typeof window<"u")try{var iy=Object.defineProperty({},"passive",{get:function(){return fE=!0,!0}});window.addEventListener("test",iy,iy),window.removeEventListener("test",iy,iy)}catch{fE=!1}var Vf=fE?{passive:!1}:!1,T0e=function(e){return e.tagName==="TEXTAREA"},YB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!T0e(e)&&n[t]==="visible")},M0e=function(e){return YB(e,"overflowY")},R0e=function(e){return YB(e,"overflowX")},GR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ZB(e,r);if(i){var o=XB(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ZB=function(e,t){return e==="v"?M0e(t):R0e(t)},XB=function(e,t){return e==="v"?D0e(t):$0e(t)},I0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},N0e=function(e,t,n,r,i){var o=I0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=XB(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&ZB(e,s)&&(f+=w,h+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},oy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},YR=function(e){return[e.deltaX,e.deltaY]},ZR=function(e){return e&&"current"in e?e.current:e},L0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F0e=function(e){return` +`)},GR=function(){var e=parseInt(document.body.getAttribute(Pd)||"0",10);return isFinite(e)?e:0},S0e=function(){y.useEffect(function(){return document.body.setAttribute(Pd,(GR()+1).toString()),function(){var e=GR()-1;e<=0?document.body.removeAttribute(Pd):document.body.setAttribute(Pd,e.toString())}},[])},C0e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;S0e();var o=y.useMemo(function(){return x0e(i)},[i]);return y.createElement(w0e,{styles:_0e(o,!t,i,n?"":"!important")})};function E0e(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=YB();return t&&e.setAttribute("nonce",t),e}function O0e(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function A0e(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var P0e=function(){var e=0,t=null;return{add:function(n){e==0&&(t=E0e())&&(O0e(t,n),A0e(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},k0e=function(){var e=P0e();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},qO=function(){var e=k0e(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},fE=!1;if(typeof window<"u")try{var oy=Object.defineProperty({},"passive",{get:function(){return fE=!0,!0}});window.addEventListener("test",oy,oy),window.removeEventListener("test",oy,oy)}catch{fE=!1}var Vf=fE?{passive:!1}:!1,T0e=function(e){return e.tagName==="TEXTAREA"},ZB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!T0e(e)&&n[t]==="visible")},M0e=function(e){return ZB(e,"overflowY")},R0e=function(e){return ZB(e,"overflowX")},YR=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=XB(e,r);if(i){var o=QB(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},D0e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},$0e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},XB=function(e,t){return e==="v"?M0e(t):R0e(t)},QB=function(e,t){return e==="v"?D0e(t):$0e(t)},I0e=function(e,t){return e==="h"&&t==="rtl"?-1:1},N0e=function(e,t,n,r,i){var o=I0e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=QB(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&XB(e,s)&&(f+=w,h+=m),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(f)<1||!i)||!c&&(Math.abs(h)<1||!i))&&(l=!0),l},ay=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ZR=function(e){return[e.deltaX,e.deltaY]},XR=function(e){return e&&"current"in e?e.current:e},L0e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},F0e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},j0e=0,Wf=[];function B0e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(j0e++)[0],o=y.useState(qO)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(ZR),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=oy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=GR(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=GR(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return N0e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Wf.length||Wf[Wf.length-1]!==o)){var w="deltaY"in b?YR(b):oy(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&L0e(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(ZR).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:z0e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=oy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,YR(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,oy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Wf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Vf),document.addEventListener("touchmove",u,Vf),document.addEventListener("touchstart",c,Vf),function(){Wf=Wf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Vf),document.removeEventListener("touchmove",u,Vf),document.removeEventListener("touchstart",c,Vf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:F0e(i)}):null,p?y.createElement(C0e,{gapMode:e.gapMode}):null)}function z0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U0e=KB(qB,B0e);var _m=y.forwardRef(function(e,t){return y.createElement(rw,Ri({},e,{ref:t,sideCar:U0e}))});_m.classNames=rw.classNames;var V0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hf=new WeakMap,ay=new WeakMap,sy={},CS=0,QB=function(e){return e&&(e.host||QB(e.parentNode))},W0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=QB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},H0e=function(e,t,n,r){var i=W0e(t,Array.isArray(e)?e:[e]);sy[n]||(sy[n]=new WeakMap);var o=sy[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Hf.get(h)||0)+1,b=(o.get(h)||0)+1;Hf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&ay.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),CS++,function(){a.forEach(function(f){var h=Hf.get(f)-1,p=o.get(f)-1;Hf.set(f,h),o.set(f,p),h||(ay.has(f)||f.removeAttribute(r),ay.delete(f)),p||f.removeAttribute(n)}),CS--,CS||(Hf=new WeakMap,Hf=new WeakMap,ay=new WeakMap,sy={})}},Sm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=V0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),H0e(r,i,n,"aria-hidden")):function(){return null}},GO="Dialog",[JB,ez]=vi(GO),[K0e,ns]=JB(GO),tz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(K0e,{scope:t,triggerRef:s,contentRef:u,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};tz.displayName=GO;var nz="DialogTrigger",rz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(nz,n),o=Gt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":XO(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});rz.displayName=nz;var YO="DialogPortal",[q0e,iz]=JB(YO,{forceMount:void 0}),oz=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(YO,t);return I.jsx(q0e,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:a})}))})};oz.displayName=YO;var rb="DialogOverlay",az=y.forwardRef((e,t)=>{const n=iz(rb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(rb,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(G0e,{...i,ref:t})}):null});az.displayName=rb;var G0e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(rb,n);return I.jsx(_m,{as:Al,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":XO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xc="DialogContent",sz=y.forwardRef((e,t)=>{const n=iz(Xc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Xc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(Y0e,{...i,ref:t}):I.jsx(Z0e,{...i,ref:t})})});sz.displayName=Xc;var Y0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(null),i=Gt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),I.jsx(uz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),Z0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(uz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),uz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Xc,n),u=y.useRef(null),l=Gt(t,u);return nw(),I.jsxs(I.Fragment,{children:[I.jsx(wm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":XO(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Q0e,{titleId:s.titleId}),I.jsx(ege,{contentRef:u,descriptionId:s.descriptionId})]})]})}),ZO="DialogTitle",lz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ZO,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});lz.displayName=ZO;var cz="DialogDescription",fz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(cz,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});fz.displayName=cz;var dz="DialogClose",hz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(dz,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});hz.displayName=dz;function XO(e){return e?"open":"closed"}var pz="DialogTitleWarning",[X0e,gz]=Dpe(pz,{contentName:Xc,titleName:ZO,docsSlug:"dialog"}),Q0e=({titleId:e})=>{const t=gz(pz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. +`)},j0e=0,Wf=[];function B0e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(j0e++)[0],o=y.useState(qO)[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=WB([e.lockRef.current],(e.shards||[]).map(XR),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=ay(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=YR(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=YR(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return N0e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!Wf.length||Wf[Wf.length-1]!==o)){var w="deltaY"in b?ZR(b):ay(b),x=t.current.filter(function(E){return E.name===b.type&&(E.target===b.target||b.target===E.shadowParent)&&L0e(E.delta,w)})[0];if(x&&x.should){b.cancelable&&b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(XR).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.cancelable&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x,shadowParent:z0e(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=ay(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,ZR(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,ay(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return Wf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Vf),document.addEventListener("touchmove",u,Vf),document.addEventListener("touchstart",c,Vf),function(){Wf=Wf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Vf),document.removeEventListener("touchmove",u,Vf),document.removeEventListener("touchstart",c,Vf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:F0e(i)}):null,p?y.createElement(C0e,{gapMode:e.gapMode}):null)}function z0e(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const U0e=qB(GB,B0e);var Sm=y.forwardRef(function(e,t){return y.createElement(rw,Ri({},e,{ref:t,sideCar:U0e}))});Sm.classNames=rw.classNames;var V0e=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Hf=new WeakMap,sy=new WeakMap,uy={},CS=0,JB=function(e){return e&&(e.host||JB(e.parentNode))},W0e=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=JB(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},H0e=function(e,t,n,r){var i=W0e(t,Array.isArray(e)?e:[e]);uy[n]||(uy[n]=new WeakMap);var o=uy[n],a=[],s=new Set,u=new Set(i),l=function(f){!f||s.has(f)||(s.add(f),l(f.parentNode))};i.forEach(l);var c=function(f){!f||u.has(f)||Array.prototype.forEach.call(f.children,function(h){if(s.has(h))c(h);else try{var p=h.getAttribute(r),m=p!==null&&p!=="false",v=(Hf.get(h)||0)+1,b=(o.get(h)||0)+1;Hf.set(h,v),o.set(h,b),a.push(h),v===1&&m&&sy.set(h,!0),b===1&&h.setAttribute(n,"true"),m||h.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",h,w)}})};return c(t),s.clear(),CS++,function(){a.forEach(function(f){var h=Hf.get(f)-1,p=o.get(f)-1;Hf.set(f,h),o.set(f,p),h||(sy.has(f)||f.removeAttribute(r),sy.delete(f)),p||f.removeAttribute(n)}),CS--,CS||(Hf=new WeakMap,Hf=new WeakMap,sy=new WeakMap,uy={})}},Cm=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=V0e(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),H0e(r,i,n,"aria-hidden")):function(){return null}},GO="Dialog",[ez,tz]=vi(GO),[K0e,ns]=ez(GO),nz=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(K0e,{scope:t,triggerRef:s,contentRef:u,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a,children:n})};nz.displayName=GO;var rz="DialogTrigger",iz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(rz,n),o=Gt(t,i.triggerRef);return I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":XO(i.open),...r,ref:o,onClick:Ye(e.onClick,i.onOpenToggle)})});iz.displayName=rz;var YO="DialogPortal",[q0e,oz]=ez(YO,{forceMount:void 0}),az=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=ns(YO,t);return I.jsx(q0e,{scope:t,forceMount:n,children:y.Children.map(r,a=>I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:a})}))})};az.displayName=YO;var ib="DialogOverlay",sz=y.forwardRef((e,t)=>{const n=oz(ib,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(ib,e.__scopeDialog);return o.modal?I.jsx(Gr,{present:r||o.open,children:I.jsx(G0e,{...i,ref:t})}):null});sz.displayName=ib;var G0e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ib,n);return I.jsx(Sm,{as:Al,allowPinchZoom:!0,shards:[i.contentRef],children:I.jsx(pt.div,{"data-state":XO(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xc="DialogContent",uz=y.forwardRef((e,t)=>{const n=oz(Xc,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=ns(Xc,e.__scopeDialog);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(Y0e,{...i,ref:t}):I.jsx(Z0e,{...i,ref:t})})});uz.displayName=Xc;var Y0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(null),i=Gt(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(lz,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault())})}),Z0e=y.forwardRef((e,t)=>{const n=ns(Xc,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(lz,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),lz=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=ns(Xc,n),u=y.useRef(null),l=Gt(t,u);return nw(),I.jsxs(I.Fragment,{children:[I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":XO(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),I.jsxs(I.Fragment,{children:[I.jsx(Q0e,{titleId:s.titleId}),I.jsx(ege,{contentRef:u,descriptionId:s.descriptionId})]})]})}),ZO="DialogTitle",cz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(ZO,n);return I.jsx(pt.h2,{id:i.titleId,...r,ref:t})});cz.displayName=ZO;var fz="DialogDescription",dz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(fz,n);return I.jsx(pt.p,{id:i.descriptionId,...r,ref:t})});dz.displayName=fz;var hz="DialogClose",pz=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=ns(hz,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});pz.displayName=hz;function XO(e){return e?"open":"closed"}var gz="DialogTitleWarning",[X0e,mz]=Dpe(gz,{contentName:Xc,titleName:ZO,docsSlug:"dialog"}),Q0e=({titleId:e})=>{const t=mz(gz),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. -For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},J0e="DialogDescriptionWarning",ege=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gz(J0e).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tge=tz,nge=rz,rge=oz,ige=az,oge=sz,age=lz,sge=fz,mz=hz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var uge=["color"],KYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lge=["color"],qYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,lge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cge=["color"],GYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fge=["color"],YYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,fge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dge=["color"],ZYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,dge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hge=["color"],XYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pge=["color"],QYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,pge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gge=["color"],JYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mge=["color"],eZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vge=["color"],tZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),yge=["color"],nZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bge=["color"],rZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xge=["color"],iZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wge=["color"],oZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_ge=["color"],aZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_ge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sge=["color"],sZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cge=["color"],uZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ege=["color"],lZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ege);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Oge=["color"],cZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Oge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),QO="Collapsible",[Age,fZe]=vi(QO),[Pge,JO]=Age(QO),vz=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return I.jsx(Pge,{scope:n,disabled:o,contentId:Fo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":tA(u),"data-disabled":o?"":void 0,...s,ref:t})})});vz.displayName=QO;var yz="CollapsibleTrigger",kge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=JO(yz,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":tA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});kge.displayName=yz;var eA="CollapsibleContent",Tge=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=JO(eA,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Mge,{...r,ref:t,present:o})})});Tge.displayName=eA;var Mge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=JO(eA,n),[s,u]=y.useState(r),l=y.useRef(null),c=Gt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":tA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function tA(e){return e?"open":"closed"}var dZe=vz;function nA(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=F.useRef(null),w=F.useRef(new Map).current;return I.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=F.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Gt(m,w.collectionRef);return I.jsx(Al,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=F.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=F.useRef(null),S=Gt(m,x),O=o(l,v);return F.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),I.jsx(Al,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return F.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var Rge=y.createContext(void 0);function Cm(e){const t=y.useContext(Rge);return e||t||"ltr"}const Dge=["top","right","bottom","left"],Rl=Math.min,Ro=Math.max,ib=Math.round,uy=Math.floor,Dl=e=>({x:e,y:e}),$ge={left:"right",right:"left",bottom:"top",top:"bottom"},Ige={start:"end",end:"start"};function dE(e,t,n){return Ro(e,Rl(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function wu(e){return e.split("-")[0]}function Fh(e){return e.split("-")[1]}function rA(e){return e==="x"?"y":"x"}function iA(e){return e==="y"?"height":"width"}function jh(e){return["top","bottom"].includes(wu(e))?"y":"x"}function oA(e){return rA(jh(e))}function Nge(e,t,n){n===void 0&&(n=!1);const r=Fh(e),i=oA(e),o=iA(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ob(a)),[a,ob(a)]}function Lge(e){const t=ob(e);return[hE(e),t,hE(t)]}function hE(e){return e.replace(/start|end/g,t=>Ige[t])}function Fge(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function jge(e,t,n,r){const i=Fh(e);let o=Fge(wu(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(hE)))),o}function ob(e){return e.replace(/left|right|bottom|top/g,t=>$ge[t])}function Bge(e){return{top:0,right:0,bottom:0,left:0,...e}}function bz(e){return typeof e!="number"?Bge(e):{top:e,right:e,bottom:e,left:e}}function ab(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function XR(e,t,n){let{reference:r,floating:i}=e;const o=jh(t),a=oA(t),s=iA(a),u=wu(t),l=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Fh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const zge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=XR(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=xu(e,t)||{};if(l==null)return{};const f=bz(c),h={x:n,y:r},p=oA(i),m=iA(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,N=k/2-v[m]/2-1,z=Rl(f[w],N),H=Rl(f[x],N),V=z,ne=k-v[m]-H,Z=k/2-v[m]/2+M,G=dE(V,Z,ne),q=!u.arrow&&Fh(i)!=null&&Z!==G&&o.reference[m]/2-(ZV<=0)){var N,z;const V=(((N=o.flip)==null?void 0:N.index)||0)+1,ne=E[V];if(ne)return{data:{index:V,overflows:M},reset:{placement:ne}};let Z=(z=M.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!Z)switch(p){case"bestFit":{var H;const G=(H=M.map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,j)=>W+j,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function QR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JR(e){return Dge.some(t=>e[t]>=0)}const Wge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xu(e,t);switch(r){case"referenceHidden":{const o=await pg(t,{...i,elementContext:"reference"}),a=QR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:JR(a)}}}case"escaped":{const o=await pg(t,{...i,altBoundary:!0}),a=QR(o,n.floating);return{data:{escapedOffsets:a,escaped:JR(a)}}}default:return{}}}}};async function Hge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=wu(n),s=Fh(n),u=jh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=xu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Kge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Hge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},qge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=xu(e,t),l={x:n,y:r},c=await pg(t,u),f=jh(wu(i)),h=rA(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=dE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=dE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Gge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=xu(e,t),c={x:n,y:r},f=jh(i),h=rA(f);let p=c[h],m=c[f];const v=xu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(wu(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Yge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xu(e,t),u=await pg(t,s),l=wu(n),c=Fh(n),f=jh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Rl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Rl(b,C):C}if(x&&!c){const C=Ro(u.left,0),k=Ro(u.right,0),M=Ro(u.top,0),N=Ro(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Ro(u.left,u.right)):S=p-2*(M!==0||N!==0?M+N:Ro(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function $l(e){return xz(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ku(e){var t;return(t=(xz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xz(e){return e instanceof Node||e instanceof jo(e).Node}function _u(e){return e instanceof Element||e instanceof jo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function eD(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot}function Em(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Zge(e){return["table","td","th"].includes($l(e))}function aA(e){const t=sA(),n=va(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Xge(e){let t=Zd(e);for(;Ms(t)&&!iw(t);){if(aA(t))return t;t=Zd(t)}return null}function sA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function iw(e){return["html","body","#document"].includes($l(e))}function va(e){return jo(e).getComputedStyle(e)}function ow(e){return _u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zd(e){if($l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eD(e)&&e.host||ku(e);return eD(t)?t.host:t}function wz(e){const t=Zd(e);return iw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&Em(t)?t:wz(t)}function gg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=wz(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jo(i);return o?t.concat(a,a.visualViewport||[],Em(i)?i:[],a.frameElement&&n?gg(a.frameElement):[]):t.concat(i,gg(i,[],n))}function _z(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ib(n)!==o||ib(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function uA(e){return _u(e)?e:e.contextElement}function kd(e){const t=uA(e);if(!Ms(t))return Dl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=_z(t);let a=(o?ib(n.width):n.width)/r,s=(o?ib(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Qge=Dl(0);function Sz(e){const t=jo(e);return!sA()||!t.visualViewport?Qge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jo(e)?!1:t}function Qc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=uA(e);let a=Dl(1);t&&(r?_u(r)&&(a=kd(r)):a=kd(e));const s=Jge(o,n,r)?Sz(o):Dl(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=jo(o),p=r&&_u(r)?jo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=kd(v),w=v.getBoundingClientRect(),x=va(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=jo(v),v=m.frameElement}}return ab({width:c,height:f,x:u,y:l})}const eme=[":popover-open",":modal"];function Cz(e){return eme.some(t=>{try{return e.matches(t)}catch{return!1}})}function tme(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ku(r),s=t?Cz(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Dl(1);const c=Dl(0),f=Ms(r);if((f||!f&&!o)&&(($l(r)!=="body"||Em(a))&&(u=ow(r)),Ms(r))){const h=Qc(r);l=kd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function nme(e){return Array.from(e.getClientRects())}function Ez(e){return Qc(ku(e)).left+ow(e).scrollLeft}function rme(e){const t=ku(e),n=ow(e),r=e.ownerDocument.body,i=Ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ez(e);const s=-n.scrollTop;return va(r).direction==="rtl"&&(a+=Ro(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function ime(e,t){const n=jo(e),r=ku(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=sA();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function ome(e,t){const n=Qc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?kd(e):Dl(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function tD(e,t,n){let r;if(t==="viewport")r=ime(e,n);else if(t==="document")r=rme(ku(e));else if(_u(t))r=ome(t,n);else{const i=Sz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return ab(r)}function Oz(e,t){const n=Zd(e);return n===t||!_u(n)||iw(n)?!1:va(n).position==="fixed"||Oz(n,t)}function ame(e,t){const n=t.get(e);if(n)return n;let r=gg(e,[],!1).filter(s=>_u(s)&&$l(s)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Zd(e):e;for(;_u(a)&&!iw(a);){const s=va(a),u=aA(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Em(a)&&!u&&Oz(e,a))?r=r.filter(c=>c!==a):i=s,a=Zd(a)}return t.set(e,r),r}function sme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?ame(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=tD(t,c,i);return l.top=Ro(f.top,l.top),l.right=Rl(f.right,l.right),l.bottom=Rl(f.bottom,l.bottom),l.left=Ro(f.left,l.left),l},tD(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ume(e){const{width:t,height:n}=_z(e);return{width:t,height:n}}function lme(e,t,n){const r=Ms(t),i=ku(t),o=n==="fixed",a=Qc(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Dl(0);if(r||!r&&!o)if(($l(t)!=="body"||Em(i))&&(s=ow(t)),r){const f=Qc(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Ez(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function nD(e,t){return!Ms(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function Az(e,t){const n=jo(e);if(!Ms(e)||Cz(e))return n;let r=nD(e,t);for(;r&&Zge(r)&&va(r).position==="static";)r=nD(r,t);return r&&($l(r)==="html"||$l(r)==="body"&&va(r).position==="static"&&!aA(r))?n:r||Xge(e)||n}const cme=async function(e){const t=this.getOffsetParent||Az,n=this.getDimensions;return{reference:lme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function fme(e){return va(e).direction==="rtl"}const dme={convertOffsetParentRelativeRectToViewportRelativeRect:tme,getDocumentElement:ku,getClippingRect:sme,getOffsetParent:Az,getElementRects:cme,getClientRects:nme,getDimensions:ume,getScale:kd,isElement:_u,isRTL:fme};function hme(e,t){let n=null,r;const i=ku(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=uy(c),m=uy(i.clientWidth-(l+f)),v=uy(i.clientHeight-(c+h)),b=uy(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ro(0,Rl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function pme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=uA(e),c=i||o?[...l?gg(l):[],...gg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?hme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Qc(e):null;u&&b();function b(){const w=Qc(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const gme=qge,mme=Vge,vme=Yge,yme=Wge,rD=Uge,bme=Gge,xme=(e,t,n)=>{const r=new Map,i={platform:dme,...n},o={...i.platform,_c:r};return zge(e,t,{...i,platform:o})},wme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?rD({element:r.current,padding:i}).fn(n):{}:r?rD({element:r,padding:i}).fn(n):{}}}};var Jy=typeof document<"u"?y.useLayoutEffect:y.useEffect;function sb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!sb(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!sb(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function Pz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iD(e,t){const n=Pz(e);return Math.round(t*n)/n}function oD(e){const t=y.useRef(e);return Jy(()=>{t.current=e}),t}function _me(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);sb(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(W=>{W!==C.current&&(C.current=W,v(W))},[]),S=y.useCallback(W=>{W!==k.current&&(k.current=W,w(W))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),N=u!=null,z=oD(u),H=oD(i),V=y.useCallback(()=>{if(!C.current||!k.current)return;const W={placement:t,strategy:n,middleware:h};H.current&&(W.platform=H.current),xme(C.current,k.current,W).then(j=>{const K={...j,isPositioned:!0};ne.current&&!sb(M.current,K)&&(M.current=K,Au.flushSync(()=>{f(K)}))})},[h,t,n,H]);Jy(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const ne=y.useRef(!1);Jy(()=>(ne.current=!0,()=>{ne.current=!1}),[]),Jy(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(z.current)return z.current(O,E,V);V()}},[O,E,V,z,N]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:O,floating:E}),[O,E]),q=y.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const j=iD(G.floating,c.x),K=iD(G.floating,c.y);return s?{...W,transform:"translate("+j+"px, "+K+"px)",...Pz(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,s,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:V,refs:Z,elements:G,floatingStyles:q}),[c,V,Z,G,q])}var Sme="Arrow",kz=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});kz.displayName=Sme;var Cme=kz;function lA(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cA="Popper",[Tz,zl]=vi(cA),[Eme,Mz]=Tz(cA),Rz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(Eme,{scope:t,anchor:r,onAnchorChange:i,children:n})};Rz.displayName=cA;var Dz="PopperAnchor",$z=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Mz(Dz,n),a=y.useRef(null),s=Gt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:s})});$z.displayName=Dz;var fA="PopperContent",[Ome,Ame]=Tz(fA),Iz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=Mz(fA,n),[w,x]=y.useState(null),S=Gt(t,me=>x(me)),[O,E]=y.useState(null),C=lA(O),k=C?.width??0,M=C?.height??0,N=r+(o!=="center"?"-"+o:""),z=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],V=H.length>0,ne={padding:z,boundary:H.filter(kme),altBoundary:V},{refs:Z,floatingStyles:G,placement:q,isPositioned:W,middlewareData:j}=_me({strategy:"fixed",placement:N,whileElementsMounted:(...me)=>pme(...me,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Kge({mainAxis:i+M,alignmentAxis:a}),u&&gme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?bme():void 0,...ne}),u&&mme({...ne}),vme({...ne,apply:({elements:me,rects:Ze,availableWidth:Ae,availableHeight:Le})=>{const{width:$e,height:be}=Ze.reference,yt=me.floating.style;yt.setProperty("--radix-popper-available-width",`${Ae}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),O&&wme({element:O,padding:s}),Tme({arrowWidth:k,arrowHeight:M}),h&&yme({strategy:"referenceHidden",...ne})]}),[K,Y]=Fz(q),oe=Vr(m);ii(()=>{W&&oe?.()},[W,oe]);const Q=j.arrow?.x,J=j.arrow?.y,ue=j.arrow?.centerOffset!==0,[de,Se]=y.useState();return ii(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(Ome,{scope:n,placedSide:K,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:ue,children:I.jsx(pt.div,{"data-side":K,"data-align":Y,...v,ref:S,style:{...v.style,animation:W?void 0:"none"}})})})});Iz.displayName=fA;var Nz="PopperArrow",Pme={top:"bottom",right:"left",bottom:"top",left:"right"},Lz=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Ame(Nz,r),a=Pme[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(Cme,{...i,ref:n,style:{...i.style,display:"block"}})})});Lz.displayName=Nz;function kme(e){return e!==null}var Tme=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=Fz(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function Fz(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Rz,Om=$z,sw=Iz,uw=Lz,ES="rovingFocusGroup.onEntryFocus",Mme={bubbles:!1,cancelable:!0},lw="RovingFocusGroup",[pE,jz,Rme]=nA(lw),[Dme,cw]=vi(lw,[Rme]),[$me,Ime]=Dme(lw),Bz=y.forwardRef((e,t)=>I.jsx(pE.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(pE.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(Nme,{...e,ref:t})})}));Bz.displayName=lw;var Nme=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Gt(t,h),m=Cm(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Vr(l),O=jz(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ES,S),()=>M.removeEventListener(ES,S)},[S]),I.jsx($me,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!w){const z=new CustomEvent(ES,Mme);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){const H=O().filter(q=>q.focusable),V=H.find(q=>q.active),ne=H.find(q=>q.id===v),G=[V,ne,...H].filter(Boolean).map(q=>q.ref.current);Vz(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),zz="RovingFocusGroupItem",Uz=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Fo(),u=o||s,l=Ime(zz,n),c=l.currentTabStopId===u,f=jz(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),I.jsx(pE.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=jme(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?Bme(w,x+1):w.slice(x+1)}setTimeout(()=>Vz(w))}})})})});Uz.displayName=zz;var Lme={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fme(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jme(e,t,n){const r=Fme(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Lme[r]}function Vz(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Wz=Bz,Hz=Uz,gE=["Enter"," "],zme=["ArrowDown","PageUp","Home"],Kz=["ArrowUp","PageDown","End"],Ume=[...zme,...Kz],Vme={ltr:[...gE,"ArrowRight"],rtl:[...gE,"ArrowLeft"]},Wme={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Am="Menu",[mg,Hme,Kme]=nA(Am),[hf,qz]=vi(Am,[Kme,zl,cw]),fw=zl(),Gz=cw(),[qme,pf]=hf(Am),[Gme,Pm]=hf(Am),Yz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=fw(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Vr(o),h=Cm(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),I.jsx(aw,{...s,children:I.jsx(qme,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:I.jsx(Gme,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};Yz.displayName=Am;var Yme="MenuAnchor",dA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(Om,{...i,...r,ref:t})});dA.displayName=Yme;var hA="MenuPortal",[Zme,Zz]=hf(hA,{forceMount:void 0}),Xz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=pf(hA,t);return I.jsx(Zme,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};Xz.displayName=hA;var ha="MenuContent",[Xme,pA]=hf(ha),Qz=y.forwardRef((e,t)=>{const n=Zz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=Pm(ha,e.__scopeMenu);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(Qme,{...i,ref:t}):I.jsx(Jme,{...i,ref:t})})})})}),Qme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),I.jsx(gA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Jme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu);return I.jsx(gA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=pf(ha,n),w=Pm(ha,n),x=fw(n),S=Gz(n),O=Hme(n),[E,C]=y.useState(null),k=y.useRef(null),M=Gt(t,k,b.onContentChange),N=y.useRef(0),z=y.useRef(""),H=y.useRef(0),V=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),G=m?_m:y.Fragment,q=m?{as:Al,allowPinchZoom:!0}:void 0,W=K=>{const Y=z.current+K,oe=O().filter(me=>!me.disabled),Q=document.activeElement,J=oe.find(me=>me.ref.current===Q)?.textValue,ue=oe.map(me=>me.textValue),de=fve(ue,Y,J),Se=oe.find(me=>me.textValue===de)?.ref.current;(function me(Ze){z.current=Ze,window.clearTimeout(N.current),Ze!==""&&(N.current=window.setTimeout(()=>me(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(N.current),[]),nw();const j=y.useCallback(K=>ne.current===V.current?.side&&hve(K,V.current?.area),[]);return I.jsx(Xme,{scope:n,searchRef:z,onItemEnter:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),onItemLeave:y.useCallback(K=>{j(K)||(k.current?.focus(),C(null))},[j]),onTriggerLeave:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(K=>{V.current=K},[]),children:I.jsx(G,{...q,children:I.jsx(wm,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,K=>{K.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:I.jsx(Wz,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,K=>{w.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(sw,{role:"menu","aria-orientation":"vertical","data-state":pU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,K=>{const oe=K.target.closest("[data-radix-menu-content]")===K.currentTarget,Q=K.ctrlKey||K.altKey||K.metaKey,J=K.key.length===1;oe&&(K.key==="Tab"&&K.preventDefault(),!Q&&J&&W(K.key));const ue=k.current;if(K.target!==ue||!Ume.includes(K.key))return;K.preventDefault();const Se=O().filter(me=>!me.disabled).map(me=>me.ref.current);Kz.includes(K.key)&&Se.reverse(),lve(Se)}),onBlur:Ye(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(N.current),z.current="")}),onPointerMove:Ye(e.onPointerMove,vg(K=>{const Y=K.target,oe=Z.current!==K.clientX;if(K.currentTarget.contains(Y)&&oe){const Q=K.clientX>Z.current?"right":"left";ne.current=Q,Z.current=K.clientX}}))})})})})})})});Qz.displayName=ha;var eve="MenuGroup",mA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});mA.displayName=eve;var tve="MenuLabel",Jz=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});Jz.displayName=tve;var ub="MenuItem",aD="menu.itemSelect",dw=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=Pm(ub,e.__scopeMenu),s=pA(ub,e.__scopeMenu),u=Gt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(aD,{bubbles:!0,cancelable:!0});f.addEventListener(aD,p=>r?.(p),{once:!0}),NB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(eU,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||gE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});dw.displayName=ub;var eU=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pA(ub,n),s=Gz(n),u=y.useRef(null),l=Gt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),I.jsx(mg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(Hz,{asChild:!0,...s,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,vg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,vg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),nve="MenuCheckboxItem",tU=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(aU,{scope:e.__scopeMenu,checked:n,children:I.jsx(dw,{role:"menuitemcheckbox","aria-checked":lb(n)?"mixed":n,...i,ref:t,"data-state":yA(n),onSelect:Ye(i.onSelect,()=>r?.(lb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});tU.displayName=nve;var nU="MenuRadioGroup",[rve,ive]=hf(nU,{value:void 0,onValueChange:()=>{}}),rU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Vr(r);return I.jsx(rve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(mA,{...i,ref:t})})});rU.displayName=nU;var iU="MenuRadioItem",oU=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=ive(iU,e.__scopeMenu),o=n===i.value;return I.jsx(aU,{scope:e.__scopeMenu,checked:o,children:I.jsx(dw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":yA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});oU.displayName=iU;var vA="MenuItemIndicator",[aU,ove]=hf(vA,{checked:!1}),sU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=ove(vA,n);return I.jsx(Gr,{present:r||lb(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":yA(o.checked)})})});sU.displayName=vA;var ave="MenuSeparator",uU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});uU.displayName=ave;var sve="MenuArrow",lU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(uw,{...i,...r,ref:t})});lU.displayName=sve;var uve="MenuSub",[hZe,cU]=hf(uve),s0="MenuSubTrigger",fU=y.forwardRef((e,t)=>{const n=pf(s0,e.__scopeMenu),r=Pm(s0,e.__scopeMenu),i=cU(s0,e.__scopeMenu),o=pA(s0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),I.jsx(dA,{asChild:!0,...l,children:I.jsx(eU,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":pU(n.open),...e,ref:Ux(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,vg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,vg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Vme[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});fU.displayName=s0;var dU="MenuSubContent",hU=y.forwardRef((e,t)=>{const n=Zz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=Pm(ha,e.__scopeMenu),s=cU(dU,e.__scopeMenu),u=y.useRef(null),l=Gt(t,u);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:I.jsx(gA,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=Wme[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});hU.displayName=dU;function pU(e){return e?"open":"closed"}function lb(e){return e==="indeterminate"}function yA(e){return lb(e)?"indeterminate":e?"checked":"unchecked"}function lve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function dve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function hve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dve(n,t)}function vg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pve=Yz,gve=dA,mve=Xz,vve=Qz,yve=mA,bve=Jz,xve=dw,wve=tU,_ve=rU,Sve=oU,Cve=sU,Eve=uU,Ove=lU,Ave=fU,Pve=hU,bA="DropdownMenu",[kve,pZe]=vi(bA,[qz]),Zi=qz(),[Tve,gU]=kve(bA),mU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return I.jsx(Tve,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:I.jsx(pve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};mU.displayName=bA;var vU="DropdownMenuTrigger",yU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=gU(vU,n),a=Zi(n);return I.jsx(gve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ux(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});yU.displayName=vU;var Mve="DropdownMenuPortal",bU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return I.jsx(mve,{...r,...n})};bU.displayName=Mve;var xU="DropdownMenuContent",wU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=gU(xU,n),o=Zi(n),a=y.useRef(!1);return I.jsx(vve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});wU.displayName=xU;var Rve="DropdownMenuGroup",_U=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(yve,{...i,...r,ref:t})});_U.displayName=Rve;var Dve="DropdownMenuLabel",SU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(bve,{...i,...r,ref:t})});SU.displayName=Dve;var $ve="DropdownMenuItem",CU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(xve,{...i,...r,ref:t})});CU.displayName=$ve;var Ive="DropdownMenuCheckboxItem",EU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(wve,{...i,...r,ref:t})});EU.displayName=Ive;var Nve="DropdownMenuRadioGroup",Lve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(_ve,{...i,...r,ref:t})});Lve.displayName=Nve;var Fve="DropdownMenuRadioItem",OU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Sve,{...i,...r,ref:t})});OU.displayName=Fve;var jve="DropdownMenuItemIndicator",AU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Cve,{...i,...r,ref:t})});AU.displayName=jve;var Bve="DropdownMenuSeparator",PU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Eve,{...i,...r,ref:t})});PU.displayName=Bve;var zve="DropdownMenuArrow",Uve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ove,{...i,...r,ref:t})});Uve.displayName=zve;var Vve="DropdownMenuSubTrigger",kU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ave,{...i,...r,ref:t})});kU.displayName=Vve;var Wve="DropdownMenuSubContent",TU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Pve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});TU.displayName=Wve;var gZe=mU,mZe=yU,vZe=bU,yZe=wU,bZe=_U,xZe=SU,wZe=CU,_Ze=EU,SZe=OU,CZe=AU,EZe=PU,OZe=kU,AZe=TU,Hve="VisuallyHidden",xA=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));xA.displayName=Hve;var Kve=xA,[hw,PZe]=vi("Tooltip",[zl]),pw=zl(),MU="TooltipProvider",qve=700,mE="tooltip.open",[Gve,wA]=hw(MU),RU=e=>{const{__scopeTooltip:t,delayDuration:n=qve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(Gve,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};RU.displayName=MU;var gw="Tooltip",[Yve,km]=hw(gw),DU=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=wA(gw,e.__scopeTooltip),l=pw(t),[c,f]=y.useState(null),h=Fo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(mE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),I.jsx(aw,{...l,children:I.jsx(Yve,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};DU.displayName=gw;var vE="TooltipTrigger",$U=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=km(vE,n),o=wA(vE,n),a=pw(n),s=y.useRef(null),u=Gt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),I.jsx(Om,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});$U.displayName=vE;var _A="TooltipPortal",[Zve,Xve]=hw(_A,{forceMount:void 0}),IU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=km(_A,t);return I.jsx(Zve,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};IU.displayName=_A;var Xd="TooltipContent",NU=y.forwardRef((e,t)=>{const n=Xve(Xd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=km(Xd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(LU,{side:i,...o,ref:t}):I.jsx(Qve,{side:i,...o,ref:t})})}),Qve=y.forwardRef((e,t)=>{const n=km(Xd,e.__scopeTooltip),r=wA(Xd,e.__scopeTooltip),i=y.useRef(null),o=Gt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=nye(w,b.getBoundingClientRect()),S=rye(w,x),O=iye(v.getBoundingClientRect()),E=aye([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!oye(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),I.jsx(LU,{...e,ref:o})}),[Jve,eye]=hw(gw,{isInside:!1}),LU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=km(Xd,n),l=pw(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(mE,c),()=>document.removeEventListener(mE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:I.jsxs(sw,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(OO,{children:r}),I.jsx(Jve,{scope:n,isInside:!0,children:I.jsx(Kve,{id:u.contentId,role:"tooltip",children:i||r})})]})})});NU.displayName=Xd;var FU="TooltipArrow",tye=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=pw(n);return eye(FU,n).isInside?null:I.jsx(uw,{...i,...r,ref:t})});tye.displayName=FU;function nye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rye(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function iye(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function oye(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function aye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),sye(t)}function sye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var kZe=RU,TZe=DU,MZe=$U,RZe=IU,DZe=NU,sD=1,uye=.9,lye=.8,cye=.17,OS=.1,AS=.999,fye=.9999,dye=.99,hye=/[\\\/_+.#"@\[\(\{&]/,pye=/[\\\/_+.#"@\[\(\{&]/g,gye=/[\s-]/,jU=/[\s-]/g;function yE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?sD:dye;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=yE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=sD:hye.test(e.charAt(l-1))?(f*=lye,p=e.slice(i,l-1).match(pye),p&&i>0&&(f*=Math.pow(AS,p.length))):gye.test(e.charAt(l-1))?(f*=uye,m=e.slice(i,l-1).match(jU),m&&i>0&&(f*=Math.pow(AS,m.length))):(f*=cye,i>0&&(f*=Math.pow(AS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=fye)),(ff&&(f=h*OS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function uD(e){return e.toLowerCase().replace(jU," ")}function mye(e,t){return yE(e,t,uD(e),uD(t),0,0,{})}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>vye(n,t))}function Tm(...e){return y.useCallback(BU(...e),e)}function yye(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,bye(i,...t)]}function bye(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const xye=globalThis?.document?y.useLayoutEffect:()=>{},wye=P4.useId||(()=>{});let _ye=0;function PS(e){const[t,n]=y.useState(wye());return xye(()=>{e||n(r=>r??String(_ye++))},[e]),e||(t?`radix-${t}`:"")}function zU(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sye({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Cye({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=zU(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Cye({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=zU(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const SA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Oye);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(bE,Ki({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(bE,Ki({},r,{ref:t}),n)});SA.displayName="Slot";const bE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...Aye(r,n.props),ref:BU(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});bE.displayName="SlotClone";const Eye=({children:e})=>y.createElement(y.Fragment,null,e);function Oye(e){return y.isValidElement(e)&&e.type===Eye}function Aye(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Pye=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],mw=Pye.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?SA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,Ki({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kye(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function CA(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tye(e){const t=CA(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const xE="dismissableLayer.update",Mye="dismissableLayer.pointerDownOutside",Rye="dismissableLayer.focusOutside";let lD;const Dye=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$ye=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(Dye),[c,f]=y.useState(null),[,h]=y.useState({}),p=Tm(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=Iye(C=>{const k=C.target,M=[...l.branches].some(N=>N.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=Nye(C=>{const k=C.target;[...l.branches].some(N=>N.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return Tye(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(lD=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),cD(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=lD)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),cD())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),y.createElement(mw.div,Ki({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Td(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Td(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Td(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Iye(e){const t=CA(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){UU(Mye,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Nye(e){const t=CA(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&UU(Rye,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function cD(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function UU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kye(i,o):i.dispatchEvent(o)}function fD(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const kS="focusScope.autoFocusOnMount",TS="focusScope.autoFocusOnUnmount",dD={bubbles:!1,cancelable:!0},Lye=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=fD(i),c=fD(o),f=y.useRef(null),h=Tm(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:cc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||cc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){pD.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(kS,dD);s.addEventListener(kS,l),s.dispatchEvent(w),w.defaultPrevented||(Fye(Vye(VU(s)),{select:!0}),document.activeElement===v&&cc(s))}return()=>{s.removeEventListener(kS,l),setTimeout(()=>{const w=new CustomEvent(TS,dD);s.addEventListener(TS,c),s.dispatchEvent(w),w.defaultPrevented||cc(v??document.body,{select:!0}),s.removeEventListener(TS,c),pD.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=jye(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&cc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&cc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(mw.div,Ki({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function Fye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function jye(e){const t=VU(e),n=hD(t,e),r=hD(t.reverse(),e);return[n,r]}function VU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function hD(e,t){for(const n of e)if(!Bye(n,{upTo:t}))return n}function Bye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zye(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zye(e)&&t&&e.select()}}const pD=Uye();function Uye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=gD(e,t),e.unshift(t)},remove(t){var n;e=gD(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function gD(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vye(e){return e.filter(t=>t.tagName!=="A")}const Wye=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?jx.createPortal(y.createElement(mw.div,Ki({},i,{ref:t})),r):null}),mD=globalThis?.document?y.useLayoutEffect:()=>{};function Hye(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vw=e=>{const{present:t,children:n}=e,r=Kye(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Tm(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};vw.displayName="Presence";function Kye(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Hye(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=ly(r.current);o.current=s==="mounted"?l:"none"},[s]),mD(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=ly(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),mD(()=>{if(t){const l=f=>{const p=ly(r.current).includes(f.animationName);f.target===t&&p&&Au.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=ly(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function ly(e){return e?.animationName||"none"}let MS=0;function qye(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:vD()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:vD()),MS++,()=>{MS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MS--}},[])}function vD(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var e1="right-scroll-bar-position",t1="width-before-scroll-bar",Gye="with-scroll-bars-hidden",Yye="--removed-body-scroll-bar-size";function RS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zye(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Xye=typeof window<"u"?y.useLayoutEffect:y.useEffect,yD=new WeakMap;function Qye(e,t){var n=Zye(null,function(r){return e.forEach(function(i){return RS(i,r)})});return Xye(function(){var r=yD.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||RS(s,null)}),o.forEach(function(s){i.has(s)||RS(s,a)})}yD.set(n,e)},[e]),n}var WU=WB(),DS=function(){},yw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:DS,onWheelCapture:DS,onTouchMoveCapture:DS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=KO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=Qye([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:WU,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});yw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yw.classNames={fullWidth:t1,zeroRight:e1};var Jye={left:0,top:0,right:0,gap:0},$S=function(e){return parseInt(e||"",10)||0},e1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$S(n),$S(r),$S(i)]},t1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jye;var t=e1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},n1e=qO(),Md="data-scroll-locked",r1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` +For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return y.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},J0e="DialogDescriptionWarning",ege=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mz(J0e).contentName}}.`;return y.useEffect(()=>{const i=e.current?.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},tge=nz,nge=iz,rge=az,ige=sz,oge=uz,age=cz,sge=dz,vz=pz;function Yr(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var uge=["color"],qYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,uge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),lge=["color"],GYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,lge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.877045C3.84222 0.877045 0.877075 3.84219 0.877075 7.49988C0.877075 11.1575 3.84222 14.1227 7.49991 14.1227C11.1576 14.1227 14.1227 11.1575 14.1227 7.49988C14.1227 3.84219 11.1576 0.877045 7.49991 0.877045ZM1.82708 7.49988C1.82708 4.36686 4.36689 1.82704 7.49991 1.82704C10.6329 1.82704 13.1727 4.36686 13.1727 7.49988C13.1727 10.6329 10.6329 13.1727 7.49991 13.1727C4.36689 13.1727 1.82708 10.6329 1.82708 7.49988ZM10.1589 5.53774C10.3178 5.31191 10.2636 5.00001 10.0378 4.84109C9.81194 4.68217 9.50004 4.73642 9.34112 4.96225L6.51977 8.97154L5.35681 7.78706C5.16334 7.59002 4.84677 7.58711 4.64973 7.78058C4.45268 7.97404 4.44978 8.29061 4.64325 8.48765L6.22658 10.1003C6.33054 10.2062 6.47617 10.2604 6.62407 10.2483C6.77197 10.2363 6.90686 10.1591 6.99226 10.0377L10.1589 5.53774Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),cge=["color"],YYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),fge=["color"],ZYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,fge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M8.84182 3.13514C9.04327 3.32401 9.05348 3.64042 8.86462 3.84188L5.43521 7.49991L8.86462 11.1579C9.05348 11.3594 9.04327 11.6758 8.84182 11.8647C8.64036 12.0535 8.32394 12.0433 8.13508 11.8419L4.38508 7.84188C4.20477 7.64955 4.20477 7.35027 4.38508 7.15794L8.13508 3.15794C8.32394 2.95648 8.64036 2.94628 8.84182 3.13514Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),dge=["color"],XYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,dge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),hge=["color"],QYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,hge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M3.13523 8.84197C3.3241 9.04343 3.64052 9.05363 3.84197 8.86477L7.5 5.43536L11.158 8.86477C11.3595 9.05363 11.6759 9.04343 11.8648 8.84197C12.0536 8.64051 12.0434 8.32409 11.842 8.13523L7.84197 4.38523C7.64964 4.20492 7.35036 4.20492 7.15803 4.38523L3.15803 8.13523C2.95657 8.32409 2.94637 8.64051 3.13523 8.84197Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),pge=["color"],JYe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,pge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49991C0.877075 3.84222 3.84222 0.877075 7.49991 0.877075C11.1576 0.877075 14.1227 3.84222 14.1227 7.49991C14.1227 11.1576 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1576 0.877075 7.49991ZM7.49991 1.82708C4.36689 1.82708 1.82708 4.36689 1.82708 7.49991C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49991C13.1727 4.36689 10.6329 1.82708 7.49991 1.82708Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),gge=["color"],eZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,gge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),mge=["color"],tZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,mge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49988C0.877075 3.84219 3.84222 0.877045 7.49991 0.877045C11.1576 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1576 14.1227 7.49991 14.1227C3.84222 14.1227 0.877075 11.1575 0.877075 7.49988ZM7.49991 1.82704C4.36689 1.82704 1.82708 4.36686 1.82708 7.49988C1.82708 10.6329 4.36689 13.1727 7.49991 13.1727C10.6329 13.1727 13.1727 10.6329 13.1727 7.49988C13.1727 4.36686 10.6329 1.82704 7.49991 1.82704ZM9.85358 5.14644C10.0488 5.3417 10.0488 5.65829 9.85358 5.85355L8.20713 7.49999L9.85358 9.14644C10.0488 9.3417 10.0488 9.65829 9.85358 9.85355C9.65832 10.0488 9.34173 10.0488 9.14647 9.85355L7.50002 8.2071L5.85358 9.85355C5.65832 10.0488 5.34173 10.0488 5.14647 9.85355C4.95121 9.65829 4.95121 9.3417 5.14647 9.14644L6.79292 7.49999L5.14647 5.85355C4.95121 5.65829 4.95121 5.3417 5.14647 5.14644C5.34173 4.95118 5.65832 4.95118 5.85358 5.14644L7.50002 6.79289L9.14647 5.14644C9.34173 4.95118 9.65832 4.95118 9.85358 5.14644Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),vge=["color"],nZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,vge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",fill:r}))}),yge=["color"],rZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,yge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),bge=["color"],iZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,bge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),xge=["color"],oZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,xge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 4.625C6.12132 4.625 6.625 4.12132 6.625 3.5C6.625 2.87868 6.12132 2.375 5.5 2.375C4.87868 2.375 4.375 2.87868 4.375 3.5C4.375 4.12132 4.87868 4.625 5.5 4.625ZM9.5 4.625C10.1213 4.625 10.625 4.12132 10.625 3.5C10.625 2.87868 10.1213 2.375 9.5 2.375C8.87868 2.375 8.375 2.87868 8.375 3.5C8.375 4.12132 8.87868 4.625 9.5 4.625ZM10.625 7.5C10.625 8.12132 10.1213 8.625 9.5 8.625C8.87868 8.625 8.375 8.12132 8.375 7.5C8.375 6.87868 8.87868 6.375 9.5 6.375C10.1213 6.375 10.625 6.87868 10.625 7.5ZM5.5 8.625C6.12132 8.625 6.625 8.12132 6.625 7.5C6.625 6.87868 6.12132 6.375 5.5 6.375C4.87868 6.375 4.375 6.87868 4.375 7.5C4.375 8.12132 4.87868 8.625 5.5 8.625ZM10.625 11.5C10.625 12.1213 10.1213 12.625 9.5 12.625C8.87868 12.625 8.375 12.1213 8.375 11.5C8.375 10.8787 8.87868 10.375 9.5 10.375C10.1213 10.375 10.625 10.8787 10.625 11.5ZM5.5 12.625C6.12132 12.625 6.625 12.1213 6.625 11.5C6.625 10.8787 6.12132 10.375 5.5 10.375C4.87868 10.375 4.375 10.8787 4.375 11.5C4.375 12.1213 4.87868 12.625 5.5 12.625Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),wge=["color"],aZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,wge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M10 6.5C10 8.433 8.433 10 6.5 10C4.567 10 3 8.433 3 6.5C3 4.567 4.567 3 6.5 3C8.433 3 10 4.567 10 6.5ZM9.30884 10.0159C8.53901 10.6318 7.56251 11 6.5 11C4.01472 11 2 8.98528 2 6.5C2 4.01472 4.01472 2 6.5 2C8.98528 2 11 4.01472 11 6.5C11 7.56251 10.6318 8.53901 10.0159 9.30884L12.8536 12.1464C13.0488 12.3417 13.0488 12.6583 12.8536 12.8536C12.6583 13.0488 12.3417 13.0488 12.1464 12.8536L9.30884 10.0159Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),_ge=["color"],sZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,_ge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.5 3C4.67157 3 4 3.67157 4 4.5C4 5.32843 4.67157 6 5.5 6C6.32843 6 7 5.32843 7 4.5C7 3.67157 6.32843 3 5.5 3ZM3 5C3.01671 5 3.03323 4.99918 3.04952 4.99758C3.28022 6.1399 4.28967 7 5.5 7C6.71033 7 7.71978 6.1399 7.95048 4.99758C7.96677 4.99918 7.98329 5 8 5H13.5C13.7761 5 14 4.77614 14 4.5C14 4.22386 13.7761 4 13.5 4H8C7.98329 4 7.96677 4.00082 7.95048 4.00242C7.71978 2.86009 6.71033 2 5.5 2C4.28967 2 3.28022 2.86009 3.04952 4.00242C3.03323 4.00082 3.01671 4 3 4H1.5C1.22386 4 1 4.22386 1 4.5C1 4.77614 1.22386 5 1.5 5H3ZM11.9505 10.9976C11.7198 12.1399 10.7103 13 9.5 13C8.28967 13 7.28022 12.1399 7.04952 10.9976C7.03323 10.9992 7.01671 11 7 11H1.5C1.22386 11 1 10.7761 1 10.5C1 10.2239 1.22386 10 1.5 10H7C7.01671 10 7.03323 10.0008 7.04952 10.0024C7.28022 8.8601 8.28967 8 9.5 8C10.7103 8 11.7198 8.8601 11.9505 10.0024C11.9668 10.0008 11.9833 10 12 10H13.5C13.7761 10 14 10.2239 14 10.5C14 10.7761 13.7761 11 13.5 11H12C11.9833 11 11.9668 10.9992 11.9505 10.9976ZM8 10.5C8 9.67157 8.67157 9 9.5 9C10.3284 9 11 9.67157 11 10.5C11 11.3284 10.3284 12 9.5 12C8.67157 12 8 11.3284 8 10.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Sge=["color"],uZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Sge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M12.1464 1.14645C12.3417 0.951184 12.6583 0.951184 12.8535 1.14645L14.8535 3.14645C15.0488 3.34171 15.0488 3.65829 14.8535 3.85355L10.9109 7.79618C10.8349 7.87218 10.7471 7.93543 10.651 7.9835L6.72359 9.94721C6.53109 10.0435 6.29861 10.0057 6.14643 9.85355C5.99425 9.70137 5.95652 9.46889 6.05277 9.27639L8.01648 5.34897C8.06455 5.25283 8.1278 5.16507 8.2038 5.08907L12.1464 1.14645ZM12.5 2.20711L8.91091 5.79618L7.87266 7.87267L8.12731 8.12732L10.2038 7.08907L13.7929 3.5L12.5 2.20711ZM9.99998 2L8.99998 3H4.9C4.47171 3 4.18056 3.00039 3.95552 3.01877C3.73631 3.03668 3.62421 3.06915 3.54601 3.10899C3.35785 3.20487 3.20487 3.35785 3.10899 3.54601C3.06915 3.62421 3.03669 3.73631 3.01878 3.95552C3.00039 4.18056 3 4.47171 3 4.9V11.1C3 11.5283 3.00039 11.8194 3.01878 12.0445C3.03669 12.2637 3.06915 12.3758 3.10899 12.454C3.20487 12.6422 3.35785 12.7951 3.54601 12.891C3.62421 12.9309 3.73631 12.9633 3.95552 12.9812C4.18056 12.9996 4.47171 13 4.9 13H11.1C11.5283 13 11.8194 12.9996 12.0445 12.9812C12.2637 12.9633 12.3758 12.9309 12.454 12.891C12.6422 12.7951 12.7951 12.6422 12.891 12.454C12.9309 12.3758 12.9633 12.2637 12.9812 12.0445C12.9996 11.8194 13 11.5283 13 11.1V6.99998L14 5.99998V11.1V11.1207C14 11.5231 14 11.8553 13.9779 12.1259C13.9549 12.407 13.9057 12.6653 13.782 12.908C13.5903 13.2843 13.2843 13.5903 12.908 13.782C12.6653 13.9057 12.407 13.9549 12.1259 13.9779C11.8553 14 11.5231 14 11.1207 14H11.1H4.9H4.87934C4.47686 14 4.14468 14 3.87409 13.9779C3.59304 13.9549 3.33469 13.9057 3.09202 13.782C2.7157 13.5903 2.40973 13.2843 2.21799 12.908C2.09434 12.6653 2.04506 12.407 2.0221 12.1259C1.99999 11.8553 1.99999 11.5231 2 11.1207V11.1206V11.1V4.9V4.87935V4.87932V4.87931C1.99999 4.47685 1.99999 4.14468 2.0221 3.87409C2.04506 3.59304 2.09434 3.33469 2.21799 3.09202C2.40973 2.71569 2.7157 2.40973 3.09202 2.21799C3.33469 2.09434 3.59304 2.04506 3.87409 2.0221C4.14468 1.99999 4.47685 1.99999 4.87932 2H4.87935H4.9H9.99998Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Cge=["color"],lZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Cge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M7.49991 0.876892C3.84222 0.876892 0.877075 3.84204 0.877075 7.49972C0.877075 11.1574 3.84222 14.1226 7.49991 14.1226C11.1576 14.1226 14.1227 11.1574 14.1227 7.49972C14.1227 3.84204 11.1576 0.876892 7.49991 0.876892ZM1.82707 7.49972C1.82707 4.36671 4.36689 1.82689 7.49991 1.82689C10.6329 1.82689 13.1727 4.36671 13.1727 7.49972C13.1727 10.6327 10.6329 13.1726 7.49991 13.1726C4.36689 13.1726 1.82707 10.6327 1.82707 7.49972ZM7.50003 4C7.77617 4 8.00003 4.22386 8.00003 4.5V7H10.5C10.7762 7 11 7.22386 11 7.5C11 7.77614 10.7762 8 10.5 8H8.00003V10.5C8.00003 10.7761 7.77617 11 7.50003 11C7.22389 11 7.00003 10.7761 7.00003 10.5V8H4.50003C4.22389 8 4.00003 7.77614 4.00003 7.5C4.00003 7.22386 4.22389 7 4.50003 7H7.00003V4.5C7.00003 4.22386 7.22389 4 7.50003 4Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Ege=["color"],cZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Ege);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M0.877075 7.49972C0.877075 3.84204 3.84222 0.876892 7.49991 0.876892C11.1576 0.876892 14.1227 3.84204 14.1227 7.49972C14.1227 11.1574 11.1576 14.1226 7.49991 14.1226C3.84222 14.1226 0.877075 11.1574 0.877075 7.49972ZM7.49991 1.82689C4.36689 1.82689 1.82708 4.36671 1.82708 7.49972C1.82708 10.6327 4.36689 13.1726 7.49991 13.1726C10.6329 13.1726 13.1727 10.6327 13.1727 7.49972C13.1727 4.36671 10.6329 1.82689 7.49991 1.82689ZM8.24993 10.5C8.24993 10.9142 7.91414 11.25 7.49993 11.25C7.08571 11.25 6.74993 10.9142 6.74993 10.5C6.74993 10.0858 7.08571 9.75 7.49993 9.75C7.91414 9.75 8.24993 10.0858 8.24993 10.5ZM6.05003 6.25C6.05003 5.57211 6.63511 4.925 7.50003 4.925C8.36496 4.925 8.95003 5.57211 8.95003 6.25C8.95003 6.74118 8.68002 6.99212 8.21447 7.27494C8.16251 7.30651 8.10258 7.34131 8.03847 7.37854L8.03841 7.37858C7.85521 7.48497 7.63788 7.61119 7.47449 7.73849C7.23214 7.92732 6.95003 8.23198 6.95003 8.7C6.95004 9.00376 7.19628 9.25 7.50004 9.25C7.8024 9.25 8.04778 9.00601 8.05002 8.70417L8.05056 8.7033C8.05924 8.6896 8.08493 8.65735 8.15058 8.6062C8.25207 8.52712 8.36508 8.46163 8.51567 8.37436L8.51571 8.37433C8.59422 8.32883 8.68296 8.27741 8.78559 8.21506C9.32004 7.89038 10.05 7.35382 10.05 6.25C10.05 4.92789 8.93511 3.825 7.50003 3.825C6.06496 3.825 4.95003 4.92789 4.95003 6.25C4.95003 6.55376 5.19628 6.8 5.50003 6.8C5.80379 6.8 6.05003 6.55376 6.05003 6.25Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),Oge=["color"],fZe=y.forwardRef(function(e,t){var n=e.color,r=n===void 0?"currentColor":n,i=Yr(e,Oge);return y.createElement("svg",Object.assign({width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i,{ref:t}),y.createElement("path",{d:"M5.49998 0.5C5.49998 0.223858 5.72383 0 5.99998 0H7.49998H8.99998C9.27612 0 9.49998 0.223858 9.49998 0.5C9.49998 0.776142 9.27612 1 8.99998 1H7.99998V2.11922C9.09832 2.20409 10.119 2.56622 10.992 3.13572C11.0116 3.10851 11.0336 3.08252 11.058 3.05806L11.858 2.25806C12.1021 2.01398 12.4978 2.01398 12.7419 2.25806C12.986 2.50214 12.986 2.89786 12.7419 3.14194L11.967 3.91682C13.1595 5.07925 13.9 6.70314 13.9 8.49998C13.9 12.0346 11.0346 14.9 7.49998 14.9C3.96535 14.9 1.09998 12.0346 1.09998 8.49998C1.09998 5.13362 3.69904 2.3743 6.99998 2.11922V1H5.99998C5.72383 1 5.49998 0.776142 5.49998 0.5ZM2.09998 8.49998C2.09998 5.51764 4.51764 3.09998 7.49998 3.09998C10.4823 3.09998 12.9 5.51764 12.9 8.49998C12.9 11.4823 10.4823 13.9 7.49998 13.9C4.51764 13.9 2.09998 11.4823 2.09998 8.49998ZM7.99998 4.5C7.99998 4.22386 7.77612 4 7.49998 4C7.22383 4 6.99998 4.22386 6.99998 4.5V9.5C6.99998 9.77614 7.22383 10 7.49998 10C7.77612 10 7.99998 9.77614 7.99998 9.5V4.5Z",fill:r,fillRule:"evenodd",clipRule:"evenodd"}))}),QO="Collapsible",[Age,dZe]=vi(QO),[Pge,JO]=Age(QO),yz=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[u=!1,l]=Za({prop:r,defaultProp:i,onChange:a});return I.jsx(Pge,{scope:n,disabled:o,contentId:Fo(),open:u,onOpenToggle:y.useCallback(()=>l(c=>!c),[l]),children:I.jsx(pt.div,{"data-state":tA(u),"data-disabled":o?"":void 0,...s,ref:t})})});yz.displayName=QO;var bz="CollapsibleTrigger",kge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=JO(bz,n);return I.jsx(pt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":tA(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ye(e.onClick,i.onOpenToggle)})});kge.displayName=bz;var eA="CollapsibleContent",Tge=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=JO(eA,e.__scopeCollapsible);return I.jsx(Gr,{present:n||i.open,children:({present:o})=>I.jsx(Mge,{...r,ref:t,present:o})})});Tge.displayName=eA;var Mge=y.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=JO(eA,n),[s,u]=y.useState(r),l=y.useRef(null),c=Gt(t,l),f=y.useRef(0),h=f.current,p=y.useRef(0),m=p.current,v=a.open||s,b=y.useRef(v),w=y.useRef(void 0);return y.useEffect(()=>{const x=requestAnimationFrame(()=>b.current=!1);return()=>cancelAnimationFrame(x)},[]),ii(()=>{const x=l.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();f.current=S.height,p.current=S.width,b.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),u(r)}},[a.open,r]),I.jsx(pt.div,{"data-state":tA(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...o,ref:c,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:v&&i})});function tA(e){return e?"open":"closed"}var hZe=yz;function nA(e){const t=e+"CollectionProvider",[n,r]=vi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=p=>{const{scope:m,children:v}=p,b=F.useRef(null),w=F.useRef(new Map).current;return I.jsx(i,{scope:m,itemMap:w,collectionRef:b,children:v})};a.displayName=t;const s=e+"CollectionSlot",u=F.forwardRef((p,m)=>{const{scope:v,children:b}=p,w=o(s,v),x=Gt(m,w.collectionRef);return I.jsx(Al,{ref:x,children:b})});u.displayName=s;const l=e+"CollectionItemSlot",c="data-radix-collection-item",f=F.forwardRef((p,m)=>{const{scope:v,children:b,...w}=p,x=F.useRef(null),S=Gt(m,x),O=o(l,v);return F.useEffect(()=>(O.itemMap.set(x,{ref:x,...w}),()=>void O.itemMap.delete(x))),I.jsx(Al,{[c]:"",ref:S,children:b})});f.displayName=l;function h(p){const m=o(e+"CollectionConsumer",p);return F.useCallback(()=>{const b=m.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${c}]`));return Array.from(m.itemMap.values()).sort((O,E)=>w.indexOf(O.ref.current)-w.indexOf(E.ref.current))},[m.collectionRef,m.itemMap])}return[{Provider:a,Slot:u,ItemSlot:f},h,r]}var Rge=y.createContext(void 0);function Em(e){const t=y.useContext(Rge);return e||t||"ltr"}const Dge=["top","right","bottom","left"],Rl=Math.min,Ro=Math.max,ob=Math.round,ly=Math.floor,Dl=e=>({x:e,y:e}),$ge={left:"right",right:"left",bottom:"top",top:"bottom"},Ige={start:"end",end:"start"};function dE(e,t,n){return Ro(e,Rl(t,n))}function xu(e,t){return typeof e=="function"?e(t):e}function wu(e){return e.split("-")[0]}function Fh(e){return e.split("-")[1]}function rA(e){return e==="x"?"y":"x"}function iA(e){return e==="y"?"height":"width"}function jh(e){return["top","bottom"].includes(wu(e))?"y":"x"}function oA(e){return rA(jh(e))}function Nge(e,t,n){n===void 0&&(n=!1);const r=Fh(e),i=oA(e),o=iA(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=ab(a)),[a,ab(a)]}function Lge(e){const t=ab(e);return[hE(e),t,hE(t)]}function hE(e){return e.replace(/start|end/g,t=>Ige[t])}function Fge(e,t,n){const r=["left","right"],i=["right","left"],o=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?i:r:t?r:i;case"left":case"right":return t?o:a;default:return[]}}function jge(e,t,n,r){const i=Fh(e);let o=Fge(wu(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(hE)))),o}function ab(e){return e.replace(/left|right|bottom|top/g,t=>$ge[t])}function Bge(e){return{top:0,right:0,bottom:0,left:0,...e}}function xz(e){return typeof e!="number"?Bge(e):{top:e,right:e,bottom:e,left:e}}function sb(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function QR(e,t,n){let{reference:r,floating:i}=e;const o=jh(t),a=oA(t),s=iA(a),u=wu(t),l=o==="y",c=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,h=r[s]/2-i[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-i.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-i.width,y:f};break;default:p={x:r.x,y:r.y}}switch(Fh(t)){case"start":p[a]-=h*(n&&l?-1:1);break;case"end":p[a]+=h*(n&&l?-1:1);break}return p}const zge=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),u=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:f}=QR(l,r,u),h=r,p={},m=0;for(let v=0;v({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=xu(e,t)||{};if(l==null)return{};const f=xz(c),h={x:n,y:r},p=oA(i),m=iA(p),v=await a.getDimensions(l),b=p==="y",w=b?"top":"left",x=b?"bottom":"right",S=b?"clientHeight":"clientWidth",O=o.reference[m]+o.reference[p]-h[p]-o.floating[m],E=h[p]-o.reference[p],C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l));let k=C?C[S]:0;(!k||!await(a.isElement==null?void 0:a.isElement(C)))&&(k=s.floating[S]||o.floating[m]);const M=O/2-E/2,N=k/2-v[m]/2-1,z=Rl(f[w],N),H=Rl(f[x],N),V=z,ne=k-v[m]-H,Z=k/2-v[m]/2+M,G=dE(V,Z,ne),q=!u.arrow&&Fh(i)!=null&&Z!==G&&o.reference[m]/2-(ZV<=0)){var N,z;const V=(((N=o.flip)==null?void 0:N.index)||0)+1,ne=E[V];if(ne)return{data:{index:V,overflows:M},reset:{placement:ne}};let Z=(z=M.filter(G=>G.overflows[0]<=0).sort((G,q)=>G.overflows[1]-q.overflows[1])[0])==null?void 0:z.placement;if(!Z)switch(p){case"bestFit":{var H;const G=(H=M.map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,j)=>W+j,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:H[0];G&&(Z=G);break}case"initialPlacement":Z=s;break}if(i!==Z)return{reset:{placement:Z}}}return{}}}};function JR(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function e9(e){return Dge.some(t=>e[t]>=0)}const Wge=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...i}=xu(e,t);switch(r){case"referenceHidden":{const o=await pg(t,{...i,elementContext:"reference"}),a=JR(o,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:e9(a)}}}case"escaped":{const o=await pg(t,{...i,altBoundary:!0}),a=JR(o,n.floating);return{data:{escapedOffsets:a,escaped:e9(a)}}}default:return{}}}}};async function Hge(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=wu(n),s=Fh(n),u=jh(n)==="y",l=["left","top"].includes(a)?-1:1,c=o&&u?-1:1,f=xu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&typeof m=="number"&&(p=s==="end"?m*-1:m),u?{x:p*c,y:h*l}:{x:h*l,y:p*c}}const Kge=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,u=await Hge(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+u.x,y:o+u.y,data:{...u,placement:a}}}}},qge=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:b=>{let{x:w,y:x}=b;return{x:w,y:x}}},...u}=xu(e,t),l={x:n,y:r},c=await pg(t,u),f=jh(wu(i)),h=rA(f);let p=l[h],m=l[f];if(o){const b=h==="y"?"top":"left",w=h==="y"?"bottom":"right",x=p+c[b],S=p-c[w];p=dE(x,p,S)}if(a){const b=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=m+c[b],S=m-c[w];m=dE(x,m,S)}const v=s.fn({...t,[h]:p,[f]:m});return{...v,data:{x:v.x-n,y:v.y-r}}}}},Gge=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=xu(e,t),c={x:n,y:r},f=jh(i),h=rA(f);let p=c[h],m=c[f];const v=xu(s,t),b=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(u){const S=h==="y"?"height":"width",O=o.reference[h]-o.floating[S]+b.mainAxis,E=o.reference[h]+o.reference[S]-b.mainAxis;pE&&(p=E)}if(l){var w,x;const S=h==="y"?"width":"height",O=["top","left"].includes(wu(i)),E=o.reference[f]-o.floating[S]+(O&&((w=a.offset)==null?void 0:w[f])||0)+(O?0:b.crossAxis),C=o.reference[f]+o.reference[S]+(O?0:((x=a.offset)==null?void 0:x[f])||0)-(O?b.crossAxis:0);mC&&(m=C)}return{[h]:p,[f]:m}}}},Yge=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:i,elements:o}=t,{apply:a=()=>{},...s}=xu(e,t),u=await pg(t,s),l=wu(n),c=Fh(n),f=jh(n)==="y",{width:h,height:p}=r.floating;let m,v;l==="top"||l==="bottom"?(m=l,v=c===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=l,m=c==="end"?"top":"bottom");const b=p-u[m],w=h-u[v],x=!t.middlewareData.shift;let S=b,O=w;if(f){const C=h-u.left-u.right;O=c||x?Rl(w,C):C}else{const C=p-u.top-u.bottom;S=c||x?Rl(b,C):C}if(x&&!c){const C=Ro(u.left,0),k=Ro(u.right,0),M=Ro(u.top,0),N=Ro(u.bottom,0);f?O=h-2*(C!==0||k!==0?C+k:Ro(u.left,u.right)):S=p-2*(M!==0||N!==0?M+N:Ro(u.top,u.bottom))}await a({...t,availableWidth:O,availableHeight:S});const E=await i.getDimensions(o.floating);return h!==E.width||p!==E.height?{reset:{rects:!0}}:{}}}};function $l(e){return wz(e)?(e.nodeName||"").toLowerCase():"#document"}function jo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ku(e){var t;return(t=(wz(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function wz(e){return e instanceof Node||e instanceof jo(e).Node}function _u(e){return e instanceof Element||e instanceof jo(e).Element}function Ms(e){return e instanceof HTMLElement||e instanceof jo(e).HTMLElement}function t9(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jo(e).ShadowRoot}function Om(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=va(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function Zge(e){return["table","td","th"].includes($l(e))}function aA(e){const t=sA(),n=va(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Xge(e){let t=Zd(e);for(;Ms(t)&&!iw(t);){if(aA(t))return t;t=Zd(t)}return null}function sA(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function iw(e){return["html","body","#document"].includes($l(e))}function va(e){return jo(e).getComputedStyle(e)}function ow(e){return _u(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Zd(e){if($l(e)==="html")return e;const t=e.assignedSlot||e.parentNode||t9(e)&&e.host||ku(e);return t9(t)?t.host:t}function _z(e){const t=Zd(e);return iw(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ms(t)&&Om(t)?t:_z(t)}function gg(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=_z(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jo(i);return o?t.concat(a,a.visualViewport||[],Om(i)?i:[],a.frameElement&&n?gg(a.frameElement):[]):t.concat(i,gg(i,[],n))}function Sz(e){const t=va(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Ms(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=ob(n)!==o||ob(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function uA(e){return _u(e)?e:e.contextElement}function kd(e){const t=uA(e);if(!Ms(t))return Dl(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Sz(t);let a=(o?ob(n.width):n.width)/r,s=(o?ob(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const Qge=Dl(0);function Cz(e){const t=jo(e);return!sA()||!t.visualViewport?Qge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jo(e)?!1:t}function Qc(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=uA(e);let a=Dl(1);t&&(r?_u(r)&&(a=kd(r)):a=kd(e));const s=Jge(o,n,r)?Cz(o):Dl(0);let u=(i.left+s.x)/a.x,l=(i.top+s.y)/a.y,c=i.width/a.x,f=i.height/a.y;if(o){const h=jo(o),p=r&&_u(r)?jo(r):r;let m=h,v=m.frameElement;for(;v&&r&&p!==m;){const b=kd(v),w=v.getBoundingClientRect(),x=va(v),S=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*b.x,O=w.top+(v.clientTop+parseFloat(x.paddingTop))*b.y;u*=b.x,l*=b.y,c*=b.x,f*=b.y,u+=S,l+=O,m=jo(v),v=m.frameElement}}return sb({width:c,height:f,x:u,y:l})}const eme=[":popover-open",":modal"];function Ez(e){return eme.some(t=>{try{return e.matches(t)}catch{return!1}})}function tme(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=ku(r),s=t?Ez(t.floating):!1;if(r===a||s&&o)return n;let u={scrollLeft:0,scrollTop:0},l=Dl(1);const c=Dl(0),f=Ms(r);if((f||!f&&!o)&&(($l(r)!=="body"||Om(a))&&(u=ow(r)),Ms(r))){const h=Qc(r);l=kd(r),c.x=h.x+r.clientLeft,c.y=h.y+r.clientTop}return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-u.scrollLeft*l.x+c.x,y:n.y*l.y-u.scrollTop*l.y+c.y}}function nme(e){return Array.from(e.getClientRects())}function Oz(e){return Qc(ku(e)).left+ow(e).scrollLeft}function rme(e){const t=ku(e),n=ow(e),r=e.ownerDocument.body,i=Ro(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Ro(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Oz(e);const s=-n.scrollTop;return va(r).direction==="rtl"&&(a+=Ro(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function ime(e,t){const n=jo(e),r=ku(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,u=0;if(i){o=i.width,a=i.height;const l=sA();(!l||l&&t==="fixed")&&(s=i.offsetLeft,u=i.offsetTop)}return{width:o,height:a,x:s,y:u}}function ome(e,t){const n=Qc(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Ms(e)?kd(e):Dl(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,u=i*o.x,l=r*o.y;return{width:a,height:s,x:u,y:l}}function n9(e,t,n){let r;if(t==="viewport")r=ime(e,n);else if(t==="document")r=rme(ku(e));else if(_u(t))r=ome(t,n);else{const i=Cz(e);r={...t,x:t.x-i.x,y:t.y-i.y}}return sb(r)}function Az(e,t){const n=Zd(e);return n===t||!_u(n)||iw(n)?!1:va(n).position==="fixed"||Az(n,t)}function ame(e,t){const n=t.get(e);if(n)return n;let r=gg(e,[],!1).filter(s=>_u(s)&&$l(s)!=="body"),i=null;const o=va(e).position==="fixed";let a=o?Zd(e):e;for(;_u(a)&&!iw(a);){const s=va(a),u=aA(a);!u&&s.position==="fixed"&&(i=null),(o?!u&&!i:!u&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Om(a)&&!u&&Az(e,a))?r=r.filter(c=>c!==a):i=s,a=Zd(a)}return t.set(e,r),r}function sme(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?ame(t,this._c):[].concat(n),r],s=a[0],u=a.reduce((l,c)=>{const f=n9(t,c,i);return l.top=Ro(f.top,l.top),l.right=Rl(f.right,l.right),l.bottom=Rl(f.bottom,l.bottom),l.left=Ro(f.left,l.left),l},n9(t,s,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function ume(e){const{width:t,height:n}=Sz(e);return{width:t,height:n}}function lme(e,t,n){const r=Ms(t),i=ku(t),o=n==="fixed",a=Qc(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const u=Dl(0);if(r||!r&&!o)if(($l(t)!=="body"||Om(i))&&(s=ow(t)),r){const f=Qc(t,!0,o,t);u.x=f.x+t.clientLeft,u.y=f.y+t.clientTop}else i&&(u.x=Oz(i));const l=a.left+s.scrollLeft-u.x,c=a.top+s.scrollTop-u.y;return{x:l,y:c,width:a.width,height:a.height}}function r9(e,t){return!Ms(e)||va(e).position==="fixed"?null:t?t(e):e.offsetParent}function Pz(e,t){const n=jo(e);if(!Ms(e)||Ez(e))return n;let r=r9(e,t);for(;r&&Zge(r)&&va(r).position==="static";)r=r9(r,t);return r&&($l(r)==="html"||$l(r)==="body"&&va(r).position==="static"&&!aA(r))?n:r||Xge(e)||n}const cme=async function(e){const t=this.getOffsetParent||Pz,n=this.getDimensions;return{reference:lme(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await n(e.floating)}}};function fme(e){return va(e).direction==="rtl"}const dme={convertOffsetParentRelativeRectToViewportRelativeRect:tme,getDocumentElement:ku,getClippingRect:sme,getOffsetParent:Pz,getElementRects:cme,getClientRects:nme,getDimensions:ume,getScale:kd,isElement:_u,isRTL:fme};function hme(e,t){let n=null,r;const i=ku(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,u){s===void 0&&(s=!1),u===void 0&&(u=1),o();const{left:l,top:c,width:f,height:h}=e.getBoundingClientRect();if(s||t(),!f||!h)return;const p=ly(c),m=ly(i.clientWidth-(l+f)),v=ly(i.clientHeight-(c+h)),b=ly(l),x={rootMargin:-p+"px "+-m+"px "+-v+"px "+-b+"px",threshold:Ro(0,Rl(1,u))||1};let S=!0;function O(E){const C=E[0].intersectionRatio;if(C!==u){if(!S)return a();C?a(!1,C):r=setTimeout(()=>{a(!1,1e-7)},100)}S=!1}try{n=new IntersectionObserver(O,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,x)}n.observe(e)}return a(!0),o}function pme(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,l=uA(e),c=i||o?[...l?gg(l):[],...gg(t)]:[];c.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const f=l&&s?hme(l,n):null;let h=-1,p=null;a&&(p=new ResizeObserver(w=>{let[x]=w;x&&x.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var S;(S=p)==null||S.observe(t)})),n()}),l&&!u&&p.observe(l),p.observe(t));let m,v=u?Qc(e):null;u&&b();function b(){const w=Qc(e);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,m=requestAnimationFrame(b)}return n(),()=>{var w;c.forEach(x=>{i&&x.removeEventListener("scroll",n),o&&x.removeEventListener("resize",n)}),f?.(),(w=p)==null||w.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const gme=qge,mme=Vge,vme=Yge,yme=Wge,i9=Uge,bme=Gge,xme=(e,t,n)=>{const r=new Map,i={platform:dme,...n},o={...i.platform,_c:r};return zge(e,t,{...i,platform:o})},wme=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?i9({element:r.current,padding:i}).fn(n):{}:r?i9({element:r,padding:i}).fn(n):{}}}};var e1=typeof document<"u"?y.useLayoutEffect:y.useEffect;function ub(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ub(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!ub(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function kz(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function o9(e,t){const n=kz(e);return Math.round(t*n)/n}function a9(e){const t=y.useRef(e);return e1(()=>{t.current=e}),t}function _me(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,f]=y.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=y.useState(r);ub(h,r)||p(r);const[m,v]=y.useState(null),[b,w]=y.useState(null),x=y.useCallback(W=>{W!==C.current&&(C.current=W,v(W))},[]),S=y.useCallback(W=>{W!==k.current&&(k.current=W,w(W))},[]),O=o||m,E=a||b,C=y.useRef(null),k=y.useRef(null),M=y.useRef(c),N=u!=null,z=a9(u),H=a9(i),V=y.useCallback(()=>{if(!C.current||!k.current)return;const W={placement:t,strategy:n,middleware:h};H.current&&(W.platform=H.current),xme(C.current,k.current,W).then(j=>{const K={...j,isPositioned:!0};ne.current&&!ub(M.current,K)&&(M.current=K,Au.flushSync(()=>{f(K)}))})},[h,t,n,H]);e1(()=>{l===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[l]);const ne=y.useRef(!1);e1(()=>(ne.current=!0,()=>{ne.current=!1}),[]),e1(()=>{if(O&&(C.current=O),E&&(k.current=E),O&&E){if(z.current)return z.current(O,E,V);V()}},[O,E,V,z,N]);const Z=y.useMemo(()=>({reference:C,floating:k,setReference:x,setFloating:S}),[x,S]),G=y.useMemo(()=>({reference:O,floating:E}),[O,E]),q=y.useMemo(()=>{const W={position:n,left:0,top:0};if(!G.floating)return W;const j=o9(G.floating,c.x),K=o9(G.floating,c.y);return s?{...W,transform:"translate("+j+"px, "+K+"px)",...kz(G.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:j,top:K}},[n,s,G.floating,c.x,c.y]);return y.useMemo(()=>({...c,update:V,refs:Z,elements:G,floatingStyles:q}),[c,V,Z,G,q])}var Sme="Arrow",Tz=y.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return I.jsx(pt.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:I.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tz.displayName=Sme;var Cme=Tz;function lA(e){const[t,n]=y.useState(void 0);return ii(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let a,s;if("borderBoxSize"in o){const u=o.borderBoxSize,l=Array.isArray(u)?u[0]:u;a=l.inlineSize,s=l.blockSize}else a=e.offsetWidth,s=e.offsetHeight;n({width:a,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var cA="Popper",[Mz,zl]=vi(cA),[Eme,Rz]=Mz(cA),Dz=e=>{const{__scopePopper:t,children:n}=e,[r,i]=y.useState(null);return I.jsx(Eme,{scope:t,anchor:r,onAnchorChange:i,children:n})};Dz.displayName=cA;var $z="PopperAnchor",Iz=y.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=Rz($z,n),a=y.useRef(null),s=Gt(t,a);return y.useEffect(()=>{o.onAnchorChange(r?.current||a.current)}),r?null:I.jsx(pt.div,{...i,ref:s})});Iz.displayName=$z;var fA="PopperContent",[Ome,Ame]=Mz(fA),Nz=y.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,arrowPadding:s=0,avoidCollisions:u=!0,collisionBoundary:l=[],collisionPadding:c=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:m,...v}=e,b=Rz(fA,n),[w,x]=y.useState(null),S=Gt(t,me=>x(me)),[O,E]=y.useState(null),C=lA(O),k=C?.width??0,M=C?.height??0,N=r+(o!=="center"?"-"+o:""),z=typeof c=="number"?c:{top:0,right:0,bottom:0,left:0,...c},H=Array.isArray(l)?l:[l],V=H.length>0,ne={padding:z,boundary:H.filter(kme),altBoundary:V},{refs:Z,floatingStyles:G,placement:q,isPositioned:W,middlewareData:j}=_me({strategy:"fixed",placement:N,whileElementsMounted:(...me)=>pme(...me,{animationFrame:p==="always"}),elements:{reference:b.anchor},middleware:[Kge({mainAxis:i+M,alignmentAxis:a}),u&&gme({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?bme():void 0,...ne}),u&&mme({...ne}),vme({...ne,apply:({elements:me,rects:Ze,availableWidth:Ae,availableHeight:Le})=>{const{width:$e,height:be}=Ze.reference,yt=me.floating.style;yt.setProperty("--radix-popper-available-width",`${Ae}px`),yt.setProperty("--radix-popper-available-height",`${Le}px`),yt.setProperty("--radix-popper-anchor-width",`${$e}px`),yt.setProperty("--radix-popper-anchor-height",`${be}px`)}}),O&&wme({element:O,padding:s}),Tme({arrowWidth:k,arrowHeight:M}),h&&yme({strategy:"referenceHidden",...ne})]}),[K,Y]=jz(q),oe=Vr(m);ii(()=>{W&&oe?.()},[W,oe]);const Q=j.arrow?.x,J=j.arrow?.y,ue=j.arrow?.centerOffset!==0,[de,Se]=y.useState();return ii(()=>{w&&Se(window.getComputedStyle(w).zIndex)},[w]),I.jsx("div",{ref:Z.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:W?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:de,"--radix-popper-transform-origin":[j.transformOrigin?.x,j.transformOrigin?.y].join(" "),...j.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:I.jsx(Ome,{scope:n,placedSide:K,onArrowChange:E,arrowX:Q,arrowY:J,shouldHideArrow:ue,children:I.jsx(pt.div,{"data-side":K,"data-align":Y,...v,ref:S,style:{...v.style,animation:W?void 0:"none"}})})})});Nz.displayName=fA;var Lz="PopperArrow",Pme={top:"bottom",right:"left",bottom:"top",left:"right"},Fz=y.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=Ame(Lz,r),a=Pme[o.placedSide];return I.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:I.jsx(Cme,{...i,ref:n,style:{...i.style,display:"block"}})})});Fz.displayName=Lz;function kme(e){return e!==null}var Tme=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,s=a?0:e.arrowWidth,u=a?0:e.arrowHeight,[l,c]=jz(n),f={start:"0%",center:"50%",end:"100%"}[c],h=(i.arrow?.x??0)+s/2,p=(i.arrow?.y??0)+u/2;let m="",v="";return l==="bottom"?(m=a?f:`${h}px`,v=`${-u}px`):l==="top"?(m=a?f:`${h}px`,v=`${r.floating.height+u}px`):l==="right"?(m=`${-u}px`,v=a?f:`${p}px`):l==="left"&&(m=`${r.floating.width+u}px`,v=a?f:`${p}px`),{data:{x:m,y:v}}}});function jz(e){const[t,n="center"]=e.split("-");return[t,n]}var aw=Dz,Am=Iz,sw=Nz,uw=Fz,ES="rovingFocusGroup.onEntryFocus",Mme={bubbles:!1,cancelable:!0},lw="RovingFocusGroup",[pE,Bz,Rme]=nA(lw),[Dme,cw]=vi(lw,[Rme]),[$me,Ime]=Dme(lw),zz=y.forwardRef((e,t)=>I.jsx(pE.Provider,{scope:e.__scopeRovingFocusGroup,children:I.jsx(pE.Slot,{scope:e.__scopeRovingFocusGroup,children:I.jsx(Nme,{...e,ref:t})})}));zz.displayName=lw;var Nme=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,preventScrollOnEntryFocus:c=!1,...f}=e,h=y.useRef(null),p=Gt(t,h),m=Em(o),[v=null,b]=Za({prop:a,defaultProp:s,onChange:u}),[w,x]=y.useState(!1),S=Vr(l),O=Bz(n),E=y.useRef(!1),[C,k]=y.useState(0);return y.useEffect(()=>{const M=h.current;if(M)return M.addEventListener(ES,S),()=>M.removeEventListener(ES,S)},[S]),I.jsx($me,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:v,onItemFocus:y.useCallback(M=>b(M),[b]),onItemShiftTab:y.useCallback(()=>x(!0),[]),onFocusableItemAdd:y.useCallback(()=>k(M=>M+1),[]),onFocusableItemRemove:y.useCallback(()=>k(M=>M-1),[]),children:I.jsx(pt.div,{tabIndex:w||C===0?-1:0,"data-orientation":r,...f,ref:p,style:{outline:"none",...e.style},onMouseDown:Ye(e.onMouseDown,()=>{E.current=!0}),onFocus:Ye(e.onFocus,M=>{const N=!E.current;if(M.target===M.currentTarget&&N&&!w){const z=new CustomEvent(ES,Mme);if(M.currentTarget.dispatchEvent(z),!z.defaultPrevented){const H=O().filter(q=>q.focusable),V=H.find(q=>q.active),ne=H.find(q=>q.id===v),G=[V,ne,...H].filter(Boolean).map(q=>q.ref.current);Wz(G,c)}}E.current=!1}),onBlur:Ye(e.onBlur,()=>x(!1))})})}),Uz="RovingFocusGroupItem",Vz=y.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,...a}=e,s=Fo(),u=o||s,l=Ime(Uz,n),c=l.currentTabStopId===u,f=Bz(n),{onFocusableItemAdd:h,onFocusableItemRemove:p}=l;return y.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),I.jsx(pE.ItemSlot,{scope:n,id:u,focusable:r,active:i,children:I.jsx(pt.span,{tabIndex:c?0:-1,"data-orientation":l.orientation,...a,ref:t,onMouseDown:Ye(e.onMouseDown,m=>{r?l.onItemFocus(u):m.preventDefault()}),onFocus:Ye(e.onFocus,()=>l.onItemFocus(u)),onKeyDown:Ye(e.onKeyDown,m=>{if(m.key==="Tab"&&m.shiftKey){l.onItemShiftTab();return}if(m.target!==m.currentTarget)return;const v=jme(m,l.orientation,l.dir);if(v!==void 0){if(m.metaKey||m.ctrlKey||m.altKey||m.shiftKey)return;m.preventDefault();let w=f().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(m.currentTarget);w=l.loop?Bme(w,x+1):w.slice(x+1)}setTimeout(()=>Wz(w))}})})})});Vz.displayName=Uz;var Lme={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Fme(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jme(e,t,n){const r=Fme(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Lme[r]}function Wz(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Bme(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Hz=zz,Kz=Vz,gE=["Enter"," "],zme=["ArrowDown","PageUp","Home"],qz=["ArrowUp","PageDown","End"],Ume=[...zme,...qz],Vme={ltr:[...gE,"ArrowRight"],rtl:[...gE,"ArrowLeft"]},Wme={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Pm="Menu",[mg,Hme,Kme]=nA(Pm),[hf,Gz]=vi(Pm,[Kme,zl,cw]),fw=zl(),Yz=cw(),[qme,pf]=hf(Pm),[Gme,km]=hf(Pm),Zz=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:o,modal:a=!0}=e,s=fw(t),[u,l]=y.useState(null),c=y.useRef(!1),f=Vr(o),h=Em(i);return y.useEffect(()=>{const p=()=>{c.current=!0,document.addEventListener("pointerdown",m,{capture:!0,once:!0}),document.addEventListener("pointermove",m,{capture:!0,once:!0})},m=()=>c.current=!1;return document.addEventListener("keydown",p,{capture:!0}),()=>{document.removeEventListener("keydown",p,{capture:!0}),document.removeEventListener("pointerdown",m,{capture:!0}),document.removeEventListener("pointermove",m,{capture:!0})}},[]),I.jsx(aw,{...s,children:I.jsx(qme,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:l,children:I.jsx(Gme,{scope:t,onClose:y.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:c,dir:h,modal:a,children:r})})})};Zz.displayName=Pm;var Yme="MenuAnchor",dA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(Am,{...i,...r,ref:t})});dA.displayName=Yme;var hA="MenuPortal",[Zme,Xz]=hf(hA,{forceMount:void 0}),Qz=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:i}=e,o=pf(hA,t);return I.jsx(Zme,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};Qz.displayName=hA;var ha="MenuContent",[Xme,pA]=hf(ha),Jz=y.forwardRef((e,t)=>{const n=Xz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=km(ha,e.__scopeMenu);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:a.modal?I.jsx(Qme,{...i,ref:t}):I.jsx(Jme,{...i,ref:t})})})})}),Qme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu),r=y.useRef(null),i=Gt(t,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),I.jsx(gA,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:Ye(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Jme=y.forwardRef((e,t)=>{const n=pf(ha,e.__scopeMenu);return I.jsx(gA,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),gA=y.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,disableOutsideScroll:m,...v}=e,b=pf(ha,n),w=km(ha,n),x=fw(n),S=Yz(n),O=Hme(n),[E,C]=y.useState(null),k=y.useRef(null),M=Gt(t,k,b.onContentChange),N=y.useRef(0),z=y.useRef(""),H=y.useRef(0),V=y.useRef(null),ne=y.useRef("right"),Z=y.useRef(0),G=m?Sm:y.Fragment,q=m?{as:Al,allowPinchZoom:!0}:void 0,W=K=>{const Y=z.current+K,oe=O().filter(me=>!me.disabled),Q=document.activeElement,J=oe.find(me=>me.ref.current===Q)?.textValue,ue=oe.map(me=>me.textValue),de=fve(ue,Y,J),Se=oe.find(me=>me.textValue===de)?.ref.current;(function me(Ze){z.current=Ze,window.clearTimeout(N.current),Ze!==""&&(N.current=window.setTimeout(()=>me(""),1e3))})(Y),Se&&setTimeout(()=>Se.focus())};y.useEffect(()=>()=>window.clearTimeout(N.current),[]),nw();const j=y.useCallback(K=>ne.current===V.current?.side&&hve(K,V.current?.area),[]);return I.jsx(Xme,{scope:n,searchRef:z,onItemEnter:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),onItemLeave:y.useCallback(K=>{j(K)||(k.current?.focus(),C(null))},[j]),onTriggerLeave:y.useCallback(K=>{j(K)&&K.preventDefault()},[j]),pointerGraceTimerRef:H,onPointerGraceIntentChange:y.useCallback(K=>{V.current=K},[]),children:I.jsx(G,{...q,children:I.jsx(_m,{asChild:!0,trapped:i,onMountAutoFocus:Ye(o,K=>{K.preventDefault(),k.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:f,onInteractOutside:h,onDismiss:p,children:I.jsx(Hz,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:C,onEntryFocus:Ye(u,K=>{w.isUsingKeyboardRef.current||K.preventDefault()}),preventScrollOnEntryFocus:!0,children:I.jsx(sw,{role:"menu","aria-orientation":"vertical","data-state":gU(b.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:Ye(v.onKeyDown,K=>{const oe=K.target.closest("[data-radix-menu-content]")===K.currentTarget,Q=K.ctrlKey||K.altKey||K.metaKey,J=K.key.length===1;oe&&(K.key==="Tab"&&K.preventDefault(),!Q&&J&&W(K.key));const ue=k.current;if(K.target!==ue||!Ume.includes(K.key))return;K.preventDefault();const Se=O().filter(me=>!me.disabled).map(me=>me.ref.current);qz.includes(K.key)&&Se.reverse(),lve(Se)}),onBlur:Ye(e.onBlur,K=>{K.currentTarget.contains(K.target)||(window.clearTimeout(N.current),z.current="")}),onPointerMove:Ye(e.onPointerMove,vg(K=>{const Y=K.target,oe=Z.current!==K.clientX;if(K.currentTarget.contains(Y)&&oe){const Q=K.clientX>Z.current?"right":"left";ne.current=Q,Z.current=K.clientX}}))})})})})})})});Jz.displayName=ha;var eve="MenuGroup",mA=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"group",...r,ref:t})});mA.displayName=eve;var tve="MenuLabel",eU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{...r,ref:t})});eU.displayName=tve;var lb="MenuItem",s9="menu.itemSelect",dw=y.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...i}=e,o=y.useRef(null),a=km(lb,e.__scopeMenu),s=pA(lb,e.__scopeMenu),u=Gt(t,o),l=y.useRef(!1),c=()=>{const f=o.current;if(!n&&f){const h=new CustomEvent(s9,{bubbles:!0,cancelable:!0});f.addEventListener(s9,p=>r?.(p),{once:!0}),LB(f,h),h.defaultPrevented?l.current=!1:a.onClose()}};return I.jsx(tU,{...i,ref:u,disabled:n,onClick:Ye(e.onClick,c),onPointerDown:f=>{e.onPointerDown?.(f),l.current=!0},onPointerUp:Ye(e.onPointerUp,f=>{l.current||f.currentTarget?.click()}),onKeyDown:Ye(e.onKeyDown,f=>{const h=s.searchRef.current!=="";n||h&&f.key===" "||gE.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});dw.displayName=lb;var tU=y.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...o}=e,a=pA(lb,n),s=Yz(n),u=y.useRef(null),l=Gt(t,u),[c,f]=y.useState(!1),[h,p]=y.useState("");return y.useEffect(()=>{const m=u.current;m&&p((m.textContent??"").trim())},[o.children]),I.jsx(mg.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:I.jsx(Kz,{asChild:!0,...s,focusable:!r,children:I.jsx(pt.div,{role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...o,ref:l,onPointerMove:Ye(e.onPointerMove,vg(m=>{r?a.onItemLeave(m):(a.onItemEnter(m),m.defaultPrevented||m.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Ye(e.onPointerLeave,vg(m=>a.onItemLeave(m))),onFocus:Ye(e.onFocus,()=>f(!0)),onBlur:Ye(e.onBlur,()=>f(!1))})})})}),nve="MenuCheckboxItem",nU=y.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...i}=e;return I.jsx(sU,{scope:e.__scopeMenu,checked:n,children:I.jsx(dw,{role:"menuitemcheckbox","aria-checked":cb(n)?"mixed":n,...i,ref:t,"data-state":yA(n),onSelect:Ye(i.onSelect,()=>r?.(cb(n)?!0:!n),{checkForDefaultPrevented:!1})})})});nU.displayName=nve;var rU="MenuRadioGroup",[rve,ive]=hf(rU,{value:void 0,onValueChange:()=>{}}),iU=y.forwardRef((e,t)=>{const{value:n,onValueChange:r,...i}=e,o=Vr(r);return I.jsx(rve,{scope:e.__scopeMenu,value:n,onValueChange:o,children:I.jsx(mA,{...i,ref:t})})});iU.displayName=rU;var oU="MenuRadioItem",aU=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=ive(oU,e.__scopeMenu),o=n===i.value;return I.jsx(sU,{scope:e.__scopeMenu,checked:o,children:I.jsx(dw,{role:"menuitemradio","aria-checked":o,...r,ref:t,"data-state":yA(o),onSelect:Ye(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});aU.displayName=oU;var vA="MenuItemIndicator",[sU,ove]=hf(vA,{checked:!1}),uU=y.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...i}=e,o=ove(vA,n);return I.jsx(Gr,{present:r||cb(o.checked)||o.checked===!0,children:I.jsx(pt.span,{...i,ref:t,"data-state":yA(o.checked)})})});uU.displayName=vA;var ave="MenuSeparator",lU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return I.jsx(pt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});lU.displayName=ave;var sve="MenuArrow",cU=y.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,i=fw(n);return I.jsx(uw,{...i,...r,ref:t})});cU.displayName=sve;var uve="MenuSub",[pZe,fU]=hf(uve),s0="MenuSubTrigger",dU=y.forwardRef((e,t)=>{const n=pf(s0,e.__scopeMenu),r=km(s0,e.__scopeMenu),i=fU(s0,e.__scopeMenu),o=pA(s0,e.__scopeMenu),a=y.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=o,l={__scopeMenu:e.__scopeMenu},c=y.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return y.useEffect(()=>c,[c]),y.useEffect(()=>{const f=s.current;return()=>{window.clearTimeout(f),u(null)}},[s,u]),I.jsx(dA,{asChild:!0,...l,children:I.jsx(tU,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":gU(n.open),...e,ref:Ux(t,i.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:Ye(e.onPointerMove,vg(f=>{o.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(o.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),c()},100))})),onPointerLeave:Ye(e.onPointerLeave,vg(f=>{c();const h=n.content?.getBoundingClientRect();if(h){const p=n.content?.dataset.side,m=p==="right",v=m?-5:5,b=h[m?"left":"right"],w=h[m?"right":"left"];o.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:p}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(f),f.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:Ye(e.onKeyDown,f=>{const h=o.searchRef.current!=="";e.disabled||h&&f.key===" "||Vme[r.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});dU.displayName=s0;var hU="MenuSubContent",pU=y.forwardRef((e,t)=>{const n=Xz(ha,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,o=pf(ha,e.__scopeMenu),a=km(ha,e.__scopeMenu),s=fU(hU,e.__scopeMenu),u=y.useRef(null),l=Gt(t,u);return I.jsx(mg.Provider,{scope:e.__scopeMenu,children:I.jsx(Gr,{present:r||o.open,children:I.jsx(mg.Slot,{scope:e.__scopeMenu,children:I.jsx(gA,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:l,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:c=>{a.isUsingKeyboardRef.current&&u.current?.focus(),c.preventDefault()},onCloseAutoFocus:c=>c.preventDefault(),onFocusOutside:Ye(e.onFocusOutside,c=>{c.target!==s.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:Ye(e.onEscapeKeyDown,c=>{a.onClose(),c.preventDefault()}),onKeyDown:Ye(e.onKeyDown,c=>{const f=c.currentTarget.contains(c.target),h=Wme[a.dir].includes(c.key);f&&h&&(o.onOpenChange(!1),s.trigger?.focus(),c.preventDefault())})})})})})});pU.displayName=hU;function gU(e){return e?"open":"closed"}function cb(e){return e==="indeterminate"}function yA(e){return cb(e)?"indeterminate":e?"checked":"unchecked"}function lve(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function cve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fve(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=cve(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function dve(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function hve(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return dve(n,t)}function vg(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pve=Zz,gve=dA,mve=Qz,vve=Jz,yve=mA,bve=eU,xve=dw,wve=nU,_ve=iU,Sve=aU,Cve=uU,Eve=lU,Ove=cU,Ave=dU,Pve=pU,bA="DropdownMenu",[kve,gZe]=vi(bA,[Gz]),Zi=Gz(),[Tve,mU]=kve(bA),vU=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,u=Zi(t),l=y.useRef(null),[c=!1,f]=Za({prop:i,defaultProp:o,onChange:a});return I.jsx(Tve,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:c,onOpenChange:f,onOpenToggle:y.useCallback(()=>f(h=>!h),[f]),modal:s,children:I.jsx(pve,{...u,open:c,onOpenChange:f,dir:r,modal:s,children:n})})};vU.displayName=bA;var yU="DropdownMenuTrigger",bU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,o=mU(yU,n),a=Zi(n);return I.jsx(gve,{asChild:!0,...a,children:I.jsx(pt.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Ux(t,o.triggerRef),onPointerDown:Ye(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(o.onOpenToggle(),o.open||s.preventDefault())}),onKeyDown:Ye(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&o.onOpenToggle(),s.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});bU.displayName=yU;var Mve="DropdownMenuPortal",xU=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Zi(t);return I.jsx(mve,{...r,...n})};xU.displayName=Mve;var wU="DropdownMenuContent",_U=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=mU(wU,n),o=Zi(n),a=y.useRef(!1);return I.jsx(vve,{id:i.contentId,"aria-labelledby":i.triggerId,...o,...r,ref:t,onCloseAutoFocus:Ye(e.onCloseAutoFocus,s=>{a.current||i.triggerRef.current?.focus(),a.current=!1,s.preventDefault()}),onInteractOutside:Ye(e.onInteractOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0,c=u.button===2||l;(!i.modal||c)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});_U.displayName=wU;var Rve="DropdownMenuGroup",SU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(yve,{...i,...r,ref:t})});SU.displayName=Rve;var Dve="DropdownMenuLabel",CU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(bve,{...i,...r,ref:t})});CU.displayName=Dve;var $ve="DropdownMenuItem",EU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(xve,{...i,...r,ref:t})});EU.displayName=$ve;var Ive="DropdownMenuCheckboxItem",OU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(wve,{...i,...r,ref:t})});OU.displayName=Ive;var Nve="DropdownMenuRadioGroup",Lve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(_ve,{...i,...r,ref:t})});Lve.displayName=Nve;var Fve="DropdownMenuRadioItem",AU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Sve,{...i,...r,ref:t})});AU.displayName=Fve;var jve="DropdownMenuItemIndicator",PU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Cve,{...i,...r,ref:t})});PU.displayName=jve;var Bve="DropdownMenuSeparator",kU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Eve,{...i,...r,ref:t})});kU.displayName=Bve;var zve="DropdownMenuArrow",Uve=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ove,{...i,...r,ref:t})});Uve.displayName=zve;var Vve="DropdownMenuSubTrigger",TU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Ave,{...i,...r,ref:t})});TU.displayName=Vve;var Wve="DropdownMenuSubContent",MU=y.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,i=Zi(n);return I.jsx(Pve,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});MU.displayName=Wve;var mZe=vU,vZe=bU,yZe=xU,bZe=_U,xZe=SU,wZe=CU,_Ze=EU,SZe=OU,CZe=AU,EZe=PU,OZe=kU,AZe=TU,PZe=MU,Hve="VisuallyHidden",xA=y.forwardRef((e,t)=>I.jsx(pt.span,{...e,ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));xA.displayName=Hve;var Kve=xA,[hw,kZe]=vi("Tooltip",[zl]),pw=zl(),RU="TooltipProvider",qve=700,mE="tooltip.open",[Gve,wA]=hw(RU),DU=e=>{const{__scopeTooltip:t,delayDuration:n=qve,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:o}=e,[a,s]=y.useState(!0),u=y.useRef(!1),l=y.useRef(0);return y.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),I.jsx(Gve,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:y.useCallback(()=>{window.clearTimeout(l.current),s(!1)},[]),onClose:y.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(!0),r)},[r]),isPointerInTransitRef:u,onPointerInTransitChange:y.useCallback(c=>{u.current=c},[]),disableHoverableContent:i,children:o})};DU.displayName=RU;var gw="Tooltip",[Yve,Tm]=hw(gw),$U=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:o,disableHoverableContent:a,delayDuration:s}=e,u=wA(gw,e.__scopeTooltip),l=pw(t),[c,f]=y.useState(null),h=Fo(),p=y.useRef(0),m=a??u.disableHoverableContent,v=s??u.delayDuration,b=y.useRef(!1),[w=!1,x]=Za({prop:r,defaultProp:i,onChange:k=>{k?(u.onOpen(),document.dispatchEvent(new CustomEvent(mE))):u.onClose(),o?.(k)}}),S=y.useMemo(()=>w?b.current?"delayed-open":"instant-open":"closed",[w]),O=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,b.current=!1,x(!0)},[x]),E=y.useCallback(()=>{window.clearTimeout(p.current),p.current=0,x(!1)},[x]),C=y.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{b.current=!0,x(!0),p.current=0},v)},[v,x]);return y.useEffect(()=>()=>{p.current&&(window.clearTimeout(p.current),p.current=0)},[]),I.jsx(aw,{...l,children:I.jsx(Yve,{scope:t,contentId:h,open:w,stateAttribute:S,trigger:c,onTriggerChange:f,onTriggerEnter:y.useCallback(()=>{u.isOpenDelayed?C():O()},[u.isOpenDelayed,C,O]),onTriggerLeave:y.useCallback(()=>{m?E():(window.clearTimeout(p.current),p.current=0)},[E,m]),onOpen:O,onClose:E,disableHoverableContent:m,children:n})})};$U.displayName=gw;var vE="TooltipTrigger",IU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=Tm(vE,n),o=wA(vE,n),a=pw(n),s=y.useRef(null),u=Gt(t,s,i.onTriggerChange),l=y.useRef(!1),c=y.useRef(!1),f=y.useCallback(()=>l.current=!1,[]);return y.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),I.jsx(Am,{asChild:!0,...a,children:I.jsx(pt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:u,onPointerMove:Ye(e.onPointerMove,h=>{h.pointerType!=="touch"&&!c.current&&!o.isPointerInTransitRef.current&&(i.onTriggerEnter(),c.current=!0)}),onPointerLeave:Ye(e.onPointerLeave,()=>{i.onTriggerLeave(),c.current=!1}),onPointerDown:Ye(e.onPointerDown,()=>{l.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:Ye(e.onFocus,()=>{l.current||i.onOpen()}),onBlur:Ye(e.onBlur,i.onClose),onClick:Ye(e.onClick,i.onClose)})})});IU.displayName=vE;var _A="TooltipPortal",[Zve,Xve]=hw(_A,{forceMount:void 0}),NU=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,o=Tm(_A,t);return I.jsx(Zve,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};NU.displayName=_A;var Xd="TooltipContent",LU=y.forwardRef((e,t)=>{const n=Xve(Xd,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...o}=e,a=Tm(Xd,e.__scopeTooltip);return I.jsx(Gr,{present:r||a.open,children:a.disableHoverableContent?I.jsx(FU,{side:i,...o,ref:t}):I.jsx(Qve,{side:i,...o,ref:t})})}),Qve=y.forwardRef((e,t)=>{const n=Tm(Xd,e.__scopeTooltip),r=wA(Xd,e.__scopeTooltip),i=y.useRef(null),o=Gt(t,i),[a,s]=y.useState(null),{trigger:u,onClose:l}=n,c=i.current,{onPointerInTransitChange:f}=r,h=y.useCallback(()=>{s(null),f(!1)},[f]),p=y.useCallback((m,v)=>{const b=m.currentTarget,w={x:m.clientX,y:m.clientY},x=nye(w,b.getBoundingClientRect()),S=rye(w,x),O=iye(v.getBoundingClientRect()),E=aye([...S,...O]);s(E),f(!0)},[f]);return y.useEffect(()=>()=>h(),[h]),y.useEffect(()=>{if(u&&c){const m=b=>p(b,c),v=b=>p(b,u);return u.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{u.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[u,c,p,h]),y.useEffect(()=>{if(a){const m=v=>{const b=v.target,w={x:v.clientX,y:v.clientY},x=u?.contains(b)||c?.contains(b),S=!oye(w,a);x?h():S&&(h(),l())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[u,c,a,l,h]),I.jsx(FU,{...e,ref:o})}),[Jve,eye]=hw(gw,{isInside:!1}),FU=y.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:o,onPointerDownOutside:a,...s}=e,u=Tm(Xd,n),l=pw(n),{onClose:c}=u;return y.useEffect(()=>(document.addEventListener(mE,c),()=>document.removeEventListener(mE,c)),[c]),y.useEffect(()=>{if(u.trigger){const f=h=>{h.target?.contains(u.trigger)&&c()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[u.trigger,c]),I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:c,children:I.jsxs(sw,{"data-state":u.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[I.jsx(OO,{children:r}),I.jsx(Jve,{scope:n,isInside:!0,children:I.jsx(Kve,{id:u.contentId,role:"tooltip",children:i||r})})]})})});LU.displayName=Xd;var jU="TooltipArrow",tye=y.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,i=pw(n);return eye(jU,n).isInside?null:I.jsx(uw,{...i,...r,ref:t})});tye.displayName=jU;function nye(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,i,o)){case o:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function rye(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function iye(e){const{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function oye(e,t){const{x:n,y:r}=e;let i=!1;for(let o=0,a=t.length-1;or!=c>r&&n<(l-s)*(r-u)/(c-u)+s&&(i=!i)}return i}function aye(e){const t=e.slice();return t.sort((n,r)=>n.xr.x?1:n.yr.y?1:0),sye(t)}function sye(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const o=t[t.length-1],a=t[t.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))t.pop();else break}t.push(i)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const i=e[r];for(;n.length>=2;){const o=n[n.length-1],a=n[n.length-2];if((o.x-a.x)*(i.y-a.y)>=(o.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var TZe=DU,MZe=$U,RZe=IU,DZe=NU,$Ze=LU,u9=1,uye=.9,lye=.8,cye=.17,OS=.1,AS=.999,fye=.9999,dye=.99,hye=/[\\\/_+.#"@\[\(\{&]/,pye=/[\\\/_+.#"@\[\(\{&]/g,gye=/[\s-]/,BU=/[\s-]/g;function yE(e,t,n,r,i,o,a){if(o===t.length)return i===e.length?u9:dye;var s=`${i},${o}`;if(a[s]!==void 0)return a[s];for(var u=r.charAt(o),l=n.indexOf(u,i),c=0,f,h,p,m;l>=0;)f=yE(e,t,n,r,l+1,o+1,a),f>c&&(l===i?f*=u9:hye.test(e.charAt(l-1))?(f*=lye,p=e.slice(i,l-1).match(pye),p&&i>0&&(f*=Math.pow(AS,p.length))):gye.test(e.charAt(l-1))?(f*=uye,m=e.slice(i,l-1).match(BU),m&&i>0&&(f*=Math.pow(AS,m.length))):(f*=cye,i>0&&(f*=Math.pow(AS,l-i))),e.charAt(l)!==t.charAt(o)&&(f*=fye)),(ff&&(f=h*OS)),f>c&&(c=f),l=n.indexOf(u,l+1);return a[s]=c,c}function l9(e){return e.toLowerCase().replace(BU," ")}function mye(e,t){return yE(e,t,l9(e),l9(t),0,0,{})}function Ki(){return Ki=Object.assign?Object.assign.bind():function(e){for(var t=1;te.forEach(n=>vye(n,t))}function Mm(...e){return y.useCallback(zU(...e),e)}function yye(e,t=[]){let n=[];function r(o,a){const s=y.createContext(a),u=n.length;n=[...n,a];function l(f){const{scope:h,children:p,...m}=f,v=h?.[e][u]||s,b=y.useMemo(()=>m,Object.values(m));return y.createElement(v.Provider,{value:b},p)}function c(f,h){const p=h?.[e][u]||s,m=y.useContext(p);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${o}\``)}return l.displayName=o+"Provider",[l,c]}const i=()=>{const o=n.map(a=>y.createContext(a));return function(s){const u=s?.[e]||o;return y.useMemo(()=>({[`__scope${e}`]:{...s,[e]:u}}),[s,u])}};return i.scopeName=e,[r,bye(i,...t)]}function bye(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:u,scopeName:l})=>{const f=u(o)[`__scope${l}`];return{...s,...f}},{});return y.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}const xye=globalThis?.document?y.useLayoutEffect:()=>{},wye=P4.useId||(()=>{});let _ye=0;function PS(e){const[t,n]=y.useState(wye());return xye(()=>{e||n(r=>r??String(_ye++))},[e]),e||(t?`radix-${t}`:"")}function UU(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Sye({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=Cye({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=UU(n),u=y.useCallback(l=>{if(o){const f=typeof l=="function"?l(e):l;f!==e&&s(f)}else i(l)},[o,e,i,s]);return[a,u]}function Cye({defaultProp:e,onChange:t}){const n=y.useState(e),[r]=n,i=y.useRef(r),o=UU(t);return y.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}const SA=y.forwardRef((e,t)=>{const{children:n,...r}=e,i=y.Children.toArray(n),o=i.find(Oye);if(o){const a=o.props.children,s=i.map(u=>u===o?y.Children.count(a)>1?y.Children.only(null):y.isValidElement(a)?a.props.children:null:u);return y.createElement(bE,Ki({},r,{ref:t}),y.isValidElement(a)?y.cloneElement(a,void 0,s):null)}return y.createElement(bE,Ki({},r,{ref:t}),n)});SA.displayName="Slot";const bE=y.forwardRef((e,t)=>{const{children:n,...r}=e;return y.isValidElement(n)?y.cloneElement(n,{...Aye(r,n.props),ref:zU(t,n.ref)}):y.Children.count(n)>1?y.Children.only(null):null});bE.displayName="SlotClone";const Eye=({children:e})=>y.createElement(y.Fragment,null,e);function Oye(e){return y.isValidElement(e)&&e.type===Eye}function Aye(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?n[r]=(...s)=>{o?.(...s),i?.(...s)}:r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}const Pye=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"],mw=Pye.reduce((e,t)=>{const n=y.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?SA:t;return y.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),y.createElement(s,Ki({},a,{ref:i}))});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function kye(e,t){e&&Au.flushSync(()=>e.dispatchEvent(t))}function CA(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}function Tye(e){const t=CA(e);y.useEffect(()=>{const n=r=>{r.key==="Escape"&&t(r)};return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)},[t])}const xE="dismissableLayer.update",Mye="dismissableLayer.pointerDownOutside",Rye="dismissableLayer.focusOutside";let c9;const Dye=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$ye=y.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...u}=e,l=y.useContext(Dye),[c,f]=y.useState(null),[,h]=y.useState({}),p=Mm(t,C=>f(C)),m=Array.from(l.layers),[v]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),b=m.indexOf(v),w=c?m.indexOf(c):-1,x=l.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,O=Iye(C=>{const k=C.target,M=[...l.branches].some(N=>N.contains(k));!S||M||(i?.(C),a?.(C),C.defaultPrevented||s?.())}),E=Nye(C=>{const k=C.target;[...l.branches].some(N=>N.contains(k))||(o?.(C),a?.(C),C.defaultPrevented||s?.())});return Tye(C=>{w===l.layers.size-1&&(r?.(C),!C.defaultPrevented&&s&&(C.preventDefault(),s()))}),y.useEffect(()=>{if(c)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(c9=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),f9(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(document.body.style.pointerEvents=c9)}},[c,n,l]),y.useEffect(()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),f9())},[c,l]),y.useEffect(()=>{const C=()=>h({});return document.addEventListener(xE,C),()=>document.removeEventListener(xE,C)},[]),y.createElement(mw.div,Ki({},u,{ref:p,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:Td(e.onFocusCapture,E.onFocusCapture),onBlurCapture:Td(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:Td(e.onPointerDownCapture,O.onPointerDownCapture)}))});function Iye(e){const t=CA(e),n=y.useRef(!1),r=y.useRef(()=>{});return y.useEffect(()=>{const i=a=>{if(a.target&&!n.current){let u=function(){VU(Mye,t,s,{discrete:!0})};const s={originalEvent:a};a.pointerType==="touch"?(document.removeEventListener("click",r.current),r.current=u,document.addEventListener("click",r.current,{once:!0})):u()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",i),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}function Nye(e){const t=CA(e),n=y.useRef(!1);return y.useEffect(()=>{const r=i=>{i.target&&!n.current&&VU(Rye,t,{originalEvent:i},{discrete:!1})};return document.addEventListener("focusin",r),()=>document.removeEventListener("focusin",r)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function f9(){const e=new CustomEvent(xE);document.dispatchEvent(e)}function VU(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?kye(i,o):i.dispatchEvent(o)}function d9(e){const t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>(...n)=>{var r;return(r=t.current)===null||r===void 0?void 0:r.call(t,...n)},[])}const kS="focusScope.autoFocusOnMount",TS="focusScope.autoFocusOnUnmount",h9={bubbles:!1,cancelable:!0},Lye=y.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,u]=y.useState(null),l=d9(i),c=d9(o),f=y.useRef(null),h=Mm(t,v=>u(v)),p=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let v=function(w){if(p.paused||!s)return;const x=w.target;s.contains(x)?f.current=x:cc(f.current,{select:!0})},b=function(w){p.paused||!s||s.contains(w.relatedTarget)||cc(f.current,{select:!0})};return document.addEventListener("focusin",v),document.addEventListener("focusout",b),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",b)}}},[r,s,p.paused]),y.useEffect(()=>{if(s){g9.add(p);const v=document.activeElement;if(!s.contains(v)){const w=new CustomEvent(kS,h9);s.addEventListener(kS,l),s.dispatchEvent(w),w.defaultPrevented||(Fye(Vye(WU(s)),{select:!0}),document.activeElement===v&&cc(s))}return()=>{s.removeEventListener(kS,l),setTimeout(()=>{const w=new CustomEvent(TS,h9);s.addEventListener(TS,c),s.dispatchEvent(w),w.defaultPrevented||cc(v??document.body,{select:!0}),s.removeEventListener(TS,c),g9.remove(p)},0)}}},[s,l,c,p]);const m=y.useCallback(v=>{if(!n&&!r||p.paused)return;const b=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(b&&w){const x=v.currentTarget,[S,O]=jye(x);S&&O?!v.shiftKey&&w===O?(v.preventDefault(),n&&cc(S,{select:!0})):v.shiftKey&&w===S&&(v.preventDefault(),n&&cc(O,{select:!0})):w===x&&v.preventDefault()}},[n,r,p.paused]);return y.createElement(mw.div,Ki({tabIndex:-1},a,{ref:h,onKeyDown:m}))});function Fye(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(cc(r,{select:t}),document.activeElement!==n)return}function jye(e){const t=WU(e),n=p9(t,e),r=p9(t.reverse(),e);return[n,r]}function WU(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function p9(e,t){for(const n of e)if(!Bye(n,{upTo:t}))return n}function Bye(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function zye(e){return e instanceof HTMLInputElement&&"select"in e}function cc(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&zye(e)&&t&&e.select()}}const g9=Uye();function Uye(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=m9(e,t),e.unshift(t)},remove(t){var n;e=m9(e,t),(n=e[0])===null||n===void 0||n.resume()}}}function m9(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Vye(e){return e.filter(t=>t.tagName!=="A")}const Wye=y.forwardRef((e,t)=>{var n;const{container:r=globalThis==null||(n=globalThis.document)===null||n===void 0?void 0:n.body,...i}=e;return r?jx.createPortal(y.createElement(mw.div,Ki({},i,{ref:t})),r):null}),v9=globalThis?.document?y.useLayoutEffect:()=>{};function Hye(e,t){return y.useReducer((n,r)=>{const i=t[n][r];return i??n},e)}const vw=e=>{const{present:t,children:n}=e,r=Kye(t),i=typeof n=="function"?n({present:r.isPresent}):y.Children.only(n),o=Mm(r.ref,i.ref);return typeof n=="function"||r.isPresent?y.cloneElement(i,{ref:o}):null};vw.displayName="Presence";function Kye(e){const[t,n]=y.useState(),r=y.useRef({}),i=y.useRef(e),o=y.useRef("none"),a=e?"mounted":"unmounted",[s,u]=Hye(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return y.useEffect(()=>{const l=cy(r.current);o.current=s==="mounted"?l:"none"},[s]),v9(()=>{const l=r.current,c=i.current;if(c!==e){const h=o.current,p=cy(l);e?u("MOUNT"):p==="none"||l?.display==="none"?u("UNMOUNT"):u(c&&h!==p?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,u]),v9(()=>{if(t){const l=f=>{const p=cy(r.current).includes(f.animationName);f.target===t&&p&&Au.flushSync(()=>u("ANIMATION_END"))},c=f=>{f.target===t&&(o.current=cy(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:y.useCallback(l=>{l&&(r.current=getComputedStyle(l)),n(l)},[])}}function cy(e){return e?.animationName||"none"}let MS=0;function qye(){y.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=n[0])!==null&&e!==void 0?e:y9()),document.body.insertAdjacentElement("beforeend",(t=n[1])!==null&&t!==void 0?t:y9()),MS++,()=>{MS===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(r=>r.remove()),MS--}},[])}function y9(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var t1="right-scroll-bar-position",n1="width-before-scroll-bar",Gye="with-scroll-bars-hidden",Yye="--removed-body-scroll-bar-size";function RS(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zye(e,t){var n=y.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Xye=typeof window<"u"?y.useLayoutEffect:y.useEffect,b9=new WeakMap;function Qye(e,t){var n=Zye(null,function(r){return e.forEach(function(i){return RS(i,r)})});return Xye(function(){var r=b9.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||RS(s,null)}),o.forEach(function(s){i.has(s)||RS(s,a)})}b9.set(n,e)},[e]),n}var HU=HB(),DS=function(){},yw=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:DS,onWheelCapture:DS,onTouchMoveCapture:DS}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,f=e.shards,h=e.sideCar,p=e.noIsolation,m=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=KO(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),S=h,O=Qye([n,t]),E=Ri(Ri({},x),i);return y.createElement(y.Fragment,null,c&&y.createElement(S,{sideCar:HU,removeScrollBar:l,shards:f,noIsolation:p,inert:m,setCallbacks:o,allowPinchZoom:!!v,lockRef:n}),a?y.cloneElement(y.Children.only(s),Ri(Ri({},E),{ref:O})):y.createElement(w,Ri({},E,{className:u,ref:O}),s))});yw.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yw.classNames={fullWidth:n1,zeroRight:t1};var Jye={left:0,top:0,right:0,gap:0},$S=function(e){return parseInt(e||"",10)||0},e1e=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[$S(n),$S(r),$S(i)]},t1e=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Jye;var t=e1e(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},n1e=qO(),Md="data-scroll-locked",r1e=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),` .`.concat(Gye,` { overflow: hidden `).concat(r,`; padding-right: `).concat(s,"px ").concat(r,`; @@ -146,34 +146,34 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),` } - .`).concat(e1,` { + .`).concat(t1,` { right: `).concat(s,"px ").concat(r,`; } - .`).concat(t1,` { + .`).concat(n1,` { margin-right: `).concat(s,"px ").concat(r,`; } - .`).concat(e1," .").concat(e1,` { + .`).concat(t1," .").concat(t1,` { right: 0 `).concat(r,`; } - .`).concat(t1," .").concat(t1,` { + .`).concat(n1," .").concat(n1,` { margin-right: 0 `).concat(r,`; } body[`).concat(Md,`] { `).concat(Yye,": ").concat(s,`px; } -`)},bD=function(){var e=parseInt(document.body.getAttribute(Md)||"0",10);return isFinite(e)?e:0},i1e=function(){y.useEffect(function(){return document.body.setAttribute(Md,(bD()+1).toString()),function(){var e=bD()-1;e<=0?document.body.removeAttribute(Md):document.body.setAttribute(Md,e.toString())}},[])},o1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;i1e();var o=y.useMemo(function(){return t1e(i)},[i]);return y.createElement(n1e,{styles:r1e(o,!t,i,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var cy=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",cy,cy),window.removeEventListener("test",cy,cy)}catch{wE=!1}var Kf=wE?{passive:!1}:!1,a1e=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},s1e=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},xD=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=HU(e,n);if(r){var i=KU(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},u1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},HU=function(e,t){return e==="v"?a1e(t):s1e(t)},KU=function(e,t){return e==="v"?u1e(t):l1e(t)},c1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},f1e=function(e,t,n,r,i){var o=c1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=KU(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&HU(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},fy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wD=function(e){return[e.deltaX,e.deltaY]},_D=function(e){return e&&"current"in e?e.current:e},d1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h1e=function(e){return` +`)},x9=function(){var e=parseInt(document.body.getAttribute(Md)||"0",10);return isFinite(e)?e:0},i1e=function(){y.useEffect(function(){return document.body.setAttribute(Md,(x9()+1).toString()),function(){var e=x9()-1;e<=0?document.body.removeAttribute(Md):document.body.setAttribute(Md,e.toString())}},[])},o1e=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;i1e();var o=y.useMemo(function(){return t1e(i)},[i]);return y.createElement(n1e,{styles:r1e(o,!t,i,n?"":"!important")})},wE=!1;if(typeof window<"u")try{var fy=Object.defineProperty({},"passive",{get:function(){return wE=!0,!0}});window.addEventListener("test",fy,fy),window.removeEventListener("test",fy,fy)}catch{wE=!1}var Kf=wE?{passive:!1}:!1,a1e=function(e){var t=window.getComputedStyle(e);return t.overflowY!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowY==="visible")},s1e=function(e){var t=window.getComputedStyle(e);return t.overflowX!=="hidden"&&!(t.overflowY===t.overflowX&&t.overflowX==="visible")},w9=function(e,t){var n=t;do{typeof ShadowRoot<"u"&&n instanceof ShadowRoot&&(n=n.host);var r=KU(e,n);if(r){var i=qU(e,n),o=i[1],a=i[2];if(o>a)return!0}n=n.parentNode}while(n&&n!==document.body);return!1},u1e=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},l1e=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},KU=function(e,t){return e==="v"?a1e(t):s1e(t)},qU=function(e,t){return e==="v"?u1e(t):l1e(t)},c1e=function(e,t){return e==="h"&&t==="rtl"?-1:1},f1e=function(e,t,n,r,i){var o=c1e(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,u=t.contains(s),l=!1,c=a>0,f=0,h=0;do{var p=qU(e,s),m=p[0],v=p[1],b=p[2],w=v-b-o*m;(m||w)&&KU(e,s)&&(f+=w,h+=m),s=s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(f===0||!i)||!c&&(h===0||!i))&&(l=!0),l},dy=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},_9=function(e){return[e.deltaX,e.deltaY]},S9=function(e){return e&&"current"in e?e.current:e},d1e=function(e,t){return e[0]===t[0]&&e[1]===t[1]},h1e=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} -`)},p1e=0,qf=[];function g1e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(p1e++)[0],o=y.useState(function(){return qO()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VB([e.lockRef.current],(e.shards||[]).map(_D),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=fy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=xD(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=xD(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return f1e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?wD(b):fy(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&d1e(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(_D).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=fy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,wD(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,fy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Kf),document.addEventListener("touchmove",u,Kf),document.addEventListener("touchstart",c,Kf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Kf),document.removeEventListener("touchmove",u,Kf),document.removeEventListener("touchstart",c,Kf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:h1e(i)}):null,p?y.createElement(o1e,{gapMode:"margin"}):null)}const m1e=KB(WU,g1e);var qU=y.forwardRef(function(e,t){return y.createElement(yw,Ri({},e,{ref:t,sideCar:m1e}))});qU.classNames=yw.classNames;const GU="Dialog",[YU,$Ze]=yye(GU),[v1e,gf]=YU(GU),y1e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Sye({prop:r,defaultProp:i,onChange:o});return y.createElement(v1e,{scope:t,triggerRef:s,contentRef:u,contentId:PS(),titleId:PS(),descriptionId:PS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},ZU="DialogPortal",[b1e,XU]=YU(ZU,{forceMount:void 0}),x1e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=gf(ZU,t);return y.createElement(b1e,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(vw,{present:n||o.open},y.createElement(Wye,{asChild:!0,container:i},a))))},_E="DialogOverlay",w1e=y.forwardRef((e,t)=>{const n=XU(_E,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(_E,e.__scopeDialog);return o.modal?y.createElement(vw,{present:r||o.open},y.createElement(_1e,Ki({},i,{ref:t}))):null}),_1e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gf(_E,n);return y.createElement(qU,{as:SA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(mw.div,Ki({"data-state":JU(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),yg="DialogContent",S1e=y.forwardRef((e,t)=>{const n=XU(yg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(yg,e.__scopeDialog);return y.createElement(vw,{present:r||o.open},o.modal?y.createElement(C1e,Ki({},i,{ref:t})):y.createElement(E1e,Ki({},i,{ref:t})))}),C1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(null),i=Tm(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Sm(o)},[]),y.createElement(QU,Ki({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Td(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Td(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Td(e.onFocusOutside,o=>o.preventDefault())}))}),E1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(!1);return y.createElement(QU,Ki({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),QU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=gf(yg,n),u=y.useRef(null),l=Tm(t,u);return qye(),y.createElement(y.Fragment,null,y.createElement(Lye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement($ye,Ki({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":JU(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function JU(e){return e?"open":"closed"}const O1e=y1e,A1e=x1e,P1e=w1e,k1e=S1e;var T1e='[cmdk-list-sizer=""]',jp='[cmdk-group=""]',IS='[cmdk-group-items=""]',M1e='[cmdk-group-heading=""]',EA='[cmdk-item=""]',SD=`${EA}:not([aria-disabled="true"])`,SE="cmdk-item-select",Qs="data-value",R1e=(e,t)=>mye(e,t),eV=y.createContext(void 0),Mm=()=>y.useContext(eV),tV=y.createContext(void 0),OA=()=>y.useContext(tV),nV=y.createContext(void 0),rV=y.forwardRef((e,t)=>{let n=y.useRef(null),r=td(()=>{var Y,oe,Q;return{search:"",value:(Q=(oe=e.value)!=null?oe:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=td(()=>new Set),o=td(()=>new Map),a=td(()=>new Map),s=td(()=>new Set),u=iV(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=V1e();Bh(()=>{if(f!==void 0){let Y=f.trim().toLowerCase();r.current.value=Y,O(6,H),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:Y=>(s.current.add(Y),()=>s.current.delete(Y)),snapshot:()=>r.current,setState:(Y,oe,Q)=>{var J,ue,de;if(!Object.is(r.current[Y],oe)){if(r.current[Y]=oe,Y==="search")z(),M(),O(1,N);else if(Y==="value")if(((J=u.current)==null?void 0:J.value)!==void 0){let Se=oe??"";(de=(ue=u.current).onValueChange)==null||de.call(ue,Se);return}else Q||O(5,H);E.emit()}},emit:()=>{s.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,oe)=>{oe!==a.current.get(Y)&&(a.current.set(Y,oe),r.current.filtered.items.set(Y,k(oe)),O(2,()=>{M(),E.emit()}))},item:(Y,oe)=>(i.current.add(Y),oe&&(o.current.has(oe)?o.current.get(oe).add(Y):o.current.set(oe,new Set([Y]))),O(3,()=>{z(),M(),r.current.value||N(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=V();O(4,()=>{z(),Q?.getAttribute("id")===Y&&N(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(Y){var oe,Q;let J=(Q=(oe=u.current)==null?void 0:oe.filter)!=null?Q:R1e;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Y=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(J=>{let ue=o.current.get(J),de=0;ue.forEach(Se=>{let me=Y.get(Se);de=Math.max(me,de)}),oe.push([J,de])});let Q=n.current.querySelector(T1e);ne().sort((J,ue)=>{var de,Se;let me=J.getAttribute(Qs),Ze=ue.getAttribute(Qs);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(me))!=null?Se:0)}).forEach(J=>{let ue=J.closest(IS);ue?ue.appendChild(J.parentElement===ue?J:J.closest(`${IS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${IS} > *`))}),oe.sort((J,ue)=>ue[1]-J[1]).forEach(J=>{let ue=n.current.querySelector(`${jp}[${Qs}="${J[0]}"]`);ue?.parentElement.appendChild(ue)})}function N(){let Y=ne().find(Q=>!Q.ariaDisabled),oe=Y?.getAttribute(Qs);E.setState("value",oe||void 0)}function z(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let oe of i.current){let Q=a.current.get(oe),J=k(Q);r.current.filtered.items.set(oe,J),J>0&&Y++}for(let[oe,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=Y}function H(){var Y,oe,Q;let J=V();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(oe=J.closest(jp))==null?void 0:oe.querySelector(M1e))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function V(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${EA}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(SD))}function Z(Y){let oe=ne()[Y];oe&&E.setState("value",oe.getAttribute(Qs))}function G(Y){var oe;let Q=V(),J=ne(),ue=J.findIndex(Se=>Se===Q),de=J[ue+Y];(oe=u.current)!=null&&oe.loop&&(de=ue+Y<0?J[J.length-1]:ue+Y===J.length?J[0]:J[ue+Y]),de&&E.setState("value",de.getAttribute(Qs))}function q(Y){let oe=V(),Q=oe?.closest(jp),J;for(;Q&&!J;)Q=Y>0?z1e(Q,jp):U1e(Q,jp),J=Q?.querySelector(SD);J?E.setState("value",J.getAttribute(Qs)):G(Y)}let W=()=>Z(ne().length-1),j=Y=>{Y.preventDefault(),Y.metaKey?W():Y.altKey?q(1):G(1)},K=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?q(-1):G(-1)};return y.createElement("div",{ref:Rm([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{v&&Y.ctrlKey&&j(Y);break}case"ArrowDown":{j(Y);break}case"p":case"k":{v&&Y.ctrlKey&&K(Y);break}case"ArrowUp":{K(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),W();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=V();if(Q){let J=new Event(SE);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:W1e},l),y.createElement(tV.Provider,{value:E},y.createElement(eV.Provider,{value:C},c)))}),D1e=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(nV),s=Mm(),u=iV(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Bh(()=>s.item(i,a?.id),[]);let c=oV(i,o,[e.value,e.children,o]),f=OA(),h=Jc(E=>E.value&&E.value===c.current),p=Jc(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(SE,m),()=>E.removeEventListener(SE,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Rm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),$1e=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Mm(),f=Jc(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Bh(()=>c.group(a),[]),oV(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(nV.Provider,{value:h},r);return y.createElement("div",{ref:Rm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),I1e=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Jc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Rm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),N1e=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=OA(),a=Jc(c=>c.search),s=Jc(c=>c.value),u=Mm(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${EA}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),L1e=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Mm();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Rm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),F1e=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(O1e,{open:n,onOpenChange:r},y.createElement(A1e,{container:a},y.createElement(P1e,{"cmdk-overlay":"",className:i}),y.createElement(k1e,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(rV,{ref:t,...s}))))}),j1e=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Jc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),B1e=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),IZe=Object.assign(rV,{List:L1e,Item:D1e,Input:N1e,Group:$1e,Separator:I1e,Dialog:F1e,Empty:j1e,Loading:B1e});function z1e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function U1e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function iV(e){let t=y.useRef(e);return Bh(()=>{t.current=e}),t}var Bh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function td(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Rm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Jc(e){let t=OA(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function oV(e,t,n){let r=y.useRef(),i=Mm();return Bh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var V1e=()=>{let[e,t]=y.useState(),n=td(()=>new Map);return Bh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},W1e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** +`)},p1e=0,qf=[];function g1e(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(p1e++)[0],o=y.useState(function(){return qO()})[0],a=y.useRef(e);y.useEffect(function(){a.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=WB([e.lockRef.current],(e.shards||[]).map(S9),!0).filter(Boolean);return v.forEach(function(b){return b.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(b){return b.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=y.useCallback(function(v,b){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=dy(v),x=n.current,S="deltaX"in v?v.deltaX:x[0]-w[0],O="deltaY"in v?v.deltaY:x[1]-w[1],E,C=v.target,k=Math.abs(S)>Math.abs(O)?"h":"v";if("touches"in v&&k==="h"&&C.type==="range")return!1;var M=w9(k,C);if(!M)return!0;if(M?E=k:(E=k==="v"?"h":"v",M=w9(k,C)),!M)return!1;if(!r.current&&"changedTouches"in v&&(S||O)&&(r.current=E),!E)return!0;var N=r.current||E;return f1e(N,b,v,N==="h"?S:O,!0)},[]),u=y.useCallback(function(v){var b=v;if(!(!qf.length||qf[qf.length-1]!==o)){var w="deltaY"in b?_9(b):dy(b),x=t.current.filter(function(E){return E.name===b.type&&E.target===b.target&&d1e(E.delta,w)})[0];if(x&&x.should){b.preventDefault();return}if(!x){var S=(a.current.shards||[]).map(S9).filter(Boolean).filter(function(E){return E.contains(b.target)}),O=S.length>0?s(b,S[0]):!a.current.noIsolation;O&&b.preventDefault()}}},[]),l=y.useCallback(function(v,b,w,x){var S={name:v,delta:b,target:w,should:x};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(O){return O!==S})},1)},[]),c=y.useCallback(function(v){n.current=dy(v),r.current=void 0},[]),f=y.useCallback(function(v){l(v.type,_9(v),v.target,s(v,e.lockRef.current))},[]),h=y.useCallback(function(v){l(v.type,dy(v),v.target,s(v,e.lockRef.current))},[]);y.useEffect(function(){return qf.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",u,Kf),document.addEventListener("touchmove",u,Kf),document.addEventListener("touchstart",c,Kf),function(){qf=qf.filter(function(v){return v!==o}),document.removeEventListener("wheel",u,Kf),document.removeEventListener("touchmove",u,Kf),document.removeEventListener("touchstart",c,Kf)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(o,{styles:h1e(i)}):null,p?y.createElement(o1e,{gapMode:"margin"}):null)}const m1e=qB(HU,g1e);var GU=y.forwardRef(function(e,t){return y.createElement(yw,Ri({},e,{ref:t,sideCar:m1e}))});GU.classNames=yw.classNames;const YU="Dialog",[ZU,IZe]=yye(YU),[v1e,gf]=ZU(YU),y1e=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=y.useRef(null),u=y.useRef(null),[l=!1,c]=Sye({prop:r,defaultProp:i,onChange:o});return y.createElement(v1e,{scope:t,triggerRef:s,contentRef:u,contentId:PS(),titleId:PS(),descriptionId:PS(),open:l,onOpenChange:c,onOpenToggle:y.useCallback(()=>c(f=>!f),[c]),modal:a},n)},XU="DialogPortal",[b1e,QU]=ZU(XU,{forceMount:void 0}),x1e=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=gf(XU,t);return y.createElement(b1e,{scope:t,forceMount:n},y.Children.map(r,a=>y.createElement(vw,{present:n||o.open},y.createElement(Wye,{asChild:!0,container:i},a))))},_E="DialogOverlay",w1e=y.forwardRef((e,t)=>{const n=QU(_E,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(_E,e.__scopeDialog);return o.modal?y.createElement(vw,{present:r||o.open},y.createElement(_1e,Ki({},i,{ref:t}))):null}),_1e=y.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=gf(_E,n);return y.createElement(GU,{as:SA,allowPinchZoom:!0,shards:[i.contentRef]},y.createElement(mw.div,Ki({"data-state":eV(i.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),yg="DialogContent",S1e=y.forwardRef((e,t)=>{const n=QU(yg,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=gf(yg,e.__scopeDialog);return y.createElement(vw,{present:r||o.open},o.modal?y.createElement(C1e,Ki({},i,{ref:t})):y.createElement(E1e,Ki({},i,{ref:t})))}),C1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(null),i=Mm(t,n.contentRef,r);return y.useEffect(()=>{const o=r.current;if(o)return Cm(o)},[]),y.createElement(JU,Ki({},e,{ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Td(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Td(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Td(e.onFocusOutside,o=>o.preventDefault())}))}),E1e=y.forwardRef((e,t)=>{const n=gf(yg,e.__scopeDialog),r=y.useRef(!1);return y.createElement(JU,Ki({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var o;if((o=e.onCloseAutoFocus)===null||o===void 0||o.call(e,i),!i.defaultPrevented){var a;r.current||(a=n.triggerRef.current)===null||a===void 0||a.focus(),i.preventDefault()}r.current=!1},onInteractOutside:i=>{var o,a;(o=e.onInteractOutside)===null||o===void 0||o.call(e,i),i.defaultPrevented||(r.current=!0);const s=i.target;((a=n.triggerRef.current)===null||a===void 0?void 0:a.contains(s))&&i.preventDefault()}}))}),JU=y.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=gf(yg,n),u=y.useRef(null),l=Mm(t,u);return qye(),y.createElement(y.Fragment,null,y.createElement(Lye,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o},y.createElement($ye,Ki({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eV(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)});function eV(e){return e?"open":"closed"}const O1e=y1e,A1e=x1e,P1e=w1e,k1e=S1e;var T1e='[cmdk-list-sizer=""]',jp='[cmdk-group=""]',IS='[cmdk-group-items=""]',M1e='[cmdk-group-heading=""]',EA='[cmdk-item=""]',C9=`${EA}:not([aria-disabled="true"])`,SE="cmdk-item-select",Qs="data-value",R1e=(e,t)=>mye(e,t),tV=y.createContext(void 0),Rm=()=>y.useContext(tV),nV=y.createContext(void 0),OA=()=>y.useContext(nV),rV=y.createContext(void 0),iV=y.forwardRef((e,t)=>{let n=y.useRef(null),r=td(()=>{var Y,oe,Q;return{search:"",value:(Q=(oe=e.value)!=null?oe:(Y=e.defaultValue)==null?void 0:Y.toLowerCase())!=null?Q:"",filtered:{count:0,items:new Map,groups:new Set}}}),i=td(()=>new Set),o=td(()=>new Map),a=td(()=>new Map),s=td(()=>new Set),u=oV(e),{label:l,children:c,value:f,onValueChange:h,filter:p,shouldFilter:m,vimBindings:v=!0,...b}=e,w=y.useId(),x=y.useId(),S=y.useId(),O=V1e();Bh(()=>{if(f!==void 0){let Y=f.trim().toLowerCase();r.current.value=Y,O(6,H),E.emit()}},[f]);let E=y.useMemo(()=>({subscribe:Y=>(s.current.add(Y),()=>s.current.delete(Y)),snapshot:()=>r.current,setState:(Y,oe,Q)=>{var J,ue,de;if(!Object.is(r.current[Y],oe)){if(r.current[Y]=oe,Y==="search")z(),M(),O(1,N);else if(Y==="value")if(((J=u.current)==null?void 0:J.value)!==void 0){let Se=oe??"";(de=(ue=u.current).onValueChange)==null||de.call(ue,Se);return}else Q||O(5,H);E.emit()}},emit:()=>{s.current.forEach(Y=>Y())}}),[]),C=y.useMemo(()=>({value:(Y,oe)=>{oe!==a.current.get(Y)&&(a.current.set(Y,oe),r.current.filtered.items.set(Y,k(oe)),O(2,()=>{M(),E.emit()}))},item:(Y,oe)=>(i.current.add(Y),oe&&(o.current.has(oe)?o.current.get(oe).add(Y):o.current.set(oe,new Set([Y]))),O(3,()=>{z(),M(),r.current.value||N(),E.emit()}),()=>{a.current.delete(Y),i.current.delete(Y),r.current.filtered.items.delete(Y);let Q=V();O(4,()=>{z(),Q?.getAttribute("id")===Y&&N(),E.emit()})}),group:Y=>(o.current.has(Y)||o.current.set(Y,new Set),()=>{a.current.delete(Y),o.current.delete(Y)}),filter:()=>u.current.shouldFilter,label:l||e["aria-label"],commandRef:n,listId:w,inputId:S,labelId:x}),[]);function k(Y){var oe,Q;let J=(Q=(oe=u.current)==null?void 0:oe.filter)!=null?Q:R1e;return Y?J(Y,r.current.search):0}function M(){if(!n.current||!r.current.search||u.current.shouldFilter===!1)return;let Y=r.current.filtered.items,oe=[];r.current.filtered.groups.forEach(J=>{let ue=o.current.get(J),de=0;ue.forEach(Se=>{let me=Y.get(Se);de=Math.max(me,de)}),oe.push([J,de])});let Q=n.current.querySelector(T1e);ne().sort((J,ue)=>{var de,Se;let me=J.getAttribute(Qs),Ze=ue.getAttribute(Qs);return((de=Y.get(Ze))!=null?de:0)-((Se=Y.get(me))!=null?Se:0)}).forEach(J=>{let ue=J.closest(IS);ue?ue.appendChild(J.parentElement===ue?J:J.closest(`${IS} > *`)):Q.appendChild(J.parentElement===Q?J:J.closest(`${IS} > *`))}),oe.sort((J,ue)=>ue[1]-J[1]).forEach(J=>{let ue=n.current.querySelector(`${jp}[${Qs}="${J[0]}"]`);ue?.parentElement.appendChild(ue)})}function N(){let Y=ne().find(Q=>!Q.ariaDisabled),oe=Y?.getAttribute(Qs);E.setState("value",oe||void 0)}function z(){if(!r.current.search||u.current.shouldFilter===!1){r.current.filtered.count=i.current.size;return}r.current.filtered.groups=new Set;let Y=0;for(let oe of i.current){let Q=a.current.get(oe),J=k(Q);r.current.filtered.items.set(oe,J),J>0&&Y++}for(let[oe,Q]of o.current)for(let J of Q)if(r.current.filtered.items.get(J)>0){r.current.filtered.groups.add(oe);break}r.current.filtered.count=Y}function H(){var Y,oe,Q;let J=V();J&&(((Y=J.parentElement)==null?void 0:Y.firstChild)===J&&((Q=(oe=J.closest(jp))==null?void 0:oe.querySelector(M1e))==null||Q.scrollIntoView({block:"nearest"})),J.scrollIntoView({block:"nearest"}))}function V(){var Y;return(Y=n.current)==null?void 0:Y.querySelector(`${EA}[aria-selected="true"]`)}function ne(){return Array.from(n.current.querySelectorAll(C9))}function Z(Y){let oe=ne()[Y];oe&&E.setState("value",oe.getAttribute(Qs))}function G(Y){var oe;let Q=V(),J=ne(),ue=J.findIndex(Se=>Se===Q),de=J[ue+Y];(oe=u.current)!=null&&oe.loop&&(de=ue+Y<0?J[J.length-1]:ue+Y===J.length?J[0]:J[ue+Y]),de&&E.setState("value",de.getAttribute(Qs))}function q(Y){let oe=V(),Q=oe?.closest(jp),J;for(;Q&&!J;)Q=Y>0?z1e(Q,jp):U1e(Q,jp),J=Q?.querySelector(C9);J?E.setState("value",J.getAttribute(Qs)):G(Y)}let W=()=>Z(ne().length-1),j=Y=>{Y.preventDefault(),Y.metaKey?W():Y.altKey?q(1):G(1)},K=Y=>{Y.preventDefault(),Y.metaKey?Z(0):Y.altKey?q(-1):G(-1)};return y.createElement("div",{ref:Dm([n,t]),...b,"cmdk-root":"",onKeyDown:Y=>{var oe;if((oe=b.onKeyDown)==null||oe.call(b,Y),!Y.defaultPrevented)switch(Y.key){case"n":case"j":{v&&Y.ctrlKey&&j(Y);break}case"ArrowDown":{j(Y);break}case"p":case"k":{v&&Y.ctrlKey&&K(Y);break}case"ArrowUp":{K(Y);break}case"Home":{Y.preventDefault(),Z(0);break}case"End":{Y.preventDefault(),W();break}case"Enter":if(!Y.nativeEvent.isComposing){Y.preventDefault();let Q=V();if(Q){let J=new Event(SE);Q.dispatchEvent(J)}}}}},y.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:W1e},l),y.createElement(nV.Provider,{value:E},y.createElement(tV.Provider,{value:C},c)))}),D1e=y.forwardRef((e,t)=>{var n,r;let i=y.useId(),o=y.useRef(null),a=y.useContext(rV),s=Rm(),u=oV(e),l=(r=(n=u.current)==null?void 0:n.forceMount)!=null?r:a?.forceMount;Bh(()=>s.item(i,a?.id),[]);let c=aV(i,o,[e.value,e.children,o]),f=OA(),h=Jc(E=>E.value&&E.value===c.current),p=Jc(E=>l||s.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);y.useEffect(()=>{let E=o.current;if(!(!E||e.disabled))return E.addEventListener(SE,m),()=>E.removeEventListener(SE,m)},[p,e.onSelect,e.disabled]);function m(){var E,C;v(),(C=(E=u.current).onSelect)==null||C.call(E,c.current)}function v(){f.setState("value",c.current,!0)}if(!p)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,...O}=e;return y.createElement("div",{ref:Dm([o,t]),...O,id:i,"cmdk-item":"",role:"option","aria-disabled":b||void 0,"aria-selected":h||void 0,"data-disabled":b||void 0,"data-selected":h||void 0,onPointerMove:b?void 0:v,onClick:b?void 0:m},e.children)}),$1e=y.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...o}=e,a=y.useId(),s=y.useRef(null),u=y.useRef(null),l=y.useId(),c=Rm(),f=Jc(m=>i||c.filter()===!1?!0:m.search?m.filtered.groups.has(a):!0);Bh(()=>c.group(a),[]),aV(a,s,[e.value,e.heading,u]);let h=y.useMemo(()=>({id:a,forceMount:i}),[i]),p=y.createElement(rV.Provider,{value:h},r);return y.createElement("div",{ref:Dm([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&y.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),y.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},p))}),I1e=y.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=y.useRef(null),o=Jc(a=>!a.search);return!n&&!o?null:y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-separator":"",role:"separator"})}),N1e=y.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,o=OA(),a=Jc(c=>c.search),s=Jc(c=>c.value),u=Rm(),l=y.useMemo(()=>{var c;let f=(c=u.commandRef.current)==null?void 0:c.querySelector(`${EA}[${Qs}="${s}"]`);return f?.getAttribute("id")},[s,u.commandRef]);return y.useEffect(()=>{e.value!=null&&o.setState("search",e.value)},[e.value]),y.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||o.setState("search",c.target.value),n?.(c.target.value)}})}),L1e=y.forwardRef((e,t)=>{let{children:n,...r}=e,i=y.useRef(null),o=y.useRef(null),a=Rm();return y.useEffect(()=>{if(o.current&&i.current){let s=o.current,u=i.current,l,c=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let f=s.offsetHeight;u.style.setProperty("--cmdk-list-height",f.toFixed(1)+"px")})});return c.observe(s),()=>{cancelAnimationFrame(l),c.unobserve(s)}}},[]),y.createElement("div",{ref:Dm([i,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:a.listId,"aria-labelledby":a.inputId},y.createElement("div",{ref:o,"cmdk-list-sizer":""},n))}),F1e=y.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:o,container:a,...s}=e;return y.createElement(O1e,{open:n,onOpenChange:r},y.createElement(A1e,{container:a},y.createElement(P1e,{"cmdk-overlay":"",className:i}),y.createElement(k1e,{"aria-label":e.label,"cmdk-dialog":"",className:o},y.createElement(iV,{ref:t,...s}))))}),j1e=y.forwardRef((e,t)=>{let n=y.useRef(!0),r=Jc(i=>i.filtered.count===0);return y.useEffect(()=>{n.current=!1},[]),n.current||!r?null:y.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),B1e=y.forwardRef((e,t)=>{let{progress:n,children:r,...i}=e;return y.createElement("div",{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},y.createElement("div",{"aria-hidden":!0},r))}),NZe=Object.assign(iV,{List:L1e,Item:D1e,Input:N1e,Group:$1e,Separator:I1e,Dialog:F1e,Empty:j1e,Loading:B1e});function z1e(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function U1e(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oV(e){let t=y.useRef(e);return Bh(()=>{t.current=e}),t}var Bh=typeof window>"u"?y.useEffect:y.useLayoutEffect;function td(e){let t=y.useRef();return t.current===void 0&&(t.current=e()),t}function Dm(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Jc(e){let t=OA(),n=()=>e(t.snapshot());return y.useSyncExternalStore(t.subscribe,n,n)}function aV(e,t,n){let r=y.useRef(),i=Rm();return Bh(()=>{var o;let a=(()=>{var s;for(let u of n){if(typeof u=="string")return u.trim().toLowerCase();if(typeof u=="object"&&"current"in u)return u.current?(s=u.current.textContent)==null?void 0:s.trim().toLowerCase():r.current}})();i.value(e,a),(o=t.current)==null||o.setAttribute(Qs,a),r.current=a}),r}var V1e=()=>{let[e,t]=y.useState(),n=td(()=>new Map);return Bh(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}},W1e={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const H1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),aV=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** + */const H1e=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),sV=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. @@ -183,212 +183,212 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const q1e=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...K1e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:aV("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** + */const q1e=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},u)=>y.createElement("svg",{ref:u,...K1e,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:sV("lucide",i),...s},[...a.map(([l,c])=>y.createElement(l,c)),...Array.isArray(o)?o:[o]]));/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const en=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(q1e,{ref:o,iconNode:t,className:aV(`lucide-${H1e(e)}`,r),...i}));return n.displayName=`${e}`,n};/** + */const en=(e,t)=>{const n=y.forwardRef(({className:r,...i},o)=>y.createElement(q1e,{ref:o,iconNode:t,className:sV(`lucide-${H1e(e)}`,r),...i}));return n.displayName=`${e}`,n};/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const NZe=en("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** + */const LZe=en("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const LZe=en("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** + */const FZe=en("ArrowDownToLine",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const FZe=en("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** + */const jZe=en("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const jZe=en("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** + */const BZe=en("ArrowUpDown",[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const BZe=en("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** + */const zZe=en("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const zZe=en("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** + */const UZe=en("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const UZe=en("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** + */const VZe=en("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const VZe=en("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** + */const WZe=en("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const WZe=en("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** + */const HZe=en("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const HZe=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** + */const KZe=en("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const KZe=en("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** + */const qZe=en("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const qZe=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** + */const GZe=en("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const GZe=en("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** + */const YZe=en("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const YZe=en("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** + */const ZZe=en("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const ZZe=en("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** + */const XZe=en("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const XZe=en("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** + */const QZe=en("CirclePlus",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const QZe=en("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** + */const JZe=en("ClipboardCopy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const JZe=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** + */const eXe=en("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const eXe=en("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** + */const tXe=en("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const tXe=en("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** + */const nXe=en("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const nXe=en("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** + */const rXe=en("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const rXe=en("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** + */const iXe=en("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const iXe=en("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** + */const oXe=en("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const oXe=en("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** + */const aXe=en("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const aXe=en("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** + */const sXe=en("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const sXe=en("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** + */const uXe=en("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const uXe=en("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** + */const lXe=en("MessagesSquare",[["path",{d:"M14 9a2 2 0 0 1-2 2H6l-4 4V4c0-1.1.9-2 2-2h8a2 2 0 0 1 2 2z",key:"jj09z8"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1",key:"1cx29u"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const lXe=en("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** + */const cXe=en("Network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const cXe=en("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** + */const fXe=en("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const fXe=en("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** + */const dXe=en("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const dXe=en("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** + */const hXe=en("RotateCw",[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const hXe=en("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** + */const pXe=en("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const pXe=en("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** + */const gXe=en("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const gXe=en("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** + */const mXe=en("ShieldBan",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m4.243 5.21 14.39 12.472",key:"1c9a7c"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const mXe=en("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** + */const vXe=en("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const vXe=en("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** + */const yXe=en("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const yXe=en("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** + */const bXe=en("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const bXe=en("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** + */const xXe=en("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const xXe=en("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** + */const wXe=en("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** * @license lucide-react v0.399.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const wXe=en("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);var G1e=["title"],Y1e=["title"];function cb(){return cb=Object.assign||function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z1e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var _Xe=function(t){var n=t.title,r=sV(t,G1e);return F.createElement("svg",cb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},SXe=function(t){var n=t.title,r=sV(t,Y1e);return F.createElement("svg",cb({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("g",{fill:"#FFF"},F.createElement("path",{d:"M0 0h513v341.3H0V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),F.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),F.createElement("g",{fill:"#D80027"},F.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},AA="Avatar",[X1e,CXe]=vi(AA),[Q1e,uV]=X1e(AA),lV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(Q1e,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});lV.displayName=AA;var cV="AvatarImage",fV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=uV(cV,n),s=J1e(r,o.referrerPolicy),u=Vr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});fV.displayName=cV;var dV="AvatarFallback",hV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=uV(dV,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});hV.displayName=dV;function J1e(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var EXe=lV,OXe=fV,AXe=hV,ebe=Array.isArray,vo=ebe,tbe=typeof la=="object"&&la&&la.Object===Object&&la,pV=tbe,nbe=pV,rbe=typeof self=="object"&&self&&self.Object===Object&&self,ibe=nbe||rbe||Function("return this")(),Ds=ibe,obe=Ds,abe=obe.Symbol,Dm=abe,CD=Dm,gV=Object.prototype,sbe=gV.hasOwnProperty,ube=gV.toString,Bp=CD?CD.toStringTag:void 0;function lbe(e){var t=sbe.call(e,Bp),n=e[Bp];try{e[Bp]=void 0;var r=!0}catch{}var i=ube.call(e);return r&&(t?e[Bp]=n:delete e[Bp]),i}var cbe=lbe,fbe=Object.prototype,dbe=fbe.toString;function hbe(e){return dbe.call(e)}var pbe=hbe,ED=Dm,gbe=cbe,mbe=pbe,vbe="[object Null]",ybe="[object Undefined]",OD=ED?ED.toStringTag:void 0;function bbe(e){return e==null?e===void 0?ybe:vbe:OD&&OD in Object(e)?gbe(e):mbe(e)}var Tu=bbe;function xbe(e){return e!=null&&typeof e=="object"}var Mu=xbe,wbe=Tu,_be=Mu,Sbe="[object Symbol]";function Cbe(e){return typeof e=="symbol"||_be(e)&&wbe(e)==Sbe}var zh=Cbe,Ebe=vo,Obe=zh,Abe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Pbe=/^\w*$/;function kbe(e,t){if(Ebe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Obe(e)?!0:Pbe.test(e)||!Abe.test(e)||t!=null&&e in Object(t)}var PA=kbe;function Tbe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ul=Tbe;const Uh=Pn(Ul);var Mbe=Tu,Rbe=Ul,Dbe="[object AsyncFunction]",$be="[object Function]",Ibe="[object GeneratorFunction]",Nbe="[object Proxy]";function Lbe(e){if(!Rbe(e))return!1;var t=Mbe(e);return t==$be||t==Ibe||t==Dbe||t==Nbe}var kA=Lbe;const Wt=Pn(kA);var Fbe=Ds,jbe=Fbe["__core-js_shared__"],Bbe=jbe,NS=Bbe,AD=function(){var e=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function zbe(e){return!!AD&&AD in e}var Ube=zbe,Vbe=Function.prototype,Wbe=Vbe.toString;function Hbe(e){if(e!=null){try{return Wbe.call(e)}catch{}try{return e+""}catch{}}return""}var mV=Hbe,Kbe=kA,qbe=Ube,Gbe=Ul,Ybe=mV,Zbe=/[\\^$.*+?()[\]{}|]/g,Xbe=/^\[object .+?Constructor\]$/,Qbe=Function.prototype,Jbe=Object.prototype,exe=Qbe.toString,txe=Jbe.hasOwnProperty,nxe=RegExp("^"+exe.call(txe).replace(Zbe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function rxe(e){if(!Gbe(e)||qbe(e))return!1;var t=Kbe(e)?nxe:Xbe;return t.test(Ybe(e))}var ixe=rxe;function oxe(e,t){return e?.[t]}var axe=oxe,sxe=ixe,uxe=axe;function lxe(e,t){var n=uxe(e,t);return sxe(n)?n:void 0}var mf=lxe,cxe=mf,fxe=cxe(Object,"create"),bw=fxe,PD=bw;function dxe(){this.__data__=PD?PD(null):{},this.size=0}var hxe=dxe;function pxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var gxe=pxe,mxe=bw,vxe="__lodash_hash_undefined__",yxe=Object.prototype,bxe=yxe.hasOwnProperty;function xxe(e){var t=this.__data__;if(mxe){var n=t[e];return n===vxe?void 0:n}return bxe.call(t,e)?t[e]:void 0}var wxe=xxe,_xe=bw,Sxe=Object.prototype,Cxe=Sxe.hasOwnProperty;function Exe(e){var t=this.__data__;return _xe?t[e]!==void 0:Cxe.call(t,e)}var Oxe=Exe,Axe=bw,Pxe="__lodash_hash_undefined__";function kxe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Axe&&t===void 0?Pxe:t,this}var Txe=kxe,Mxe=hxe,Rxe=gxe,Dxe=wxe,$xe=Oxe,Ixe=Txe;function Vh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Qxe=Xxe,Jxe=xw;function ewe(e,t){var n=this.__data__,r=Jxe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var twe=ewe,nwe=Fxe,rwe=Kxe,iwe=Yxe,owe=Qxe,awe=twe;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X1e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}var SXe=function(t){var n=t.title,r=AA(t,G1e);return F.createElement("svg",bg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#D80027",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"m226.8 239.2-9.7-15.6-17.9 4.4 11.9-14.1-9.7-15.6 17.1 6.9 11.8-14.1-1.3 18.4 17.1 6.9-17.9 4.4zM290.6 82l-10.1 15.4 11.6 14.3-17.7-4.8-10.1 15.5-1-18.4-17.7-4.8 17.2-6.6-1-18.4 11.6 14.3zm-54.4-56.6-2 18.3 16.8 7.6-18 3.8-2 18.3-9.2-16-17.9 3.8 12.3-13.7-9.2-15.9 16.8 7.5zm56.6 136.4-14.9 10.9 5.8 17.5-14.9-10.8-14.9 11 5.6-17.6-14.9-10.7 18.4-.1 5.6-17.6 5.8 17.5zM115 46.3l17.3 53.5h56.2l-45.4 32.9 17.3 53.5-45.4-33-45.5 33 17.4-53.5-45.5-32.9h56.3z",fill:"#FFDA44"}))},CXe=function(t){var n=t.title,r=AA(t,Y1e);return F.createElement("svg",bg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("g",{fill:"#FFF"},F.createElement("path",{d:"M0 0h513v341.3H0V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zM200.3 111.3 0 0v31.5l143.7 79.8h56.6z"})),F.createElement("path",{d:"M393.8 230 513 295.7V230H393.8zm-82.1 0L513 341.3v-31.5L369.3 230h-57.6zm146.9 111.3-147-81.7v81.7h147zM90.3 230 0 280.2V230h90.3zm110 14.2v97.2H25.5l174.8-97.2zm-82.1-132.9L0 45.6v65.7h118.2zm82.1 0L0 0v31.5l143.7 79.8h56.6zM53.4 0l147 81.7V0h-147zm368.3 111.3L513 61.1v50.2h-91.3zm-110-14.2V0h174.9L311.7 97.1z",fill:"#0052B4"}),F.createElement("g",{fill:"#D80027"},F.createElement("path",{d:"M288 0h-64v138.7H0v64h224v138.7h64V202.7h224v-64H288V0z"}),F.createElement("path",{d:"M311.7 230 513 341.3v-31.5L369.3 230h-57.6zm-168 0L0 309.9v31.5L200.3 230h-56.6zm56.6-118.7L0 0v31.5l143.7 79.8h56.6zm168 0L513 31.5V0L311.7 111.3h56.6z"})))},EXe=function(t){var n=t.title,r=AA(t,Z1e);return F.createElement("svg",bg({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 513 342"},r),n&&F.createElement("title",null,n),F.createElement("path",{fill:"#91DC5A",d:"M0 0h513v342H0z"}),F.createElement("path",{fill:"#FFF",d:"M0 0h513v342H0z"}),F.createElement("path",{d:"M0 0h513v57.188H0zm0 284.1h513v57.177H0z",fill:"#0052B4"}),F.createElement("path",{fill:"#D80027",d:"M0 79.9h513v181.582H0z"}),F.createElement("circle",{fill:"#FFF",cx:190.33,cy:171,r:65.668}),F.createElement("path",{fill:"#D80027",d:"m190.3 105 14.8 45.3h47.7l-38.6 28.1 14.8 45.5-38.7-28.2-38.6 28.1 14.8-45.4-38.6-28.1h47.7z"}))},PA="Avatar",[Q1e,OXe]=vi(PA),[J1e,uV]=Q1e(PA),lV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=y.useState("idle");return I.jsx(J1e,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:I.jsx(pt.span,{...r,ref:t})})});lV.displayName=PA;var cV="AvatarImage",fV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=uV(cV,n),s=ebe(r,o.referrerPolicy),u=Vr(l=>{i(l),a.onImageLoadingStatusChange(l)});return ii(()=>{s!=="idle"&&u(s)},[s,u]),s==="loaded"?I.jsx(pt.img,{...o,ref:t,src:r}):null});fV.displayName=cV;var dV="AvatarFallback",hV=y.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=uV(dV,n),[a,s]=y.useState(r===void 0);return y.useEffect(()=>{if(r!==void 0){const u=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(u)}},[r]),a&&o.imageLoadingStatus!=="loaded"?I.jsx(pt.span,{...i,ref:t}):null});hV.displayName=dV;function ebe(e,t){const[n,r]=y.useState("idle");return ii(()=>{if(!e){r("error");return}let i=!0;const o=new window.Image,a=s=>()=>{i&&r(s)};return r("loading"),o.onload=a("loaded"),o.onerror=a("error"),o.src=e,t&&(o.referrerPolicy=t),()=>{i=!1}},[e,t]),n}var AXe=lV,PXe=fV,kXe=hV,tbe=Array.isArray,vo=tbe,nbe=typeof la=="object"&&la&&la.Object===Object&&la,pV=nbe,rbe=pV,ibe=typeof self=="object"&&self&&self.Object===Object&&self,obe=rbe||ibe||Function("return this")(),Ds=obe,abe=Ds,sbe=abe.Symbol,$m=sbe,E9=$m,gV=Object.prototype,ube=gV.hasOwnProperty,lbe=gV.toString,Bp=E9?E9.toStringTag:void 0;function cbe(e){var t=ube.call(e,Bp),n=e[Bp];try{e[Bp]=void 0;var r=!0}catch{}var i=lbe.call(e);return r&&(t?e[Bp]=n:delete e[Bp]),i}var fbe=cbe,dbe=Object.prototype,hbe=dbe.toString;function pbe(e){return hbe.call(e)}var gbe=pbe,O9=$m,mbe=fbe,vbe=gbe,ybe="[object Null]",bbe="[object Undefined]",A9=O9?O9.toStringTag:void 0;function xbe(e){return e==null?e===void 0?bbe:ybe:A9&&A9 in Object(e)?mbe(e):vbe(e)}var Tu=xbe;function wbe(e){return e!=null&&typeof e=="object"}var Mu=wbe,_be=Tu,Sbe=Mu,Cbe="[object Symbol]";function Ebe(e){return typeof e=="symbol"||Sbe(e)&&_be(e)==Cbe}var zh=Ebe,Obe=vo,Abe=zh,Pbe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kbe=/^\w*$/;function Tbe(e,t){if(Obe(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||Abe(e)?!0:kbe.test(e)||!Pbe.test(e)||t!=null&&e in Object(t)}var kA=Tbe;function Mbe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Ul=Mbe;const Uh=Pn(Ul);var Rbe=Tu,Dbe=Ul,$be="[object AsyncFunction]",Ibe="[object Function]",Nbe="[object GeneratorFunction]",Lbe="[object Proxy]";function Fbe(e){if(!Dbe(e))return!1;var t=Rbe(e);return t==Ibe||t==Nbe||t==$be||t==Lbe}var TA=Fbe;const Wt=Pn(TA);var jbe=Ds,Bbe=jbe["__core-js_shared__"],zbe=Bbe,NS=zbe,P9=function(){var e=/[^.]+$/.exec(NS&&NS.keys&&NS.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ube(e){return!!P9&&P9 in e}var Vbe=Ube,Wbe=Function.prototype,Hbe=Wbe.toString;function Kbe(e){if(e!=null){try{return Hbe.call(e)}catch{}try{return e+""}catch{}}return""}var mV=Kbe,qbe=TA,Gbe=Vbe,Ybe=Ul,Zbe=mV,Xbe=/[\\^$.*+?()[\]{}|]/g,Qbe=/^\[object .+?Constructor\]$/,Jbe=Function.prototype,exe=Object.prototype,txe=Jbe.toString,nxe=exe.hasOwnProperty,rxe=RegExp("^"+txe.call(nxe).replace(Xbe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ixe(e){if(!Ybe(e)||Gbe(e))return!1;var t=qbe(e)?rxe:Qbe;return t.test(Zbe(e))}var oxe=ixe;function axe(e,t){return e?.[t]}var sxe=axe,uxe=oxe,lxe=sxe;function cxe(e,t){var n=lxe(e,t);return uxe(n)?n:void 0}var mf=cxe,fxe=mf,dxe=fxe(Object,"create"),bw=dxe,k9=bw;function hxe(){this.__data__=k9?k9(null):{},this.size=0}var pxe=hxe;function gxe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var mxe=gxe,vxe=bw,yxe="__lodash_hash_undefined__",bxe=Object.prototype,xxe=bxe.hasOwnProperty;function wxe(e){var t=this.__data__;if(vxe){var n=t[e];return n===yxe?void 0:n}return xxe.call(t,e)?t[e]:void 0}var _xe=wxe,Sxe=bw,Cxe=Object.prototype,Exe=Cxe.hasOwnProperty;function Oxe(e){var t=this.__data__;return Sxe?t[e]!==void 0:Exe.call(t,e)}var Axe=Oxe,Pxe=bw,kxe="__lodash_hash_undefined__";function Txe(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Pxe&&t===void 0?kxe:t,this}var Mxe=Txe,Rxe=pxe,Dxe=mxe,$xe=_xe,Ixe=Axe,Nxe=Mxe;function Vh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t-1}var Jxe=Qxe,ewe=xw;function twe(e,t){var n=this.__data__,r=ewe(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var nwe=twe,rwe=jxe,iwe=qxe,owe=Zxe,awe=Jxe,swe=nwe;function Wh(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t0?1:-1},Sc=function(t){return $m(t)&&t.indexOf("%")===t.length-1},qe=function(t){return P2e(t)&&!Kh(t)},Hr=function(t){return qe(t)||$m(t)},R2e=0,vf=function(t){var n=++R2e;return"".concat(t||"").concat(n)},ef=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(t)&&!$m(t))return r;var o;if(Sc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Kh(o)&&(o=r),i&&o>n&&(o=n),o},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},D2e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function B2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EE(e)}var ID={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},ND=null,FS=null,jA=function e(t){if(t===ND&&Array.isArray(FS))return FS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(S2e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),FS=n,ND=t,n};function po(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fu(i)}):r=[fu(t)],jA(e).forEach(function(i){var o=pa(i,"type.displayName")||pa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function To(e,t){var n=po(e,t);return n[0]}var LD=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},z2e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],U2e=function(t){return t&&t.type&&$m(t.type)&&z2e.indexOf(t.type)>=0},OV=function(t){return t&&EE(t)==="object"&&"clipDot"in t},V2e=function(t,n,r,i){var o,a=(o=LS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||N2e.includes(n))||r&&FA.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Uh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;V2e((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},OE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return FD(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function G2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=q2e(e,K2e),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return F.createElement("svg",AE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),F.createElement("title",null,s),F.createElement("desc",null,u),t)}var Y2e=["children","className"];function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function X2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cn=F.forwardRef(function(e,t){var n=e.children,r=e.className,i=Z2e(e,Y2e),o=dn("recharts-layer",r);return F.createElement("g",kE({className:o},zt(i,!0),{ref:t}),n)}),du=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:e_e(e,t,n)}var n_e=t_e,r_e="\\ud800-\\udfff",i_e="\\u0300-\\u036f",o_e="\\ufe20-\\ufe2f",a_e="\\u20d0-\\u20ff",s_e=i_e+o_e+a_e,u_e="\\ufe0e\\ufe0f",l_e="\\u200d",c_e=RegExp("["+l_e+r_e+s_e+u_e+"]");function f_e(e){return c_e.test(e)}var AV=f_e;function d_e(e){return e.split("")}var h_e=d_e,PV="\\ud800-\\udfff",p_e="\\u0300-\\u036f",g_e="\\ufe20-\\ufe2f",m_e="\\u20d0-\\u20ff",v_e=p_e+g_e+m_e,y_e="\\ufe0e\\ufe0f",b_e="["+PV+"]",TE="["+v_e+"]",ME="\\ud83c[\\udffb-\\udfff]",x_e="(?:"+TE+"|"+ME+")",kV="[^"+PV+"]",TV="(?:\\ud83c[\\udde6-\\uddff]){2}",MV="[\\ud800-\\udbff][\\udc00-\\udfff]",w_e="\\u200d",RV=x_e+"?",DV="["+y_e+"]?",__e="(?:"+w_e+"(?:"+[kV,TV,MV].join("|")+")"+DV+RV+")*",S_e=DV+RV+__e,C_e="(?:"+[kV+TE+"?",TE,TV,MV,b_e].join("|")+")",E_e=RegExp(ME+"(?="+ME+")|"+C_e+S_e,"g");function O_e(e){return e.match(E_e)||[]}var A_e=O_e,P_e=h_e,k_e=AV,T_e=A_e;function M_e(e){return k_e(e)?T_e(e):P_e(e)}var R_e=M_e,D_e=n_e,$_e=AV,I_e=R_e,N_e=xV;function L_e(e){return function(t){t=N_e(t);var n=$_e(t)?I_e(t):void 0,r=n?n[0]:t.charAt(0),i=n?D_e(n,1).join(""):t.slice(1);return r[e]()+i}}var F_e=L_e,j_e=F_e,B_e=j_e("toUpperCase"),z_e=B_e;const $w=Pn(z_e);function Vn(e){return function(){return e}}const $V=Math.cos,hb=Math.sin,rs=Math.sqrt,pb=Math.PI,Iw=2*pb,RE=Math.PI,DE=2*RE,fc=1e-6,U_e=DE-fc;function IV(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IV;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;ifc)if(!(Math.abs(f*u-l*c)>fc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((RE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>fc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>fc||Math.abs(this._y1-c)>fc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%DE+DE),h>U_e?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>fc&&this._append`A${r},${r},0,${+(h>=RE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function BA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new W_e(t)}function zA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NV(e){this._context=e}NV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Nw(e){return new NV(e)}function LV(e){return e[0]}function FV(e){return e[1]}function jV(e,t){var n=Vn(!0),r=null,i=Nw,o=null,a=BA(s);e=typeof e=="function"?e:e===void 0?LV:Vn(e),t=typeof t=="function"?t:t===void 0?FV:Vn(t);function s(u){var l,c=(u=zA(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return jV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Vn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class BV{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function H_e(e){return new BV(e,!0)}function K_e(e){return new BV(e,!1)}const UA={draw(e,t){const n=rs(t/pb);e.moveTo(n,0),e.arc(0,0,n,0,Iw)}},q_e={draw(e,t){const n=rs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},zV=rs(1/3),G_e=zV*2,Y_e={draw(e,t){const n=rs(t/G_e),r=n*zV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},Z_e={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},X_e=.8908130915292852,UV=hb(pb/10)/hb(7*pb/10),Q_e=hb(Iw/10)*UV,J_e=-$V(Iw/10)*UV,eSe={draw(e,t){const n=rs(t*X_e),r=Q_e*n,i=J_e*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Iw*o/5,s=$V(a),u=hb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},jS=rs(3),tSe={draw(e,t){const n=-rs(t/(jS*3));e.moveTo(0,n*2),e.lineTo(-jS*n,-n),e.lineTo(jS*n,-n),e.closePath()}},ta=-.5,na=rs(3)/2,$E=1/rs(12),nSe=($E/2+1)*3,rSe={draw(e,t){const n=rs(t/nSe),r=n/2,i=n*$E,o=r,a=n*$E+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(ta*r-na*i,na*r+ta*i),e.lineTo(ta*o-na*a,na*o+ta*a),e.lineTo(ta*s-na*u,na*s+ta*u),e.lineTo(ta*r+na*i,ta*i-na*r),e.lineTo(ta*o+na*a,ta*a-na*o),e.lineTo(ta*s+na*u,ta*u-na*s),e.closePath()}};function iSe(e,t){let n=null,r=BA(i);e=typeof e=="function"?e:Vn(e||UA),t=typeof t=="function"?t:Vn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Vn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Vn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gb(){}function mb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function VV(e){this._context=e}VV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function oSe(e){return new VV(e)}function WV(e){this._context=e}WV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aSe(e){return new WV(e)}function HV(e){this._context=e}HV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sSe(e){return new HV(e)}function KV(e){this._context=e}KV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function uSe(e){return new KV(e)}function BD(e){return e<0?-1:1}function zD(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(BD(o)+BD(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function UD(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function vb(e){this._context=e}vb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:BS(this,this._t0,UD(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BS(this,UD(this,n=zD(this,e,t)),n);break;default:BS(this,this._t0,n=zD(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qV(e){this._context=new GV(e)}(qV.prototype=Object.create(vb.prototype)).point=function(e,t){vb.prototype.point.call(this,t,e)};function GV(e){this._context=e}GV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function lSe(e){return new vb(e)}function cSe(e){return new qV(e)}function YV(e){this._context=e}YV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=VD(e),i=VD(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function dSe(e){return new Lw(e,.5)}function hSe(e){return new Lw(e,0)}function pSe(e){return new Lw(e,1)}function Qd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function gSe(e,t){return e[t]}function mSe(e){const t=[];return t.key=e,t}function vSe(){var e=Vn([]),t=IE,n=Qd,r=gSe;function i(o){var a=Array.from(e.apply(this,arguments),mSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OSe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZV={symbolCircle:UA,symbolCross:q_e,symbolDiamond:Y_e,symbolSquare:Z_e,symbolStar:eSe,symbolTriangle:tSe,symbolWye:rSe},ASe=Math.PI/180,PSe=function(t){var n="symbol".concat($w(t));return ZV[n]||UA},kSe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*ASe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},TSe=function(t,n){ZV["symbol".concat($w(t))]=n},Fw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=ESe(t,wSe),l=HD(HD({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=PSe(r),w=iSe().type(b).size(kSe(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?F.createElement("path",NE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Fw.registerSymbol=TSe;function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t0?1:-1},Sc=function(t){return Im(t)&&t.indexOf("%")===t.length-1},qe=function(t){return k2e(t)&&!Kh(t)},Hr=function(t){return qe(t)||Im(t)},D2e=0,vf=function(t){var n=++D2e;return"".concat(t||"").concat(n)},ef=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!qe(t)&&!Im(t))return r;var o;if(Sc(t)){var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Kh(o)&&(o=r),i&&o>n&&(o=n),o},rl=function(t){if(!t)return null;var n=Object.keys(t);return n&&n.length?t[n[0]]:null},$2e=function(t){if(!Array.isArray(t))return!1;for(var n=t.length,r={},i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function z2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function EE(e){"@babel/helpers - typeof";return EE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},EE(e)}var N9={click:"onClick",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",mouseout:"onMouseOut",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",touchcancel:"onTouchCancel",touchend:"onTouchEnd",touchmove:"onTouchMove",touchstart:"onTouchStart",contextmenu:"onContextMenu",dblclick:"onDoubleClick"},fu=function(t){return typeof t=="string"?t:t?t.displayName||t.name||"Component":""},L9=null,FS=null,BA=function e(t){if(t===L9&&Array.isArray(FS))return FS;var n=[];return y.Children.forEach(t,function(r){Ut(r)||(C2e.isFragment(r)?n=n.concat(e(r.props.children)):n.push(r))}),FS=n,L9=t,n};function po(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(function(i){return fu(i)}):r=[fu(t)],BA(e).forEach(function(i){var o=pa(i,"type.displayName")||pa(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}function To(e,t){var n=po(e,t);return n[0]}var F9=function(t){if(!t||!t.props)return!1;var n=t.props,r=n.width,i=n.height;return!(!qe(r)||r<=0||!qe(i)||i<=0)},U2e=["a","altGlyph","altGlyphDef","altGlyphItem","animate","animateColor","animateMotion","animateTransform","circle","clipPath","color-profile","cursor","defs","desc","ellipse","feBlend","feColormatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","font","font-face","font-face-format","font-face-name","font-face-url","foreignObject","g","glyph","glyphRef","hkern","image","line","lineGradient","marker","mask","metadata","missing-glyph","mpath","path","pattern","polygon","polyline","radialGradient","rect","script","set","stop","style","svg","switch","symbol","text","textPath","title","tref","tspan","use","view","vkern"],V2e=function(t){return t&&t.type&&Im(t.type)&&U2e.indexOf(t.type)>=0},OV=function(t){return t&&EE(t)==="object"&&"clipDot"in t},W2e=function(t,n,r,i){var o,a=(o=LS?.[i])!==null&&o!==void 0?o:[];return!Wt(t)&&(i&&a.includes(n)||L2e.includes(n))||r&&jA.includes(n)},zt=function(t,n,r){if(!t||typeof t=="function"||typeof t=="boolean")return null;var i=t;if(y.isValidElement(t)&&(i=t.props),!Uh(i))return null;var o={};return Object.keys(i).forEach(function(a){var s;W2e((s=i)===null||s===void 0?void 0:s[a],a,n,r)&&(o[a]=i[a])}),o},OE=function e(t,n){if(t===n)return!0;var r=y.Children.count(t);if(r!==y.Children.count(n))return!1;if(r===0)return!0;if(r===1)return j9(Array.isArray(t)?t[0]:t,Array.isArray(n)?n[0]:n);for(var i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PE(e){var t=e.children,n=e.width,r=e.height,i=e.viewBox,o=e.className,a=e.style,s=e.title,u=e.desc,l=G2e(e,q2e),c=i||{width:n,height:r,x:0,y:0},f=dn("recharts-surface",o);return F.createElement("svg",AE({},zt(l,!0,"svg"),{className:f,width:n,height:r,style:a,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height)}),F.createElement("title",null,s),F.createElement("desc",null,u),t)}var Z2e=["children","className"];function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Q2e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var Cn=F.forwardRef(function(e,t){var n=e.children,r=e.className,i=X2e(e,Z2e),o=dn("recharts-layer",r);return F.createElement("g",kE({className:o},zt(i,!0),{ref:t}),n)}),du=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;oi?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r=r?e:t_e(e,t,n)}var r_e=n_e,i_e="\\ud800-\\udfff",o_e="\\u0300-\\u036f",a_e="\\ufe20-\\ufe2f",s_e="\\u20d0-\\u20ff",u_e=o_e+a_e+s_e,l_e="\\ufe0e\\ufe0f",c_e="\\u200d",f_e=RegExp("["+c_e+i_e+u_e+l_e+"]");function d_e(e){return f_e.test(e)}var AV=d_e;function h_e(e){return e.split("")}var p_e=h_e,PV="\\ud800-\\udfff",g_e="\\u0300-\\u036f",m_e="\\ufe20-\\ufe2f",v_e="\\u20d0-\\u20ff",y_e=g_e+m_e+v_e,b_e="\\ufe0e\\ufe0f",x_e="["+PV+"]",TE="["+y_e+"]",ME="\\ud83c[\\udffb-\\udfff]",w_e="(?:"+TE+"|"+ME+")",kV="[^"+PV+"]",TV="(?:\\ud83c[\\udde6-\\uddff]){2}",MV="[\\ud800-\\udbff][\\udc00-\\udfff]",__e="\\u200d",RV=w_e+"?",DV="["+b_e+"]?",S_e="(?:"+__e+"(?:"+[kV,TV,MV].join("|")+")"+DV+RV+")*",C_e=DV+RV+S_e,E_e="(?:"+[kV+TE+"?",TE,TV,MV,x_e].join("|")+")",O_e=RegExp(ME+"(?="+ME+")|"+E_e+C_e,"g");function A_e(e){return e.match(O_e)||[]}var P_e=A_e,k_e=p_e,T_e=AV,M_e=P_e;function R_e(e){return T_e(e)?M_e(e):k_e(e)}var D_e=R_e,$_e=r_e,I_e=AV,N_e=D_e,L_e=xV;function F_e(e){return function(t){t=L_e(t);var n=I_e(t)?N_e(t):void 0,r=n?n[0]:t.charAt(0),i=n?$_e(n,1).join(""):t.slice(1);return r[e]()+i}}var j_e=F_e,B_e=j_e,z_e=B_e("toUpperCase"),U_e=z_e;const $w=Pn(U_e);function Vn(e){return function(){return e}}const $V=Math.cos,hb=Math.sin,rs=Math.sqrt,pb=Math.PI,Iw=2*pb,RE=Math.PI,DE=2*RE,fc=1e-6,V_e=DE-fc;function IV(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw new Error(`invalid digits: ${e}`);if(t>15)return IV;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;ifc)if(!(Math.abs(f*u-l*c)>fc)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,v=u*u+l*l,b=p*p+m*m,w=Math.sqrt(v),x=Math.sqrt(h),S=o*Math.tan((RE-Math.acos((v+h-b)/(2*w*x)))/2),O=S/x,E=S/w;Math.abs(O-1)>fc&&this._append`L${t+O*c},${n+O*f}`,this._append`A${o},${o},0,0,${+(f*p>c*m)},${this._x1=t+E*u},${this._y1=n+E*l}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),l=t+s,c=n+u,f=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${l},${c}`:(Math.abs(this._x1-l)>fc||Math.abs(this._y1-c)>fc)&&this._append`L${l},${c}`,r&&(h<0&&(h=h%DE+DE),h>V_e?this._append`A${r},${r},0,1,${f},${t-s},${n-u}A${r},${r},0,1,${f},${this._x1=l},${this._y1=c}`:h>fc&&this._append`A${r},${r},0,${+(h>=RE)},${f},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function zA(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new H_e(t)}function UA(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function NV(e){this._context=e}NV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Nw(e){return new NV(e)}function LV(e){return e[0]}function FV(e){return e[1]}function jV(e,t){var n=Vn(!0),r=null,i=Nw,o=null,a=zA(s);e=typeof e=="function"?e:e===void 0?LV:Vn(e),t=typeof t=="function"?t:t===void 0?FV:Vn(t);function s(u){var l,c=(u=UA(u)).length,f,h=!1,p;for(r==null&&(o=i(p=a())),l=0;l<=c;++l)!(l=p;--m)s.point(S[m],O[m]);s.lineEnd(),s.areaEnd()}w&&(S[h]=+e(b,h,f),O[h]=+t(b,h,f),s.point(r?+r(b,h,f):S[h],n?+n(b,h,f):O[h]))}if(x)return s=null,x+""||null}function c(){return jV().defined(i).curve(a).context(o)}return l.x=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),r=null,l):e},l.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Vn(+f),l):e},l.x1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Vn(+f),l):r},l.y=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),n=null,l):t},l.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Vn(+f),l):t},l.y1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Vn(+f),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(t)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(r).y(t)},l.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Vn(!!f),l):i},l.curve=function(f){return arguments.length?(a=f,o!=null&&(s=a(o)),l):a},l.context=function(f){return arguments.length?(f==null?o=s=null:s=a(o=f),l):o},l}class BV{constructor(t,n){this._context=t,this._x=n}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function K_e(e){return new BV(e,!0)}function q_e(e){return new BV(e,!1)}const VA={draw(e,t){const n=rs(t/pb);e.moveTo(n,0),e.arc(0,0,n,0,Iw)}},G_e={draw(e,t){const n=rs(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},zV=rs(1/3),Y_e=zV*2,Z_e={draw(e,t){const n=rs(t/Y_e),r=n*zV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},X_e={draw(e,t){const n=rs(t),r=-n/2;e.rect(r,r,n,n)}},Q_e=.8908130915292852,UV=hb(pb/10)/hb(7*pb/10),J_e=hb(Iw/10)*UV,eSe=-$V(Iw/10)*UV,tSe={draw(e,t){const n=rs(t*Q_e),r=J_e*n,i=eSe*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=Iw*o/5,s=$V(a),u=hb(a);e.lineTo(u*n,-s*n),e.lineTo(s*r-u*i,u*r+s*i)}e.closePath()}},jS=rs(3),nSe={draw(e,t){const n=-rs(t/(jS*3));e.moveTo(0,n*2),e.lineTo(-jS*n,-n),e.lineTo(jS*n,-n),e.closePath()}},ta=-.5,na=rs(3)/2,$E=1/rs(12),rSe=($E/2+1)*3,iSe={draw(e,t){const n=rs(t/rSe),r=n/2,i=n*$E,o=r,a=n*$E+n,s=-o,u=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,u),e.lineTo(ta*r-na*i,na*r+ta*i),e.lineTo(ta*o-na*a,na*o+ta*a),e.lineTo(ta*s-na*u,na*s+ta*u),e.lineTo(ta*r+na*i,ta*i-na*r),e.lineTo(ta*o+na*a,ta*a-na*o),e.lineTo(ta*s+na*u,ta*u-na*s),e.closePath()}};function oSe(e,t){let n=null,r=zA(i);e=typeof e=="function"?e:Vn(e||VA),t=typeof t=="function"?t:Vn(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:Vn(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:Vn(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function gb(){}function mb(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function VV(e){this._context=e}VV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:mb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aSe(e){return new VV(e)}function WV(e){this._context=e}WV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function sSe(e){return new WV(e)}function HV(e){this._context=e}HV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:mb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function uSe(e){return new HV(e)}function KV(e){this._context=e}KV.prototype={areaStart:gb,areaEnd:gb,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function lSe(e){return new KV(e)}function z9(e){return e<0?-1:1}function U9(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(z9(o)+z9(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function V9(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function BS(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function vb(e){this._context=e}vb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:BS(this,this._t0,V9(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,BS(this,V9(this,n=U9(this,e,t)),n);break;default:BS(this,this._t0,n=U9(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function qV(e){this._context=new GV(e)}(qV.prototype=Object.create(vb.prototype)).point=function(e,t){vb.prototype.point.call(this,t,e)};function GV(e){this._context=e}GV.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function cSe(e){return new vb(e)}function fSe(e){return new qV(e)}function YV(e){this._context=e}YV.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=W9(e),i=W9(t),o=0,a=1;a=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function hSe(e){return new Lw(e,.5)}function pSe(e){return new Lw(e,0)}function gSe(e){return new Lw(e,1)}function Qd(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n=0;)n[t]=t;return n}function mSe(e,t){return e[t]}function vSe(e){const t=[];return t.key=e,t}function ySe(){var e=Vn([]),t=IE,n=Qd,r=mSe;function i(o){var a=Array.from(e.apply(this,arguments),vSe),s,u=a.length,l=-1,c;for(const f of o)for(s=0,++l;s0){for(var n,r,i=0,o=e[0].length,a;i0){for(var n=0,r=e[t[0]],i,o=r.length;n0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ASe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var ZV={symbolCircle:VA,symbolCross:G_e,symbolDiamond:Z_e,symbolSquare:X_e,symbolStar:tSe,symbolTriangle:nSe,symbolWye:iSe},PSe=Math.PI/180,kSe=function(t){var n="symbol".concat($w(t));return ZV[n]||VA},TSe=function(t,n,r){if(n==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var i=18*PSe;return 1.25*t*t*(Math.tan(i)-Math.tan(i*2)*Math.pow(Math.tan(i),2))}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},MSe=function(t,n){ZV["symbol".concat($w(t))]=n},Fw=function(t){var n=t.type,r=n===void 0?"circle":n,i=t.size,o=i===void 0?64:i,a=t.sizeType,s=a===void 0?"area":a,u=OSe(t,_Se),l=K9(K9({},u),{},{type:r,size:o,sizeType:s}),c=function(){var b=kSe(r),w=oSe().type(b).size(TSe(o,s,r));return w()},f=l.className,h=l.cx,p=l.cy,m=zt(l,!0);return h===+h&&p===+p&&o===+o?F.createElement("path",NE({},m,{className:dn("recharts-symbols",f),transform:"translate(".concat(h,", ").concat(p,")"),d:c()})):null};Fw.registerSymbol=MSe;function Jd(e){"@babel/helpers - typeof";return Jd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jd(e)}function LE(){return LE=Object.assign?Object.assign.bind():function(e){for(var t=1;t`);var x=p.inactive?l:p.color;return F.createElement("li",LE({className:b,style:f,key:"legend-item-".concat(m)},bg(r.props,p,m)),F.createElement(PE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);wg(VA,"displayName","Legend");wg(VA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var BSe=ww;function zSe(){this.__data__=new BSe,this.size=0}var USe=zSe;function VSe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var WSe=VSe;function HSe(e){return this.__data__.get(e)}var KSe=HSe;function qSe(e){return this.__data__.has(e)}var GSe=qSe,YSe=ww,ZSe=MA,XSe=RA,QSe=200;function JSe(e,t){var n=this.__data__;if(n instanceof YSe){var r=n.__data__;if(!ZSe||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&w3e?new v3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=ECe}var qA=OCe,ACe=Tu,PCe=qA,kCe=Mu,TCe="[object Arguments]",MCe="[object Array]",RCe="[object Boolean]",DCe="[object Date]",$Ce="[object Error]",ICe="[object Function]",NCe="[object Map]",LCe="[object Number]",FCe="[object Object]",jCe="[object RegExp]",BCe="[object Set]",zCe="[object String]",UCe="[object WeakMap]",VCe="[object ArrayBuffer]",WCe="[object DataView]",HCe="[object Float32Array]",KCe="[object Float64Array]",qCe="[object Int8Array]",GCe="[object Int16Array]",YCe="[object Int32Array]",ZCe="[object Uint8Array]",XCe="[object Uint8ClampedArray]",QCe="[object Uint16Array]",JCe="[object Uint32Array]",er={};er[HCe]=er[KCe]=er[qCe]=er[GCe]=er[YCe]=er[ZCe]=er[XCe]=er[QCe]=er[JCe]=!0;er[TCe]=er[MCe]=er[VCe]=er[RCe]=er[WCe]=er[DCe]=er[$Ce]=er[ICe]=er[NCe]=er[LCe]=er[FCe]=er[jCe]=er[BCe]=er[zCe]=er[UCe]=!1;function eEe(e){return kCe(e)&&PCe(e.length)&&!!er[ACe(e)]}var tEe=eEe;function nEe(e){return function(t){return e(t)}}var sW=nEe,wb={exports:{}};wb.exports;(function(e,t){var n=pV,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(wb,wb.exports);var rEe=wb.exports,iEe=tEe,oEe=sW,QD=rEe,JD=QD&&QD.isTypedArray,aEe=JD?oEe(JD):iEe,uW=aEe,sEe=cCe,uEe=HA,lEe=vo,cEe=aW,fEe=KA,dEe=uW,hEe=Object.prototype,pEe=hEe.hasOwnProperty;function gEe(e,t){var n=lEe(e),r=!n&&uEe(e),i=!n&&!r&&cEe(e),o=!n&&!r&&!i&&dEe(e),a=n||r||i||o,s=a?sEe(e.length,String):[],u=s.length;for(var l in e)(t||pEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||fEe(l,u)))&&s.push(l);return s}var mEe=gEe,vEe=Object.prototype;function yEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||vEe;return e===n}var bEe=yEe;function xEe(e,t){return function(n){return e(t(n))}}var lW=xEe,wEe=lW,_Ee=wEe(Object.keys,Object),SEe=_Ee,CEe=bEe,EEe=SEe,OEe=Object.prototype,AEe=OEe.hasOwnProperty;function PEe(e){if(!CEe(e))return EEe(e);var t=[];for(var n in Object(e))AEe.call(e,n)&&n!="constructor"&&t.push(n);return t}var kEe=PEe,TEe=kA,MEe=qA;function REe(e){return e!=null&&MEe(e.length)&&!TEe(e)}var Im=REe,DEe=mEe,$Ee=kEe,IEe=Im;function NEe(e){return IEe(e)?DEe(e):$Ee(e)}var jw=NEe,LEe=Q3e,FEe=uCe,jEe=jw;function BEe(e){return LEe(e,jEe,FEe)}var zEe=BEe,e9=zEe,UEe=1,VEe=Object.prototype,WEe=VEe.hasOwnProperty;function HEe(e,t,n,r,i,o){var a=n&UEe,s=e9(e),u=s.length,l=e9(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:WEe.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var V4e=U4e;function W4e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=oOe){var l=t?null:rOe(e);if(l)return iOe(l);a=!1,i=nOe,u=new J4e}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function wOe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function _Oe(e){return e.value}function SOe(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=xOe(t,dOe);return F.createElement(VA,n)}var m9=1,Dd=function(e){function t(){var n;hOe(this,t);for(var r=arguments.length,i=new Array(r),o=0;om9||Math.abs(i.height-this.lastBoundingBox.height)>m9)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return F.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},SOe(o,Gs(Gs({},this.props),{},{payload:mW(c,l,_Oe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&qe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Bw(Dd,"displayName","Legend");Bw(Dd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var v9=Dm,COe=HA,EOe=vo,y9=v9?v9.isConcatSpreadable:void 0;function OOe(e){return EOe(e)||COe(e)||!!(y9&&e&&e[y9])}var AOe=OOe,POe=iW,kOe=AOe;function bW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=kOe),i||(i=[]);++o0&&n(s)?t>1?bW(s,t-1,n,r,i):POe(i,s):r||(i[i.length]=s)}return i}var xW=bW;function TOe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var MOe=TOe,ROe=MOe,DOe=ROe(),$Oe=DOe,IOe=$Oe,NOe=jw;function LOe(e,t){return e&&IOe(e,t,NOe)}var wW=LOe,FOe=Im;function jOe(e,t){return function(n,r){if(n==null)return n;if(!FOe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var JOe=QOe,WS=$A,eAe=IA,tAe=Vl,nAe=_W,rAe=GOe,iAe=sW,oAe=JOe,aAe=Yh,sAe=vo;function uAe(e,t,n){t.length?t=WS(t,function(o){return sAe(o)?function(a){return eAe(a,o.length===1?o[0]:o)}:o}):t=[aAe];var r=-1;t=WS(t,iAe(tAe));var i=nAe(e,function(o,a,s){var u=WS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return rAe(i,function(o,a){return oAe(o,a,n)})}var lAe=uAe;function cAe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var fAe=cAe,dAe=fAe,x9=Math.max;function hAe(e,t,n){return t=x9(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=x9(r.length-t,0),a=Array(o);++i0){if(++t>=SAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var AAe=OAe,PAe=_Ae,kAe=AAe,TAe=kAe(PAe),MAe=TAe,RAe=Yh,DAe=pAe,$Ae=MAe;function IAe(e,t){return $Ae(DAe(e,t,RAe),e+"")}var NAe=IAe,LAe=TA,FAe=Im,jAe=KA,BAe=Ul;function zAe(e,t,n){if(!BAe(n))return!1;var r=typeof t;return(r=="number"?FAe(n)&&jAe(t,n.length):r=="string"&&t in n)?LAe(n[t],e):!1}var zw=zAe,UAe=xW,VAe=lAe,WAe=NAe,_9=zw,HAe=WAe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&_9(e,t[0],t[1])?t=[]:n>2&&_9(t[0],t[1],t[2])&&(t=[t[0]]),VAe(e,UAe(t,1),[])}),KAe=HAe;const ZA=Pn(KAe);function _g(e){"@babel/helpers - typeof";return _g=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_g(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(zp,"-left"),qe(n)&&t&&qe(t.x)&&n=t.y),"".concat(zp,"-top"),qe(r)&&t&&qe(t.y)&&rv?Math.max(c,u[r]):Math.max(f,u[r])}function sPe(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function uPe(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,l,c,f;return a.height>0&&a.width>0&&n?(c=E9({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:u,viewBoxDimension:u.width}),f=E9({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:u,viewBoxDimension:u.height}),l=sPe({translateX:c,translateY:f,useTranslate3d:s})):l=oPe,{cssProperties:l,cssClasses:aPe({translateX:c,translateY:f,coordinate:n})}}function th(e){"@babel/helpers - typeof";return th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(e)}function O9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function A9(e){for(var t=1;tP9||Math.abs(r.height-this.state.lastBoundingBox.height)>P9)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=uPe({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),O=S.cssClasses,E=S.cssProperties,C=A9(A9({transition:h&&o?"transform ".concat(s,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return F.createElement("div",{tabIndex:-1,className:O,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),yPe=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ka={isSsr:yPe(),get:function(t){return Ka[t]},set:function(t,n){if(typeof t=="string")Ka[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Ka[i]=t[i]})}}};function nh(e){"@babel/helpers - typeof";return nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(e)}function k9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function T9(e){for(var t=1;t0;return F.createElement(vPe,{allowEscapeViewBox:a,animationDuration:s,animationEasing:u,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:p,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:O},PPe(l,T9(T9({},this.props),{},{payload:E})))}}])}(y.PureComponent);XA(Js,"displayName","Tooltip");XA(Js,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ka.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var kPe=Ds,TPe=function(){return kPe.Date.now()},MPe=TPe,RPe=/\s/;function DPe(e){for(var t=e.length;t--&&RPe.test(e.charAt(t)););return t}var $Pe=DPe,IPe=$Pe,NPe=/^\s+/;function LPe(e){return e&&e.slice(0,IPe(e)+1).replace(NPe,"")}var FPe=LPe,jPe=FPe,M9=Ul,BPe=zh,R9=NaN,zPe=/^[-+]0x[0-9a-f]+$/i,UPe=/^0b[01]+$/i,VPe=/^0o[0-7]+$/i,WPe=parseInt;function HPe(e){if(typeof e=="number")return e;if(BPe(e))return R9;if(M9(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=M9(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=jPe(e);var n=UPe.test(e);return n||VPe.test(e)?WPe(e.slice(2),n?2:8):zPe.test(e)?R9:+e}var PW=HPe,KPe=Ul,KS=MPe,D9=PW,qPe="Expected a function",GPe=Math.max,YPe=Math.min;function ZPe(e,t,n){var r,i,o,a,s,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(qPe);t=D9(t)||0,KPe(n)&&(c=!!n.leading,f="maxWait"in n,o=f?GPe(D9(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(C){var k=r,M=i;return r=i=void 0,l=C,a=e.apply(M,k),a}function m(C){return l=C,s=setTimeout(w,t),c?p(C):a}function v(C){var k=C-u,M=C-l,N=t-k;return f?YPe(N,o-M):N}function b(C){var k=C-u,M=C-l;return u===void 0||k>=t||k<0||f&&M>=o}function w(){var C=KS();if(b(C))return x(C);s=setTimeout(w,v(C))}function x(C){return s=void 0,h&&r?p(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?a:x(KS())}function E(){var C=KS(),k=b(C);if(r=arguments,i=this,u=C,k){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=S,E.flush=O,E}var XPe=ZPe,QPe=XPe,JPe=Ul,e5e="Expected a function";function t5e(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(e5e);return JPe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),QPe(e,t,{leading:r,maxWait:t,trailing:i})}var n5e=t5e;const kW=Pn(n5e);function Cg(e){"@babel/helpers - typeof";return Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cg(e)}function $9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gy(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=kW(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),G=E.current.getBoundingClientRect(),q=G.width,W=G.height;return H(q,W),Z.observe(E.current),function(){Z.disconnect()}},[H,v]);var V=y.useMemo(function(){var ne=N.containerWidth,Z=N.containerHeight;if(ne<0||Z<0)return null;du(Sc(a)||Sc(u),`The width(%s) and height(%s) are both fixed numbers, + A`).concat(a,",").concat(a,",0,1,1,").concat(s,",").concat(o),className:"recharts-legend-icon"});if(r.type==="rect")return F.createElement("path",{stroke:"none",fill:u,d:"M0,".concat(ra/8,"h").concat(ra,"v").concat(ra*3/4,"h").concat(-ra,"z"),className:"recharts-legend-icon"});if(F.isValidElement(r.legendIcon)){var l=RSe({},r);return delete l.legendIcon,F.cloneElement(r.legendIcon,l)}return F.createElement(Fw,{fill:u,cx:o,cy:o,size:ra,sizeType:"diameter",type:r.type})}},{key:"renderItems",value:function(){var r=this,i=this.props,o=i.payload,a=i.iconSize,s=i.layout,u=i.formatter,l=i.inactiveColor,c={x:0,y:0,width:ra,height:ra},f={display:s==="horizontal"?"inline-block":"block",marginRight:10},h={display:"inline-block",verticalAlign:"middle",marginRight:4};return o.map(function(p,m){var v=p.formatter||u,b=dn(_g(_g({"recharts-legend-item":!0},"legend-item-".concat(m),!0),"inactive",p.inactive));if(p.type==="none")return null;var w=Wt(p.value)?null:p.value;du(!Wt(p.value),`The name property is also required when using a function for the dataKey of a chart's cartesian components. Ex: `);var x=p.inactive?l:p.color;return F.createElement("li",LE({className:b,style:f,key:"legend-item-".concat(m)},xg(r.props,p,m)),F.createElement(PE,{width:a,height:a,viewBox:c,style:h},r.renderIcon(p)),F.createElement("span",{className:"recharts-legend-item-text",style:{color:x}},v?v(w,p,m):w))})}},{key:"render",value:function(){var r=this.props,i=r.payload,o=r.layout,a=r.align;if(!i||!i.length)return null;var s={padding:0,margin:0,textAlign:o==="horizontal"?a:"left"};return F.createElement("ul",{className:"recharts-default-legend",style:s},this.renderItems())}}])}(y.PureComponent);_g(WA,"displayName","Legend");_g(WA,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"middle",inactiveColor:"#ccc"});var zSe=ww;function USe(){this.__data__=new zSe,this.size=0}var VSe=USe;function WSe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var HSe=WSe;function KSe(e){return this.__data__.get(e)}var qSe=KSe;function GSe(e){return this.__data__.has(e)}var YSe=GSe,ZSe=ww,XSe=RA,QSe=DA,JSe=200;function e3e(e,t){var n=this.__data__;if(n instanceof ZSe){var r=n.__data__;if(!XSe||r.lengths))return!1;var l=o.get(e),c=o.get(t);if(l&&c)return l==t&&c==e;var f=-1,h=!0,p=n&_3e?new y3e:void 0;for(o.set(e,t),o.set(t,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=OCe}var GA=ACe,PCe=Tu,kCe=GA,TCe=Mu,MCe="[object Arguments]",RCe="[object Array]",DCe="[object Boolean]",$Ce="[object Date]",ICe="[object Error]",NCe="[object Function]",LCe="[object Map]",FCe="[object Number]",jCe="[object Object]",BCe="[object RegExp]",zCe="[object Set]",UCe="[object String]",VCe="[object WeakMap]",WCe="[object ArrayBuffer]",HCe="[object DataView]",KCe="[object Float32Array]",qCe="[object Float64Array]",GCe="[object Int8Array]",YCe="[object Int16Array]",ZCe="[object Int32Array]",XCe="[object Uint8Array]",QCe="[object Uint8ClampedArray]",JCe="[object Uint16Array]",eEe="[object Uint32Array]",er={};er[KCe]=er[qCe]=er[GCe]=er[YCe]=er[ZCe]=er[XCe]=er[QCe]=er[JCe]=er[eEe]=!0;er[MCe]=er[RCe]=er[WCe]=er[DCe]=er[HCe]=er[$Ce]=er[ICe]=er[NCe]=er[LCe]=er[FCe]=er[jCe]=er[BCe]=er[zCe]=er[UCe]=er[VCe]=!1;function tEe(e){return TCe(e)&&kCe(e.length)&&!!er[PCe(e)]}var nEe=tEe;function rEe(e){return function(t){return e(t)}}var sW=rEe,wb={exports:{}};wb.exports;(function(e,t){var n=pV,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,o=i&&i.exports===r,a=o&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||a&&a.binding&&a.binding("util")}catch{}}();e.exports=s})(wb,wb.exports);var iEe=wb.exports,oEe=nEe,aEe=sW,J9=iEe,eD=J9&&J9.isTypedArray,sEe=eD?aEe(eD):oEe,uW=sEe,uEe=fCe,lEe=KA,cEe=vo,fEe=aW,dEe=qA,hEe=uW,pEe=Object.prototype,gEe=pEe.hasOwnProperty;function mEe(e,t){var n=cEe(e),r=!n&&lEe(e),i=!n&&!r&&fEe(e),o=!n&&!r&&!i&&hEe(e),a=n||r||i||o,s=a?uEe(e.length,String):[],u=s.length;for(var l in e)(t||gEe.call(e,l))&&!(a&&(l=="length"||i&&(l=="offset"||l=="parent")||o&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||dEe(l,u)))&&s.push(l);return s}var vEe=mEe,yEe=Object.prototype;function bEe(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||yEe;return e===n}var xEe=bEe;function wEe(e,t){return function(n){return e(t(n))}}var lW=wEe,_Ee=lW,SEe=_Ee(Object.keys,Object),CEe=SEe,EEe=xEe,OEe=CEe,AEe=Object.prototype,PEe=AEe.hasOwnProperty;function kEe(e){if(!EEe(e))return OEe(e);var t=[];for(var n in Object(e))PEe.call(e,n)&&n!="constructor"&&t.push(n);return t}var TEe=kEe,MEe=TA,REe=GA;function DEe(e){return e!=null&&REe(e.length)&&!MEe(e)}var Nm=DEe,$Ee=vEe,IEe=TEe,NEe=Nm;function LEe(e){return NEe(e)?$Ee(e):IEe(e)}var jw=LEe,FEe=J3e,jEe=lCe,BEe=jw;function zEe(e){return FEe(e,BEe,jEe)}var UEe=zEe,tD=UEe,VEe=1,WEe=Object.prototype,HEe=WEe.hasOwnProperty;function KEe(e,t,n,r,i,o){var a=n&VEe,s=tD(e),u=s.length,l=tD(t),c=l.length;if(u!=c&&!a)return!1;for(var f=u;f--;){var h=s[f];if(!(a?h in t:HEe.call(t,h)))return!1}var p=o.get(e),m=o.get(t);if(p&&m)return p==t&&m==e;var v=!0;o.set(e,t),o.set(t,e);for(var b=a;++f-1}var W4e=V4e;function H4e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r=aOe){var l=t?null:iOe(e);if(l)return oOe(l);a=!1,i=rOe,u=new eOe}else u=t?[]:s;e:for(;++r=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function _Oe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function SOe(e){return e.value}function COe(e,t){if(F.isValidElement(e))return F.cloneElement(e,t);if(typeof e=="function")return F.createElement(e,t);t.ref;var n=wOe(t,hOe);return F.createElement(WA,n)}var vD=1,Dd=function(e){function t(){var n;pOe(this,t);for(var r=arguments.length,i=new Array(r),o=0;ovD||Math.abs(i.height-this.lastBoundingBox.height)>vD)&&(this.lastBoundingBox.width=i.width,this.lastBoundingBox.height=i.height,r&&r(i)):(this.lastBoundingBox.width!==-1||this.lastBoundingBox.height!==-1)&&(this.lastBoundingBox.width=-1,this.lastBoundingBox.height=-1,r&&r(null))}},{key:"getBBoxSnapshot",value:function(){return this.lastBoundingBox.width>=0&&this.lastBoundingBox.height>=0?Gs({},this.lastBoundingBox):{width:0,height:0}}},{key:"getDefaultPosition",value:function(r){var i=this.props,o=i.layout,a=i.align,s=i.verticalAlign,u=i.margin,l=i.chartWidth,c=i.chartHeight,f,h;if(!r||(r.left===void 0||r.left===null)&&(r.right===void 0||r.right===null))if(a==="center"&&o==="vertical"){var p=this.getBBoxSnapshot();f={left:((l||0)-p.width)/2}}else f=a==="right"?{right:u&&u.right||0}:{left:u&&u.left||0};if(!r||(r.top===void 0||r.top===null)&&(r.bottom===void 0||r.bottom===null))if(s==="middle"){var m=this.getBBoxSnapshot();h={top:((c||0)-m.height)/2}}else h=s==="bottom"?{bottom:u&&u.bottom||0}:{top:u&&u.top||0};return Gs(Gs({},f),h)}},{key:"render",value:function(){var r=this,i=this.props,o=i.content,a=i.width,s=i.height,u=i.wrapperStyle,l=i.payloadUniqBy,c=i.payload,f=Gs(Gs({position:"absolute",width:a||"auto",height:s||"auto"},this.getDefaultPosition(u)),u);return F.createElement("div",{className:"recharts-legend-wrapper",style:f,ref:function(p){r.wrapperNode=p}},COe(o,Gs(Gs({},this.props),{},{payload:mW(c,l,SOe)})))}}],[{key:"getWithHeight",value:function(r,i){var o=Gs(Gs({},this.defaultProps),r.props),a=o.layout;return a==="vertical"&&qe(r.props.height)?{height:r.props.height}:a==="horizontal"?{width:r.props.width||i}:null}}])}(y.PureComponent);Bw(Dd,"displayName","Legend");Bw(Dd,"defaultProps",{iconSize:14,layout:"horizontal",align:"center",verticalAlign:"bottom"});var yD=$m,EOe=KA,OOe=vo,bD=yD?yD.isConcatSpreadable:void 0;function AOe(e){return OOe(e)||EOe(e)||!!(bD&&e&&e[bD])}var POe=AOe,kOe=iW,TOe=POe;function bW(e,t,n,r,i){var o=-1,a=e.length;for(n||(n=TOe),i||(i=[]);++o0&&n(s)?t>1?bW(s,t-1,n,r,i):kOe(i,s):r||(i[i.length]=s)}return i}var xW=bW;function MOe(e){return function(t,n,r){for(var i=-1,o=Object(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(n(o[u],u,o)===!1)break}return t}}var ROe=MOe,DOe=ROe,$Oe=DOe(),IOe=$Oe,NOe=IOe,LOe=jw;function FOe(e,t){return e&&NOe(e,t,LOe)}var wW=FOe,jOe=Nm;function BOe(e,t){return function(n,r){if(n==null)return n;if(!jOe(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=Object(n);(t?o--:++ot||o&&a&&u&&!s&&!l||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!l&&e=s)return u;var l=n[r];return u*(l=="desc"?-1:1)}}return e.index-t.index}var eAe=JOe,WS=IA,tAe=NA,nAe=Vl,rAe=_W,iAe=YOe,oAe=sW,aAe=eAe,sAe=Yh,uAe=vo;function lAe(e,t,n){t.length?t=WS(t,function(o){return uAe(o)?function(a){return tAe(a,o.length===1?o[0]:o)}:o}):t=[sAe];var r=-1;t=WS(t,oAe(nAe));var i=rAe(e,function(o,a,s){var u=WS(t,function(l){return l(o)});return{criteria:u,index:++r,value:o}});return iAe(i,function(o,a){return aAe(o,a,n)})}var cAe=lAe;function fAe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var dAe=fAe,hAe=dAe,wD=Math.max;function pAe(e,t,n){return t=wD(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wD(r.length-t,0),a=Array(o);++i0){if(++t>=CAe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var PAe=AAe,kAe=SAe,TAe=PAe,MAe=TAe(kAe),RAe=MAe,DAe=Yh,$Ae=gAe,IAe=RAe;function NAe(e,t){return IAe($Ae(e,t,DAe),e+"")}var LAe=NAe,FAe=MA,jAe=Nm,BAe=qA,zAe=Ul;function UAe(e,t,n){if(!zAe(n))return!1;var r=typeof t;return(r=="number"?jAe(n)&&BAe(t,n.length):r=="string"&&t in n)?FAe(n[t],e):!1}var zw=UAe,VAe=xW,WAe=cAe,HAe=LAe,SD=zw,KAe=HAe(function(e,t){if(e==null)return[];var n=t.length;return n>1&&SD(e,t[0],t[1])?t=[]:n>2&&SD(t[0],t[1],t[2])&&(t=[t[0]]),WAe(e,VAe(t,1),[])}),qAe=KAe;const XA=Pn(qAe);function Sg(e){"@babel/helpers - typeof";return Sg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sg(e)}function HE(){return HE=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t.x),"".concat(zp,"-left"),qe(n)&&t&&qe(t.x)&&n=t.y),"".concat(zp,"-top"),qe(r)&&t&&qe(t.y)&&rv?Math.max(c,u[r]):Math.max(f,u[r])}function u5e(e){var t=e.translateX,n=e.translateY,r=e.useTranslate3d;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function l5e(e){var t=e.allowEscapeViewBox,n=e.coordinate,r=e.offsetTopLeft,i=e.position,o=e.reverseDirection,a=e.tooltipBox,s=e.useTranslate3d,u=e.viewBox,l,c,f;return a.height>0&&a.width>0&&n?(c=OD({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:u,viewBoxDimension:u.width}),f=OD({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:u,viewBoxDimension:u.height}),l=u5e({translateX:c,translateY:f,useTranslate3d:s})):l=a5e,{cssProperties:l,cssClasses:s5e({translateX:c,translateY:f,coordinate:n})}}function th(e){"@babel/helpers - typeof";return th=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},th(e)}function AD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function PD(e){for(var t=1;tkD||Math.abs(r.height-this.state.lastBoundingBox.height)>kD)&&this.setState({lastBoundingBox:{width:r.width,height:r.height}})}else(this.state.lastBoundingBox.width!==-1||this.state.lastBoundingBox.height!==-1)&&this.setState({lastBoundingBox:{width:-1,height:-1}})}},{key:"componentDidMount",value:function(){document.addEventListener("keydown",this.handleKeyDown),this.updateBBox()}},{key:"componentWillUnmount",value:function(){document.removeEventListener("keydown",this.handleKeyDown)}},{key:"componentDidUpdate",value:function(){var r,i;this.props.active&&this.updateBBox(),this.state.dismissed&&(((r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==this.state.dismissedAtCoordinate.x||((i=this.props.coordinate)===null||i===void 0?void 0:i.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}},{key:"render",value:function(){var r=this,i=this.props,o=i.active,a=i.allowEscapeViewBox,s=i.animationDuration,u=i.animationEasing,l=i.children,c=i.coordinate,f=i.hasPayload,h=i.isAnimationActive,p=i.offset,m=i.position,v=i.reverseDirection,b=i.useTranslate3d,w=i.viewBox,x=i.wrapperStyle,S=l5e({allowEscapeViewBox:a,coordinate:c,offsetTopLeft:p,position:m,reverseDirection:v,tooltipBox:this.state.lastBoundingBox,useTranslate3d:b,viewBox:w}),O=S.cssClasses,E=S.cssProperties,C=PD(PD({transition:h&&o?"transform ".concat(s,"ms ").concat(u):void 0},E),{},{pointerEvents:"none",visibility:!this.state.dismissed&&o&&f?"visible":"hidden",position:"absolute",top:0,left:0},x);return F.createElement("div",{tabIndex:-1,className:O,style:C,ref:function(M){r.wrapperNode=M}},l)}}])}(y.PureComponent),b5e=function(){return!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout)},Ka={isSsr:b5e(),get:function(t){return Ka[t]},set:function(t,n){if(typeof t=="string")Ka[t]=n;else{var r=Object.keys(t);r&&r.length&&r.forEach(function(i){Ka[i]=t[i]})}}};function nh(e){"@babel/helpers - typeof";return nh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nh(e)}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function MD(e){for(var t=1;t0;return F.createElement(y5e,{allowEscapeViewBox:a,animationDuration:s,animationEasing:u,isAnimationActive:h,active:o,coordinate:c,hasPayload:C,offset:p,position:b,reverseDirection:w,useTranslate3d:x,viewBox:S,wrapperStyle:O},k5e(l,MD(MD({},this.props),{},{payload:E})))}}])}(y.PureComponent);QA(Js,"displayName","Tooltip");QA(Js,"defaultProps",{accessibilityLayer:!1,allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",contentStyle:{},coordinate:{x:0,y:0},cursor:!0,cursorStyle:{},filterNull:!0,isAnimationActive:!Ka.isSsr,itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,viewBox:{x:0,y:0,height:0,width:0},wrapperStyle:{}});var T5e=Ds,M5e=function(){return T5e.Date.now()},R5e=M5e,D5e=/\s/;function $5e(e){for(var t=e.length;t--&&D5e.test(e.charAt(t)););return t}var I5e=$5e,N5e=I5e,L5e=/^\s+/;function F5e(e){return e&&e.slice(0,N5e(e)+1).replace(L5e,"")}var j5e=F5e,B5e=j5e,RD=Ul,z5e=zh,DD=NaN,U5e=/^[-+]0x[0-9a-f]+$/i,V5e=/^0b[01]+$/i,W5e=/^0o[0-7]+$/i,H5e=parseInt;function K5e(e){if(typeof e=="number")return e;if(z5e(e))return DD;if(RD(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=RD(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=B5e(e);var n=V5e.test(e);return n||W5e.test(e)?H5e(e.slice(2),n?2:8):U5e.test(e)?DD:+e}var PW=K5e,q5e=Ul,KS=R5e,$D=PW,G5e="Expected a function",Y5e=Math.max,Z5e=Math.min;function X5e(e,t,n){var r,i,o,a,s,u,l=0,c=!1,f=!1,h=!0;if(typeof e!="function")throw new TypeError(G5e);t=$D(t)||0,q5e(n)&&(c=!!n.leading,f="maxWait"in n,o=f?Y5e($D(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h);function p(C){var k=r,M=i;return r=i=void 0,l=C,a=e.apply(M,k),a}function m(C){return l=C,s=setTimeout(w,t),c?p(C):a}function v(C){var k=C-u,M=C-l,N=t-k;return f?Z5e(N,o-M):N}function b(C){var k=C-u,M=C-l;return u===void 0||k>=t||k<0||f&&M>=o}function w(){var C=KS();if(b(C))return x(C);s=setTimeout(w,v(C))}function x(C){return s=void 0,h&&r?p(C):(r=i=void 0,a)}function S(){s!==void 0&&clearTimeout(s),l=0,r=u=i=s=void 0}function O(){return s===void 0?a:x(KS())}function E(){var C=KS(),k=b(C);if(r=arguments,i=this,u=C,k){if(s===void 0)return m(u);if(f)return clearTimeout(s),s=setTimeout(w,t),p(u)}return s===void 0&&(s=setTimeout(w,t)),a}return E.cancel=S,E.flush=O,E}var Q5e=X5e,J5e=Q5e,ePe=Ul,tPe="Expected a function";function nPe(e,t,n){var r=!0,i=!0;if(typeof e!="function")throw new TypeError(tPe);return ePe(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),J5e(e,t,{leading:r,maxWait:t,trailing:i})}var rPe=nPe;const kW=Pn(rPe);function Eg(e){"@babel/helpers - typeof";return Eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eg(e)}function ID(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function my(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(ne=kW(ne,v,{trailing:!0,leading:!1}));var Z=new ResizeObserver(ne),G=E.current.getBoundingClientRect(),q=G.width,W=G.height;return H(q,W),Z.observe(E.current),function(){Z.disconnect()}},[H,v]);var V=y.useMemo(function(){var ne=N.containerWidth,Z=N.containerHeight;if(ne<0||Z<0)return null;du(Sc(a)||Sc(u),`The width(%s) and height(%s) are both fixed numbers, maybe you don't need to use a ResponsiveContainer.`,a,u),du(!n||n>0,"The aspect(%s) must be greater than zero.",n);var G=Sc(a)?ne:a,q=Sc(u)?Z:u;n&&n>0&&(G?q=G/n:q&&(G=q*n),h&&q>h&&(q=h)),du(G>0||q>0,`The width(%s) and height(%s) of chart should be greater than 0, please check the style of container, or the props width(%s) and height(%s), or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the - height and width.`,G,q,a,u,c,f,n);var W=!Array.isArray(p)&&fu(p.type).endsWith("Chart");return F.Children.map(p,function(j){return F.isValidElement(j)?y.cloneElement(j,gy({width:G,height:q},W?{style:gy({height:"100%",width:"100%",maxHeight:q,maxWidth:G},j.props.style)}:{})):j})},[n,p,u,h,f,c,N,a]);return F.createElement("div",{id:b?"".concat(b):void 0,className:dn("recharts-responsive-container",w),style:gy(gy({},O),{},{width:a,height:u,minWidth:c,minHeight:f,maxHeight:h}),ref:E},V)}),QA=function(t){return null};QA.displayName="Cell";function Eg(e){"@babel/helpers - typeof";return Eg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Eg(e)}function N9(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ka.isSsr)return{width:0,height:0};var r=m5e(n),i=JSON.stringify({text:t,copyStyle:r});if(Gf.widthCache[i])return Gf.widthCache[i];try{var o=document.getElementById(L9);o||(o=document.createElement("span"),o.setAttribute("id",L9),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=YE(YE({},g5e),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),u={width:s.width,height:s.height};return Gf.widthCache[i]=u,++Gf.cacheCount>p5e&&(Gf.cacheCount=0,Gf.widthCache={}),u}catch{return{width:0,height:0}}},v5e=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Og(e){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Og(e)}function Eb(e,t){return w5e(e)||x5e(e,t)||b5e(e,t)||y5e()}function y5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function b5e(e,t){if(e){if(typeof e=="string")return F9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return F9(e,t)}}function F9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I5e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function W9(e,t){return j5e(e)||F5e(e,t)||L5e(e,t)||N5e()}function N5e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function L5e(e,t){if(e){if(typeof e=="string")return H9(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H9(e,t)}}function H9(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(q,W){var j=W.word,K=W.width,Y=q[q.length-1];if(Y&&(i==null||o||Y.width+K+rW.width?q:W})};if(!c)return p;for(var v="…",b=function(G){var q=f.slice(0,G),W=DW({breakAll:l,style:u,children:q+v}).wordsWithComputedWidth,j=h(W),K=j.length>a||m(j).width>Number(i);return[K,j]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=W9(k,2),N=M[0],z=M[1],H=b(E),V=W9(H,1),ne=V[0];if(!N&&!ne&&(w=E+1),N&&ne&&(x=E-1),!N&&ne){O=z;break}S++}return O||p},K9=function(t){var n=Ut(t)?[]:t.toString().split(RW);return[{words:n}]},z5e=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ka.isSsr){var u,l,c=DW({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return K9(i);return B5e({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return K9(i)},q9="#808080",Ob=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?q9:b,x=V9(t,D5e),S=y.useMemo(function(){return z5e({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,N=V9(x,$5e);if(!Hr(r)||!Hr(o))return null;var z=r+(qe(O)?O:0),H=o+(qe(E)?E:0),V;switch(v){case"start":V=qS("calc(".concat(l,")"));break;case"middle":V=qS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:V=qS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,G=x.width;ne.push("scale(".concat((qe(G)?G/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(z,", ").concat(H,")")),ne.length&&(N.transform=ne.join(" ")),F.createElement("text",ZE({},zt(N,!0),{x:z,y:H,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?q9:w}),S.map(function(q,W){var j=q.words.join(M?"":" ");return F.createElement("tspan",{x:z,dy:W===0?V:s,key:"".concat(j,"-").concat(W)},j)}))};function _l(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function U5e(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function JA(e){let t,n,r;e.length!==2?(t=_l,n=(s,u)=>_l(e(s),u),r=(s,u)=>e(s)-u):(t=e===_l||e===U5e?e:V5e,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function V5e(){return 0}function $W(e){return e===null?NaN:+e}function*W5e(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const H5e=JA(_l),Nm=H5e.right;JA($W).center;class G9 extends Map{constructor(t,n=G5e){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(Y9(this,t))}has(t){return super.has(Y9(this,t))}set(t,n){return super.set(K5e(this,t),n)}delete(t){return super.delete(q5e(this,t))}}function Y9({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function K5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function q5e({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function G5e(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Y5e(e=_l){if(e===_l)return IW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function IW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const Z5e=Math.sqrt(50),X5e=Math.sqrt(10),Q5e=Math.sqrt(2);function Ab(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Z5e?10:o>=X5e?5:o>=Q5e?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function X9(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function NW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?IW:Y5e(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));NW(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Up(e,n,t),i(e[r],o)>0&&Up(e,n,r);a0;)--s}i(e[n],o)===0?Up(e,n,s):(++s,Up(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Up(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function J5e(e,t,n){if(e=Float64Array.from(W5e(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return X9(e);if(t>=1)return Z9(e);var r,i=(r-1)*t,o=Math.floor(i),a=Z9(NW(e,o).subarray(0,o+1)),s=X9(e.subarray(o+1));return a+(s-a)*(i-o)}}function e8e(e,t,n=$W){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function t8e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=r8e.exec(e))?new so(t[1],t[2],t[3],1):(t=i8e.exec(e))?new so(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=o8e.exec(e))?vy(t[1],t[2],t[3],t[4]):(t=a8e.exec(e))?vy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=s8e.exec(e))?i7(t[1],t[2]/100,t[3]/100,1):(t=u8e.exec(e))?i7(t[1],t[2]/100,t[3]/100,t[4]):Q9.hasOwnProperty(e)?t7(Q9[e]):e==="transparent"?new so(NaN,NaN,NaN,0):null}function t7(e){return new so(e>>16&255,e>>8&255,e&255,1)}function vy(e,t,n,r){return r<=0&&(e=t=n=NaN),new so(e,t,n,r)}function f8e(e){return e instanceof Lm||(e=Tg(e)),e?(e=e.rgb(),new so(e.r,e.g,e.b,e.opacity)):new so}function t6(e,t,n,r){return arguments.length===1?f8e(e):new so(e,t,n,r??1)}function so(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}tP(so,t6,FW(Lm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Pg:Math.pow(Pg,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new so(Dc(this.r),Dc(this.g),Dc(this.b),kb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:n7,formatHex:n7,formatHex8:d8e,formatRgb:r7,toString:r7}));function n7(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}`}function d8e(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}${Cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function r7(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cc(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function i7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function jW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Lm||(e=Tg(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function h8e(e,t,n,r){return arguments.length===1?jW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}tP(Ba,h8e,FW(Lm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Pg:Math.pow(Pg,e),new Ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new so(GS(e>=240?e-240:e+120,i,r),GS(e,i,r),GS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(o7(this.h),yy(this.s),yy(this.l),kb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${o7(this.h)}, ${yy(this.s)*100}%, ${yy(this.l)*100}%${e===1?")":`, ${e})`}`}}));function o7(e){return e=(e||0)%360,e<0?e+360:e}function yy(e){return Math.max(0,Math.min(1,e||0))}function GS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const nP=e=>()=>e;function p8e(e,t){return function(n){return e+n*t}}function g8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function m8e(e){return(e=+e)==1?BW:function(t,n){return n-t?g8e(t,n,e):nP(isNaN(t)?n:t)}}function BW(e,t){var n=t-e;return n?p8e(e,n):nP(isNaN(e)?t:e)}const a7=function e(t){var n=m8e(t);function r(i,o){var a=n((i=t6(i)).r,(o=t6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=BW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function v8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tb(r,i)})),n=YS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function P8e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?k8e:P8e,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Tb)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Mb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=rP,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Vi,c()):a!==Vi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function iP(){return Uw()(Vi,Vi)}function T8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rh(e){return e=Rb(Math.abs(e)),e?e[1]:NaN}function M8e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function R8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var D8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Mg(e){if(!(t=D8e.exec(e)))throw new Error("invalid format: "+e);var t;return new oP({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Mg.prototype=oP.prototype;function oP(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}oP.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function $8e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var zW;function I8e(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(zW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rb(e,Math.max(0,t+o-1))[0]}function u7(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const l7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:T8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>u7(e*100,t),r:u7,s:I8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function c7(e){return e}var f7=Array.prototype.map,d7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function N8e(e){var t=e.grouping===void 0||e.thousands===void 0?c7:M8e(f7.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?c7:R8e(f7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Mg(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):l7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=l7[E],N=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function z(H){var V=C,ne=k,Z,G,q;if(E==="c")ne=M(H)+ne,H="";else{H=+H;var W=H<0||1/H<0;if(H=isNaN(H)?u:M(Math.abs(H),S),O&&(H=$8e(H)),W&&+H==0&&m!=="+"&&(W=!1),V=(W?m==="("?m:s:m==="-"||m==="("?"":m)+V,ne=(E==="s"?d7[8+zW/3]:"")+ne+(W&&m==="("?")":""),N){for(Z=-1,G=H.length;++Zq||q>57){ne=(q===46?i+H.slice(Z+1):H.slice(Z))+ne,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var j=V.length+H.length+ne.length,K=j>1)+V+H+ne+K.slice(j);break;default:H=K+V+H+ne;break}return o(H)}return z.toString=function(){return f+""},z}function c(f,h){var p=l((f=Mg(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(rh(h)/3)))*3,v=Math.pow(10,-m),b=d7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var by,aP,UW;L8e({thousands:",",grouping:[3],currency:["$",""]});function L8e(e){return by=N8e(e),aP=by.format,UW=by.formatPrefix,by}function F8e(e){return Math.max(0,-rh(Math.abs(e)))}function j8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rh(t)/3)))*3-rh(Math.abs(e)))}function B8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rh(t)-rh(e))+1}function VW(e,t,n,r){var i=JE(e,t,n),o;switch(r=Mg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=j8e(i,a))&&(r.precision=o),UW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=B8e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=F8e(i))&&(r.precision=o-(r.type==="%")*2);break}}return aP(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return XE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return VW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=QE(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Db(){var e=iP();return e.copy=function(){return Fm(e,Db())},wa.apply(e,arguments),Wl(e)}function WW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return WW(e).unknown(t)},e=arguments.length?Array.from(e,Mb):[0,1],Wl(n)}function HW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function H8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function g7(e){return(t,n)=>-e(-t,n)}function sP(e){const t=e(h7,p7),n=t.domain;let r=10,i,o;function a(){return i=H8e(r),o=W8e(r),n()[0]<0?(i=g7(i),o=g7(o),e(z8e,U8e)):e(h7,p7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Mg(u)).precision==null&&(u.trim=!0),u=aP(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(HW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function KW(){const e=sP(Uw()).domain([1,10]);return e.copy=()=>Fm(e,KW()).base(e.base()),wa.apply(e,arguments),e}function m7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function v7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function uP(e){var t=1,n=e(m7(t),v7(t));return n.constant=function(r){return arguments.length?e(m7(t=+r),v7(t)):t},Wl(n)}function qW(){var e=uP(Uw());return e.copy=function(){return Fm(e,qW()).constant(e.constant())},wa.apply(e,arguments)}function y7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function K8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function q8e(e){return e<0?-e*e:e*e}function lP(e){var t=e(Vi,Vi),n=1;function r(){return n===1?e(Vi,Vi):n===.5?e(K8e,q8e):e(y7(n),y7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function cP(){var e=lP(Uw());return e.copy=function(){return Fm(e,cP()).exponent(e.exponent())},wa.apply(e,arguments),e}function G8e(){return cP.apply(null,arguments).exponent(.5)}function b7(e){return Math.sign(e)*e*e}function Y8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function GW(){var e=iP(),t=[0,1],n=!1,r;function i(o){var a=Y8e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(b7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mb)).map(b7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return GW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(i,arguments),Wl(i)}function YW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ZW().domain([e,t]).range(i).unknown(o)},wa.apply(Wl(a),arguments)}function XW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Nm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return XW().domain(e).range(t).unknown(n)},wa.apply(i,arguments)}const ZS=new Date,XS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ZS.setTime(+o),XS.setTime(+a),e(ZS),e(XS),Math.floor(n(ZS,XS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const $b=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$b.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$b);$b.range;const ou=1e3,fa=ou*60,au=fa*60,Su=au*24,fP=Su*7,x7=Su*30,QS=Su*365,Ec=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Ec.range;const dP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getMinutes());dP.range;const hP=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getUTCMinutes());hP.range;const pP=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*fa)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());pP.range;const gP=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());gP.range;const jm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fa)/Su,e=>e.getDate()-1);jm.range;const Vw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>e.getUTCDate()-1);Vw.range;const QW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>Math.floor(e/Su));QW.range;function yf(e){return Zr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*fa)/fP)}const Ww=yf(0),Ib=yf(1),Z8e=yf(2),X8e=yf(3),ih=yf(4),Q8e=yf(5),J8e=yf(6);Ww.range;Ib.range;Z8e.range;X8e.range;ih.range;Q8e.range;J8e.range;function bf(e){return Zr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/fP)}const Hw=bf(0),Nb=bf(1),eke=bf(2),tke=bf(3),oh=bf(4),nke=bf(5),rke=bf(6);Hw.range;Nb.range;eke.range;tke.range;oh.range;nke.range;rke.range;const mP=Zr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());mP.range;const vP=Zr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());vP.range;const Cu=Zr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Cu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Cu.range;const Eu=Zr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Eu.range;function JW(e,t,n,r,i,o){const a=[[Ec,1,ou],[Ec,5,5*ou],[Ec,15,15*ou],[Ec,30,30*ou],[o,1,fa],[o,5,5*fa],[o,15,15*fa],[o,30,30*fa],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Su],[r,2,2*Su],[n,1,fP],[t,1,x7],[t,3,3*x7],[e,1,QS]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(JE(l/QS,c/QS,f));if(p===0)return $b.every(Math.max(JE(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=e3(Vp(be.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?Nb.ceil(lt):Nb(lt),lt=Vw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=JS(Vp(be.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Ib.ceil(lt):Ib(lt),lt=jm.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),Nt="Z"in be?e3(Vp(be.y,0,1)).getUTCDay():JS(Vp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(Nt+5)%7:be.w+be.U*7-(Nt+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,e3(be)):JS(be)}}function M(Ae,Le,$e,be){for(var yt=0,lt=Le.length,Nt=$e.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in w7?Le.charAt(yt++):yn],!nn||(be=nn(Ae,$e,be))<0)return-1}else if(yn!=$e.charCodeAt(be++))return-1}return be}function N(Ae,Le,$e){var be=l.exec(Le.slice($e));return be?(Ae.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function z(Ae,Le,$e){var be=p.exec(Le.slice($e));return be?(Ae.w=m.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Ae,Le,$e){var be=f.exec(Le.slice($e));return be?(Ae.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function V(Ae,Le,$e){var be=w.exec(Le.slice($e));return be?(Ae.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ne(Ae,Le,$e){var be=v.exec(Le.slice($e));return be?(Ae.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Ae,Le,$e){return M(Ae,t,Le,$e)}function G(Ae,Le,$e){return M(Ae,n,Le,$e)}function q(Ae,Le,$e){return M(Ae,r,Le,$e)}function W(Ae){return a[Ae.getDay()]}function j(Ae){return o[Ae.getDay()]}function K(Ae){return u[Ae.getMonth()]}function Y(Ae){return s[Ae.getMonth()]}function oe(Ae){return i[+(Ae.getHours()>=12)]}function Q(Ae){return 1+~~(Ae.getMonth()/3)}function J(Ae){return a[Ae.getUTCDay()]}function ue(Ae){return o[Ae.getUTCDay()]}function de(Ae){return u[Ae.getUTCMonth()]}function Se(Ae){return s[Ae.getUTCMonth()]}function me(Ae){return i[+(Ae.getUTCHours()>=12)]}function Ze(Ae){return 1+~~(Ae.getUTCMonth()/3)}return{format:function(Ae){var Le=C(Ae+="",S);return Le.toString=function(){return Ae},Le},parse:function(Ae){var Le=k(Ae+="",!1);return Le.toString=function(){return Ae},Le},utcFormat:function(Ae){var Le=C(Ae+="",O);return Le.toString=function(){return Ae},Le},utcParse:function(Ae){var Le=k(Ae+="",!0);return Le.toString=function(){return Ae},Le}}}var w7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,lke=/^%/,cke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function dke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function hke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function pke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function mke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function _7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function yke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function bke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function C7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function xke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function E7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function wke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function _ke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Cke(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Eke(e,t,n){var r=lke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Oke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Ake(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function O7(e,t){return bn(e.getDate(),t,2)}function Pke(e,t){return bn(e.getHours(),t,2)}function kke(e,t){return bn(e.getHours()%12||12,t,2)}function Tke(e,t){return bn(1+jm.count(Cu(e),e),t,3)}function eH(e,t){return bn(e.getMilliseconds(),t,3)}function Mke(e,t){return eH(e,t)+"000"}function Rke(e,t){return bn(e.getMonth()+1,t,2)}function Dke(e,t){return bn(e.getMinutes(),t,2)}function $ke(e,t){return bn(e.getSeconds(),t,2)}function Ike(e){var t=e.getDay();return t===0?7:t}function Nke(e,t){return bn(Ww.count(Cu(e)-1,e),t,2)}function tH(e){var t=e.getDay();return t>=4||t===0?ih(e):ih.ceil(e)}function Lke(e,t){return e=tH(e),bn(ih.count(Cu(e),e)+(Cu(e).getDay()===4),t,2)}function Fke(e){return e.getDay()}function jke(e,t){return bn(Ib.count(Cu(e)-1,e),t,2)}function Bke(e,t){return bn(e.getFullYear()%100,t,2)}function zke(e,t){return e=tH(e),bn(e.getFullYear()%100,t,2)}function Uke(e,t){return bn(e.getFullYear()%1e4,t,4)}function Vke(e,t){var n=e.getDay();return e=n>=4||n===0?ih(e):ih.ceil(e),bn(e.getFullYear()%1e4,t,4)}function Wke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function A7(e,t){return bn(e.getUTCDate(),t,2)}function Hke(e,t){return bn(e.getUTCHours(),t,2)}function Kke(e,t){return bn(e.getUTCHours()%12||12,t,2)}function qke(e,t){return bn(1+Vw.count(Eu(e),e),t,3)}function nH(e,t){return bn(e.getUTCMilliseconds(),t,3)}function Gke(e,t){return nH(e,t)+"000"}function Yke(e,t){return bn(e.getUTCMonth()+1,t,2)}function Zke(e,t){return bn(e.getUTCMinutes(),t,2)}function Xke(e,t){return bn(e.getUTCSeconds(),t,2)}function Qke(e){var t=e.getUTCDay();return t===0?7:t}function Jke(e,t){return bn(Hw.count(Eu(e)-1,e),t,2)}function rH(e){var t=e.getUTCDay();return t>=4||t===0?oh(e):oh.ceil(e)}function eTe(e,t){return e=rH(e),bn(oh.count(Eu(e),e)+(Eu(e).getUTCDay()===4),t,2)}function tTe(e){return e.getUTCDay()}function nTe(e,t){return bn(Nb.count(Eu(e)-1,e),t,2)}function rTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function iTe(e,t){return e=rH(e),bn(e.getUTCFullYear()%100,t,2)}function oTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function aTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oh(e):oh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function sTe(){return"+0000"}function P7(){return"%"}function k7(e){return+e}function T7(e){return Math.floor(+e/1e3)}var Yf,iH,oH;uTe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function uTe(e){return Yf=uke(e),iH=Yf.format,Yf.parse,oH=Yf.utcFormat,Yf.utcParse,Yf}function lTe(e){return new Date(e)}function cTe(e){return e instanceof Date?+e:+new Date(+e)}function yP(e,t,n,r,i,o,a,s,u,l){var c=iP(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>J5e(e,o/r))},n.copy=function(){return lH(t).domain(e)},Ru.apply(n,arguments)}function qw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Vi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var yTe=vTe,bTe=hH,xTe=yTe,wTe=Yh;function _Te(e){return e&&e.length?bTe(e,wTe,xTe):void 0}var STe=_Te;const ul=Pn(STe);function CTe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return hu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(hu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Do))throw Error(ya+"NaN");if(n.s<1)throw Error(ya+(n.s?"NaN":"-Infinity"));return n.eq(Do)?new r(0):(ar=!1,t=hu(Rg(n,o),Rg(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?vH(t,e):gH(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ya+"NaN");return n.s?(ar=!1,t=hu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return mH(this)};st.naturalLogarithm=st.ln=function(){return Rg(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gH(t,e):vH(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(ya+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Qh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(hu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,Xh),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=nf(r,!0):(Rs(e,0,Xh),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=nf(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?nf(i):(Rs(e,0,Xh),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=nf(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(Do);if(s=new u(s),!s.s){if(e.s<1)throw Error(ya+"Infinity");return s}if(s.eq(Do))return s;if(r=u.precision,e.eq(Do))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=pH){for(i=new u(Do),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),D7(i.d,t)),n=Qh(n/2),n!==0;)s=s.times(s),D7(s.d,t);return ar=!0,e.s<0?new u(Do).div(i):zn(i,r)}}else if(o<0)throw Error(ya+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Rg(s,r+l)),ar=!0,i=mH(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=nf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,Xh),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=nf(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,Xh),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return nf(e,t<=n.toExpNeg||t>=n.toExpPos)};function gH(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error($c+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,N=r.constructor,z=r.s==i.s?1:-1,H=r.d,V=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(ya+"Division by zero");for(u=r.e-i.e,k=V.length,E=H.length,p=new N(z),m=p.d=[],l=0;V[l]==(H[l]||0);)++l;if(V[l]>(H[l]||0)&&--u,o==null?x=o=N.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new N(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,V=V[0],x++;(l1&&(V=e(V,c),H=e(H,c),k=V.length,E=H.length),O=k,v=H.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(V,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(V,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(wP+Mr(e));if(!e.s)return new c(Do);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(hc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c(Do),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(hu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function t3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(ya+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Qu(e){for(var t="";e--;)t+="0";return t}function Rg(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(ya+(p.s?"NaN":"-Infinity"));if(p.eq(Do))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),t3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=t3(v,l+2,b).times(o+""),p=Rg(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=hu(p.minus(Do),p.plus(Do),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(hu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(t3(v,l+2,b).times(o+""))),s=hu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function R7(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Qh(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rLb||e.e<-Lb))throw Error(wP+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=hc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/hc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=hc(10,(tr-t%tr)%tr),e.e=Qh(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=hc(10,tr-r),f[c]=i>0?(l/hc(10,a-i)%hc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Lb||e.e<-Lb))throw Error(wP+Mr(e));return e}function vH(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Qu(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Qu(-i-1)+o,n&&(r=n-a)>0&&(o+=Qu(r))):i>=a?(o+=Qu(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Qu(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Qu(r))),e.s<0?"-"+o:o}function D7(e,t){if(e.length>t)return e.length=t,!0}function yH(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($c+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return R7(a,o.toString())}else if(typeof o!="string")throw Error($c+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,KTe.test(o))R7(a,o);else throw Error($c+o)}if(i.prototype=st,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=yH,i.config=i.set=qTe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var _P=yH(HTe);Do=new _P(1);const Nn=_P;function GTe(e){return QTe(e)||XTe(e)||ZTe(e)||YTe()}function YTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ZTe(e,t){if(e){if(typeof e=="string")return i6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i6(e,t)}}function XTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function QTe(e){if(Array.isArray(e))return i6(e)}function i6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,$7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function hMe(e){if(Array.isArray(e))return e}function SH(e){var t=Dg(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function CH(e,t,n){if(e.lte(0))return new Nn(0);var r=Zw.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function pMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(Zw.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=nMe(tMe(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),o6);return s(0,t)}function EH(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=CH(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?EH(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function gMe(e){var t=Dg(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=SH([n,r]),u=Dg(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(s6(o6(0,i-1).map(function(){return 1/0}))):[].concat(s6(o6(0,i-1).map(function(){return-1/0})),[c]);return n>r?a6(f):f}if(l===c)return pMe(l,i,o);var h=EH(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=Zw.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?a6(b):b}function mMe(e,t){var n=Dg(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=SH([r,i]),s=Dg(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=CH(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(s6(Zw.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?a6(h):h}var vMe=wH(gMe),yMe=wH(mMe),bMe="Invariant failed";function rf(e,t){throw new Error(bMe)}var xMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ah(e){"@babel/helpers - typeof";return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ah(e)}function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function PMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kMe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},SP=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},KMe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:ef(C,r,0)})}}return a},qMe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=ef(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(L7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=ef(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(L7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},GMe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=kH({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&qe(t[p]))return mr(mr({},t),{},Id({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&qe(t[m]))return mr(mr({},t),{},Id({},m,t[m]+(h||0)))}return t},YMe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},TH=function(t,n,r,i,o){var a=n.props.children,s=po(a,Jh).filter(function(l){return YMe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=Kr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[Gw(f),ul(f)]:[f,f],p=u.reduce(function(m,v){var b=Kr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},ZMe=function(t,n,r,i,o){var a=n.map(function(s){return TH(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},MH=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&TH(t,u,l,i)||E0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Kh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},n3=new WeakMap,xy=function(t,n){if(typeof n!="function")return t;n3.has(t)||n3.set(t,new WeakMap);var r=n3.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},XMe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Ag(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Db(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:C0(),realScaleType:"point"}:o==="category"?{scale:Ag(),realScaleType:"band"}:{scale:Db(),realScaleType:"linear"};if($m(i)){var u="scale".concat($w(i));return{scale:(M7[u]||C0)(),realScaleType:M7[u]?u:"point"}}return Wt(i)?{scale:i}:{scale:C0(),realScaleType:"point"}},j7=1e-4,QMe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-j7,a=Math.max(i[0],i[1])+j7,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},JMe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},nRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},rRe={sign:tRe,expand:ySe,none:Qd,silhouette:bSe,wiggle:xSe,positive:nRe},iRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=rRe[r],a=vSe().keys(i).value(function(s,u){return+Kr(s,u,0)}).order(IE).offset(o);return a(t)},oRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Hr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[vf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Id({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Id({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:iRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Id({},h,p))},c)},aRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=vMe(l,o,s);return t.domain([Gw(c),ul(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=yMe(f,o,s);return{niceTicks:h}}return null};function sh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=fb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=Kr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var B7=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=Kr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},sRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},uRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},lRe=function(t){return t.reduce(function(n,r){return[Gw(r.concat([n[0]]).filter(qe)),ul(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},$H=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=lRe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},z7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,U7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f6=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(z7.test(t[0])){var o=+z7.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(U7.test(t[1])){var a=+U7.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=ZA(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:hRe(l),angleInRadian:l}},mRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},vRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},K7=function(t,n){var r=t.x,i=t.y,o=gRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=mRe(n),f=c.startAngle,h=c.endAngle,p=s,m;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return m?H7(H7({},n),{},{radius:a,angle:vRe(p,n)}):null};function Lg(e){"@babel/helpers - typeof";return Lg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lg(e)}var yRe=["offset"];function bRe(e){return SRe(e)||_Re(e)||wRe(e)||xRe()}function xRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wRe(e,t){if(e){if(typeof e=="string")return d6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d6(e,t)}}function _Re(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SRe(e){if(Array.isArray(e))return d6(e)}function d6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ERe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function q7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` + height and width.`,G,q,a,u,c,f,n);var W=!Array.isArray(p)&&fu(p.type).endsWith("Chart");return F.Children.map(p,function(j){return F.isValidElement(j)?y.cloneElement(j,my({width:G,height:q},W?{style:my({height:"100%",width:"100%",maxHeight:q,maxWidth:G},j.props.style)}:{})):j})},[n,p,u,h,f,c,N,a]);return F.createElement("div",{id:b?"".concat(b):void 0,className:dn("recharts-responsive-container",w),style:my(my({},O),{},{width:a,height:u,minWidth:c,minHeight:f,maxHeight:h}),ref:E},V)}),JA=function(t){return null};JA.displayName="Cell";function Og(e){"@babel/helpers - typeof";return Og=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Og(e)}function LD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YE(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Ka.isSsr)return{width:0,height:0};var r=vPe(n),i=JSON.stringify({text:t,copyStyle:r});if(Gf.widthCache[i])return Gf.widthCache[i];try{var o=document.getElementById(FD);o||(o=document.createElement("span"),o.setAttribute("id",FD),o.setAttribute("aria-hidden","true"),document.body.appendChild(o));var a=YE(YE({},mPe),r);Object.assign(o.style,a),o.textContent="".concat(t);var s=o.getBoundingClientRect(),u={width:s.width,height:s.height};return Gf.widthCache[i]=u,++Gf.cacheCount>gPe&&(Gf.cacheCount=0,Gf.widthCache={}),u}catch{return{width:0,height:0}}},yPe=function(t){return{top:t.top+window.scrollY-document.documentElement.clientTop,left:t.left+window.scrollX-document.documentElement.clientLeft}};function Ag(e){"@babel/helpers - typeof";return Ag=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ag(e)}function Eb(e,t){return _Pe(e)||wPe(e,t)||xPe(e,t)||bPe()}function bPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xPe(e,t){if(e){if(typeof e=="string")return jD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return jD(e,t)}}function jD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function NPe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function HD(e,t){return BPe(e)||jPe(e,t)||FPe(e,t)||LPe()}function LPe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function FPe(e,t){if(e){if(typeof e=="string")return KD(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return KD(e,t)}}function KD(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&arguments[0]!==void 0?arguments[0]:[];return G.reduce(function(q,W){var j=W.word,K=W.width,Y=q[q.length-1];if(Y&&(i==null||o||Y.width+K+rW.width?q:W})};if(!c)return p;for(var v="…",b=function(G){var q=f.slice(0,G),W=DW({breakAll:l,style:u,children:q+v}).wordsWithComputedWidth,j=h(W),K=j.length>a||m(j).width>Number(i);return[K,j]},w=0,x=f.length-1,S=0,O;w<=x&&S<=f.length-1;){var E=Math.floor((w+x)/2),C=E-1,k=b(C),M=HD(k,2),N=M[0],z=M[1],H=b(E),V=HD(H,1),ne=V[0];if(!N&&!ne&&(w=E+1),N&&ne&&(x=E-1),!N&&ne){O=z;break}S++}return O||p},qD=function(t){var n=Ut(t)?[]:t.toString().split(RW);return[{words:n}]},UPe=function(t){var n=t.width,r=t.scaleToFit,i=t.children,o=t.style,a=t.breakAll,s=t.maxLines;if((n||r)&&!Ka.isSsr){var u,l,c=DW({breakAll:a,children:i,style:o});if(c){var f=c.wordsWithComputedWidth,h=c.spaceWidth;u=f,l=h}else return qD(i);return zPe({breakAll:a,children:i,maxLines:s,style:o},u,l,n,r)}return qD(i)},GD="#808080",Ob=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.lineHeight,s=a===void 0?"1em":a,u=t.capHeight,l=u===void 0?"0.71em":u,c=t.scaleToFit,f=c===void 0?!1:c,h=t.textAnchor,p=h===void 0?"start":h,m=t.verticalAnchor,v=m===void 0?"end":m,b=t.fill,w=b===void 0?GD:b,x=WD(t,$Pe),S=y.useMemo(function(){return UPe({breakAll:x.breakAll,children:x.children,maxLines:x.maxLines,scaleToFit:f,style:x.style,width:x.width})},[x.breakAll,x.children,x.maxLines,f,x.style,x.width]),O=x.dx,E=x.dy,C=x.angle,k=x.className,M=x.breakAll,N=WD(x,IPe);if(!Hr(r)||!Hr(o))return null;var z=r+(qe(O)?O:0),H=o+(qe(E)?E:0),V;switch(v){case"start":V=qS("calc(".concat(l,")"));break;case"middle":V=qS("calc(".concat((S.length-1)/2," * -").concat(s," + (").concat(l," / 2))"));break;default:V=qS("calc(".concat(S.length-1," * -").concat(s,")"));break}var ne=[];if(f){var Z=S[0].width,G=x.width;ne.push("scale(".concat((qe(G)?G/Z:1)/Z,")"))}return C&&ne.push("rotate(".concat(C,", ").concat(z,", ").concat(H,")")),ne.length&&(N.transform=ne.join(" ")),F.createElement("text",ZE({},zt(N,!0),{x:z,y:H,className:dn("recharts-text",k),textAnchor:p,fill:w.includes("url")?GD:w}),S.map(function(q,W){var j=q.words.join(M?"":" ");return F.createElement("tspan",{x:z,dy:W===0?V:s,key:"".concat(j,"-").concat(W)},j)}))};function _l(e,t){return e==null||t==null?NaN:et?1:e>=t?0:NaN}function VPe(e,t){return e==null||t==null?NaN:te?1:t>=e?0:NaN}function e5(e){let t,n,r;e.length!==2?(t=_l,n=(s,u)=>_l(e(s),u),r=(s,u)=>e(s)-u):(t=e===_l||e===VPe?e:WPe,n=e,r=e);function i(s,u,l=0,c=s.length){if(l>>1;n(s[f],u)<0?l=f+1:c=f}while(l>>1;n(s[f],u)<=0?l=f+1:c=f}while(ll&&r(s[f-1],u)>-r(s[f],u)?f-1:f}return{left:i,center:a,right:o}}function WPe(){return 0}function $W(e){return e===null?NaN:+e}function*HPe(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const KPe=e5(_l),Lm=KPe.right;e5($W).center;class YD extends Map{constructor(t,n=YPe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(ZD(this,t))}has(t){return super.has(ZD(this,t))}set(t,n){return super.set(qPe(this,t),n)}delete(t){return super.delete(GPe(this,t))}}function ZD({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function qPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function GPe({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function YPe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function ZPe(e=_l){if(e===_l)return IW;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function IW(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(et?1:0)}const XPe=Math.sqrt(50),QPe=Math.sqrt(10),JPe=Math.sqrt(2);function Ab(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=XPe?10:o>=QPe?5:o>=JPe?2:1;let s,u,l;return i<0?(l=Math.pow(10,-i)/a,s=Math.round(e*l),u=Math.round(t*l),s/lt&&--u,l=-l):(l=Math.pow(10,i)*a,s=Math.round(e/l),u=Math.round(t/l),s*lt&&--u),u0))return[];if(e===t)return[e];const r=t=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let l=0;l=r)&&(n=r);return n}function QD(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function NW(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?IW:ZPe(i);r>n;){if(r-n>600){const u=r-n+1,l=t-n+1,c=Math.log(u),f=.5*Math.exp(2*c/3),h=.5*Math.sqrt(c*f*(u-f)/u)*(l-u/2<0?-1:1),p=Math.max(n,Math.floor(t-l*f/u+h)),m=Math.min(r,Math.floor(t+(u-l)*f/u+h));NW(e,t,p,m,i)}const o=e[t];let a=n,s=r;for(Up(e,n,t),i(e[r],o)>0&&Up(e,n,r);a0;)--s}i(e[n],o)===0?Up(e,n,s):(++s,Up(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function Up(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function e8e(e,t,n){if(e=Float64Array.from(HPe(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return QD(e);if(t>=1)return XD(e);var r,i=(r-1)*t,o=Math.floor(i),a=XD(NW(e,o).subarray(0,o+1)),s=QD(e.subarray(o+1));return a+(s-a)*(i-o)}}function t8e(e,t,n=$W){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function n8e(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?yy(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?yy(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=i8e.exec(e))?new so(t[1],t[2],t[3],1):(t=o8e.exec(e))?new so(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a8e.exec(e))?yy(t[1],t[2],t[3],t[4]):(t=s8e.exec(e))?yy(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=u8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,1):(t=l8e.exec(e))?o7(t[1],t[2]/100,t[3]/100,t[4]):JD.hasOwnProperty(e)?n7(JD[e]):e==="transparent"?new so(NaN,NaN,NaN,0):null}function n7(e){return new so(e>>16&255,e>>8&255,e&255,1)}function yy(e,t,n,r){return r<=0&&(e=t=n=NaN),new so(e,t,n,r)}function d8e(e){return e instanceof Fm||(e=Mg(e)),e?(e=e.rgb(),new so(e.r,e.g,e.b,e.opacity)):new so}function t6(e,t,n,r){return arguments.length===1?d8e(e):new so(e,t,n,r??1)}function so(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}n5(so,t6,FW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new so(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new so(Dc(this.r),Dc(this.g),Dc(this.b),kb(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:r7,formatHex:r7,formatHex8:h8e,formatRgb:i7,toString:i7}));function r7(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}`}function h8e(){return`#${Cc(this.r)}${Cc(this.g)}${Cc(this.b)}${Cc((isNaN(this.opacity)?1:this.opacity)*255)}`}function i7(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${Dc(this.r)}, ${Dc(this.g)}, ${Dc(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Dc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Cc(e){return e=Dc(e),(e<16?"0":"")+e.toString(16)}function o7(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Ba(e,t,n,r)}function jW(e){if(e instanceof Ba)return new Ba(e.h,e.s,e.l,e.opacity);if(e instanceof Fm||(e=Mg(e)),!e)return new Ba;if(e instanceof Ba)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(t===o?a=(n-r)/s+(n0&&u<1?0:a,new Ba(a,s,u,e.opacity)}function p8e(e,t,n,r){return arguments.length===1?jW(e):new Ba(e,t,n,r??1)}function Ba(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}n5(Ba,p8e,FW(Fm,{brighter(e){return e=e==null?Pb:Math.pow(Pb,e),new Ba(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?kg:Math.pow(kg,e),new Ba(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new so(GS(e>=240?e-240:e+120,i,r),GS(e,i,r),GS(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Ba(a7(this.h),by(this.s),by(this.l),kb(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${a7(this.h)}, ${by(this.s)*100}%, ${by(this.l)*100}%${e===1?")":`, ${e})`}`}}));function a7(e){return e=(e||0)%360,e<0?e+360:e}function by(e){return Math.max(0,Math.min(1,e||0))}function GS(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const r5=e=>()=>e;function g8e(e,t){return function(n){return e+n*t}}function m8e(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function v8e(e){return(e=+e)==1?BW:function(t,n){return n-t?m8e(t,n,e):r5(isNaN(t)?n:t)}}function BW(e,t){var n=t-e;return n?g8e(e,n):r5(isNaN(e)?t:e)}const s7=function e(t){var n=v8e(t);function r(i,o){var a=n((i=t6(i)).r,(o=t6(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),l=BW(i.opacity,o.opacity);return function(c){return i.r=a(c),i.g=s(c),i.b=u(c),i.opacity=l(c),i+""}}return r.gamma=e,r}(1);function y8e(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;in&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Tb(r,i)})),n=YS.lastIndex;return nt&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function k8e(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i2?T8e:k8e,u=l=null,f}function f(h){return h==null||isNaN(h=+h)?o:(u||(u=s(e.map(r),t,n)))(r(a(h)))}return f.invert=function(h){return a(i((l||(l=s(t,e.map(r),Tb)))(h)))},f.domain=function(h){return arguments.length?(e=Array.from(h,Mb),c()):e.slice()},f.range=function(h){return arguments.length?(t=Array.from(h),c()):t.slice()},f.rangeRound=function(h){return t=Array.from(h),n=i5,c()},f.clamp=function(h){return arguments.length?(a=h?!0:Vi,c()):a!==Vi},f.interpolate=function(h){return arguments.length?(n=h,c()):n},f.unknown=function(h){return arguments.length?(o=h,f):o},function(h,p){return r=h,i=p,c()}}function o5(){return Uw()(Vi,Vi)}function M8e(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Rb(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function rh(e){return e=Rb(Math.abs(e)),e?e[1]:NaN}function R8e(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function D8e(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var $8e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Rg(e){if(!(t=$8e.exec(e)))throw new Error("invalid format: "+e);var t;return new a5({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Rg.prototype=a5.prototype;function a5(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}a5.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function I8e(e){e:for(var t=e.length,n=1,r=-1,i;n0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var zW;function N8e(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(zW=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rb(e,Math.max(0,t+o-1))[0]}function l7(e,t){var n=Rb(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const c7={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:M8e,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>l7(e*100,t),r:l7,s:N8e,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function f7(e){return e}var d7=Array.prototype.map,h7=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function L8e(e){var t=e.grouping===void 0||e.thousands===void 0?f7:R8e(d7.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?f7:D8e(d7.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",u=e.nan===void 0?"NaN":e.nan+"";function l(f){f=Rg(f);var h=f.fill,p=f.align,m=f.sign,v=f.symbol,b=f.zero,w=f.width,x=f.comma,S=f.precision,O=f.trim,E=f.type;E==="n"?(x=!0,E="g"):c7[E]||(S===void 0&&(S=12),O=!0,E="g"),(b||h==="0"&&p==="=")&&(b=!0,h="0",p="=");var C=v==="$"?n:v==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",k=v==="$"?r:/[%p]/.test(E)?a:"",M=c7[E],N=/[defgprs%]/.test(E);S=S===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,S)):Math.max(0,Math.min(20,S));function z(H){var V=C,ne=k,Z,G,q;if(E==="c")ne=M(H)+ne,H="";else{H=+H;var W=H<0||1/H<0;if(H=isNaN(H)?u:M(Math.abs(H),S),O&&(H=I8e(H)),W&&+H==0&&m!=="+"&&(W=!1),V=(W?m==="("?m:s:m==="-"||m==="("?"":m)+V,ne=(E==="s"?h7[8+zW/3]:"")+ne+(W&&m==="("?")":""),N){for(Z=-1,G=H.length;++Zq||q>57){ne=(q===46?i+H.slice(Z+1):H.slice(Z))+ne,H=H.slice(0,Z);break}}}x&&!b&&(H=t(H,1/0));var j=V.length+H.length+ne.length,K=j>1)+V+H+ne+K.slice(j);break;default:H=K+V+H+ne;break}return o(H)}return z.toString=function(){return f+""},z}function c(f,h){var p=l((f=Rg(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(rh(h)/3)))*3,v=Math.pow(10,-m),b=h7[8+m/3];return function(w){return p(v*w)+b}}return{format:l,formatPrefix:c}}var xy,s5,UW;F8e({thousands:",",grouping:[3],currency:["$",""]});function F8e(e){return xy=L8e(e),s5=xy.format,UW=xy.formatPrefix,xy}function j8e(e){return Math.max(0,-rh(Math.abs(e)))}function B8e(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rh(t)/3)))*3-rh(Math.abs(e)))}function z8e(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rh(t)-rh(e))+1}function VW(e,t,n,r){var i=JE(e,t,n),o;switch(r=Rg(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=B8e(i,a))&&(r.precision=o),UW(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=z8e(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=j8e(i))&&(r.precision=o-(r.type==="%")*2);break}}return s5(r)}function Wl(e){var t=e.domain;return e.ticks=function(n){var r=t();return XE(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return VW(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],u,l,c=10;for(s0;){if(l=QE(a,s,n),l===u)return r[i]=a,r[o]=s,t(r);if(l>0)a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l;else if(l<0)a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l;else break;u=l}return e},e}function Db(){var e=o5();return e.copy=function(){return jm(e,Db())},wa.apply(e,arguments),Wl(e)}function WW(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Mb),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return WW(e).unknown(t)},e=arguments.length?Array.from(e,Mb):[0,1],Wl(n)}function HW(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return oMath.pow(e,t)}function K8e(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function m7(e){return(t,n)=>-e(-t,n)}function u5(e){const t=e(p7,g7),n=t.domain;let r=10,i,o;function a(){return i=K8e(r),o=H8e(r),n()[0]<0?(i=m7(i),o=m7(o),e(U8e,V8e)):e(p7,g7),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const u=n();let l=u[0],c=u[u.length-1];const f=c0){for(;h<=p;++h)for(m=1;mc)break;w.push(v)}}else for(;h<=p;++h)for(m=r-1;m>=1;--m)if(v=h>0?m/o(-h):m*o(h),!(vc)break;w.push(v)}w.length*2{if(s==null&&(s=10),u==null&&(u=r===10?"s":","),typeof u!="function"&&(!(r%1)&&(u=Rg(u)).precision==null&&(u.trim=!0),u=s5(u)),s===1/0)return u;const l=Math.max(1,r*s/t.ticks().length);return c=>{let f=c/o(Math.round(i(c)));return f*rn(HW(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function KW(){const e=u5(Uw()).domain([1,10]);return e.copy=()=>jm(e,KW()).base(e.base()),wa.apply(e,arguments),e}function v7(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function y7(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function l5(e){var t=1,n=e(v7(t),y7(t));return n.constant=function(r){return arguments.length?e(v7(t=+r),y7(t)):t},Wl(n)}function qW(){var e=l5(Uw());return e.copy=function(){return jm(e,qW()).constant(e.constant())},wa.apply(e,arguments)}function b7(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function q8e(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function G8e(e){return e<0?-e*e:e*e}function c5(e){var t=e(Vi,Vi),n=1;function r(){return n===1?e(Vi,Vi):n===.5?e(q8e,G8e):e(b7(n),b7(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},Wl(t)}function f5(){var e=c5(Uw());return e.copy=function(){return jm(e,f5()).exponent(e.exponent())},wa.apply(e,arguments),e}function Y8e(){return f5.apply(null,arguments).exponent(.5)}function x7(e){return Math.sign(e)*e*e}function Z8e(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function GW(){var e=o5(),t=[0,1],n=!1,r;function i(o){var a=Z8e(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(x7(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Mb)).map(x7)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return GW(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},wa.apply(i,arguments),Wl(i)}function YW(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a0?n[s-1]:e[0],s=n?[r[n-1],t]:[r[l-1],r[l]]},a.unknown=function(u){return arguments.length&&(o=u),a},a.thresholds=function(){return r.slice()},a.copy=function(){return ZW().domain([e,t]).range(i).unknown(o)},wa.apply(Wl(a),arguments)}function XW(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[Lm(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return XW().domain(e).range(t).unknown(n)},wa.apply(i,arguments)}const ZS=new Date,XS=new Date;function Zr(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const u=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o0))return u;let l;do u.push(l=new Date(+o)),t(o,s),e(o);while(lZr(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(ZS.setTime(+o),XS.setTime(+a),e(ZS),e(XS),Math.floor(n(ZS,XS))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const $b=Zr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);$b.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Zr(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):$b);$b.range;const ou=1e3,fa=ou*60,au=fa*60,Su=au*24,d5=Su*7,w7=Su*30,QS=Su*365,Ec=Zr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ou)},(e,t)=>(t-e)/ou,e=>e.getUTCSeconds());Ec.range;const h5=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getMinutes());h5.range;const p5=Zr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*fa)},(e,t)=>(t-e)/fa,e=>e.getUTCMinutes());p5.range;const g5=Zr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ou-e.getMinutes()*fa)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getHours());g5.range;const m5=Zr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*au)},(e,t)=>(t-e)/au,e=>e.getUTCHours());m5.range;const Bm=Zr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*fa)/Su,e=>e.getDate()-1);Bm.range;const Vw=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>e.getUTCDate()-1);Vw.range;const QW=Zr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Su,e=>Math.floor(e/Su));QW.range;function yf(e){return Zr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*fa)/d5)}const Ww=yf(0),Ib=yf(1),X8e=yf(2),Q8e=yf(3),ih=yf(4),J8e=yf(5),eke=yf(6);Ww.range;Ib.range;X8e.range;Q8e.range;ih.range;J8e.range;eke.range;function bf(e){return Zr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/d5)}const Hw=bf(0),Nb=bf(1),tke=bf(2),nke=bf(3),oh=bf(4),rke=bf(5),ike=bf(6);Hw.range;Nb.range;tke.range;nke.range;oh.range;rke.range;ike.range;const v5=Zr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());v5.range;const y5=Zr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());y5.range;const Cu=Zr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Cu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});Cu.range;const Eu=Zr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());Eu.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Zr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});Eu.range;function JW(e,t,n,r,i,o){const a=[[Ec,1,ou],[Ec,5,5*ou],[Ec,15,15*ou],[Ec,30,30*ou],[o,1,fa],[o,5,5*fa],[o,15,15*fa],[o,30,30*fa],[i,1,au],[i,3,3*au],[i,6,6*au],[i,12,12*au],[r,1,Su],[r,2,2*Su],[n,1,d5],[t,1,w7],[t,3,3*w7],[e,1,QS]];function s(l,c,f){const h=cb).right(a,h);if(p===a.length)return e.every(JE(l/QS,c/QS,f));if(p===0)return $b.every(Math.max(JE(l,c,f),1));const[m,v]=a[h/a[p-1][2]53)return null;"w"in be||(be.w=1),"Z"in be?(lt=e3(Vp(be.y,0,1)),Nt=lt.getUTCDay(),lt=Nt>4||Nt===0?Nb.ceil(lt):Nb(lt),lt=Vw.offset(lt,(be.V-1)*7),be.y=lt.getUTCFullYear(),be.m=lt.getUTCMonth(),be.d=lt.getUTCDate()+(be.w+6)%7):(lt=JS(Vp(be.y,0,1)),Nt=lt.getDay(),lt=Nt>4||Nt===0?Ib.ceil(lt):Ib(lt),lt=Bm.offset(lt,(be.V-1)*7),be.y=lt.getFullYear(),be.m=lt.getMonth(),be.d=lt.getDate()+(be.w+6)%7)}else("W"in be||"U"in be)&&("w"in be||(be.w="u"in be?be.u%7:"W"in be?1:0),Nt="Z"in be?e3(Vp(be.y,0,1)).getUTCDay():JS(Vp(be.y,0,1)).getDay(),be.m=0,be.d="W"in be?(be.w+6)%7+be.W*7-(Nt+5)%7:be.w+be.U*7-(Nt+6)%7);return"Z"in be?(be.H+=be.Z/100|0,be.M+=be.Z%100,e3(be)):JS(be)}}function M(Ae,Le,$e,be){for(var yt=0,lt=Le.length,Nt=$e.length,yn,nn;yt=Nt)return-1;if(yn=Le.charCodeAt(yt++),yn===37){if(yn=Le.charAt(yt++),nn=E[yn in _7?Le.charAt(yt++):yn],!nn||(be=nn(Ae,$e,be))<0)return-1}else if(yn!=$e.charCodeAt(be++))return-1}return be}function N(Ae,Le,$e){var be=l.exec(Le.slice($e));return be?(Ae.p=c.get(be[0].toLowerCase()),$e+be[0].length):-1}function z(Ae,Le,$e){var be=p.exec(Le.slice($e));return be?(Ae.w=m.get(be[0].toLowerCase()),$e+be[0].length):-1}function H(Ae,Le,$e){var be=f.exec(Le.slice($e));return be?(Ae.w=h.get(be[0].toLowerCase()),$e+be[0].length):-1}function V(Ae,Le,$e){var be=w.exec(Le.slice($e));return be?(Ae.m=x.get(be[0].toLowerCase()),$e+be[0].length):-1}function ne(Ae,Le,$e){var be=v.exec(Le.slice($e));return be?(Ae.m=b.get(be[0].toLowerCase()),$e+be[0].length):-1}function Z(Ae,Le,$e){return M(Ae,t,Le,$e)}function G(Ae,Le,$e){return M(Ae,n,Le,$e)}function q(Ae,Le,$e){return M(Ae,r,Le,$e)}function W(Ae){return a[Ae.getDay()]}function j(Ae){return o[Ae.getDay()]}function K(Ae){return u[Ae.getMonth()]}function Y(Ae){return s[Ae.getMonth()]}function oe(Ae){return i[+(Ae.getHours()>=12)]}function Q(Ae){return 1+~~(Ae.getMonth()/3)}function J(Ae){return a[Ae.getUTCDay()]}function ue(Ae){return o[Ae.getUTCDay()]}function de(Ae){return u[Ae.getUTCMonth()]}function Se(Ae){return s[Ae.getUTCMonth()]}function me(Ae){return i[+(Ae.getUTCHours()>=12)]}function Ze(Ae){return 1+~~(Ae.getUTCMonth()/3)}return{format:function(Ae){var Le=C(Ae+="",S);return Le.toString=function(){return Ae},Le},parse:function(Ae){var Le=k(Ae+="",!1);return Le.toString=function(){return Ae},Le},utcFormat:function(Ae){var Le=C(Ae+="",O);return Le.toString=function(){return Ae},Le},utcParse:function(Ae){var Le=k(Ae+="",!0);return Le.toString=function(){return Ae},Le}}}var _7={"-":"",_:" ",0:"0"},ai=/^\s*\d+/,cke=/^%/,fke=/[\\^$*+?|[\]().{}]/g;function bn(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o[t.toLowerCase(),n]))}function hke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function pke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function gke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function mke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function vke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function S7(e,t,n){var r=ai.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function yke(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function bke(e,t,n){var r=ai.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function xke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function E7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function wke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function O7(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function _ke(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function Ske(e,t,n){var r=ai.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function Cke(e,t,n){var r=ai.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function Eke(e,t,n){var r=ai.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Oke(e,t,n){var r=cke.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function Ake(e,t,n){var r=ai.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function Pke(e,t,n){var r=ai.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function A7(e,t){return bn(e.getDate(),t,2)}function kke(e,t){return bn(e.getHours(),t,2)}function Tke(e,t){return bn(e.getHours()%12||12,t,2)}function Mke(e,t){return bn(1+Bm.count(Cu(e),e),t,3)}function eH(e,t){return bn(e.getMilliseconds(),t,3)}function Rke(e,t){return eH(e,t)+"000"}function Dke(e,t){return bn(e.getMonth()+1,t,2)}function $ke(e,t){return bn(e.getMinutes(),t,2)}function Ike(e,t){return bn(e.getSeconds(),t,2)}function Nke(e){var t=e.getDay();return t===0?7:t}function Lke(e,t){return bn(Ww.count(Cu(e)-1,e),t,2)}function tH(e){var t=e.getDay();return t>=4||t===0?ih(e):ih.ceil(e)}function Fke(e,t){return e=tH(e),bn(ih.count(Cu(e),e)+(Cu(e).getDay()===4),t,2)}function jke(e){return e.getDay()}function Bke(e,t){return bn(Ib.count(Cu(e)-1,e),t,2)}function zke(e,t){return bn(e.getFullYear()%100,t,2)}function Uke(e,t){return e=tH(e),bn(e.getFullYear()%100,t,2)}function Vke(e,t){return bn(e.getFullYear()%1e4,t,4)}function Wke(e,t){var n=e.getDay();return e=n>=4||n===0?ih(e):ih.ceil(e),bn(e.getFullYear()%1e4,t,4)}function Hke(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+bn(t/60|0,"0",2)+bn(t%60,"0",2)}function P7(e,t){return bn(e.getUTCDate(),t,2)}function Kke(e,t){return bn(e.getUTCHours(),t,2)}function qke(e,t){return bn(e.getUTCHours()%12||12,t,2)}function Gke(e,t){return bn(1+Vw.count(Eu(e),e),t,3)}function nH(e,t){return bn(e.getUTCMilliseconds(),t,3)}function Yke(e,t){return nH(e,t)+"000"}function Zke(e,t){return bn(e.getUTCMonth()+1,t,2)}function Xke(e,t){return bn(e.getUTCMinutes(),t,2)}function Qke(e,t){return bn(e.getUTCSeconds(),t,2)}function Jke(e){var t=e.getUTCDay();return t===0?7:t}function eTe(e,t){return bn(Hw.count(Eu(e)-1,e),t,2)}function rH(e){var t=e.getUTCDay();return t>=4||t===0?oh(e):oh.ceil(e)}function tTe(e,t){return e=rH(e),bn(oh.count(Eu(e),e)+(Eu(e).getUTCDay()===4),t,2)}function nTe(e){return e.getUTCDay()}function rTe(e,t){return bn(Nb.count(Eu(e)-1,e),t,2)}function iTe(e,t){return bn(e.getUTCFullYear()%100,t,2)}function oTe(e,t){return e=rH(e),bn(e.getUTCFullYear()%100,t,2)}function aTe(e,t){return bn(e.getUTCFullYear()%1e4,t,4)}function sTe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?oh(e):oh.ceil(e),bn(e.getUTCFullYear()%1e4,t,4)}function uTe(){return"+0000"}function k7(){return"%"}function T7(e){return+e}function M7(e){return Math.floor(+e/1e3)}var Yf,iH,oH;lTe({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function lTe(e){return Yf=lke(e),iH=Yf.format,Yf.parse,oH=Yf.utcFormat,Yf.utcParse,Yf}function cTe(e){return new Date(e)}function fTe(e){return e instanceof Date?+e:+new Date(+e)}function b5(e,t,n,r,i,o,a,s,u,l){var c=o5(),f=c.invert,h=c.domain,p=l(".%L"),m=l(":%S"),v=l("%I:%M"),b=l("%I %p"),w=l("%a %d"),x=l("%b %d"),S=l("%B"),O=l("%Y");function E(C){return(u(C)t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>e8e(e,o/r))},n.copy=function(){return lH(t).domain(e)},Ru.apply(n,arguments)}function qw(){var e=0,t=.5,n=1,r=1,i,o,a,s,u,l=Vi,c,f=!1,h;function p(v){return isNaN(v=+v)?h:(v=.5+((v=+c(v))-o)*(r*vt}var bTe=yTe,xTe=hH,wTe=bTe,_Te=Yh;function STe(e){return e&&e.length?xTe(e,_Te,wTe):void 0}var CTe=STe;const ul=Pn(CTe);function ETe(e,t){return ee.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=re.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};st.decimalPlaces=st.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*tr;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};st.dividedBy=st.div=function(e){return hu(this,new this.constructor(e))};st.dividedToIntegerBy=st.idiv=function(e){var t=this,n=t.constructor;return zn(hu(t,new n(e),0,1),n.precision)};st.equals=st.eq=function(e){return!this.cmp(e)};st.exponent=function(){return Mr(this)};st.greaterThan=st.gt=function(e){return this.cmp(e)>0};st.greaterThanOrEqualTo=st.gte=function(e){return this.cmp(e)>=0};st.isInteger=st.isint=function(){return this.e>this.d.length-2};st.isNegative=st.isneg=function(){return this.s<0};st.isPositive=st.ispos=function(){return this.s>0};st.isZero=function(){return this.s===0};st.lessThan=st.lt=function(e){return this.cmp(e)<0};st.lessThanOrEqualTo=st.lte=function(e){return this.cmp(e)<1};st.logarithm=st.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(Do))throw Error(ya+"NaN");if(n.s<1)throw Error(ya+(n.s?"NaN":"-Infinity"));return n.eq(Do)?new r(0):(ar=!1,t=hu(Dg(n,o),Dg(e,o),o),ar=!0,zn(t,i))};st.minus=st.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?vH(t,e):gH(t,(e.s=-e.s,e))};st.modulo=st.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(ya+"NaN");return n.s?(ar=!1,t=hu(n,e,0,1).times(e),ar=!0,n.minus(t)):zn(new r(n),i)};st.naturalExponential=st.exp=function(){return mH(this)};st.naturalLogarithm=st.ln=function(){return Dg(this)};st.negated=st.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};st.plus=st.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?gH(t,e):vH(t,(e.s=-e.s,e))};st.precision=st.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error($c+e);if(t=Mr(i)+1,r=i.d.length-1,n=r*tr+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};st.squareRoot=st.sqrt=function(){var e,t,n,r,i,o,a,s=this,u=s.constructor;if(s.s<1){if(!s.s)return new u(0);throw Error(ya+"NaN")}for(e=Mr(s),ar=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=ys(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Qh((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),r=new u(t)):r=new u(i.toString()),n=u.precision,i=a=n+3;;)if(o=r,r=o.plus(hu(s,o,a+2)).times(.5),ys(o.d).slice(0,a)===(t=ys(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(zn(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return ar=!0,zn(r,n)};st.times=st.mul=function(e){var t,n,r,i,o,a,s,u,l,c=this,f=c.constructor,h=c.d,p=(e=new f(e)).d;if(!c.s||!e.s)return new f(0);for(e.s*=c.s,n=c.e+e.e,u=h.length,l=p.length,u=0;){for(t=0,i=u+r;i>r;)s=o[i]+p[r]*h[i-r-1]+t,o[i--]=s%ei|0,t=s/ei|0;o[i]=(o[i]+t)%ei|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,ar?zn(e,f.precision):e};st.toDecimalPlaces=st.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Rs(e,0,Xh),t===void 0?t=r.rounding:Rs(t,0,8),zn(n,e+Mr(n)+1,t))};st.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=nf(r,!0):(Rs(e,0,Xh),t===void 0?t=i.rounding:Rs(t,0,8),r=zn(new i(r),e+1,t),n=nf(r,!0,e+1)),n};st.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?nf(i):(Rs(e,0,Xh),t===void 0?t=o.rounding:Rs(t,0,8),r=zn(new o(i),e+Mr(i)+1,t),n=nf(r.abs(),!1,e+Mr(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};st.toInteger=st.toint=function(){var e=this,t=e.constructor;return zn(new t(e),Mr(e)+1,t.rounding)};st.toNumber=function(){return+this};st.toPower=st.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,l=12,c=+(e=new u(e));if(!e.s)return new u(Do);if(s=new u(s),!s.s){if(e.s<1)throw Error(ya+"Infinity");return s}if(s.eq(Do))return s;if(r=u.precision,e.eq(Do))return zn(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=c<0?-c:c)<=pH){for(i=new u(Do),t=Math.ceil(r/tr+4),ar=!1;n%2&&(i=i.times(s),$7(i.d,t)),n=Qh(n/2),n!==0;)s=s.times(s),$7(s.d,t);return ar=!0,e.s<0?new u(Do).div(i):zn(i,r)}}else if(o<0)throw Error(ya+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,ar=!1,i=e.times(Dg(s,r+l)),ar=!0,i=mH(i),i.s=o,i};st.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=Mr(i),r=nf(i,n<=o.toExpNeg||n>=o.toExpPos)):(Rs(e,1,Xh),t===void 0?t=o.rounding:Rs(t,0,8),i=zn(new o(i),e,t),n=Mr(i),r=nf(i,e<=n||n<=o.toExpNeg,e)),r};st.toSignificantDigits=st.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Rs(e,1,Xh),t===void 0?t=r.rounding:Rs(t,0,8)),zn(new r(n),e,t)};st.toString=st.valueOf=st.val=st.toJSON=st[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=Mr(e),n=e.constructor;return nf(e,t<=n.toExpNeg||t>=n.toExpPos)};function gH(e,t){var n,r,i,o,a,s,u,l,c=e.constructor,f=c.precision;if(!e.s||!t.s)return t.s||(t=new c(e)),ar?zn(t,f):t;if(u=e.d,l=t.d,a=e.e,i=t.e,u=u.slice(),o=a-i,o){for(o<0?(r=u,o=-o,s=l.length):(r=l,i=a,s=u.length),a=Math.ceil(f/tr),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=u.length,o=l.length,s-o<0&&(o=s,r=l,l=u,u=r),n=0;o;)n=(u[--o]=u[o]+l[o]+n)/ei|0,u[o]%=ei;for(n&&(u.unshift(n),++i),s=u.length;u[--s]==0;)u.pop();return t.d=u,t.e=i,ar?zn(t,f):t}function Rs(e,t,n){if(e!==~~e||en)throw Error($c+e)}function ys(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;ta?1:-1;else for(s=u=0;si[s]?1:-1;break}return u}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]1;)r.shift()}return function(r,i,o,a){var s,u,l,c,f,h,p,m,v,b,w,x,S,O,E,C,k,M,N=r.constructor,z=r.s==i.s?1:-1,H=r.d,V=i.d;if(!r.s)return new N(r);if(!i.s)throw Error(ya+"Division by zero");for(u=r.e-i.e,k=V.length,E=H.length,p=new N(z),m=p.d=[],l=0;V[l]==(H[l]||0);)++l;if(V[l]>(H[l]||0)&&--u,o==null?x=o=N.precision:a?x=o+(Mr(r)-Mr(i))+1:x=o,x<0)return new N(0);if(x=x/tr+2|0,l=0,k==1)for(c=0,V=V[0],x++;(l1&&(V=e(V,c),H=e(H,c),k=V.length,E=H.length),O=k,v=H.slice(0,k),b=v.length;b=ei/2&&++C;do c=0,s=t(V,v,k,b),s<0?(w=v[0],k!=b&&(w=w*ei+(v[1]||0)),c=w/C|0,c>1?(c>=ei&&(c=ei-1),f=e(V,c),h=f.length,b=v.length,s=t(f,v,h,b),s==1&&(c--,n(f,k16)throw Error(_5+Mr(e));if(!e.s)return new c(Do);for(t==null?(ar=!1,s=f):s=t,a=new c(.03125);e.abs().gte(.1);)e=e.times(a),l+=5;for(r=Math.log(hc(2,l))/Math.LN10*2+5|0,s+=r,n=i=o=new c(Do),c.precision=s;;){if(i=zn(i.times(e),s),n=n.times(++u),a=o.plus(hu(i,n,s)),ys(a.d).slice(0,s)===ys(o.d).slice(0,s)){for(;l--;)o=zn(o.times(o),s);return c.precision=f,t==null?(ar=!0,zn(o,f)):o}o=a}}function Mr(e){for(var t=e.e*tr,n=e.d[0];n>=10;n/=10)t++;return t}function t3(e,t,n){if(t>e.LN10.sd())throw ar=!0,n&&(e.precision=n),Error(ya+"LN10 precision limit exceeded");return zn(new e(e.LN10),t)}function Qu(e){for(var t="";e--;)t+="0";return t}function Dg(e,t){var n,r,i,o,a,s,u,l,c,f=1,h=10,p=e,m=p.d,v=p.constructor,b=v.precision;if(p.s<1)throw Error(ya+(p.s?"NaN":"-Infinity"));if(p.eq(Do))return new v(0);if(t==null?(ar=!1,l=b):l=t,p.eq(10))return t==null&&(ar=!0),t3(v,l);if(l+=h,v.precision=l,n=ys(m),r=n.charAt(0),o=Mr(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=ys(p.d),r=n.charAt(0),f++;o=Mr(p),r>1?(p=new v("0."+n),o++):p=new v(r+"."+n.slice(1))}else return u=t3(v,l+2,b).times(o+""),p=Dg(new v(r+"."+n.slice(1)),l-h).plus(u),v.precision=b,t==null?(ar=!0,zn(p,b)):p;for(s=a=p=hu(p.minus(Do),p.plus(Do),l),c=zn(p.times(p),l),i=3;;){if(a=zn(a.times(c),l),u=s.plus(hu(a,new v(i),l)),ys(u.d).slice(0,l)===ys(s.d).slice(0,l))return s=s.times(2),o!==0&&(s=s.plus(t3(v,l+2,b).times(o+""))),s=hu(s,new v(f),l),v.precision=b,t==null?(ar=!0,zn(s,b)):s;s=u,i+=2}}function D7(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=Qh(n/tr),e.d=[],r=(n+1)%tr,n<0&&(r+=tr),rLb||e.e<-Lb))throw Error(_5+n)}else e.s=0,e.e=0,e.d=[0];return e}function zn(e,t,n){var r,i,o,a,s,u,l,c,f=e.d;for(a=1,o=f[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=tr,i=t,l=f[c=0];else{if(c=Math.ceil((r+1)/tr),o=f.length,c>=o)return e;for(l=o=f[c],a=1;o>=10;o/=10)a++;r%=tr,i=r-tr+a}if(n!==void 0&&(o=hc(10,a-i-1),s=l/o%10|0,u=t<0||f[c+1]!==void 0||l%o,u=n<4?(s||u)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||u||n==6&&(r>0?i>0?l/hc(10,a-i):0:f[c-1])%10&1||n==(e.s<0?8:7))),t<1||!f[0])return u?(o=Mr(e),f.length=1,t=t-o-1,f[0]=hc(10,(tr-t%tr)%tr),e.e=Qh(-t/tr)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(r==0?(f.length=c,o=1,c--):(f.length=c+1,o=hc(10,tr-r),f[c]=i>0?(l/hc(10,a-i)%hc(10,i)|0)*o:0),u)for(;;)if(c==0){(f[0]+=o)==ei&&(f[0]=1,++e.e);break}else{if(f[c]+=o,f[c]!=ei)break;f[c--]=0,o=1}for(r=f.length;f[--r]===0;)f.pop();if(ar&&(e.e>Lb||e.e<-Lb))throw Error(_5+Mr(e));return e}function vH(e,t){var n,r,i,o,a,s,u,l,c,f,h=e.constructor,p=h.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new h(e),ar?zn(t,p):t;if(u=e.d,f=t.d,r=t.e,l=e.e,u=u.slice(),a=l-r,a){for(c=a<0,c?(n=u,a=-a,s=f.length):(n=f,r=l,s=u.length),i=Math.max(Math.ceil(p/tr),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=u.length,s=f.length,c=i0;--i)u[s++]=0;for(i=f.length;i>a;){if(u[--i]0?o=o.charAt(0)+"."+o.slice(1)+Qu(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Qu(-i-1)+o,n&&(r=n-a)>0&&(o+=Qu(r))):i>=a?(o+=Qu(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Qu(r))):((r=i+1)0&&(i+1===a&&(o+="."),o+=Qu(r))),e.s<0?"-"+o:o}function $7(e,t){if(e.length>t)return e.length=t,!0}function yH(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error($c+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return D7(a,o.toString())}else if(typeof o!="string")throw Error($c+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,qTe.test(o))D7(a,o);else throw Error($c+o)}if(i.prototype=st,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=yH,i.config=i.set=GTe,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error($c+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error($c+n+": "+r);return this}var S5=yH(KTe);Do=new S5(1);const Nn=S5;function YTe(e){return JTe(e)||QTe(e)||XTe(e)||ZTe()}function ZTe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function XTe(e,t){if(e){if(typeof e=="string")return i6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return i6(e,t)}}function QTe(e){if(typeof Symbol<"u"&&Symbol.iterator in Object(e))return Array.from(e)}function JTe(e){if(Array.isArray(e))return i6(e)}function i6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=t?n.apply(void 0,i):e(t-a,I7(function(){for(var s=arguments.length,u=new Array(s),l=0;le.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,i=!1,o=void 0;try{for(var a=e[Symbol.iterator](),s;!(r=(s=a.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(u){i=!0,o=u}finally{try{!r&&a.return!=null&&a.return()}finally{if(i)throw o}}return n}}function pMe(e){if(Array.isArray(e))return e}function SH(e){var t=$g(e,2),n=t[0],r=t[1],i=n,o=r;return n>r&&(i=r,o=n),[i,o]}function CH(e,t,n){if(e.lte(0))return new Nn(0);var r=Zw.getDigitCount(e.toNumber()),i=new Nn(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Nn(Math.ceil(o.div(a).toNumber())).add(n).mul(a),u=s.mul(i);return t?u:new Nn(Math.ceil(u))}function gMe(e,t,n){var r=1,i=new Nn(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Nn(10).pow(Zw.getDigitCount(e)-1),i=new Nn(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Nn(Math.floor(e)))}else e===0?i=new Nn(Math.floor((t-1)/2)):n||(i=new Nn(Math.floor(e)));var a=Math.floor((t-1)/2),s=rMe(nMe(function(u){return i.add(new Nn(u-a).mul(r)).toNumber()}),o6);return s(0,t)}function EH(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((t-e)/(n-1)))return{step:new Nn(0),tickMin:new Nn(0),tickMax:new Nn(0)};var o=CH(new Nn(t).sub(e).div(n-1),r,i),a;e<=0&&t>=0?a=new Nn(0):(a=new Nn(e).add(t).div(2),a=a.sub(new Nn(a).mod(o)));var s=Math.ceil(a.sub(e).div(o).toNumber()),u=Math.ceil(new Nn(t).sub(a).div(o).toNumber()),l=s+u+1;return l>n?EH(e,t,n,r,i+1):(l0?u+(n-l):u,s=t>0?s:s+(n-l)),{step:o,tickMin:a.sub(new Nn(s).mul(o)),tickMax:a.add(new Nn(u).mul(o))})}function mMe(e){var t=$g(e,2),n=t[0],r=t[1],i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(i,2),s=SH([n,r]),u=$g(s,2),l=u[0],c=u[1];if(l===-1/0||c===1/0){var f=c===1/0?[l].concat(s6(o6(0,i-1).map(function(){return 1/0}))):[].concat(s6(o6(0,i-1).map(function(){return-1/0})),[c]);return n>r?a6(f):f}if(l===c)return gMe(l,i,o);var h=EH(l,c,a,o),p=h.step,m=h.tickMin,v=h.tickMax,b=Zw.rangeStep(m,v.add(new Nn(.1).mul(p)),p);return n>r?a6(b):b}function vMe(e,t){var n=$g(e,2),r=n[0],i=n[1],o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=SH([r,i]),s=$g(a,2),u=s[0],l=s[1];if(u===-1/0||l===1/0)return[r,i];if(u===l)return[u];var c=Math.max(t,2),f=CH(new Nn(l).sub(u).div(c-1),o,0),h=[].concat(s6(Zw.rangeStep(new Nn(u),new Nn(l).sub(new Nn(.99).mul(f)),f)),[l]);return r>i?a6(h):h}var yMe=wH(mMe),bMe=wH(vMe),xMe="Invariant failed";function rf(e,t){throw new Error(xMe)}var wMe=["offset","layout","width","dataKey","data","dataPointFormatter","xAxis","yAxis"];function ah(e){"@babel/helpers - typeof";return ah=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ah(e)}function Fb(){return Fb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PMe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function kMe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function TMe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,a=-1,s=(n=r?.length)!==null&&n!==void 0?n:0;if(s<=1)return 0;if(o&&o.axisType==="angleAxis"&&Math.abs(Math.abs(o.range[1]-o.range[0])-360)<=1e-6)for(var u=o.range,l=0;l0?i[l-1].coordinate:i[s-1].coordinate,f=i[l].coordinate,h=l>=s-1?i[0].coordinate:i[l+1].coordinate,p=void 0;if(Ua(f-c)!==Ua(h-f)){var m=[];if(Ua(h-f)===Ua(u[1]-u[0])){p=h;var v=f+u[1]-u[0];m[0]=Math.min(v,(v+c)/2),m[1]=Math.max(v,(v+c)/2)}else{p=c;var b=h+u[1]-u[0];m[0]=Math.min(f,(b+f)/2),m[1]=Math.max(f,(b+f)/2)}var w=[Math.min(f,(p+f)/2),Math.max(f,(p+f)/2)];if(t>w[0]&&t<=w[1]||t>=m[0]&&t<=m[1]){a=i[l].index;break}}else{var x=Math.min(c,h),S=Math.max(c,h);if(t>(x+f)/2&&t<=(S+f)/2){a=i[l].index;break}}}else for(var O=0;O0&&O(r[O].coordinate+r[O-1].coordinate)/2&&t<=(r[O].coordinate+r[O+1].coordinate)/2||O===s-1&&t>(r[O].coordinate+r[O-1].coordinate)/2){a=r[O].index;break}return a},C5=function(t){var n,r=t,i=r.type.displayName,o=(n=t.type)!==null&&n!==void 0&&n.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,a=o.stroke,s=o.fill,u;switch(i){case"Line":u=a;break;case"Area":case"Radar":u=a&&a!=="none"?a:s;break;default:u=s;break}return u},qMe=function(t){var n=t.barSize,r=t.totalSize,i=t.stackGroups,o=i===void 0?{}:i;if(!o)return{};for(var a={},s=Object.keys(o),u=0,l=s.length;u=0});if(w&&w.length){var x=w[0].type.defaultProps,S=x!==void 0?mr(mr({},x),w[0].props):w[0].props,O=S.barSize,E=S[b];a[E]||(a[E]=[]);var C=Ut(O)?n:O;a[E].push({item:w[0],stackList:w.slice(1),barSize:Ut(C)?void 0:ef(C,r,0)})}}return a},GMe=function(t){var n=t.barGap,r=t.barCategoryGap,i=t.bandSize,o=t.sizeList,a=o===void 0?[]:o,s=t.maxBarSize,u=a.length;if(u<1)return null;var l=ef(n,i,0,!0),c,f=[];if(a[0].barSize===+a[0].barSize){var h=!1,p=i/u,m=a.reduce(function(O,E){return O+E.barSize||0},0);m+=(u-1)*l,m>=i&&(m-=(u-1)*l,l=0),m>=i&&p>0&&(h=!0,p*=.9,m=u*p);var v=(i-m)/2>>0,b={offset:v-l,size:0};c=a.reduce(function(O,E){var C={item:E.item,position:{offset:b.offset+b.size+l,size:h?p:E.barSize}},k=[].concat(F7(O),[C]);return b=k[k.length-1].position,E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:b})}),k},f)}else{var w=ef(r,i,0,!0);i-2*w-(u-1)*l<=0&&(l=0);var x=(i-2*w-(u-1)*l)/u;x>1&&(x>>=0);var S=s===+s?Math.min(x,s):x;c=a.reduce(function(O,E,C){var k=[].concat(F7(O),[{item:E.item,position:{offset:w+(x+l)*C+(x-S)/2,size:S}}]);return E.stackList&&E.stackList.length&&E.stackList.forEach(function(M){k.push({item:M,position:k[k.length-1].position})}),k},f)}return c},YMe=function(t,n,r,i){var o=r.children,a=r.width,s=r.margin,u=a-(s.left||0)-(s.right||0),l=kH({children:o,legendWidth:u});if(l){var c=i||{},f=c.width,h=c.height,p=l.align,m=l.verticalAlign,v=l.layout;if((v==="vertical"||v==="horizontal"&&m==="middle")&&p!=="center"&&qe(t[p]))return mr(mr({},t),{},Id({},p,t[p]+(f||0)));if((v==="horizontal"||v==="vertical"&&p==="center")&&m!=="middle"&&qe(t[m]))return mr(mr({},t),{},Id({},m,t[m]+(h||0)))}return t},ZMe=function(t,n,r){return Ut(n)?!0:t==="horizontal"?n==="yAxis":t==="vertical"||r==="x"?n==="xAxis":r==="y"?n==="yAxis":!0},TH=function(t,n,r,i,o){var a=n.props.children,s=po(a,Jh).filter(function(l){return ZMe(i,o,l.props.direction)});if(s&&s.length){var u=s.map(function(l){return l.props.dataKey});return t.reduce(function(l,c){var f=Kr(c,r);if(Ut(f))return l;var h=Array.isArray(f)?[Gw(f),ul(f)]:[f,f],p=u.reduce(function(m,v){var b=Kr(c,v,0),w=h[0]-Math.abs(Array.isArray(b)?b[0]:b),x=h[1]+Math.abs(Array.isArray(b)?b[1]:b);return[Math.min(w,m[0]),Math.max(x,m[1])]},[1/0,-1/0]);return[Math.min(p[0],l[0]),Math.max(p[1],l[1])]},[1/0,-1/0])}return null},XMe=function(t,n,r,i,o){var a=n.map(function(s){return TH(t,s,r,o,i)}).filter(function(s){return!Ut(s)});return a&&a.length?a.reduce(function(s,u){return[Math.min(s[0],u[0]),Math.max(s[1],u[1])]},[1/0,-1/0]):null},MH=function(t,n,r,i,o){var a=n.map(function(u){var l=u.props.dataKey;return r==="number"&&l&&TH(t,u,l,i)||E0(t,l,r,o)});if(r==="number")return a.reduce(function(u,l){return[Math.min(u[0],l[0]),Math.max(u[1],l[1])]},[1/0,-1/0]);var s={};return a.reduce(function(u,l){for(var c=0,f=l.length;c=2?Ua(s[0]-s[1])*2*l:l,n&&(t.ticks||t.niceTicks)){var c=(t.ticks||t.niceTicks).map(function(f){var h=o?o.indexOf(f):f;return{coordinate:i(h)+l,value:f,offset:l}});return c.filter(function(f){return!Kh(f.coordinate)})}return t.isCategorical&&t.categoricalDomain?t.categoricalDomain.map(function(f,h){return{coordinate:i(f)+l,value:f,index:h,offset:l}}):i.ticks&&!r?i.ticks(t.tickCount).map(function(f){return{coordinate:i(f)+l,value:f,offset:l}}):i.domain().map(function(f,h){return{coordinate:i(f)+l,value:o?o[f]:f,index:h,offset:l}})},n3=new WeakMap,wy=function(t,n){if(typeof n!="function")return t;n3.has(t)||n3.set(t,new WeakMap);var r=n3.get(t);if(r.has(n))return r.get(n);var i=function(){t.apply(void 0,arguments),n.apply(void 0,arguments)};return r.set(n,i),i},QMe=function(t,n,r){var i=t.scale,o=t.type,a=t.layout,s=t.axisType;if(i==="auto")return a==="radial"&&s==="radiusAxis"?{scale:Pg(),realScaleType:"band"}:a==="radial"&&s==="angleAxis"?{scale:Db(),realScaleType:"linear"}:o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?{scale:C0(),realScaleType:"point"}:o==="category"?{scale:Pg(),realScaleType:"band"}:{scale:Db(),realScaleType:"linear"};if(Im(i)){var u="scale".concat($w(i));return{scale:(R7[u]||C0)(),realScaleType:R7[u]?u:"point"}}return Wt(i)?{scale:i}:{scale:C0(),realScaleType:"point"}},B7=1e-4,JMe=function(t){var n=t.domain();if(!(!n||n.length<=2)){var r=n.length,i=t.range(),o=Math.min(i[0],i[1])-B7,a=Math.max(i[0],i[1])+B7,s=t(n[0]),u=t(n[r-1]);(sa||ua)&&t.domain([n[0],n[r-1]])}},eRe=function(t,n){if(!t)return null;for(var r=0,i=t.length;ri)&&(o[1]=i),o[0]>i&&(o[0]=i),o[1]=0?(t[s][r][0]=o,t[s][r][1]=o+u,o=t[s][r][1]):(t[s][r][0]=a,t[s][r][1]=a+u,a=t[s][r][1])}},rRe=function(t){var n=t.length;if(!(n<=0))for(var r=0,i=t[0].length;r=0?(t[a][r][0]=o,t[a][r][1]=o+s,o=t[a][r][1]):(t[a][r][0]=0,t[a][r][1]=0)}},iRe={sign:nRe,expand:bSe,none:Qd,silhouette:xSe,wiggle:wSe,positive:rRe},oRe=function(t,n,r){var i=n.map(function(s){return s.props.dataKey}),o=iRe[r],a=ySe().keys(i).value(function(s,u){return+Kr(s,u,0)}).order(IE).offset(o);return a(t)},aRe=function(t,n,r,i,o,a){if(!t)return null;var s=a?n.reverse():n,u={},l=s.reduce(function(f,h){var p,m=(p=h.type)!==null&&p!==void 0&&p.defaultProps?mr(mr({},h.type.defaultProps),h.props):h.props,v=m.stackId,b=m.hide;if(b)return f;var w=m[r],x=f[w]||{hasStack:!1,stackGroups:{}};if(Hr(v)){var S=x.stackGroups[v]||{numericAxisId:r,cateAxisId:i,items:[]};S.items.push(h),x.hasStack=!0,x.stackGroups[v]=S}else x.stackGroups[vf("_stackId_")]={numericAxisId:r,cateAxisId:i,items:[h]};return mr(mr({},f),{},Id({},w,x))},u),c={};return Object.keys(l).reduce(function(f,h){var p=l[h];if(p.hasStack){var m={};p.stackGroups=Object.keys(p.stackGroups).reduce(function(v,b){var w=p.stackGroups[b];return mr(mr({},v),{},Id({},b,{numericAxisId:r,cateAxisId:i,items:w.items,stackedData:oRe(t,w.items,o)}))},m)}return mr(mr({},f),{},Id({},h,p))},c)},sRe=function(t,n){var r=n.realScaleType,i=n.type,o=n.tickCount,a=n.originalDomain,s=n.allowDecimals,u=r||n.scale;if(u!=="auto"&&u!=="linear")return null;if(o&&i==="number"&&a&&(a[0]==="auto"||a[1]==="auto")){var l=t.domain();if(!l.length)return null;var c=yMe(l,o,s);return t.domain([Gw(c),ul(c)]),{niceTicks:c}}if(o&&i==="number"){var f=t.domain(),h=bMe(f,o,s);return{niceTicks:h}}return null};function sh(e){var t=e.axis,n=e.ticks,r=e.bandSize,i=e.entry,o=e.index,a=e.dataKey;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ut(i[t.dataKey])){var s=fb(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var u=Kr(i,Ut(a)?t.dataKey:a);return Ut(u)?null:t.scale(u)}var z7=function(t){var n=t.axis,r=t.ticks,i=t.offset,o=t.bandSize,a=t.entry,s=t.index;if(n.type==="category")return r[s]?r[s].coordinate+i:null;var u=Kr(a,n.dataKey,n.domain[s]);return Ut(u)?null:n.scale(u)-o/2+i},uRe=function(t){var n=t.numericAxis,r=n.scale.domain();if(n.type==="number"){var i=Math.min(r[0],r[1]),o=Math.max(r[0],r[1]);return i<=0&&o>=0?0:o<0?o:i}return r[0]},lRe=function(t,n){var r,i=(r=t.type)!==null&&r!==void 0&&r.defaultProps?mr(mr({},t.type.defaultProps),t.props):t.props,o=i.stackId;if(Hr(o)){var a=n[o];if(a){var s=a.items.indexOf(t);return s>=0?a.stackedData[s]:null}}return null},cRe=function(t){return t.reduce(function(n,r){return[Gw(r.concat([n[0]]).filter(qe)),ul(r.concat([n[1]]).filter(qe))]},[1/0,-1/0])},$H=function(t,n,r){return Object.keys(t).reduce(function(i,o){var a=t[o],s=a.stackedData,u=s.reduce(function(l,c){var f=cRe(c.slice(n,r+1));return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(u[0],i[0]),Math.max(u[1],i[1])]},[1/0,-1/0]).map(function(i){return i===1/0||i===-1/0?0:i})},U7=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,V7=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,f6=function(t,n,r){if(Wt(t))return t(n,r);if(!Array.isArray(t))return n;var i=[];if(qe(t[0]))i[0]=r?t[0]:Math.min(t[0],n[0]);else if(U7.test(t[0])){var o=+U7.exec(t[0])[1];i[0]=n[0]-o}else Wt(t[0])?i[0]=t[0](n[0]):i[0]=n[0];if(qe(t[1]))i[1]=r?t[1]:Math.max(t[1],n[1]);else if(V7.test(t[1])){var a=+V7.exec(t[1])[1];i[1]=n[1]+a}else Wt(t[1])?i[1]=t[1](n[1]):i[1]=n[1];return i},Bb=function(t,n,r){if(t&&t.scale&&t.scale.bandwidth){var i=t.scale.bandwidth();if(!r||i>0)return i}if(t&&n&&n.length>=2){for(var o=XA(n,function(f){return f.coordinate}),a=1/0,s=1,u=o.length;sa&&(l=2*Math.PI-l),{radius:s,angle:pRe(l),angleInRadian:l}},vRe=function(t){var n=t.startAngle,r=t.endAngle,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return{startAngle:n-a*360,endAngle:r-a*360}},yRe=function(t,n){var r=n.startAngle,i=n.endAngle,o=Math.floor(r/360),a=Math.floor(i/360),s=Math.min(o,a);return t+s*360},q7=function(t,n){var r=t.x,i=t.y,o=mRe({x:r,y:i},n),a=o.radius,s=o.angle,u=n.innerRadius,l=n.outerRadius;if(al)return!1;if(a===0)return!0;var c=vRe(n),f=c.startAngle,h=c.endAngle,p=s,m;if(f<=h){for(;p>h;)p-=360;for(;p=f&&p<=h}else{for(;p>f;)p-=360;for(;p=h&&p<=f}return m?K7(K7({},n),{},{radius:a,angle:yRe(p,n)}):null};function Fg(e){"@babel/helpers - typeof";return Fg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fg(e)}var bRe=["offset"];function xRe(e){return CRe(e)||SRe(e)||_Re(e)||wRe()}function wRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _Re(e,t){if(e){if(typeof e=="string")return d6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d6(e,t)}}function SRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function CRe(e){if(Array.isArray(e))return d6(e)}function d6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ORe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function G7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jr(e){for(var t=1;t=0?1:-1,S,O;i==="insideStart"?(S=p+x*a,O=v):i==="insideEnd"?(S=m-x*a,O=!v):i==="end"&&(S=m+x*a,O=v),O=w<=0?O:!O;var E=pi(l,c,b,S),C=pi(l,c,b,S+(O?1:-1)*359),k="M".concat(E.x,",").concat(E.y,` A`).concat(b,",").concat(b,",0,1,").concat(O?0:1,`, - `).concat(C.x,",").concat(C.y),M=Ut(t.id)?vf("recharts-radial-line-"):t.id;return F.createElement("text",Fg({},r,{dominantBaseline:"central",className:dn("recharts-radial-bar-label",s)}),F.createElement("defs",null,F.createElement("path",{id:M,d:k})),F.createElement("textPath",{xlinkHref:"#".concat(M)},n))},RRe=function(t){var n=t.viewBox,r=t.offset,i=t.position,o=n,a=o.cx,s=o.cy,u=o.innerRadius,l=o.outerRadius,c=o.startAngle,f=o.endAngle,h=(c+f)/2;if(i==="outside"){var p=pi(a,s,l+r,h),m=p.x,v=p.y;return{x:m,y:v,textAnchor:m>=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},DRe=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Uh(o)&&(qe(o.x)||Sc(o.x))&&(qe(o.y)||Sc(o.y))?jr({x:s+ef(o.x,l),y:u+ef(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},$Re=function(t){return"cx"in t&&qe(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=CRe(e,yRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Wt(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=kRe(i);var m=$Re(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return MRe(i,p,v);var b=m?RRe(i):DRe(i);return F.createElement(Ob,Fg({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var NH=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(qe(v)&&qe(b)){if(qe(f)&&qe(h))return{x:f,y:h,width:v,height:b};if(qe(p)&&qe(m))return{x:p,y:m,width:v,height:b}}return qe(f)&&qe(h)?{x:f,y:h,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},IRe=function(t,n){return t?t===!0?F.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?F.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Uh(t)?F.createElement(ki,Fg({viewBox:n},t,{key:"label-implicit"})):null:null},NRe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=NH(t),a=po(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=IRe(t.label,n||o);return[s].concat(bRe(a))};ki.parseViewBox=NH;ki.renderCallByParent=NRe;function LRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var FRe=LRe;const jRe=Pn(FRe);function jg(e){"@babel/helpers - typeof";return jg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jg(e)}var BRe=["valueAccessor"],zRe=["data","dataKey","clockWise","id","textBreakAll"];function URe(e){return KRe(e)||HRe(e)||WRe(e)||VRe()}function VRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WRe(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function HRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function KRe(e){if(Array.isArray(e))return h6(e)}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var XRe=function(t){return Array.isArray(t.value)?jRe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?XRe:t,r=Z7(e,BRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=Z7(r,zRe);return!i||!i.length?null:F.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):Kr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return F.createElement(ki,Ub({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:Y7(Y7({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function QRe(e,t){return e?e===!0?F.createElement(As,{key:"labelList-implicit",data:t}):F.isValidElement(e)||Wt(e)?F.createElement(As,{key:"labelList-implicit",data:t,content:e}):Uh(e)?F.createElement(As,Ub({data:t},e,{key:"labelList-implicit"})):null:null}function JRe(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=po(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=QRe(e.label,t);return[o].concat(URe(i))}As.renderCallByParent=JRe;function Bg(e){"@babel/helpers - typeof";return Bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bg(e)}function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=a?"start":"end",verticalAnchor:"middle"}}if(i==="center")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"middle"};if(i==="centerTop")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"start"};if(i==="centerBottom")return{x:a,y:s,textAnchor:"middle",verticalAnchor:"end"};var b=(u+l)/2,w=pi(a,s,b,h),x=w.x,S=w.y;return{x,y:S,textAnchor:"middle",verticalAnchor:"middle"}},$Re=function(t){var n=t.viewBox,r=t.parentViewBox,i=t.offset,o=t.position,a=n,s=a.x,u=a.y,l=a.width,c=a.height,f=c>=0?1:-1,h=f*i,p=f>0?"end":"start",m=f>0?"start":"end",v=l>=0?1:-1,b=v*i,w=v>0?"end":"start",x=v>0?"start":"end";if(o==="top"){var S={x:s+l/2,y:u-f*i,textAnchor:"middle",verticalAnchor:p};return jr(jr({},S),r?{height:Math.max(u-r.y,0),width:l}:{})}if(o==="bottom"){var O={x:s+l/2,y:u+c+h,textAnchor:"middle",verticalAnchor:m};return jr(jr({},O),r?{height:Math.max(r.y+r.height-(u+c),0),width:l}:{})}if(o==="left"){var E={x:s-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"};return jr(jr({},E),r?{width:Math.max(E.x-r.x,0),height:c}:{})}if(o==="right"){var C={x:s+l+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"};return jr(jr({},C),r?{width:Math.max(r.x+r.width-C.x,0),height:c}:{})}var k=r?{width:l,height:c}:{};return o==="insideLeft"?jr({x:s+b,y:u+c/2,textAnchor:x,verticalAnchor:"middle"},k):o==="insideRight"?jr({x:s+l-b,y:u+c/2,textAnchor:w,verticalAnchor:"middle"},k):o==="insideTop"?jr({x:s+l/2,y:u+h,textAnchor:"middle",verticalAnchor:m},k):o==="insideBottom"?jr({x:s+l/2,y:u+c-h,textAnchor:"middle",verticalAnchor:p},k):o==="insideTopLeft"?jr({x:s+b,y:u+h,textAnchor:x,verticalAnchor:m},k):o==="insideTopRight"?jr({x:s+l-b,y:u+h,textAnchor:w,verticalAnchor:m},k):o==="insideBottomLeft"?jr({x:s+b,y:u+c-h,textAnchor:x,verticalAnchor:p},k):o==="insideBottomRight"?jr({x:s+l-b,y:u+c-h,textAnchor:w,verticalAnchor:p},k):Uh(o)&&(qe(o.x)||Sc(o.x))&&(qe(o.y)||Sc(o.y))?jr({x:s+ef(o.x,l),y:u+ef(o.y,c),textAnchor:"end",verticalAnchor:"end"},k):jr({x:s+l/2,y:u+c/2,textAnchor:"middle",verticalAnchor:"middle"},k)},IRe=function(t){return"cx"in t&&qe(t.cx)};function ki(e){var t=e.offset,n=t===void 0?5:t,r=ERe(e,bRe),i=jr({offset:n},r),o=i.viewBox,a=i.position,s=i.value,u=i.children,l=i.content,c=i.className,f=c===void 0?"":c,h=i.textBreakAll;if(!o||Ut(s)&&Ut(u)&&!y.isValidElement(l)&&!Wt(l))return null;if(y.isValidElement(l))return y.cloneElement(l,i);var p;if(Wt(l)){if(p=y.createElement(l,i),y.isValidElement(p))return p}else p=TRe(i);var m=IRe(o),v=zt(i,!0);if(m&&(a==="insideStart"||a==="insideEnd"||a==="end"))return RRe(i,p,v);var b=m?DRe(i):$Re(i);return F.createElement(Ob,jg({className:dn("recharts-label",f)},v,b,{breakAll:h}),p)}ki.displayName="Label";var NH=function(t){var n=t.cx,r=t.cy,i=t.angle,o=t.startAngle,a=t.endAngle,s=t.r,u=t.radius,l=t.innerRadius,c=t.outerRadius,f=t.x,h=t.y,p=t.top,m=t.left,v=t.width,b=t.height,w=t.clockWise,x=t.labelViewBox;if(x)return x;if(qe(v)&&qe(b)){if(qe(f)&&qe(h))return{x:f,y:h,width:v,height:b};if(qe(p)&&qe(m))return{x:p,y:m,width:v,height:b}}return qe(f)&&qe(h)?{x:f,y:h,width:0,height:0}:qe(n)&&qe(r)?{cx:n,cy:r,startAngle:o||i||0,endAngle:a||i||0,innerRadius:l||0,outerRadius:c||u||s||0,clockWise:w}:t.viewBox?t.viewBox:{}},NRe=function(t,n){return t?t===!0?F.createElement(ki,{key:"label-implicit",viewBox:n}):Hr(t)?F.createElement(ki,{key:"label-implicit",viewBox:n,value:t}):y.isValidElement(t)?t.type===ki?y.cloneElement(t,{key:"label-implicit",viewBox:n}):F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Wt(t)?F.createElement(ki,{key:"label-implicit",content:t,viewBox:n}):Uh(t)?F.createElement(ki,jg({viewBox:n},t,{key:"label-implicit"})):null:null},LRe=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!t||!t.children&&r&&!t.label)return null;var i=t.children,o=NH(t),a=po(i,ki).map(function(u,l){return y.cloneElement(u,{viewBox:n||o,key:"label-".concat(l)})});if(!r)return a;var s=NRe(t.label,n||o);return[s].concat(xRe(a))};ki.parseViewBox=NH;ki.renderCallByParent=LRe;function FRe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var jRe=FRe;const BRe=Pn(jRe);function Bg(e){"@babel/helpers - typeof";return Bg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bg(e)}var zRe=["valueAccessor"],URe=["data","dataKey","clockWise","id","textBreakAll"];function VRe(e){return qRe(e)||KRe(e)||HRe(e)||WRe()}function WRe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HRe(e,t){if(e){if(typeof e=="string")return h6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h6(e,t)}}function KRe(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function qRe(e){if(Array.isArray(e))return h6(e)}function h6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function XRe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var QRe=function(t){return Array.isArray(t.value)?BRe(t.value):t.value};function As(e){var t=e.valueAccessor,n=t===void 0?QRe:t,r=X7(e,zRe),i=r.data,o=r.dataKey,a=r.clockWise,s=r.id,u=r.textBreakAll,l=X7(r,URe);return!i||!i.length?null:F.createElement(Cn,{className:"recharts-label-list"},i.map(function(c,f){var h=Ut(o)?n(c,f):Kr(c&&c.payload,o),p=Ut(s)?{}:{id:"".concat(s,"-").concat(f)};return F.createElement(ki,Ub({},zt(c,!0),l,p,{parentViewBox:c.parentViewBox,value:h,textBreakAll:u,viewBox:ki.parseViewBox(Ut(a)?c:Z7(Z7({},c),{},{clockWise:a})),key:"label-".concat(f),index:f}))}))}As.displayName="LabelList";function JRe(e,t){return e?e===!0?F.createElement(As,{key:"labelList-implicit",data:t}):F.isValidElement(e)||Wt(e)?F.createElement(As,{key:"labelList-implicit",data:t,content:e}):Uh(e)?F.createElement(As,Ub({data:t},e,{key:"labelList-implicit"})):null:null}function e9e(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(!e||!e.children&&n&&!e.label)return null;var r=e.children,i=po(r,As).map(function(a,s){return y.cloneElement(a,{data:t,key:"labelList-".concat(s)})});if(!n)return i;var o=JRe(e.label,t);return[o].concat(VRe(i))}As.renderCallByParent=e9e;function zg(e){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zg(e)}function p6(){return p6=Object.assign?Object.assign.bind():function(e){for(var t=1;t180),",").concat(+(a>l),`, `).concat(f.x,",").concat(f.y,` `);if(i>0){var p=pi(n,r,i,a),m=pi(n,r,i,l);h+="L ".concat(m.x,",").concat(m.y,` A `).concat(i,",").concat(i,`,0, `).concat(+(Math.abs(u)>180),",").concat(+(a<=l),`, - `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},iDe=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,u=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,f=Ua(c-l),h=wy({cx:n,cy:r,radius:o,angle:l,sign:f,cornerRadius:a,cornerIsExternal:u}),p=h.circleTangency,m=h.lineTangency,v=h.theta,b=wy({cx:n,cy:r,radius:o,angle:c,sign:-f,cornerRadius:a,cornerIsExternal:u}),w=b.circleTangency,x=b.lineTangency,S=b.theta,O=u?Math.abs(l-c):Math.abs(l-c)-v-S;if(O<0)return s?"M ".concat(m.x,",").concat(m.y,` + `).concat(p.x,",").concat(p.y," Z")}else h+="L ".concat(n,",").concat(r," Z");return h},o9e=function(t){var n=t.cx,r=t.cy,i=t.innerRadius,o=t.outerRadius,a=t.cornerRadius,s=t.forceCornerRadius,u=t.cornerIsExternal,l=t.startAngle,c=t.endAngle,f=Ua(c-l),h=_y({cx:n,cy:r,radius:o,angle:l,sign:f,cornerRadius:a,cornerIsExternal:u}),p=h.circleTangency,m=h.lineTangency,v=h.theta,b=_y({cx:n,cy:r,radius:o,angle:c,sign:-f,cornerRadius:a,cornerIsExternal:u}),w=b.circleTangency,x=b.lineTangency,S=b.theta,O=u?Math.abs(l-c):Math.abs(l-c)-v-S;if(O<0)return s?"M ".concat(m.x,",").concat(m.y,` a`).concat(a,",").concat(a,",0,0,1,").concat(a*2,`,0 a`).concat(a,",").concat(a,",0,0,1,").concat(-a*2,`,0 `):LH({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:l,endAngle:c});var E="M ".concat(m.x,",").concat(m.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(p.x,",").concat(p.y,` A`).concat(o,",").concat(o,",0,").concat(+(O>180),",").concat(+(f<0),",").concat(w.x,",").concat(w.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(x.x,",").concat(x.y,` - `);if(i>0){var C=wy({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),k=C.circleTangency,M=C.lineTangency,N=C.theta,z=wy({cx:n,cy:r,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),H=z.circleTangency,V=z.lineTangency,ne=z.theta,Z=u?Math.abs(l-c):Math.abs(l-c)-N-ne;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(V.x,",").concat(V.y,` + `);if(i>0){var C=_y({cx:n,cy:r,radius:i,angle:l,sign:f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),k=C.circleTangency,M=C.lineTangency,N=C.theta,z=_y({cx:n,cy:r,radius:i,angle:c,sign:-f,isExternal:!0,cornerRadius:a,cornerIsExternal:u}),H=z.circleTangency,V=z.lineTangency,ne=z.theta,Z=u?Math.abs(l-c):Math.abs(l-c)-N-ne;if(Z<0&&a===0)return"".concat(E,"L").concat(n,",").concat(r,"Z");E+="L".concat(V.x,",").concat(V.y,` A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(H.x,",").concat(H.y,` A`).concat(i,",").concat(i,",0,").concat(+(Z>180),",").concat(+(f>0),",").concat(k.x,",").concat(k.y,` - A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},oDe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},FH=function(t){var n=Q7(Q7({},oDe),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=iDe({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=LH({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),F.createElement("path",p6({},zt(n,!0),{className:p,d:b,role:"img"}))};function zg(e){"@babel/helpers - typeof";return zg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zg(e)}function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function gDe(e,t){return ep(e.getTime(),t.getTime())}function a$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function mDe(e,t,n){var r=o$(e),i=r.length;if(o$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Gp(e,t,n){var r=r$(e),i=r.length;if(r$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=i$(e,o),s=i$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function vDe(e,t){return ep(e.valueOf(),t.valueOf())}function yDe(e,t){return e.source===t.source&&e.flags===t.flags}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function bDe(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var xDe="[object Arguments]",wDe="[object Boolean]",_De="[object Date]",SDe="[object Map]",CDe="[object Number]",EDe="[object Object]",ODe="[object RegExp]",ADe="[object Set]",PDe="[object String]",kDe=Array.isArray,u$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,l$=Object.assign,TDe=Object.prototype.toString.call.bind(Object.prototype.toString);function MDe(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(kDe(c))return t(c,f,h);if(u$!=null&&u$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=TDe(c);return m===_De?n(c,f,h):m===ODe?a(c,f,h):m===SDe?r(c,f,h):m===ADe?s(c,f,h):m===EDe?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===xDe?i(c,f,h):m===wDe||m===CDe||m===PDe?o(c,f,h):!1}}function RDe(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Gp:pDe,areDatesEqual:gDe,areMapsEqual:r?n$(a$,Gp):a$,areObjectsEqual:r?Gp:mDe,arePrimitiveWrappersEqual:vDe,areRegExpsEqual:yDe,areSetsEqual:r?n$(s$,Gp):s$,areTypedArraysEqual:r?Gp:bDe};if(n&&(i=l$({},i,n(i))),t){var o=Sy(i.areArraysEqual),a=Sy(i.areMapsEqual),s=Sy(i.areObjectsEqual),u=Sy(i.areSetsEqual);i=l$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function DDe(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function $De(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var IDe=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return ep}});Kl({strict:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=RDe(e),u=MDe(s),l=r?r(u):DDe(u);return $De({circular:n,comparator:u,createState:i,equals:l,strict:a})}function NDe(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function c$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):NDe(i)};requestAnimationFrame(r)}function m6(e){"@babel/helpers - typeof";return m6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m6(e)}function LDe(e){return zDe(e)||BDe(e)||jDe(e)||FDe()}function FDe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jDe(e,t){if(e){if(typeof e=="string")return f$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f$(e,t)}}function f$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},v=function(w){for(var x=w>1?1:w,S=x,O=0;O<8;++O){var E=f(S)-x,C=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,u=function(c,f,h){var p=-(c-f)*r,m=h*o,v=h+(p-m)*s/1e3,b=h*s/1e3+c;return Math.abs(b-f)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function y9e(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function r3(e){return _9e(e)||w9e(e)||x9e(e)||b9e()}function b9e(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function x9e(e,t){if(e){if(typeof e=="string")return w6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w6(e,t)}}function w9e(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _9e(e){if(Array.isArray(e))return w6(e)}function w6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hb(e)}var Xa=function(e){A9e(n,e);var t=P9e(n);function n(r,i){var o;S9e(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,u=a.attributeName,l=a.from,c=a.to,f=a.steps,h=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(C6(o)),o.changeStyle=o.changeStyle.bind(C6(o)),!s||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),S6(o);if(f&&f.length)o.state={style:f[0].style};else if(l){if(typeof h=="function")return o.state={style:l},S6(o);o.state={style:u?u0({},u,l):l}}else o.state={style:{}};return o}return E9e(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,u=o.attributeName,l=o.shouldReAnimate,c=o.to,f=o.from,h=this.state.style;if(s){if(!a){var p={style:u?u0({},u,c):c};this.state&&h&&(u&&h[u]!==c||!u&&h!==c)&&this.setState(p);return}if(!(IDe(i.to,c)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||l?f:i.to;if(this.state&&h){var b={style:u?u0({},u,v):v};(u&&h[u]!==v||!u&&h!==v)&&this.setState(b)}this.runAnimation(ka(ka({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,u=i.duration,l=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=g9e(a,s,i9e(l),u,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([h,c,m,u,f])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,u=i.onAnimationStart,l=a[0],c=l.style,f=l.duration,h=f===void 0?0:f,p=function(v,b,w){if(w===0)return v;var x=b.duration,S=b.easing,O=S===void 0?"ease":S,E=b.style,C=b.properties,k=b.onAnimationEnd,M=w>0?a[w-1]:b,N=C||Object.keys(E);if(typeof O=="function"||O==="spring")return[].concat(r3(v),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:O}),x]);var z=p$(N,x,O),H=ka(ka(ka({},M.style),E),{},{transition:z});return[].concat(r3(v),[H,x,k]).filter(KDe)};return this.manager.start([u].concat(r3(a.reduce(p,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=UDe());var o=i.begin,a=i.duration,s=i.attributeName,u=i.to,l=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof l=="function"||typeof p=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?u0({},s,u):u,b=p$(Object.keys(v),a,l);m.start([c,o,ka(ka({},v),{},{transition:b}),a,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=v9e(i,m9e),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!s||l===0||a<=0)return o;var f=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,w=m.className,x=y.cloneElement(p,ka(ka({},u),{},{style:ka(ka({},b),c),className:w}));return x};return l===1?f(y.Children.only(o)):F.createElement("div",null,y.Children.map(o,function(h){return f(h)}))}}]),n}(y.PureComponent);Xa.displayName="Animate";Xa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Xa.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Wg(e){"@babel/helpers - typeof";return Wg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wg(e)}function Kb(){return Kb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,u=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ha?a:o[h];c="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(t+u*f[0],",").concat(n)),c+="L ".concat(t+r-u*f[1],",").concat(n),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, + A`).concat(a,",").concat(a,",0,0,").concat(+(f<0),",").concat(M.x,",").concat(M.y,"Z")}else E+="L".concat(n,",").concat(r,"Z");return E},a9e={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},FH=function(t){var n=J7(J7({},a9e),t),r=n.cx,i=n.cy,o=n.innerRadius,a=n.outerRadius,s=n.cornerRadius,u=n.forceCornerRadius,l=n.cornerIsExternal,c=n.startAngle,f=n.endAngle,h=n.className;if(a0&&Math.abs(c-f)<360?b=o9e({cx:r,cy:i,innerRadius:o,outerRadius:a,cornerRadius:Math.min(v,m/2),forceCornerRadius:u,cornerIsExternal:l,startAngle:c,endAngle:f}):b=LH({cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:c,endAngle:f}),F.createElement("path",p6({},zt(n,!0),{className:p,d:b,role:"img"}))};function Ug(e){"@babel/helpers - typeof";return Ug=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ug(e)}function g6(){return g6=Object.assign?Object.assign.bind():function(e){for(var t=1;t0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function m9e(e,t){return ep(e.getTime(),t.getTime())}function s$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.entries(),o=0,a,s;(a=i.next())&&!a.done;){for(var u=t.entries(),l=!1,c=0;(s=u.next())&&!s.done;){var f=a.value,h=f[0],p=f[1],m=s.value,v=m[0],b=m[1];!l&&!r[c]&&(l=n.equals(h,v,o,c,e,t,n)&&n.equals(p,b,h,v,e,t,n))&&(r[c]=!0),c++}if(!l)return!1;o++}return!0}function v9e(e,t,n){var r=a$(e),i=r.length;if(a$(t).length!==i)return!1;for(var o;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n))return!1;return!0}function Gp(e,t,n){var r=i$(e),i=r.length;if(i$(t).length!==i)return!1;for(var o,a,s;i-- >0;)if(o=r[i],o===BH&&(e.$$typeof||t.$$typeof)&&e.$$typeof!==t.$$typeof||!jH(t,o)||!n.equals(e[o],t[o],o,o,e,t,n)||(a=o$(e,o),s=o$(t,o),(a||s)&&(!a||!s||a.configurable!==s.configurable||a.enumerable!==s.enumerable||a.writable!==s.writable)))return!1;return!0}function y9e(e,t){return ep(e.valueOf(),t.valueOf())}function b9e(e,t){return e.source===t.source&&e.flags===t.flags}function u$(e,t,n){if(e.size!==t.size)return!1;for(var r={},i=e.values(),o,a;(o=i.next())&&!o.done;){for(var s=t.values(),u=!1,l=0;(a=s.next())&&!a.done;)!u&&!r[l]&&(u=n.equals(o.value,a.value,o.value,a.value,e,t,n))&&(r[l]=!0),l++;if(!u)return!1}return!0}function x9e(e,t){var n=e.length;if(t.length!==n)return!1;for(;n-- >0;)if(e[n]!==t[n])return!1;return!0}var w9e="[object Arguments]",_9e="[object Boolean]",S9e="[object Date]",C9e="[object Map]",E9e="[object Number]",O9e="[object Object]",A9e="[object RegExp]",P9e="[object Set]",k9e="[object String]",T9e=Array.isArray,l$=typeof ArrayBuffer=="function"&&ArrayBuffer.isView?ArrayBuffer.isView:null,c$=Object.assign,M9e=Object.prototype.toString.call.bind(Object.prototype.toString);function R9e(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,i=e.areObjectsEqual,o=e.arePrimitiveWrappersEqual,a=e.areRegExpsEqual,s=e.areSetsEqual,u=e.areTypedArraysEqual;return function(c,f,h){if(c===f)return!0;if(c==null||f==null||typeof c!="object"||typeof f!="object")return c!==c&&f!==f;var p=c.constructor;if(p!==f.constructor)return!1;if(p===Object)return i(c,f,h);if(T9e(c))return t(c,f,h);if(l$!=null&&l$(c))return u(c,f,h);if(p===Date)return n(c,f,h);if(p===RegExp)return a(c,f,h);if(p===Map)return r(c,f,h);if(p===Set)return s(c,f,h);var m=M9e(c);return m===S9e?n(c,f,h):m===A9e?a(c,f,h):m===C9e?r(c,f,h):m===P9e?s(c,f,h):m===O9e?typeof c.then!="function"&&typeof f.then!="function"&&i(c,f,h):m===w9e?i(c,f,h):m===_9e||m===E9e||m===k9e?o(c,f,h):!1}}function D9e(e){var t=e.circular,n=e.createCustomConfig,r=e.strict,i={areArraysEqual:r?Gp:g9e,areDatesEqual:m9e,areMapsEqual:r?r$(s$,Gp):s$,areObjectsEqual:r?Gp:v9e,arePrimitiveWrappersEqual:y9e,areRegExpsEqual:b9e,areSetsEqual:r?r$(u$,Gp):u$,areTypedArraysEqual:r?Gp:x9e};if(n&&(i=c$({},i,n(i))),t){var o=Cy(i.areArraysEqual),a=Cy(i.areMapsEqual),s=Cy(i.areObjectsEqual),u=Cy(i.areSetsEqual);i=c$({},i,{areArraysEqual:o,areMapsEqual:a,areObjectsEqual:s,areSetsEqual:u})}return i}function $9e(e){return function(t,n,r,i,o,a,s){return e(t,n,s)}}function I9e(e){var t=e.circular,n=e.comparator,r=e.createState,i=e.equals,o=e.strict;if(r)return function(u,l){var c=r(),f=c.cache,h=f===void 0?t?new WeakMap:void 0:f,p=c.meta;return n(u,l,{cache:h,equals:i,meta:p,strict:o})};if(t)return function(u,l){return n(u,l,{cache:new WeakMap,equals:i,meta:void 0,strict:o})};var a={cache:void 0,equals:i,meta:void 0,strict:o};return function(u,l){return n(u,l,a)}}var N9e=Kl();Kl({strict:!0});Kl({circular:!0});Kl({circular:!0,strict:!0});Kl({createInternalComparator:function(){return ep}});Kl({strict:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep}});Kl({circular:!0,createInternalComparator:function(){return ep},strict:!0});function Kl(e){e===void 0&&(e={});var t=e.circular,n=t===void 0?!1:t,r=e.createInternalComparator,i=e.createState,o=e.strict,a=o===void 0?!1:o,s=D9e(e),u=R9e(s),l=r?r(u):$9e(u);return I9e({circular:n,comparator:u,createState:i,equals:l,strict:a})}function L9e(e){typeof requestAnimationFrame<"u"&&requestAnimationFrame(e)}function f$(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=-1,r=function i(o){n<0&&(n=o),o-n>t?(e(o),n=-1):L9e(i)};requestAnimationFrame(r)}function m6(e){"@babel/helpers - typeof";return m6=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m6(e)}function F9e(e){return U9e(e)||z9e(e)||B9e(e)||j9e()}function j9e(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B9e(e,t){if(e){if(typeof e=="string")return d$(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d$(e,t)}}function d$(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?1:w<0?0:w},v=function(w){for(var x=w>1?1:w,S=x,O=0;O<8;++O){var E=f(S)-x,C=p(S);if(Math.abs(E-x)0&&arguments[0]!==void 0?arguments[0]:{},n=t.stiff,r=n===void 0?100:n,i=t.damping,o=i===void 0?8:i,a=t.dt,s=a===void 0?17:a,u=function(c,f,h){var p=-(c-f)*r,m=h*o,v=h+(p-m)*s/1e3,b=h*s/1e3+c;return Math.abs(b-f)e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bDe(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function r3(e){return SDe(e)||_De(e)||wDe(e)||xDe()}function xDe(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function wDe(e,t){if(e){if(typeof e=="string")return w6(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return w6(e,t)}}function _De(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function SDe(e){if(Array.isArray(e))return w6(e)}function w6(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Hb(e){return Hb=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Hb(e)}var Xa=function(e){PDe(n,e);var t=kDe(n);function n(r,i){var o;CDe(this,n),o=t.call(this,r,i);var a=o.props,s=a.isActive,u=a.attributeName,l=a.from,c=a.to,f=a.steps,h=a.children,p=a.duration;if(o.handleStyleChange=o.handleStyleChange.bind(C6(o)),o.changeStyle=o.changeStyle.bind(C6(o)),!s||p<=0)return o.state={style:{}},typeof h=="function"&&(o.state={style:c}),S6(o);if(f&&f.length)o.state={style:f[0].style};else if(l){if(typeof h=="function")return o.state={style:l},S6(o);o.state={style:u?u0({},u,l):l}}else o.state={style:{}};return o}return ODe(n,[{key:"componentDidMount",value:function(){var i=this.props,o=i.isActive,a=i.canBegin;this.mounted=!0,!(!o||!a)&&this.runAnimation(this.props)}},{key:"componentDidUpdate",value:function(i){var o=this.props,a=o.isActive,s=o.canBegin,u=o.attributeName,l=o.shouldReAnimate,c=o.to,f=o.from,h=this.state.style;if(s){if(!a){var p={style:u?u0({},u,c):c};this.state&&h&&(u&&h[u]!==c||!u&&h!==c)&&this.setState(p);return}if(!(N9e(i.to,c)&&i.canBegin&&i.isActive)){var m=!i.canBegin||!i.isActive;this.manager&&this.manager.stop(),this.stopJSAnimation&&this.stopJSAnimation();var v=m||l?f:i.to;if(this.state&&h){var b={style:u?u0({},u,v):v};(u&&h[u]!==v||!u&&h!==v)&&this.setState(b)}this.runAnimation(ka(ka({},this.props),{},{from:v,begin:0}))}}}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var i=this.props.onAnimationEnd;this.unSubscribe&&this.unSubscribe(),this.manager&&(this.manager.stop(),this.manager=null),this.stopJSAnimation&&this.stopJSAnimation(),i&&i()}},{key:"handleStyleChange",value:function(i){this.changeStyle(i)}},{key:"changeStyle",value:function(i){this.mounted&&this.setState({style:i})}},{key:"runJSAnimation",value:function(i){var o=this,a=i.from,s=i.to,u=i.duration,l=i.easing,c=i.begin,f=i.onAnimationEnd,h=i.onAnimationStart,p=mDe(a,s,oDe(l),u,this.changeStyle),m=function(){o.stopJSAnimation=p()};this.manager.start([h,c,m,u,f])}},{key:"runStepAnimation",value:function(i){var o=this,a=i.steps,s=i.begin,u=i.onAnimationStart,l=a[0],c=l.style,f=l.duration,h=f===void 0?0:f,p=function(v,b,w){if(w===0)return v;var x=b.duration,S=b.easing,O=S===void 0?"ease":S,E=b.style,C=b.properties,k=b.onAnimationEnd,M=w>0?a[w-1]:b,N=C||Object.keys(E);if(typeof O=="function"||O==="spring")return[].concat(r3(v),[o.runJSAnimation.bind(o,{from:M.style,to:E,duration:x,easing:O}),x]);var z=g$(N,x,O),H=ka(ka(ka({},M.style),E),{},{transition:z});return[].concat(r3(v),[H,x,k]).filter(q9e)};return this.manager.start([u].concat(r3(a.reduce(p,[c,Math.max(h,s)])),[i.onAnimationEnd]))}},{key:"runAnimation",value:function(i){this.manager||(this.manager=V9e());var o=i.begin,a=i.duration,s=i.attributeName,u=i.to,l=i.easing,c=i.onAnimationStart,f=i.onAnimationEnd,h=i.steps,p=i.children,m=this.manager;if(this.unSubscribe=m.subscribe(this.handleStyleChange),typeof l=="function"||typeof p=="function"||l==="spring"){this.runJSAnimation(i);return}if(h.length>1){this.runStepAnimation(i);return}var v=s?u0({},s,u):u,b=g$(Object.keys(v),a,l);m.start([c,o,ka(ka({},v),{},{transition:b}),a,f])}},{key:"render",value:function(){var i=this.props,o=i.children;i.begin;var a=i.duration;i.attributeName,i.easing;var s=i.isActive;i.steps,i.from,i.to,i.canBegin,i.onAnimationEnd,i.shouldReAnimate,i.onAnimationReStart;var u=yDe(i,vDe),l=y.Children.count(o),c=this.state.style;if(typeof o=="function")return o(c);if(!s||l===0||a<=0)return o;var f=function(p){var m=p.props,v=m.style,b=v===void 0?{}:v,w=m.className,x=y.cloneElement(p,ka(ka({},u),{},{style:ka(ka({},b),c),className:w}));return x};return l===1?f(y.Children.only(o)):F.createElement("div",null,y.Children.map(o,function(h){return f(h)}))}}]),n}(y.PureComponent);Xa.displayName="Animate";Xa.defaultProps={begin:0,duration:1e3,from:"",to:"",attributeName:"",easing:"ease",isActive:!0,canBegin:!0,steps:[],onAnimationEnd:function(){},onAnimationStart:function(){}};Xa.propTypes={from:Mt.oneOfType([Mt.object,Mt.string]),to:Mt.oneOfType([Mt.object,Mt.string]),attributeName:Mt.string,duration:Mt.number,begin:Mt.number,easing:Mt.oneOfType([Mt.string,Mt.func]),steps:Mt.arrayOf(Mt.shape({duration:Mt.number.isRequired,style:Mt.object.isRequired,easing:Mt.oneOfType([Mt.oneOf(["ease","ease-in","ease-out","ease-in-out","linear"]),Mt.func]),properties:Mt.arrayOf("string"),onAnimationEnd:Mt.func})),children:Mt.oneOfType([Mt.node,Mt.func]),isActive:Mt.bool,canBegin:Mt.bool,onAnimationEnd:Mt.func,shouldReAnimate:Mt.bool,onAnimationStart:Mt.func,onAnimationReStart:Mt.func};Mt.object,Mt.object,Mt.object,Mt.element;Mt.object,Mt.object,Mt.object,Mt.oneOfType([Mt.array,Mt.element]),Mt.any;function Hg(e){"@babel/helpers - typeof";return Hg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hg(e)}function Kb(){return Kb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0?1:-1,u=r>=0?1:-1,l=i>=0&&r>=0||i<0&&r<0?1:0,c;if(a>0&&o instanceof Array){for(var f=[0,0,0,0],h=0,p=4;ha?a:o[h];c="M".concat(t,",").concat(n+s*f[0]),f[0]>0&&(c+="A ".concat(f[0],",").concat(f[0],",0,0,").concat(l,",").concat(t+u*f[0],",").concat(n)),c+="L ".concat(t+r-u*f[1],",").concat(n),f[1]>0&&(c+="A ".concat(f[1],",").concat(f[1],",0,0,").concat(l,`, `).concat(t+r,",").concat(n+s*f[1])),c+="L ".concat(t+r,",").concat(n+i-s*f[2]),f[2]>0&&(c+="A ".concat(f[2],",").concat(f[2],",0,0,").concat(l,`, `).concat(t+r-u*f[2],",").concat(n+i)),c+="L ".concat(t+u*f[3],",").concat(n+i),f[3]>0&&(c+="A ".concat(f[3],",").concat(f[3],",0,0,").concat(l,`, `).concat(t,",").concat(n+i-s*f[3])),c+="Z"}else if(a>0&&o===+o&&o>0){var m=Math.min(a,o);c="M ".concat(t,",").concat(n+s*m,` @@ -450,22 +450,22 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho L `).concat(t+r,",").concat(n+i-s*m,` A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t+r-u*m,",").concat(n+i,` L `).concat(t+u*m,",").concat(n+i,` - A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t,",").concat(n+i-s*m," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},F9e=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,u=n.height;if(Math.abs(s)>0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},j9e={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},CP=function(t){var n=_$(_$({},j9e),t),r=y.useRef(),i=y.useState(-1),o=T9e(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?F.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},F.createElement("path",Kb({},zt(n,!0),{className:S,d:S$(k,M,E,C,h),ref:r})))}):F.createElement("path",Kb({},zt(n,!0),{className:S,d:S$(u,l,c,f,h)}))};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function K9e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var q9e=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},G9e=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=H9e(t,B9e),b=z9e({x:r,y:o,top:s,left:l,width:f,height:p},v);return!qe(r)||!qe(o)||!qe(f)||!qe(p)||!qe(s)||!qe(l)?null:F.createElement("path",O6({},zt(b,!0),{className:dn("recharts-cross",m),d:q9e(r,o,f,p,s,l)}))},Y9e=lW,Z9e=Y9e(Object.getPrototypeOf,Object),X9e=Z9e,Q9e=Tu,J9e=X9e,e7e=Mu,t7e="[object Object]",n7e=Function.prototype,r7e=Object.prototype,qH=n7e.toString,i7e=r7e.hasOwnProperty,o7e=qH.call(Object);function a7e(e){if(!e7e(e)||Q9e(e)!=t7e)return!1;var t=J9e(e);if(t===null)return!0;var n=i7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&qH.call(n)==o7e}var s7e=a7e;const u7e=Pn(s7e);var l7e=Tu,c7e=Mu,f7e="[object Boolean]";function d7e(e){return e===!0||e===!1||c7e(e)&&l7e(e)==f7e}var h7e=d7e;const p7e=Pn(h7e);function Kg(e){"@babel/helpers - typeof";return Kg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kg(e)}function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},F.createElement("path",qb({},zt(n,!0),{className:x,d:P$(k,M,O,E,C),ref:r})))}):F.createElement("g",null,F.createElement("path",qb({},zt(n,!0),{className:x,d:P$(u,l,c,f,h)})))},E7e=["option","shapeType","propTransformer","activeClassName","isActive"];function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function O7e(e,t){if(e==null)return{};var n=A7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function A7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function k$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Ao(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Ao(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ao(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ao(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ao(r,"handleSlideDragStart",function(i){var o=N$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return c$e(t,e),a$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=Kr(o[r],s,r);return Wt(a)?a(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=N$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Ao(Ao({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Ao({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return F.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?F.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=o3(o3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return F.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return F.createElement(Cn,{className:"recharts-brush-texts"},F.createElement(Ob,Zb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),F.createElement(Ob,Zb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!qe(s)||!qe(u)||!qe(l)||!qe(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=F.Children.count(a)===1,E=i$e("userSelect","none");return F.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),F.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return F.isValidElement(r)?o=F.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return o3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?d$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Ao(ch,"displayName","Brush");Ao(ch,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var h$e=YA;function p$e(e,t){var n;return h$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var g$e=p$e,m$e=tW,v$e=Vl,y$e=g$e,b$e=vo,x$e=zw;function w$e(e,t,n){var r=b$e(e)?m$e:y$e;return n&&x$e(e,t,n)&&(t=void 0),r(e,v$e(t))}var _$e=w$e;const S$e=Pn(_$e);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},L$=SW;function C$e(e,t,n){t=="__proto__"&&L$?L$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var E$e=C$e,O$e=E$e,A$e=wW,P$e=Vl;function k$e(e,t){var n={};return t=P$e(t),A$e(e,function(r,i,o){O$e(n,i,t(r,i,o))}),n}var T$e=k$e;const M$e=Pn(T$e);function R$e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Y$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Z$e(e,t){var n=e.x,r=e.y,i=G$e(e,W$e),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Yp(Yp(Yp(Yp(Yp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function j$(e){return F.createElement(A6,k6({shapeType:"rectangle",propTransformer:Z$e,activeClassName:"recharts-active-bar"},e))}var X$e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||rf(),n)}},Q$e=["value","background"],JH;function fh(e){"@babel/helpers - typeof";return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function J$e(e,t){if(e==null)return{};var n=eIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ne=Math.min((ue||0)-(Z[de-1]||0),ne))}),Number.isFinite(ne)){var G=ne/V,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=G*q/2),v.padding==="no-gap"){var W=ef(t.barCategoryGap,G*q),j=G*q/2;k=j-W-(j-W)/q*W}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var K=XMe(v,o,h),Y=K.scale,oe=K.realScaleType;Y.domain(w).range(M),QMe(Y);var Q=aRe(Y,$a($a({},v),{},{realScaleType:oe}));i==="xAxis"?(H=b==="top"&&!O||b==="bottom"&&O,N=r.left,z=f[C]-H*v.height):i==="yAxis"&&(H=b==="left"&&!O||b==="right"&&O,N=f[C]-H*v.width,z=r.top);var J=$a($a($a({},v),Q),{},{realScaleType:oe,x:N,y:z,scale:Y,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return J.bandSize=Bb(J,Q),!v.hide&&i==="xAxis"?f[C]+=(H?-1:1)*J.height:v.hide||(f[C]+=(H?-1:1)*J.width),$a($a({},p),{},e2({},m,J))},{})},rK=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},dIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return rK({x:n,y:r},{x:i,y:o})},iK=function(){function e(t){uIe(this,e),this.scale=t}return lIe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();e2(iK,"EPS",1e-4);var EP=function(t){var n=Object.keys(t).reduce(function(r,i){return $a($a({},r),{},e2({},i,iK.create(t[i])))},{});return $a($a({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return M$e(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return QH(i,function(o,a){return n[a].isInRange(o)})}})};function hIe(e){return(e%180+180)%180}var pIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=hIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var bIe=yIe,xIe=GH;function wIe(e){var t=xIe(e),n=t%1;return t===t?n?t-n:t:0}var _Ie=wIe,SIe=gW,CIe=Vl,EIe=_Ie,OIe=Math.max;function AIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:EIe(n);return i<0&&(i=OIe(r+i,0)),SIe(e,CIe(t),i)}var PIe=AIe,kIe=bIe,TIe=PIe,MIe=kIe(TIe),RIe=MIe;const DIe=Pn(RIe);var $Ie=Nwe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),OP=y.createContext(void 0),AP=y.createContext(void 0),oK=y.createContext(void 0),aK=y.createContext({}),sK=y.createContext(void 0),uK=y.createContext(0),lK=y.createContext(0),W$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=$Ie(o);return F.createElement(OP.Provider,{value:r},F.createElement(AP.Provider,{value:i},F.createElement(aK.Provider,{value:o},F.createElement(oK.Provider,{value:c},F.createElement(sK.Provider,{value:a},F.createElement(uK.Provider,{value:l},F.createElement(lK.Provider,{value:u},s)))))))},IIe=function(){return y.useContext(sK)},cK=function(t){var n=y.useContext(OP);n==null&&rf();var r=n[t];return r==null&&rf(),r},NIe=function(){var t=y.useContext(OP);return rl(t)},LIe=function(){var t=y.useContext(AP),n=DIe(t,function(r){return QH(r.domain,Number.isFinite)});return n||rl(t)},fK=function(t){var n=y.useContext(AP);n==null&&rf();var r=n[t];return r==null&&rf(),r},FIe=function(){var t=y.useContext(oK);return t},jIe=function(){return y.useContext(aK)},PP=function(){return y.useContext(lK)},kP=function(){return y.useContext(uK)};function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function BIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zIe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function _Ne(e,t){return yK(e,t+1)}function SNe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:yK(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||rx(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function Qg(e){"@babel/helpers - typeof";return Qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qg(e)}function Q$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=rx(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function PNe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=rx(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=rx(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=wNe(o,b,p);return u==="equidistantPreserveStart"?SNe(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=PNe(b,w,v,i,a,u==="preserveStartEnd"):h=ANe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var kNe=["viewBox"],TNe=["viewBox"],MNe=["ticks"];function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function RNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function DNe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:F.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return F.isValidElement(r)?a=F.cloneElement(r,i):Wt(r)?a=r(i):a=F.createElement(Ob,vd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);DP(np,"displayName","CartesianAxis");DP(np,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var BNe=["x1","y1","x2","y2","key"],zNe=["offset"];function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function tI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var KNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return F.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function wK(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=nI(t,BNe),l=zt(u,!1);l.offset;var c=nI(l,zNe);n=F.createElement("line",Oc({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function qNe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function GNe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function YNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return F.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function ZNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return F.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var XNe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return DH(RP(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},QNe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return DH(RP(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function JNe(e){var t,n,r,i,o,a,s=PP(),u=kP(),l=jIe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zf.verticalFill,x:qe(e.x)?e.x:l.left,y:qe(e.y)?e.y:l.top,width:qe(e.width)?e.width:l.width,height:qe(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=NIe(),S=LIe();if(!qe(p)||p<=0||!qe(m)||m<=0||!qe(f)||f!==+f||!qe(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||XNe,E=c.horizontalCoordinatesGenerator||QNe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,N=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);du(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(N),"]")),Array.isArray(N)&&(C=N)}if((!k||!k.length)&&Wt(O)){var z=w&&w.length,H=O({xAxis:x?Ti(Ti({},x),{},{ticks:z?w:x.ticks}):void 0,width:s,height:u,offset:l},z?!0:v);du(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(H),"]")),Array.isArray(H)&&(k=H)}return F.createElement("g",{className:"recharts-cartesian-grid"},F.createElement(KNe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),F.createElement(qNe,Oc({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),F.createElement(GNe,Oc({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),F.createElement(YNe,Oc({},c,{horizontalPoints:C})),F.createElement(ZNe,Oc({},c,{verticalPoints:k})))}JNe.displayName="CartesianGrid";var eLe=["type","layout","connectNulls","ref"],tLe=["key"];function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}function rI(e,t){if(e==null)return{};var n=nLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function nLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(Xf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Xf(t.repeat(u,c)),Xf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Ia(n,"id",vf("recharts-line-")),Ia(n,"pathRef",function(a){n.mainCurve=a}),Ia(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ia(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return dLe(t,e),uLe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=po(c,Jh);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return F.createElement(Cn,p,f.map(function(m){return F.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Oo(Oo(Oo({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return F.createElement(Cn,A0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=rI(s,eLe),h=Oo(Oo(Oo({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return F.createElement(Ic,A0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return F.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(V,ne){var Z=Math.floor(ne*C);if(x[Z]){var G=x[Z],q=Er(G.x,V.x),W=Er(G.y,V.y);return Oo(Oo({},V),{},{x:q(E),y:W(E)})}if(m){var j=Er(v*2,V.x),K=Er(b/2,V.y);return Oo(Oo({},V),{},{x:j(E),y:K(E)})}return Oo(Oo({},V),{},{x:V.x,y:V.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),N=M(E),z;if(u){var H="".concat(u).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});z=o.getStrokeDasharray(N,S,H)}else z=o.generateSimpleStrokeDasharray(S,N);return o.renderCurveStatically(s,r,i,{strokeDasharray:z})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!tf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:h-q/2,y:f-q/2,width:p+q,height:m+q}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Xf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!tf(c,a)||!tf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:c-q/2,y:l-q/2,width:p+q,height:m+q}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);CK=xf;bs(xf,"displayName","Area");bs(xf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ka.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(xf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(qe(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(xf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=CK.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=Kr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&Kr(O,u)==null;return b?{x:sh({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:sh({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Yu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(xf,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=EK(t,gLe);n=F.createElement(Xw,Ac({},o,{key:i,className:r}))}return n});function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function CLe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ELe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function $Le(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function ILe(e){var t=e.option,n=e.isActive,r=DLe(e,RLe);return typeof t=="string"?F.createElement(A6,P0({option:F.createElement(Fw,P0({type:t},r)),isActive:n,shapeType:"symbols"},r)):F.createElement(A6,P0({option:t,isActive:n,shapeType:"symbols"},r))}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function TFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function MFe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&qe(i)&&qe(o)?t.slice(i,o+1):[]};function qK(e){return e==="number"?[0,"auto"]:void 0}var X6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=u2(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=fb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Sh(u),[IH(l,h)]):u},[])},gI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=VFe(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=HMe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=X6(t,n,c,f),p=WFe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},HFe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=RH(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Ee(Ee({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,N=w[a];if(m[N])return m;var z=u2(t.data,{graphicalItems:i.filter(function(Q){var J,ue=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return ue===N}),dataStartIndex:u,dataEndIndex:l}),H=z.length,V,ne,Z;vFe(w.domain,O,x)&&(V=f6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category")));var G=qK(x);if(!V||V.length===0){var q,W=(q=w.domain)!==null&&q!==void 0?q:G;if(S){if(V=E0(z,S,x),x==="category"&&p){var j=D2e(V);E&&j?(ne=V,V=Yb(0,H)):E||(V=V7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(Sh(Q),[J])},[]))}else if(x==="category")E?V=V.filter(function(Q){return Q!==""&&!Ut(Q)}):V=V7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||Ut(J)?Q:[].concat(Sh(Q),[J])},[]);else if(x==="number"){var K=ZMe(z,i.filter(function(Q){var J,ue,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(ue=Q.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return de===N&&(M||!Se)}),S,o,c);K&&(V=K)}p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category"))}else p?V=Yb(0,H):s&&s[N]&&s[N].hasStack&&x==="number"?V=h==="expand"?[0,1]:$H(s[N].stackGroups,u,l):V=MH(z,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],ue="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===N&&(M||!ue)}),x,c,!0);if(x==="number")V=G6(f,V,N,o,k),W&&(V=f6(W,V,O));else if(x==="category"&&W){var Y=W,oe=V.every(function(Q){return Y.indexOf(Q)>=0});oe&&(V=Y)}}return Ee(Ee({},m),{},kt({},N,Ee(Ee({},w),{},{axisType:o,domain:V,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:p,layout:c})))},{})},KFe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=u2(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=RH(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],O=qK("number");if(!b[S]){v++;var E;return m?E=Yb(0,p):s&&s[S]&&s[S].hasStack?(E=$H(s[S].stackGroups,u,l),E=G6(f,E,S,o)):(E=f6(O,MH(h,r.filter(function(C){var k,M,N=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],z="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return N===S&&!z}),"number",c),i.defaultProps.allowDataOverflow),E=G6(f,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:pa(zFe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},qFe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=po(c,o),p={};return h.length?p=HFe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=KFe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},GFe=function(t){var n=rl(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:ZA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bb(n,r)}},mI=function(t){var n=t.children,r=t.defaultShowTooltip,i=To(n,ch),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},YFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fu(n&&n.type);return r&&r.indexOf("Bar")>=0})},vI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},ZFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=To(f,ch),m=To(f,Dd),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,pa(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||ch.defaultProps.height),m&&n&&(w=GMe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},XFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},QFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,N=w.barSize,z=w.layout,H=w.barGap,V=w.barCategoryGap,ne=w.maxBarSize,Z=vI(z),G=Z.numericAxisName,q=Z.cateAxisName,W=YFe(S),j=[];return S.forEach(function(K,Y){var oe=u2(w.data,{graphicalItems:[K],dataStartIndex:k,dataEndIndex:M}),Q=K.type.defaultProps!==void 0?Ee(Ee({},K.type.defaultProps),K.props):K.props,J=Q.dataKey,ue=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(q,"Id")],me={},Ze=u.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||rf();var mt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,mt),"".concat(je.axisType,"Ticks"),su(mt)))},me),Ae=Ze[q],Le=Ze["".concat(q,"Ticks")],$e=O&&O[de]&&O[de].hasStack&&uRe(K,O[de].stackGroups),be=fu(K.type).indexOf("Bar")>=0,yt=Bb(Ae,Le),lt=[],Nt=W&&KMe({barSize:N,stackGroups:O,totalSize:XFe(Ze,q)});if(be){var yn,nn,ie=Ut(ue)?ne:ue,pe=(yn=(nn=Bb(Ae,Le,!0))!==null&&nn!==void 0?nn:ie)!==null&&yn!==void 0?yn:0;lt=qMe({barGap:H,barCategoryGap:V,bandSize:pe!==yt?pe:yt,sizeList:Nt[Se],maxBarSize:ie}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=K&&K.type&&K.type.getComposedData;ye&&j.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:oe,props:w,dataKey:J,item:K,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:z,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:K.key||"item-".concat(Y)},G,Ze[G]),q,Ze[q]),"animationId",C)),childIndex:H2e(K,w.children),item:K})}),j},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!LD({props:S}))return null;var k=S.children,M=S.layout,N=S.stackOffset,z=S.data,H=S.reverseStackOrder,V=vI(M),ne=V.numericAxisName,Z=V.cateAxisName,G=po(k,r),q=oRe(z,G,"".concat(ne,"Id"),"".concat(Z,"Id"),N,H),W=u.reduce(function(Q,J){var ue="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},ue,qFe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ne&&q,dataStartIndex:O,dataEndIndex:E}))))},{}),j=ZFe(Ee(Ee({},W),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(W).forEach(function(Q){W[Q]=c(S,W[Q],j,Q.replace("Map",""),n)});var K=W["".concat(Z,"Map")],Y=GFe(K),oe=h(S,Ee(Ee({},W),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:q,offset:j}));return Ee(Ee({formattedGraphicalItems:oe,graphicalItems:G,offset:j,stackGroups:q},Y),W)},m=function(b){function w(x){var S,O,E;return TFe(this,w),E=DFe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new mFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,N=k.dataEndIndex,z=k.updateId;E.setState(Ee({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:N,updateId:z},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var N=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:N},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseEnter;Wt(N)&&N(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Ee(Ee({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseMove;Wt(N)&&N(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Wt(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=W2e(C),M=pa(E.props,"".concat(k));if(k&&Wt(M)){var N,z;/.*touch.*/i.test(k)?z=E.getMouseInfo(C.changedTouches[0]):z=E.getMouseInfo(C),M((N=z)!==null&&N!==void 0?N:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onClick;Wt(N)&&N(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&s3.emit(u3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,N=k.syncMethod,z=E.state.updateId,H=C.dataStartIndex,V=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:V},p({props:E.props,dataStartIndex:H,dataEndIndex:V,updateId:z},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,q=E.state,W=q.offset,j=q.tooltipTicks;if(!W)return;if(typeof N=="function")G=N(j,C);else if(N==="value"){G=-1;for(var K=0;K=0){var $e,be;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());$e=fb(K,yt,G),be=Y&&oe&&fb(oe,yt,G)}else $e=K?.[Z],be=Y&&oe&&oe[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:lt})),null,null]}if(!Ut($e))return[Ae].concat(Sh(E.renderActivePoints({item:N,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:Ae},nn=yn.graphicalItem,ie=nn.item,pe=ie===void 0?C:ie,ye=nn.childIndex,Ue=Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Ae,null,null]:[Ae,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:Ey,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Ey},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Ey},YAxis:{handler:Ey},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:vf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=kW(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return NFe(w,b),RFe(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=To(O,Js);if(M){var N=M.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,H=X6(this.state,E,N,z),V=this.state.tooltipTicks[N].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",G=Z?{x:V,y:ne}:{y:V,x:ne},q=this.state.formattedGraphicalItems.find(function(j){var K=j.item;return K.type.name==="Scatter"});q&&(G=Ee(Ee({},G),q.props.points[N].tooltipPosition),H=q.props.points[N].tooltipPayload);var W={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:z,activePayload:H,activeCoordinate:G};this.setState(W),this.renderCursor(M),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){OE([To(S.children,Js)],[To(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=To(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=v5e(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,N=this.inRange(k.chartX,k.chartY,M);if(!N)return null;var z=this.state,H=z.xAxisMap,V=z.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&H&&V){var Z=rl(H).scale,G=rl(V).scale,q=Z&&Z.invert?Z.invert(k.chartX):null,W=G&&G.invert?G.invert(k.chartY):null;return Ee(Ee({},k),{},{xValue:q,yValue:W})}var j=gI(this.state,this.props.data,this.props.layout,N);return j?Ee(Ee({},k),j):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var N=this.state.offset,z=k>=N.left&&k<=N.left+N.width&&M>=N.top&&M<=N.top+N.height;return z?{x:k,y:M}:null}var H=this.state,V=H.angleAxisMap,ne=H.radiusAxisMap;if(V&&ne){var Z=rl(V);return K7({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=To(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=db(this.props,this.handleOuterEvent);return Ee(Ee({},k),C)}},{key:"addListener",value:function(){s3.on(u3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s3.removeListener(u3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Cm(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return I.jsx(eje,{scope:n,baseId:Fo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});YK.displayName=NP;var ZK="TabsList",XK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=LP(ZK,n),a=GK(n);return I.jsx(Wz,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});XK.displayName=ZK;var QK="TabsTrigger",JK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=LP(QK,n),s=GK(n),u=nq(a.baseId,r),l=rq(a.baseId,r),c=r===a.value;return I.jsx(Hz,{asChild:!0,...s,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});JK.displayName=QK;var eq="TabsContent",tq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=LP(eq,n),u=nq(s.baseId,r),l=rq(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});tq.displayName=eq;function nq(e,t){return`${e}-trigger-${t}`}function rq(e,t){return`${e}-content-${t}`}var MXe=YK,RXe=XK,DXe=JK,$Xe=tq;function Q6(e,[t,n]){return Math.min(n,Math.max(t,e))}function FP(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var tje=[" ","Enter","ArrowUp","ArrowDown"],nje=[" ","Enter"],Bm="Select",[l2,c2,rje]=nA(Bm),[rp,IXe]=vi(Bm,[rje,zl]),f2=zl(),[ije,ql]=rp(Bm),[oje,aje]=rp(Bm),iq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=f2(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Cm(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[N,z]=Za({prop:a,defaultProp:s,onChange:u}),H=y.useRef(null),V=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),G=Array.from(ne).map(q=>q.props.value).join(";");return I.jsx(aw,{...v,children:I.jsxs(ije,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:Fo(),value:N,onValueChange:z,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(l2.Provider,{scope:t,children:I.jsx(oje,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(q=>{Z(W=>new Set(W).add(q))},[]),onNativeOptionRemove:y.useCallback(q=>{Z(W=>{const j=new Set(W);return j.delete(q),j})},[]),children:n})}),V?I.jsxs(Tq,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:N,onChange:q=>z(q.target.value),disabled:h,form:m,children:[N===void 0?I.jsx("option",{value:""}):null,Array.from(ne)]},G):null]})})};iq.displayName=Bm;var oq="SelectTrigger",aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=f2(n),a=ql(oq,n),s=a.disabled||r,u=Gt(t,a.onTriggerChange),l=c2(n),c=y.useRef("touch"),[f,h,p]=Mq(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Rq(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return I.jsx(Om,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":kq(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&tje.includes(v.key)&&(m(),v.preventDefault())})})})});aq.displayName=oq;var sq="SelectValue",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=ql(sq,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Gt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:kq(u.value)?I.jsx(I.Fragment,{children:a}):o})});uq.displayName=sq;var sje="SelectIcon",lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});lq.displayName=sje;var uje="SelectPortal",cq=e=>I.jsx(Lh,{asChild:!0,...e});cq.displayName=uje;var af="SelectContent",fq=y.forwardRef((e,t)=>{const n=ql(af,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Au.createPortal(I.jsx(dq,{scope:e.__scopeSelect,children:I.jsx(l2.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(hq,{...e,ref:t})});fq.displayName=af;var Ta=10,[dq,Gl]=rp(af),lje="SelectContentImpl",hq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=ql(af,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Gt(t,me=>O(me)),[M,N]=y.useState(null),[z,H]=y.useState(null),V=c2(n),[ne,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return Sm(S)},[S]),nw();const q=y.useCallback(me=>{const[Ze,...Ae]=V().map(be=>be.ref.current),[Le]=Ae.slice(-1),$e=document.activeElement;for(const be of me)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Le&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[V,E]),W=y.useCallback(()=>q([M,S]),[q,M,S]);y.useEffect(()=>{ne&&W()},[ne,W]);const{onOpenChange:j,triggerPointerDownPosRef:K}=x;y.useEffect(()=>{if(S){let me={x:0,y:0};const Ze=Le=>{me={x:Math.abs(Math.round(Le.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(K.current?.y??0))}},Ae=Le=>{me.x<=10&&me.y<=10?Le.preventDefault():S.contains(Le.target)||j(!1),document.removeEventListener("pointermove",Ze),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[S,j,K]),y.useEffect(()=>{const me=()=>j(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[j]);const[Y,oe]=Mq(me=>{const Ze=V().filter($e=>!$e.disabled),Ae=Ze.find($e=>$e.ref.current===document.activeElement),Le=Rq(Ze,me,Ae);Le&&setTimeout(()=>Le.ref.current.focus())}),Q=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&(N(me),Le&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),ue=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&H(me)},[x.value]),de=r==="popper"?J6:pq,Se=de===J6?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return I.jsx(dq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:ue,focusSelectedItem:W,selectedItemText:z,position:r,isPositioned:ne,searchRef:Y,children:I.jsx(_m,{as:Al,allowPinchZoom:!0,children:I.jsx(wm,{asChild:!0,trapped:x.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Ye(i,me=>{x.trigger?.focus({preventScroll:!0}),me.preventDefault()}),children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:me=>me.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,me=>{const Ze=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ze&&me.key.length===1&&oe(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Le=V().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const $e=me.target,be=Le.indexOf($e);Le=Le.slice(be+1)}setTimeout(()=>q(Le)),me.preventDefault()}})})})})})})});hq.displayName=lje;var cje="SelectItemAlignedPosition",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ql(af,n),a=Gl(af,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Gt(t,k=>c(k)),h=c2(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=z.left-M.left,be=N.left-$e,yt=k.left-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const $e=M.right-z.right,be=window.innerWidth-N.right-$e,yt=window.innerWidth-k.right-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const H=h(),V=window.innerHeight-Ta*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),q=parseInt(Z.paddingTop,10),W=parseInt(Z.borderBottomWidth,10),j=parseInt(Z.paddingBottom,10),K=G+q+ne+j+W,Y=Math.min(b.offsetHeight*5,K),oe=window.getComputedStyle(v),Q=parseInt(oe.paddingTop,10),J=parseInt(oe.paddingBottom,10),ue=k.top+k.height/2-Ta,de=V-ue,Se=b.offsetHeight/2,me=b.offsetTop+Se,Ze=G+q+me,Ae=K-Ze;if(Ze<=ue){const $e=H.length>0&&b===H[H.length-1].ref.current;s.style.bottom="0px";const be=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+W),lt=Ze+yt;s.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;s.style.top="0px";const yt=Math.max(ue,G+v.offsetTop+($e?Q:0)+Se)+Ae;s.style.height=yt+"px",v.scrollTop=Ze-ue+v.offsetTop}s.style.margin=`${Ta}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return I.jsx(dje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:I.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:I.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});pq.displayName=cje;var fje="SelectPopperPosition",J6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ta,...o}=e,a=f2(n);return I.jsx(sw,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J6.displayName=fje;var[dje,jP]=rp(af,{}),e4="SelectViewport",gq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Gl(e4,n),a=jP(e4,n),s=Gt(t,o.onViewportChange),u=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(l2.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-Ta*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});gq.displayName=e4;var mq="SelectGroup",[hje,pje]=rp(mq),vq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Fo();return I.jsx(hje,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});vq.displayName=mq;var yq="SelectLabel",bq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=pje(yq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});bq.displayName=yq;var dx="SelectItem",[gje,xq]=rp(dx),wq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=ql(dx,n),u=Gl(dx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Gt(t,x=>u.itemRefCallback?.(x,r,i)),v=Fo(),b=y.useRef("touch"),w=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(gje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(l2.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(nje.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});wq.displayName=dx;var l0="SelectItemText",_q=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=ql(l0,n),s=Gl(l0,n),u=xq(l0,n),l=aje(l0,n),[c,f]=y.useState(null),h=Gt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>I.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Au.createPortal(o.children,a.valueNode):null]})});_q.displayName=l0;var Sq="SelectItemIndicator",Cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return xq(Sq,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Cq.displayName=Sq;var t4="SelectScrollUpButton",Eq=y.forwardRef((e,t)=>{const n=Gl(t4,e.__scopeSelect),r=jP(t4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});Eq.displayName=t4;var n4="SelectScrollDownButton",Oq=y.forwardRef((e,t)=>{const n=Gl(n4,e.__scopeSelect),r=jP(n4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});Oq.displayName=n4;var Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Gl("SelectScrollButton",n),a=y.useRef(null),s=c2(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),mje="SelectSeparator",Pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Pq.displayName=mje;var r4="SelectArrow",vje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=f2(n),o=ql(r4,n),a=Gl(r4,n);return o.open&&a.position==="popper"?I.jsx(uw,{...i,...r,ref:t}):null});vje.displayName=r4;function kq(e){return e===""||e===void 0}var Tq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Gt(t,i),a=FP(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),I.jsx(xA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});Tq.displayName="BubbleSelect";function Mq(e){const t=Vr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Rq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=yje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function yje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var NXe=iq,LXe=aq,FXe=uq,jXe=lq,BXe=cq,zXe=fq,UXe=gq,VXe=vq,WXe=bq,HXe=wq,KXe=_q,qXe=Cq,GXe=Eq,YXe=Oq,ZXe=Pq;const BP=6048e5,bje=864e5,yI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yI in e?e[yI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Dn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Dn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Dn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let xje={};function zm(){return xje}function ba(e,t){const n=zm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hx(e){const t=Dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function uf(e,t){const n=Dn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=wf(n?.in,e,t),o=uf(r),a=uf(i),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/bje)}function wje(e,t){const n=Dq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sf(r)}function i4(e,t,n){return Ui(e,t*7,n)}function _je(e,t,n){return Qa(e,t*12,n)}function Sje(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function uo(e,t,n){const[r,i]=wf(n?.in,e,t);return+uf(r)==+uf(i)}function zP(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Eje(e){return!(!zP(e)&&typeof e!="number"||isNaN(+Dn(e)))}function tm(e,t,n){const[r,i]=wf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Oje(e,t,n){const[r,i]=wf(n?.in,e,t),o=ba(r,n),a=ba(i,n),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/BP)}function UP(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function go(e,t){const n=Dn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function $q(e,t){const n=Dn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function VP(e,t){const n=zm(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o{let r;const i=Aje[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Nd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const kje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Tje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Mje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Rje={date:Nd({formats:kje,defaultWidth:"full"}),time:Nd({formats:Tje,defaultWidth:"full"}),dateTime:Nd({formats:Mje,defaultWidth:"full"})},Dje={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$je=(e,t,n,r)=>Dje[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Ije={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Nje={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lje={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fje={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Bje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},zje=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Uje={ordinalNumber:zje,era:ps({values:Ije,defaultWidth:"wide"}),quarter:ps({values:Nje,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:Lje,defaultWidth:"wide"}),day:ps({values:Fje,defaultWidth:"wide"}),dayPeriod:ps({values:jje,defaultWidth:"wide",formattingValues:Bje,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Wje(s,f=>f.test(a)):Vje(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function Vje(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Wje(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Hje=/^(\d+)(th|st|nd|rd)?/i,Kje=/\d+/i,qje={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Gje={any:[/^b/i,/^(a|c)/i]},Yje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Zje={any:[/1/i,/2/i,/3/i,/4/i]},Xje={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Qje={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Jje={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},eBe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},tBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},nBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},rBe={ordinalNumber:Nq({matchPattern:Hje,parsePattern:Kje,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:qje,defaultMatchWidth:"wide",parsePatterns:Gje,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Yje,defaultMatchWidth:"wide",parsePatterns:Zje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Xje,defaultMatchWidth:"wide",parsePatterns:Qje,defaultParseWidth:"any"}),day:gs({matchPatterns:Jje,defaultMatchWidth:"wide",parsePatterns:eBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:tBe,defaultMatchWidth:"any",parsePatterns:nBe,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:Pje,formatLong:Rje,formatRelative:$je,localize:Uje,match:rBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function iBe(e,t){const n=Dn(e,t?.in);return xs(n,$q(n))+1}function Fq(e,t){const n=Dn(e,t?.in),r=+sf(n)-+wje(n);return Math.round(r/BP)+1}function jq(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=zm(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ba(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ba(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function oBe(e,t){const n=zm(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=jq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ba(o,t)}function Bq(e,t){const n=Dn(e,t?.in),r=+ba(n,t)-+oBe(n,t);return Math.round(r/BP)+1}function Mn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Mn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Mn(n+1,2)},d(e,t){return Mn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Mn(e.getHours()%12||12,t.length)},H(e,t){return Mn(e.getHours(),t.length)},m(e,t){return Mn(e.getMinutes(),t.length)},s(e,t){return Mn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Mn(i,t.length)}},Qf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},bI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=jq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Mn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Mn(o,t.length)},R:function(e,t){const n=Dq(e);return Mn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Mn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Mn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Mn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Mn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Bq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Mn(i,t.length)},I:function(e,t,n){const r=Fq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Mn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=iBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Mn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Mn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Mn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Mn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qf.noon:r===0?i=Qf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qf.evening:r>=12?i=Qf.afternoon:r>=4?i=Qf.morning:i=Qf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return wI(r);case"XXXX":case"XX":return pc(r);case"XXXXX":case"XXX":default:return pc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return wI(r);case"xxxx":case"xx":return pc(r);case"xxxxx":case"xxx":default:return pc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+xI(r,":");case"OOOO":default:return"GMT"+pc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+xI(r,":");case"zzzz":default:return"GMT"+pc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Mn(r,t.length)},T:function(e,t,n){return Mn(+e,t.length)}};function xI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Mn(o,2)}function wI(e,t){return e%60===0?(e>0?"-":"+")+Mn(Math.abs(e)/60,2):pc(e,t)}function pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Mn(Math.trunc(r/60),2),o=Mn(r%60,2);return n+i+t+o}const _I=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},aBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return _I(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",_I(r,t)).replace("{{time}}",zq(i,t))},sBe={p:zq,P:aBe},uBe=/^D+$/,lBe=/^Y+$/,cBe=["D","DD","YY","YYYY"];function fBe(e){return uBe.test(e)}function dBe(e){return lBe.test(e)}function hBe(e,t,n){const r=pBe(e,t,n);if(console.warn(r),cBe.includes(e))throw new RangeError(r)}function pBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const gBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,mBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,vBe=/^'([^]*?)'?$/,yBe=/''/g,bBe=/[a-zA-Z]/;function _f(e,t,n){const r=zm(),i=n?.locale??r.locale??Lq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Dn(e,n?.in);if(!Eje(s))throw new RangeError("Invalid time value");let u=t.match(mBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=sBe[f];return h(c,i.formatLong)}return c}).join("").match(gBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:xBe(c)};if(bI[f])return{isToken:!0,value:c};if(f.match(bBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&dBe(f)||!n?.useAdditionalDayOfYearTokens&&fBe(f))&&hBe(f,t,String(e));const h=bI[f[0]];return h(s,f,i.localize,l)}).join("")}function xBe(e){const t=e.match(vBe);return t?t[1].replace(yBe,"'"):e}function wBe(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function _Be(e){return Math.trunc(+Dn(e)/1e3)}function SBe(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Dn(n,t?.in)}function CBe(e,t){const n=Dn(e,t?.in);return Oje(SBe(n,t),go(n,t),t)+1}function o4(e,t){return+Dn(e)>+Dn(t)}function Uq(e,t){return+Dn(e)<+Dn(t)}function EBe(e,t,n){const[r,i]=wf(n?.in,e,t);return+ba(r,n)==+ba(i,n)}function WP(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function OBe(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function c3(e,t,n){return Ui(e,-t,n)}function f3(e,t,n){const r=Dn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=wBe(a);return r.setMonth(t,Math.min(o,s)),r}function SI(e,t,n){const r=Dn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function XXe(e){return uf(Date.now(),e)}const ABe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},PBe=(e,t,n)=>{let r;const i=ABe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},kBe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},TBe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},MBe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},RBe={date:Nd({formats:kBe,defaultWidth:"full"}),time:Nd({formats:TBe,defaultWidth:"full"}),dateTime:Nd({formats:MBe,defaultWidth:"full"})};function CI(e,t,n){const r="eeee p";return EBe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const DBe={lastWeek:CI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:CI,other:"PP p"},$Be=(e,t,n,r)=>{const i=DBe[e];return typeof i=="function"?i(t,n,r):i},IBe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},NBe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},LBe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},FBe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},jBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},BBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},zBe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},UBe={ordinalNumber:zBe,era:ps({values:IBe,defaultWidth:"wide"}),quarter:ps({values:NBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:LBe,defaultWidth:"wide"}),day:ps({values:FBe,defaultWidth:"wide"}),dayPeriod:ps({values:jBe,defaultWidth:"wide",formattingValues:BBe,defaultFormattingWidth:"wide"})},VBe=/^(第\s*)?\d+(日|时|分|秒)?/i,WBe=/\d+/i,HBe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},KBe={any:[/^(前)/i,/^(公元)/i]},qBe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},GBe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},YBe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},ZBe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},XBe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},QBe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},JBe={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},eze={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},tze={ordinalNumber:Nq({matchPattern:VBe,parsePattern:WBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:HBe,defaultMatchWidth:"wide",parsePatterns:KBe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:qBe,defaultMatchWidth:"wide",parsePatterns:GBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:YBe,defaultMatchWidth:"wide",parsePatterns:ZBe,defaultParseWidth:"any"}),day:gs({matchPatterns:XBe,defaultMatchWidth:"wide",parsePatterns:QBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:JBe,defaultMatchWidth:"any",parsePatterns:eze,defaultParseWidth:"any"})},QXe={code:"zh-CN",formatDistance:PBe,formatLong:RBe,formatRelative:$Be,localize:UBe,match:tze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return I.jsx($ze,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function Ize(e){var t,n=Kn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Hq,l;return i?l=I.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(EI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(EI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(OI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(OI,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Nze(e){var t=Kn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Lze(e,t,n){for(var r=n?sf(new Date):ba(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function Fze(){var e=Kn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=Lze(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function jze(){var e,t=Kn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:Fze;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function Bze(e){var t=Kn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var HP=y.createContext(void 0);function zze(e){if(!Um(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(HP.Provider,{value:t,children:e.children})}return I.jsx(Uze,{initialProps:e.initialProps,children:e.children})}function Uze(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?Vq([],r):[];if(c.selected){var w=b.findIndex(function(x){return uo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return uo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return I.jsx(HP.Provider,{value:u,children:n})}function KP(){var e=y.useContext(HP);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Vze(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?uo(i,e)&&uo(r,e)?void 0:uo(i,e)?{from:i,to:void 0}:uo(r,e)?void 0:o4(r,e)?{from:e,to:i}:{from:r,to:e}:i?o4(e,i)?{from:i,to:e}:{from:e,to:i}:r?Uq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var qP=y.createContext(void 0);function Wze(e){if(!Vm(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(qP.Provider,{value:t,children:e.children})}return I.jsx(Hze,{initialProps:e.initialProps,children:e.children})}function Hze(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=Vze(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],uo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:c3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:c3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:c3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return I.jsx(qP.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function GP(){var e=y.useContext(qP);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function n1(e){return Array.isArray(e)?Vq([],e):e!==void 0?[e]:[]}function Kze(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=n1(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var qze=Ja.Selected,Ys=Ja.Disabled,Gze=Ja.Hidden,Yze=Ja.Today,d3=Ja.RangeEnd,h3=Ja.RangeMiddle,p3=Ja.RangeStart,Zze=Ja.Outside;function Xze(e,t,n){var r,i=(r={},r[qze]=n1(e.selected),r[Ys]=n1(e.disabled),r[Gze]=n1(e.hidden),r[Yze]=[e.today],r[d3]=[],r[h3]=[],r[p3]=[],r[Zze]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),Um(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Vm(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[p3]=n.modifiers[p3],i[h3]=n.modifiers[h3],i[d3]=n.modifiers[d3]),i}var Gq=y.createContext(void 0);function Qze(e){var t=Kn(),n=KP(),r=GP(),i=Xze(t,n,r),o=Kze(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Gq.Provider,{value:a,children:e.children})}function Yq(){var e=y.useContext(Gq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function Jze(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function eUe(e){return!!(e&&typeof e=="object"&&"from"in e)}function tUe(e){return!!(e&&typeof e=="object"&&"after"in e)}function nUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function rUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function iUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?uo(i,e):r?uo(r,e):!1}function oUe(e){return zP(e)}function aUe(e){return Array.isArray(e)&&e.every(zP)}function sUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(oUe(n))return uo(e,n);if(aUe(n))return n.includes(e);if(eUe(n))return iUe(e,n);if(rUe(n))return n.dayOfWeek.includes(e.getDay());if(Jze(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=o4(n.before,n.after);return s?a&&o:o||a}return tUe(n)?xs(e,n.after)>0:nUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function YP(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return sUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!WP(e,n)&&(i.outside=!0),i}function uUe(e,t){for(var n=go(e[0]),r=UP(e[e.length-1]),i,o,a=n;a<=r;){var s=YP(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var lUe=365;function Zq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:i4,month:Qa,year:_je,startOfWeek:function(b){return i.ISOWeek?sf(b):ba(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?Iq(b):VP(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=Sje([l,p]):r==="after"&&c&&(p=Cje([c,p]));var m=!0;if(o){var v=YP(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>lUe?s.lastFocused:Zq(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var Xq=y.createContext(void 0);function cUe(e){var t=Wm(),n=Yq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=uUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=Kn(),m=function(b,w){if(i){var x=Zq(i,{moveBy:b,direction:w,context:p,modifiers:n});uo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return I.jsx(Xq.Provider,{value:v,children:e.children})}function ZP(){var e=y.useContext(Xq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function fUe(e,t){var n=Yq(),r=YP(e,n,t);return r}var XP=y.createContext(void 0);function dUe(e){if(!d2(e.initialProps)){var t={selected:void 0};return I.jsx(XP.Provider,{value:t,children:e.children})}return I.jsx(hUe,{initialProps:e.initialProps,children:e.children})}function hUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return I.jsx(XP.Provider,{value:i,children:n})}function Qq(){var e=y.useContext(XP);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function pUe(e,t){var n=Kn(),r=Qq(),i=KP(),o=GP(),a=ZP(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(W){var j,K,Y,oe;d2(n)?(j=r.onDayClick)===null||j===void 0||j.call(r,e,t,W):Um(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,W):Vm(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,W):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,W)},O=function(W){var j;h(e),(j=n.onDayFocus)===null||j===void 0||j.call(n,e,t,W)},E=function(W){var j;f(),(j=n.onDayBlur)===null||j===void 0||j.call(n,e,t,W)},C=function(W){var j;(j=n.onDayMouseEnter)===null||j===void 0||j.call(n,e,t,W)},k=function(W){var j;(j=n.onDayMouseLeave)===null||j===void 0||j.call(n,e,t,W)},M=function(W){var j;(j=n.onDayPointerEnter)===null||j===void 0||j.call(n,e,t,W)},N=function(W){var j;(j=n.onDayPointerLeave)===null||j===void 0||j.call(n,e,t,W)},z=function(W){var j;(j=n.onDayTouchCancel)===null||j===void 0||j.call(n,e,t,W)},H=function(W){var j;(j=n.onDayTouchEnd)===null||j===void 0||j.call(n,e,t,W)},V=function(W){var j;(j=n.onDayTouchMove)===null||j===void 0||j.call(n,e,t,W)},ne=function(W){var j;(j=n.onDayTouchStart)===null||j===void 0||j.call(n,e,t,W)},Z=function(W){var j;(j=n.onDayKeyUp)===null||j===void 0||j.call(n,e,t,W)},G=function(W){var j;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),l();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),c();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():p();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?b():m();break;case"Home":W.preventDefault(),W.stopPropagation(),w();break;case"End":W.preventDefault(),W.stopPropagation(),x();break}(j=n.onDayKeyDown)===null||j===void 0||j.call(n,e,t,W)},q={onClick:S,onFocus:O,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:N,onTouchCancel:z,onTouchEnd:H,onTouchMove:V,onTouchStart:ne};return q}function gUe(){var e=Kn(),t=Qq(),n=KP(),r=GP(),i=d2(e)?t.selected:Um(e)?n.selected:Vm(e)?r.selected:void 0;return i}function mUe(e){return Object.values(Ja).includes(e)}function vUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(mUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function yUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function bUe(e,t,n){var r,i,o,a=Kn(),s=ZP(),u=fUe(e,t),l=pUe(e,u),c=gUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&uo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=vUe(a,u).join(" "),p=yUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:Bze,b=I.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&uo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&uo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function xUe(e){var t=y.useRef(null),n=bUe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(px,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function wUe(e){var t=e.number,n=e.dates,r=Kn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return I.jsx(px,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function _Ue(e){var t,n,r=Kn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:xUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:wUe,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(u,{displayMonth:e.displayMonth,date:f})},_Be(f))})]})}function AI(e,t,n){for(var r=n?.ISOWeek?Iq(t):VP(t,n),i=n?.ISOWeek?sf(e):ba(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?Fq(c):Bq(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function SUe(e,t){var n=AI(go(e),UP(e),t);if(t?.useFixedWeeks){var r=CBe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=i4(o,6-r),s=AI(i4(o,1),a,t);n.push.apply(n,s)}}return n}function CUe(e){var t,n,r,i=Kn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=SUe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:jze,b=(n=c?.Row)!==null&&n!==void 0?n:_Ue,w=(r=c?.Footer)!==null&&r!==void 0?r:Nze;return I.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&I.jsx(v,{}),I.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function EUe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var OUe=EUe()?y.useLayoutEffect:y.useEffect,g3=!1,AUe=0;function PI(){return"react-day-picker-".concat(++AUe)}function PUe(e){var t,n=e??(g3?PI():null),r=y.useState(n),i=r[0],o=r[1];return OUe(function(){i===null&&o(PI())},[]),y.useEffect(function(){g3===!1&&(g3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function kUe(e){var t,n,r=Kn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Wm().displayMonths,l=PUe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:Ize;return I.jsxs("div",{className:f.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(CUe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function TUe(e){var t=Kn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function MUe(e){var t,n,r=e.initialProps,i=Kn(),o=ZP(),a=Wm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:TUe;return I.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(p,{children:a.displayMonths.map(function(m,v){return I.jsx(kUe,{displayIndex:v,displayMonth:m},v)})})}))}function RUe(e){var t=e.children,n=nze(e,["children"]);return I.jsx(wze,{initialProps:n,children:I.jsx(Mze,{children:I.jsx(dUe,{initialProps:n,children:I.jsx(zze,{initialProps:n,children:I.jsx(Wze,{initialProps:n,children:I.jsx(Qze,{children:I.jsx(cUe,{children:t})})})})})})})}function JXe(e){return I.jsx(RUe,Rt({},e,{children:I.jsx(MUe,{initialProps:e})}))}var QP="Popover",[Jq,eQe]=vi(QP,[zl]),Hm=zl(),[DUe,Yl]=Jq(QP),eG=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Hm(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(aw,{...s,children:I.jsx(DUe,{scope:t,contentId:Fo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};eG.displayName=QP;var tG="PopoverAnchor",$Ue=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(tG,n),o=Hm(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),I.jsx(Om,{...o,...r,ref:t})});$Ue.displayName=tG;var nG="PopoverTrigger",rG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(nG,n),o=Hm(n),a=Gt(t,i.triggerRef),s=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":uG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:I.jsx(Om,{asChild:!0,...o,children:s})});rG.displayName=nG;var JP="PopoverPortal",[IUe,NUe]=Jq(JP,{forceMount:void 0}),iG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Yl(JP,t);return I.jsx(IUe,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};iG.displayName=JP;var Ch="PopoverContent",oG=y.forwardRef((e,t)=>{const n=NUe(Ch,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Yl(Ch,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(LUe,{...i,ref:t}):I.jsx(FUe,{...i,ref:t})})});oG.displayName=Ch;var LUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(null),i=Gt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Sm(a)},[]),I.jsx(_m,{as:Al,allowPinchZoom:!0,children:I.jsx(aG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),FUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(aG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),aG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Yl(Ch,n),p=Hm(n);return nw(),I.jsx(wm,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(sw,{"data-state":uG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sG="PopoverClose",jUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(sG,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});jUe.displayName=sG;var BUe="PopoverArrow",zUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Hm(n);return I.jsx(uw,{...i,...r,ref:t})});zUe.displayName=BUe;function uG(e){return e?"open":"closed"}var tQe=eG,nQe=rG,rQe=iG,iQe=oG,gx={exports:{}};/** + A `).concat(m,",").concat(m,",0,0,").concat(l,",").concat(t,",").concat(n+i-s*m," Z")}else c="M ".concat(t,",").concat(n," h ").concat(r," v ").concat(i," h ").concat(-r," Z");return c},jDe=function(t,n){if(!t||!n)return!1;var r=t.x,i=t.y,o=n.x,a=n.y,s=n.width,u=n.height;if(Math.abs(s)>0&&Math.abs(u)>0){var l=Math.min(o,o+s),c=Math.max(o,o+s),f=Math.min(a,a+u),h=Math.max(a,a+u);return r>=l&&r<=c&&i>=f&&i<=h}return!1},BDe={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},E5=function(t){var n=S$(S$({},BDe),t),r=y.useRef(),i=y.useState(-1),o=MDe(i,2),a=o[0],s=o[1];y.useEffect(function(){if(r.current&&r.current.getTotalLength)try{var O=r.current.getTotalLength();O&&s(O)}catch{}},[]);var u=n.x,l=n.y,c=n.width,f=n.height,h=n.radius,p=n.className,m=n.animationEasing,v=n.animationDuration,b=n.animationBegin,w=n.isAnimationActive,x=n.isUpdateAnimationActive;if(u!==+u||l!==+l||c!==+c||f!==+f||c===0||f===0)return null;var S=dn("recharts-rectangle",p);return x?F.createElement(Xa,{canBegin:a>0,from:{width:c,height:f,x:u,y:l},to:{width:c,height:f,x:u,y:l},duration:v,animationEasing:m,isActive:x},function(O){var E=O.width,C=O.height,k=O.x,M=O.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,isActive:w,easing:m},F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(k,M,E,C,h),ref:r})))}):F.createElement("path",Kb({},zt(n,!0),{className:S,d:C$(u,l,c,f,h)}))};function E6(){return E6=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qDe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var GDe=function(t,n,r,i,o,a){return"M".concat(t,",").concat(o,"v").concat(i,"M").concat(a,",").concat(n,"h").concat(r)},YDe=function(t){var n=t.x,r=n===void 0?0:n,i=t.y,o=i===void 0?0:i,a=t.top,s=a===void 0?0:a,u=t.left,l=u===void 0?0:u,c=t.width,f=c===void 0?0:c,h=t.height,p=h===void 0?0:h,m=t.className,v=KDe(t,zDe),b=UDe({x:r,y:o,top:s,left:l,width:f,height:p},v);return!qe(r)||!qe(o)||!qe(f)||!qe(p)||!qe(s)||!qe(l)?null:F.createElement("path",O6({},zt(b,!0),{className:dn("recharts-cross",m),d:GDe(r,o,f,p,s,l)}))},ZDe=lW,XDe=ZDe(Object.getPrototypeOf,Object),QDe=XDe,JDe=Tu,e7e=QDe,t7e=Mu,n7e="[object Object]",r7e=Function.prototype,i7e=Object.prototype,qH=r7e.toString,o7e=i7e.hasOwnProperty,a7e=qH.call(Object);function s7e(e){if(!t7e(e)||JDe(e)!=n7e)return!1;var t=e7e(e);if(t===null)return!0;var n=o7e.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&qH.call(n)==a7e}var u7e=s7e;const l7e=Pn(u7e);var c7e=Tu,f7e=Mu,d7e="[object Boolean]";function h7e(e){return e===!0||e===!1||f7e(e)&&c7e(e)==d7e}var p7e=h7e;const g7e=Pn(p7e);function qg(e){"@babel/helpers - typeof";return qg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qg(e)}function qb(){return qb=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n0,from:{upperWidth:0,lowerWidth:0,height:h,x:u,y:l},to:{upperWidth:c,lowerWidth:f,height:h,x:u,y:l},duration:v,animationEasing:m,isActive:w},function(S){var O=S.upperWidth,E=S.lowerWidth,C=S.height,k=S.x,M=S.y;return F.createElement(Xa,{canBegin:a>0,from:"0px ".concat(a===-1?1:a,"px"),to:"".concat(a,"px 0px"),attributeName:"strokeDasharray",begin:b,duration:v,easing:m},F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(k,M,O,E,C),ref:r})))}):F.createElement("g",null,F.createElement("path",qb({},zt(n,!0),{className:x,d:k$(u,l,c,f,h)})))},O7e=["option","shapeType","propTransformer","activeClassName","isActive"];function Gg(e){"@babel/helpers - typeof";return Gg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gg(e)}function A7e(e,t){if(e==null)return{};var n=P7e(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function P7e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function T$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gb(e){for(var t=1;t0&&r.handleDrag(i.changedTouches[0])}),Ao(r,"handleDragEnd",function(){r.setState({isTravellerMoving:!1,isSlideMoving:!1},function(){var i=r.props,o=i.endIndex,a=i.onDragEnd,s=i.startIndex;a?.({endIndex:o,startIndex:s})}),r.detachDragEndListener()}),Ao(r,"handleLeaveWrapper",function(){(r.state.isTravellerMoving||r.state.isSlideMoving)&&(r.leaveTimer=window.setTimeout(r.handleDragEnd,r.props.leaveTimeOut))}),Ao(r,"handleEnterSlideOrTraveller",function(){r.setState({isTextActive:!0})}),Ao(r,"handleLeaveSlideOrTraveller",function(){r.setState({isTextActive:!1})}),Ao(r,"handleSlideDragStart",function(i){var o=L$(i)?i.changedTouches[0]:i;r.setState({isTravellerMoving:!1,isSlideMoving:!0,slideMoveStartX:o.pageX}),r.attachDragEndListener()}),r.travellerDragStartHandlers={startX:r.handleTravellerDragStart.bind(r,"startX"),endX:r.handleTravellerDragStart.bind(r,"endX")},r.state={},r}return f$e(t,e),s$e(t,[{key:"componentWillUnmount",value:function(){this.leaveTimer&&(clearTimeout(this.leaveTimer),this.leaveTimer=null),this.detachDragEndListener()}},{key:"getIndex",value:function(r){var i=r.startX,o=r.endX,a=this.state.scaleValues,s=this.props,u=s.gap,l=s.data,c=l.length-1,f=Math.min(i,o),h=Math.max(i,o),p=t.getIndexInRange(a,f),m=t.getIndexInRange(a,h);return{startIndex:p-p%u,endIndex:m===c?c:m-m%u}}},{key:"getTextOfTick",value:function(r){var i=this.props,o=i.data,a=i.tickFormatter,s=i.dataKey,u=Kr(o[r],s,r);return Wt(a)?a(u,r):u}},{key:"attachDragEndListener",value:function(){window.addEventListener("mouseup",this.handleDragEnd,!0),window.addEventListener("touchend",this.handleDragEnd,!0),window.addEventListener("mousemove",this.handleDrag,!0)}},{key:"detachDragEndListener",value:function(){window.removeEventListener("mouseup",this.handleDragEnd,!0),window.removeEventListener("touchend",this.handleDragEnd,!0),window.removeEventListener("mousemove",this.handleDrag,!0)}},{key:"handleSlideDrag",value:function(r){var i=this.state,o=i.slideMoveStartX,a=i.startX,s=i.endX,u=this.props,l=u.x,c=u.width,f=u.travellerWidth,h=u.startIndex,p=u.endIndex,m=u.onChange,v=r.pageX-o;v>0?v=Math.min(v,l+c-f-s,l+c-f-a):v<0&&(v=Math.max(v,l-a,l-s));var b=this.getIndex({startX:a+v,endX:s+v});(b.startIndex!==h||b.endIndex!==p)&&m&&m(b),this.setState({startX:a+v,endX:s+v,slideMoveStartX:r.pageX})}},{key:"handleTravellerDragStart",value:function(r,i){var o=L$(i)?i.changedTouches[0]:i;this.setState({isSlideMoving:!1,isTravellerMoving:!0,movingTravellerId:r,brushMoveStartX:o.pageX}),this.attachDragEndListener()}},{key:"handleTravellerMove",value:function(r){var i=this.state,o=i.brushMoveStartX,a=i.movingTravellerId,s=i.endX,u=i.startX,l=this.state[a],c=this.props,f=c.x,h=c.width,p=c.travellerWidth,m=c.onChange,v=c.gap,b=c.data,w={startX:this.state.startX,endX:this.state.endX},x=r.pageX-o;x>0?x=Math.min(x,f+h-p-l):x<0&&(x=Math.max(x,f-l)),w[a]=l+x;var S=this.getIndex(w),O=S.startIndex,E=S.endIndex,C=function(){var M=b.length-1;return a==="startX"&&(s>u?O%v===0:E%v===0)||su?E%v===0:O%v===0)||s>u&&E===M};this.setState(Ao(Ao({},a,l+x),"brushMoveStartX",r.pageX),function(){m&&C()&&m(S)})}},{key:"handleTravellerMoveKeyboard",value:function(r,i){var o=this,a=this.state,s=a.scaleValues,u=a.startX,l=a.endX,c=this.state[i],f=s.indexOf(c);if(f!==-1){var h=f+r;if(!(h===-1||h>=s.length)){var p=s[h];i==="startX"&&p>=l||i==="endX"&&p<=u||this.setState(Ao({},i,p),function(){o.props.onChange(o.getIndex({startX:o.state.startX,endX:o.state.endX}))})}}}},{key:"renderBackground",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.fill,l=r.stroke;return F.createElement("rect",{stroke:l,fill:u,x:i,y:o,width:a,height:s})}},{key:"renderPanorama",value:function(){var r=this.props,i=r.x,o=r.y,a=r.width,s=r.height,u=r.data,l=r.children,c=r.padding,f=y.Children.only(l);return f?F.cloneElement(f,{x:i,y:o,width:a,height:s,margin:c,compact:!0,data:u}):null}},{key:"renderTravellerLayer",value:function(r,i){var o,a,s=this,u=this.props,l=u.y,c=u.travellerWidth,f=u.height,h=u.traveller,p=u.ariaLabel,m=u.data,v=u.startIndex,b=u.endIndex,w=Math.max(r,this.props.x),x=o3(o3({},zt(this.props,!1)),{},{x:w,y:l,width:c,height:f}),S=p||"Min value: ".concat((o=m[v])===null||o===void 0?void 0:o.name,", Max value: ").concat((a=m[b])===null||a===void 0?void 0:a.name);return F.createElement(Cn,{tabIndex:0,role:"slider","aria-label":S,"aria-valuenow":r,className:"recharts-brush-traveller",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.travellerDragStartHandlers[i],onTouchStart:this.travellerDragStartHandlers[i],onKeyDown:function(E){["ArrowLeft","ArrowRight"].includes(E.key)&&(E.preventDefault(),E.stopPropagation(),s.handleTravellerMoveKeyboard(E.key==="ArrowRight"?1:-1,i))},onFocus:function(){s.setState({isTravellerFocused:!0})},onBlur:function(){s.setState({isTravellerFocused:!1})},style:{cursor:"col-resize"}},t.renderTraveller(h,x))}},{key:"renderSlide",value:function(r,i){var o=this.props,a=o.y,s=o.height,u=o.stroke,l=o.travellerWidth,c=Math.min(r,i)+l,f=Math.max(Math.abs(i-r)-l,0);return F.createElement("rect",{className:"recharts-brush-slide",onMouseEnter:this.handleEnterSlideOrTraveller,onMouseLeave:this.handleLeaveSlideOrTraveller,onMouseDown:this.handleSlideDragStart,onTouchStart:this.handleSlideDragStart,style:{cursor:"move"},stroke:"none",fill:u,fillOpacity:.2,x:c,y:a,width:f,height:s})}},{key:"renderText",value:function(){var r=this.props,i=r.startIndex,o=r.endIndex,a=r.y,s=r.height,u=r.travellerWidth,l=r.stroke,c=this.state,f=c.startX,h=c.endX,p=5,m={pointerEvents:"none",fill:l};return F.createElement(Cn,{className:"recharts-brush-texts"},F.createElement(Ob,Zb({textAnchor:"end",verticalAnchor:"middle",x:Math.min(f,h)-p,y:a+s/2},m),this.getTextOfTick(i)),F.createElement(Ob,Zb({textAnchor:"start",verticalAnchor:"middle",x:Math.max(f,h)+u+p,y:a+s/2},m),this.getTextOfTick(o)))}},{key:"render",value:function(){var r=this.props,i=r.data,o=r.className,a=r.children,s=r.x,u=r.y,l=r.width,c=r.height,f=r.alwaysShowText,h=this.state,p=h.startX,m=h.endX,v=h.isTextActive,b=h.isSlideMoving,w=h.isTravellerMoving,x=h.isTravellerFocused;if(!i||!i.length||!qe(s)||!qe(u)||!qe(l)||!qe(c)||l<=0||c<=0)return null;var S=dn("recharts-brush",o),O=F.Children.count(a)===1,E=o$e("userSelect","none");return F.createElement(Cn,{className:S,onMouseLeave:this.handleLeaveWrapper,onTouchMove:this.handleTouchMove,style:E},this.renderBackground(),O&&this.renderPanorama(),this.renderSlide(p,m),this.renderTravellerLayer(p,"startX"),this.renderTravellerLayer(m,"endX"),(v||b||w||x||f)&&this.renderText())}}],[{key:"renderDefaultTraveller",value:function(r){var i=r.x,o=r.y,a=r.width,s=r.height,u=r.stroke,l=Math.floor(o+s/2)-1;return F.createElement(F.Fragment,null,F.createElement("rect",{x:i,y:o,width:a,height:s,fill:u,stroke:"none"}),F.createElement("line",{x1:i+1,y1:l,x2:i+a-1,y2:l,fill:"none",stroke:"#fff"}),F.createElement("line",{x1:i+1,y1:l+2,x2:i+a-1,y2:l+2,fill:"none",stroke:"#fff"}))}},{key:"renderTraveller",value:function(r,i){var o;return F.isValidElement(r)?o=F.cloneElement(r,i):Wt(r)?o=r(i):o=t.renderDefaultTraveller(i),o}},{key:"getDerivedStateFromProps",value:function(r,i){var o=r.data,a=r.width,s=r.x,u=r.travellerWidth,l=r.updateId,c=r.startIndex,f=r.endIndex;if(o!==i.prevData||l!==i.prevUpdateId)return o3({prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a},o&&o.length?h$e({data:o,width:a,x:s,travellerWidth:u,startIndex:c,endIndex:f}):{scale:null,scaleValues:null});if(i.scale&&(a!==i.prevWidth||s!==i.prevX||u!==i.prevTravellerWidth)){i.scale.range([s,s+a-u]);var h=i.scale.domain().map(function(p){return i.scale(p)});return{prevData:o,prevTravellerWidth:u,prevUpdateId:l,prevX:s,prevWidth:a,startX:i.scale(r.startIndex),endX:i.scale(r.endIndex),scaleValues:h}}return null}},{key:"getIndexInRange",value:function(r,i){for(var o=r.length,a=0,s=o-1;s-a>1;){var u=Math.floor((a+s)/2);r[u]>i?s=u:a=u}return i>=r[s]?s:a}}])}(y.PureComponent);Ao(ch,"displayName","Brush");Ao(ch,"defaultProps",{height:40,travellerWidth:5,gap:1,fill:"#fff",stroke:"#666",padding:{top:1,right:1,bottom:1,left:1},leaveTimeOut:1e3,alwaysShowText:!1});var p$e=ZA;function g$e(e,t){var n;return p$e(e,function(r,i,o){return n=t(r,i,o),!n}),!!n}var m$e=g$e,v$e=tW,y$e=Vl,b$e=m$e,x$e=vo,w$e=zw;function _$e(e,t,n){var r=x$e(e)?v$e:b$e;return n&&w$e(e,t,n)&&(t=void 0),r(e,y$e(t))}var S$e=_$e;const C$e=Pn(S$e);var Ps=function(t,n){var r=t.alwaysShow,i=t.ifOverflow;return r&&(i="extendDomain"),i===n},F$=SW;function E$e(e,t,n){t=="__proto__"&&F$?F$(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var O$e=E$e,A$e=O$e,P$e=wW,k$e=Vl;function T$e(e,t){var n={};return t=k$e(t),P$e(e,function(r,i,o){A$e(n,i,t(r,i,o))}),n}var M$e=T$e;const R$e=Pn(M$e);function D$e(e,t){for(var n=-1,r=e==null?0:e.length;++n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Z$e(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function X$e(e,t){var n=e.x,r=e.y,i=Y$e(e,H$e),o="".concat(n),a=parseInt(o,10),s="".concat(r),u=parseInt(s,10),l="".concat(t.height||i.height),c=parseInt(l,10),f="".concat(t.width||i.width),h=parseInt(f,10);return Yp(Yp(Yp(Yp(Yp({},t),i),a?{x:a}:{}),u?{y:u}:{}),{},{height:c,width:h,name:t.name,radius:t.radius})}function B$(e){return F.createElement(A6,k6({shapeType:"rectangle",propTransformer:X$e,activeClassName:"recharts-active-bar"},e))}var Q$e=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return function(r,i){if(typeof t=="number")return t;var o=typeof r=="number";return o?t(r,i):(o||rf(),n)}},J$e=["value","background"],JH;function fh(e){"@babel/helpers - typeof";return fh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fh(e)}function eIe(e,t){if(e==null)return{};var n=tIe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function tIe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qb(){return Qb=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&Math.abs(G)0&&Math.abs(Z)0&&(ne=Math.min((ue||0)-(Z[de-1]||0),ne))}),Number.isFinite(ne)){var G=ne/V,q=v.layout==="vertical"?r.height:r.width;if(v.padding==="gap"&&(k=G*q/2),v.padding==="no-gap"){var W=ef(t.barCategoryGap,G*q),j=G*q/2;k=j-W-(j-W)/q*W}}}i==="xAxis"?M=[r.left+(S.left||0)+(k||0),r.left+r.width-(S.right||0)-(k||0)]:i==="yAxis"?M=u==="horizontal"?[r.top+r.height-(S.bottom||0),r.top+(S.top||0)]:[r.top+(S.top||0)+(k||0),r.top+r.height-(S.bottom||0)-(k||0)]:M=v.range,E&&(M=[M[1],M[0]]);var K=QMe(v,o,h),Y=K.scale,oe=K.realScaleType;Y.domain(w).range(M),JMe(Y);var Q=sRe(Y,$a($a({},v),{},{realScaleType:oe}));i==="xAxis"?(H=b==="top"&&!O||b==="bottom"&&O,N=r.left,z=f[C]-H*v.height):i==="yAxis"&&(H=b==="left"&&!O||b==="right"&&O,N=f[C]-H*v.width,z=r.top);var J=$a($a($a({},v),Q),{},{realScaleType:oe,x:N,y:z,scale:Y,width:i==="xAxis"?r.width:v.width,height:i==="yAxis"?r.height:v.height});return J.bandSize=Bb(J,Q),!v.hide&&i==="xAxis"?f[C]+=(H?-1:1)*J.height:v.hide||(f[C]+=(H?-1:1)*J.width),$a($a({},p),{},e2({},m,J))},{})},rK=function(t,n){var r=t.x,i=t.y,o=n.x,a=n.y;return{x:Math.min(r,o),y:Math.min(i,a),width:Math.abs(o-r),height:Math.abs(a-i)}},hIe=function(t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2;return rK({x:n,y:r},{x:i,y:o})},iK=function(){function e(t){lIe(this,e),this.scale=t}return cIe(e,[{key:"domain",get:function(){return this.scale.domain}},{key:"range",get:function(){return this.scale.range}},{key:"rangeMin",get:function(){return this.range()[0]}},{key:"rangeMax",get:function(){return this.range()[1]}},{key:"bandwidth",get:function(){return this.scale.bandwidth}},{key:"apply",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.bandAware,o=r.position;if(n!==void 0){if(o)switch(o){case"start":return this.scale(n);case"middle":{var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+a}case"end":{var s=this.bandwidth?this.bandwidth():0;return this.scale(n)+s}default:return this.scale(n)}if(i){var u=this.bandwidth?this.bandwidth()/2:0;return this.scale(n)+u}return this.scale(n)}}},{key:"isInRange",value:function(n){var r=this.range(),i=r[0],o=r[r.length-1];return i<=o?n>=i&&n<=o:n>=o&&n<=i}}],[{key:"create",value:function(n){return new e(n)}}])}();e2(iK,"EPS",1e-4);var O5=function(t){var n=Object.keys(t).reduce(function(r,i){return $a($a({},r),{},e2({},i,iK.create(t[i])))},{});return $a($a({},n),{},{apply:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=o.bandAware,s=o.position;return R$e(i,function(u,l){return n[l].apply(u,{bandAware:a,position:s})})},isInRange:function(i){return QH(i,function(o,a){return n[a].isInRange(o)})}})};function pIe(e){return(e%180+180)%180}var gIe=function(t){var n=t.width,r=t.height,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=pIe(i),a=o*Math.PI/180,s=Math.atan(r/n),u=a>s&&a-1?i[o?t[a]:a]:void 0}}var xIe=bIe,wIe=GH;function _Ie(e){var t=wIe(e),n=t%1;return t===t?n?t-n:t:0}var SIe=_Ie,CIe=gW,EIe=Vl,OIe=SIe,AIe=Math.max;function PIe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:OIe(n);return i<0&&(i=AIe(r+i,0)),CIe(e,EIe(t),i)}var kIe=PIe,TIe=xIe,MIe=kIe,RIe=TIe(MIe),DIe=RIe;const $Ie=Pn(DIe);var IIe=Lwe(function(e){return{x:e.left,y:e.top,width:e.width,height:e.height}},function(e){return["l",e.left,"t",e.top,"w",e.width,"h",e.height].join("")}),A5=y.createContext(void 0),P5=y.createContext(void 0),oK=y.createContext(void 0),aK=y.createContext({}),sK=y.createContext(void 0),uK=y.createContext(0),lK=y.createContext(0),H$=function(t){var n=t.state,r=n.xAxisMap,i=n.yAxisMap,o=n.offset,a=t.clipPathId,s=t.children,u=t.width,l=t.height,c=IIe(o);return F.createElement(A5.Provider,{value:r},F.createElement(P5.Provider,{value:i},F.createElement(aK.Provider,{value:o},F.createElement(oK.Provider,{value:c},F.createElement(sK.Provider,{value:a},F.createElement(uK.Provider,{value:l},F.createElement(lK.Provider,{value:u},s)))))))},NIe=function(){return y.useContext(sK)},cK=function(t){var n=y.useContext(A5);n==null&&rf();var r=n[t];return r==null&&rf(),r},LIe=function(){var t=y.useContext(A5);return rl(t)},FIe=function(){var t=y.useContext(P5),n=$Ie(t,function(r){return QH(r.domain,Number.isFinite)});return n||rl(t)},fK=function(t){var n=y.useContext(P5);n==null&&rf();var r=n[t];return r==null&&rf(),r},jIe=function(){var t=y.useContext(oK);return t},BIe=function(){return y.useContext(aK)},k5=function(){return y.useContext(lK)},T5=function(){return y.useContext(uK)};function dh(e){"@babel/helpers - typeof";return dh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dh(e)}function zIe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UIe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);ne*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function SNe(e,t){return yK(e,t+1)}function CNe(e,t,n,r,i){for(var o=(r||[]).slice(),a=t.start,s=t.end,u=0,l=1,c=a,f=function(){var m=r?.[u];if(m===void 0)return{v:yK(r,l)};var v=u,b,w=function(){return b===void 0&&(b=n(m,v)),b},x=m.coordinate,S=u===0||rx(e,x,w,c,s);S||(u=0,c=a,l+=1),S&&(c=x+e*(w()/2+i),u+=l)},h;l<=o.length;)if(h=f(),h)return h.v;return[]}function Jg(e){"@babel/helpers - typeof";return Jg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jg(e)}function J$(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ai(e){for(var t=1;t0?p.coordinate-b*e:p.coordinate})}else o[h]=p=Ai(Ai({},p),{},{tickCoord:p.coordinate});var w=rx(e,p.tickCoord,v,s,u);w&&(u=p.tickCoord-e*(v()/2+i),o[h]=Ai(Ai({},p),{},{isShow:!0}))},c=a-1;c>=0;c--)l(c);return o}function kNe(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,u=t.start,l=t.end;if(o){var c=r[s-1],f=n(c,s-1),h=e*(c.coordinate+e*f/2-l);a[s-1]=c=Ai(Ai({},c),{},{tickCoord:h>0?c.coordinate-h*e:c.coordinate});var p=rx(e,c.tickCoord,function(){return f},u,l);p&&(l=c.tickCoord-e*(f/2+i),a[s-1]=Ai(Ai({},c),{},{isShow:!0}))}for(var m=o?s-1:s,v=function(x){var S=a[x],O,E=function(){return O===void 0&&(O=n(S,x)),O};if(x===0){var C=e*(S.coordinate-e*E()/2-u);a[x]=S=Ai(Ai({},S),{},{tickCoord:C<0?S.coordinate-C*e:S.coordinate})}else a[x]=S=Ai(Ai({},S),{},{tickCoord:S.coordinate});var k=rx(e,S.tickCoord,E,u,l);k&&(u=S.tickCoord+e*(E()/2+i),a[x]=Ai(Ai({},S),{},{isShow:!0}))},b=0;b=2?Ua(i[1].coordinate-i[0].coordinate):1,w=_Ne(o,b,p);return u==="equidistantPreserveStart"?CNe(b,w,v,i,a):(u==="preserveStart"||u==="preserveStartEnd"?h=kNe(b,w,v,i,a,u==="preserveStartEnd"):h=PNe(b,w,v,i,a),h.filter(function(x){return x.isShow}))}var TNe=["viewBox"],MNe=["viewBox"],RNe=["ticks"];function gh(e){"@babel/helpers - typeof";return gh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gh(e)}function vd(){return vd=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function DNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function $Ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function tI(e,t){for(var n=0;n0?u(this.props):u(p)),a<=0||s<=0||!m||!m.length?null:F.createElement(Cn,{className:dn("recharts-cartesian-axis",l),ref:function(b){r.layerReference=b}},o&&this.renderAxisLine(),this.renderTicks(m,this.state.fontSize,this.state.letterSpacing),ki.renderCallByParent(this.props))}}],[{key:"renderTickItem",value:function(r,i,o){var a;return F.isValidElement(r)?a=F.cloneElement(r,i):Wt(r)?a=r(i):a=F.createElement(Ob,vd({},i,{className:"recharts-cartesian-axis-tick-value"}),o),a}}])}(y.Component);$5(np,"displayName","CartesianAxis");$5(np,"defaultProps",{x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"});var zNe=["x1","y1","x2","y2","key"],UNe=["offset"];function of(e){"@babel/helpers - typeof";return of=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},of(e)}function nI(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ti(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KNe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}var qNe=function(t){var n=t.fill;if(!n||n==="none")return null;var r=t.fillOpacity,i=t.x,o=t.y,a=t.width,s=t.height,u=t.ry;return F.createElement("rect",{x:i,y:o,ry:u,width:a,height:s,stroke:"none",fill:n,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function wK(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=t.x1,i=t.y1,o=t.x2,a=t.y2,s=t.key,u=rI(t,zNe),l=zt(u,!1);l.offset;var c=rI(l,UNe);n=F.createElement("line",Oc({},c,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function GNe(e){var t=e.x,n=e.width,r=e.horizontal,i=r===void 0?!0:r,o=e.horizontalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:t,y1:s,x2:t+n,y2:s,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-horizontal"},a)}function YNe(e){var t=e.y,n=e.height,r=e.vertical,i=r===void 0?!0:r,o=e.verticalPoints;if(!i||!o||!o.length)return null;var a=o.map(function(s,u){var l=Ti(Ti({},e),{},{x1:s,y1:t,x2:s,y2:t+n,key:"line-".concat(u),index:u});return wK(i,l)});return F.createElement("g",{className:"recharts-cartesian-grid-vertical"},a)}function ZNe(e){var t=e.horizontalFill,n=e.fillOpacity,r=e.x,i=e.y,o=e.width,a=e.height,s=e.horizontalPoints,u=e.horizontal,l=u===void 0?!0:u;if(!l||!t||!t.length)return null;var c=s.map(function(h){return Math.round(h+i-i)}).sort(function(h,p){return h-p});i!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?i+a-h:c[p+1]-h;if(v<=0)return null;var b=p%t.length;return F.createElement("rect",{key:"react-".concat(p),y:h,x:r,height:v,width:o,stroke:"none",fill:t[b],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},f)}function XNe(e){var t=e.vertical,n=t===void 0?!0:t,r=e.verticalFill,i=e.fillOpacity,o=e.x,a=e.y,s=e.width,u=e.height,l=e.verticalPoints;if(!n||!r||!r.length)return null;var c=l.map(function(h){return Math.round(h+o-o)}).sort(function(h,p){return h-p});o!==c[0]&&c.unshift(0);var f=c.map(function(h,p){var m=!c[p+1],v=m?o+s-h:c[p+1]-h;if(v<=0)return null;var b=p%r.length;return F.createElement("rect",{key:"react-".concat(p),x:h,y:a,width:v,height:u,stroke:"none",fill:r[b],fillOpacity:i,className:"recharts-cartesian-grid-bg"})});return F.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},f)}var QNe=function(t,n){var r=t.xAxis,i=t.width,o=t.height,a=t.offset;return DH(D5(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.left,a.left+a.width,n)},JNe=function(t,n){var r=t.yAxis,i=t.width,o=t.height,a=t.offset;return DH(D5(Ti(Ti(Ti({},np.defaultProps),r),{},{ticks:su(r,!0),viewBox:{x:0,y:0,width:i,height:o}})),a.top,a.top+a.height,n)},Zf={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[]};function eLe(e){var t,n,r,i,o,a,s=k5(),u=T5(),l=BIe(),c=Ti(Ti({},e),{},{stroke:(t=e.stroke)!==null&&t!==void 0?t:Zf.stroke,fill:(n=e.fill)!==null&&n!==void 0?n:Zf.fill,horizontal:(r=e.horizontal)!==null&&r!==void 0?r:Zf.horizontal,horizontalFill:(i=e.horizontalFill)!==null&&i!==void 0?i:Zf.horizontalFill,vertical:(o=e.vertical)!==null&&o!==void 0?o:Zf.vertical,verticalFill:(a=e.verticalFill)!==null&&a!==void 0?a:Zf.verticalFill,x:qe(e.x)?e.x:l.left,y:qe(e.y)?e.y:l.top,width:qe(e.width)?e.width:l.width,height:qe(e.height)?e.height:l.height}),f=c.x,h=c.y,p=c.width,m=c.height,v=c.syncWithTicks,b=c.horizontalValues,w=c.verticalValues,x=LIe(),S=FIe();if(!qe(p)||p<=0||!qe(m)||m<=0||!qe(f)||f!==+f||!qe(h)||h!==+h)return null;var O=c.verticalCoordinatesGenerator||QNe,E=c.horizontalCoordinatesGenerator||JNe,C=c.horizontalPoints,k=c.verticalPoints;if((!C||!C.length)&&Wt(E)){var M=b&&b.length,N=E({yAxis:S?Ti(Ti({},S),{},{ticks:M?b:S.ticks}):void 0,width:s,height:u,offset:l},M?!0:v);du(Array.isArray(N),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(of(N),"]")),Array.isArray(N)&&(C=N)}if((!k||!k.length)&&Wt(O)){var z=w&&w.length,H=O({xAxis:x?Ti(Ti({},x),{},{ticks:z?w:x.ticks}):void 0,width:s,height:u,offset:l},z?!0:v);du(Array.isArray(H),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(of(H),"]")),Array.isArray(H)&&(k=H)}return F.createElement("g",{className:"recharts-cartesian-grid"},F.createElement(qNe,{fill:c.fill,fillOpacity:c.fillOpacity,x:c.x,y:c.y,width:c.width,height:c.height,ry:c.ry}),F.createElement(GNe,Oc({},c,{offset:l,horizontalPoints:C,xAxis:x,yAxis:S})),F.createElement(YNe,Oc({},c,{offset:l,verticalPoints:k,xAxis:x,yAxis:S})),F.createElement(ZNe,Oc({},c,{horizontalPoints:C})),F.createElement(XNe,Oc({},c,{verticalPoints:k})))}eLe.displayName="CartesianGrid";var tLe=["type","layout","connectNulls","ref"],nLe=["key"];function mh(e){"@babel/helpers - typeof";return mh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mh(e)}function iI(e,t){if(e==null)return{};var n=rLe(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function rLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function A0(){return A0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);nf){p=[].concat(Xf(u.slice(0,m)),[f-v]);break}var b=p.length%2===0?[0,h]:[h];return[].concat(Xf(t.repeat(u,c)),Xf(p),b).map(function(w){return"".concat(w,"px")}).join(", ")}),Ia(n,"id",vf("recharts-line-")),Ia(n,"pathRef",function(a){n.mainCurve=a}),Ia(n,"handleAnimationEnd",function(){n.setState({isAnimationFinished:!0}),n.props.onAnimationEnd&&n.props.onAnimationEnd()}),Ia(n,"handleAnimationStart",function(){n.setState({isAnimationFinished:!1}),n.props.onAnimationStart&&n.props.onAnimationStart()}),n}return hLe(t,e),lLe(t,[{key:"componentDidMount",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();this.setState({totalLength:r})}}},{key:"componentDidUpdate",value:function(){if(this.props.isAnimationActive){var r=this.getTotalLength();r!==this.state.totalLength&&this.setState({totalLength:r})}}},{key:"getTotalLength",value:function(){var r=this.mainCurve;try{return r&&r.getTotalLength&&r.getTotalLength()||0}catch{return 0}}},{key:"renderErrorBar",value:function(r,i){if(this.props.isAnimationActive&&!this.state.isAnimationFinished)return null;var o=this.props,a=o.points,s=o.xAxis,u=o.yAxis,l=o.layout,c=o.children,f=po(c,Jh);if(!f)return null;var h=function(v,b){return{x:v.x,y:v.y,value:v.value,errorVal:Kr(v.payload,b)}},p={clipPath:r?"url(#clipPath-".concat(i,")"):null};return F.createElement(Cn,p,f.map(function(m){return F.cloneElement(m,{key:"bar-".concat(m.props.dataKey),data:a,xAxis:s,yAxis:u,layout:l,dataPointFormatter:h})}))}},{key:"renderDots",value:function(r,i,o){var a=this.props.isAnimationActive;if(a&&!this.state.isAnimationFinished)return null;var s=this.props,u=s.dot,l=s.points,c=s.dataKey,f=zt(this.props,!1),h=zt(u,!0),p=l.map(function(v,b){var w=Oo(Oo(Oo({key:"dot-".concat(b),r:3},f),h),{},{value:v.value,dataKey:c,cx:v.x,cy:v.y,index:b,payload:v.payload});return t.renderDotItem(u,w)}),m={clipPath:r?"url(#clipPath-".concat(i?"":"dots-").concat(o,")"):null};return F.createElement(Cn,A0({className:"recharts-line-dots",key:"dots"},m),p)}},{key:"renderCurveStatically",value:function(r,i,o,a){var s=this.props,u=s.type,l=s.layout,c=s.connectNulls;s.ref;var f=iI(s,tLe),h=Oo(Oo(Oo({},zt(f,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:i?"url(#clipPath-".concat(o,")"):null,points:r},a),{},{type:u,layout:l,connectNulls:c});return F.createElement(Ic,A0({},h,{pathRef:this.pathRef}))}},{key:"renderCurveWithAnimation",value:function(r,i){var o=this,a=this.props,s=a.points,u=a.strokeDasharray,l=a.isAnimationActive,c=a.animationBegin,f=a.animationDuration,h=a.animationEasing,p=a.animationId,m=a.animateNewValues,v=a.width,b=a.height,w=this.state,x=w.prevPoints,S=w.totalLength;return F.createElement(Xa,{begin:c,duration:f,isActive:l,easing:h,from:{t:0},to:{t:1},key:"line-".concat(p),onAnimationEnd:this.handleAnimationEnd,onAnimationStart:this.handleAnimationStart},function(O){var E=O.t;if(x){var C=x.length/s.length,k=s.map(function(V,ne){var Z=Math.floor(ne*C);if(x[Z]){var G=x[Z],q=Er(G.x,V.x),W=Er(G.y,V.y);return Oo(Oo({},V),{},{x:q(E),y:W(E)})}if(m){var j=Er(v*2,V.x),K=Er(b/2,V.y);return Oo(Oo({},V),{},{x:j(E),y:K(E)})}return Oo(Oo({},V),{},{x:V.x,y:V.y})});return o.renderCurveStatically(k,r,i)}var M=Er(0,S),N=M(E),z;if(u){var H="".concat(u).split(/[,\s]+/gim).map(function(V){return parseFloat(V)});z=o.getStrokeDasharray(N,S,H)}else z=o.generateSimpleStrokeDasharray(S,N);return o.renderCurveStatically(s,r,i,{strokeDasharray:z})})}},{key:"renderCurve",value:function(r,i){var o=this.props,a=o.points,s=o.isAnimationActive,u=this.state,l=u.prevPoints,c=u.totalLength;return s&&a&&a.length&&(!l&&c>0||!tf(l,a))?this.renderCurveWithAnimation(r,i):this.renderCurveStatically(a,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.xAxis,c=i.yAxis,f=i.top,h=i.left,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-line",u),O=l&&l.allowDataOverflow,E=c&&c.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?h:h-p/2,y:E?f:f-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:h-q/2,y:f-q/2,width:p+q,height:m+q}))):null,!x&&this.renderCurve(C,k),this.renderErrorBar(C,k),(x||a)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,prevPoints:i.curPoints}:r.points!==i.curPoints?{curPoints:r.points}:null}},{key:"repeat",value:function(r,i){for(var o=r.length%2!==0?[].concat(Xf(r),[0]):r,a=[],s=0;s=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vLe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Ac(){return Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t0||!tf(c,a)||!tf(f,s))?this.renderAreaWithAnimation(r,i):this.renderAreaStatically(a,s,r,i)}},{key:"render",value:function(){var r,i=this.props,o=i.hide,a=i.dot,s=i.points,u=i.className,l=i.top,c=i.left,f=i.xAxis,h=i.yAxis,p=i.width,m=i.height,v=i.isAnimationActive,b=i.id;if(o||!s||!s.length)return null;var w=this.state.isAnimationFinished,x=s.length===1,S=dn("recharts-area",u),O=f&&f.allowDataOverflow,E=h&&h.allowDataOverflow,C=O||E,k=Ut(b)?this.id:b,M=(r=zt(a,!1))!==null&&r!==void 0?r:{r:3,strokeWidth:2},N=M.r,z=N===void 0?3:N,H=M.strokeWidth,V=H===void 0?2:H,ne=OV(a)?a:{},Z=ne.clipDot,G=Z===void 0?!0:Z,q=z*2+V;return F.createElement(Cn,{className:S},O||E?F.createElement("defs",null,F.createElement("clipPath",{id:"clipPath-".concat(k)},F.createElement("rect",{x:O?c:c-p/2,y:E?l:l-m/2,width:O?p:p*2,height:E?m:m*2})),!G&&F.createElement("clipPath",{id:"clipPath-dots-".concat(k)},F.createElement("rect",{x:c-q/2,y:l-q/2,width:p+q,height:m+q}))):null,x?null:this.renderArea(C,k),(a||x)&&this.renderDots(C,G,k),(!v||w)&&As.renderCallByParent(this.props,s))}}],[{key:"getDerivedStateFromProps",value:function(r,i){return r.animationId!==i.prevAnimationId?{prevAnimationId:r.animationId,curPoints:r.points,curBaseLine:r.baseLine,prevPoints:i.curPoints,prevBaseLine:i.curBaseLine}:r.points!==i.curPoints||r.baseLine!==i.curBaseLine?{curPoints:r.points,curBaseLine:r.baseLine}:null}}])}(y.PureComponent);CK=xf;bs(xf,"displayName","Area");bs(xf,"defaultProps",{stroke:"#3182bd",fill:"#3182bd",fillOpacity:.6,xAxisId:0,yAxisId:0,legendType:"line",connectNulls:!1,points:[],dot:!1,activeDot:!0,hide:!1,isAnimationActive:!Ka.isSsr,animationBegin:0,animationDuration:1500,animationEasing:"ease"});bs(xf,"getBaseValue",function(e,t,n,r){var i=e.layout,o=e.baseValue,a=t.props.baseValue,s=a??o;if(qe(s)&&typeof s=="number")return s;var u=i==="horizontal"?r:n,l=u.scale.domain();if(u.type==="number"){var c=Math.max(l[0],l[1]),f=Math.min(l[0],l[1]);return s==="dataMin"?f:s==="dataMax"||c<0?c:Math.max(Math.min(l[0],l[1]),0)}return s==="dataMin"?l[0]:s==="dataMax"?l[1]:l[0]});bs(xf,"getComposedData",function(e){var t=e.props,n=e.item,r=e.xAxis,i=e.yAxis,o=e.xAxisTicks,a=e.yAxisTicks,s=e.bandSize,u=e.dataKey,l=e.stackedData,c=e.dataStartIndex,f=e.displayedData,h=e.offset,p=t.layout,m=l&&l.length,v=CK.getBaseValue(t,n,r,i),b=p==="horizontal",w=!1,x=f.map(function(O,E){var C;m?C=l[c+E]:(C=Kr(O,u),Array.isArray(C)?w=!0:C=[v,C]);var k=C[1]==null||m&&Kr(O,u)==null;return b?{x:sh({axis:r,ticks:o,bandSize:s,entry:O,index:E}),y:k?null:i.scale(C[1]),value:C,payload:O}:{x:k?null:r.scale(C[1]),y:sh({axis:i,ticks:a,bandSize:s,entry:O,index:E}),value:C,payload:O}}),S;return m||w?S=x.map(function(O){var E=Array.isArray(O.value)?O.value[0]:null;return b?{x:O.x,y:E!=null&&O.y!=null?i.scale(E):null}:{x:E!=null?r.scale(E):null,y:O.y}}):S=b?i.scale(v):r.scale(v),Yu({points:x,baseLine:S,layout:p,isRange:w},h)});bs(xf,"renderDotItem",function(e,t){var n;if(F.isValidElement(e))n=F.cloneElement(e,t);else if(Wt(e))n=e(t);else{var r=dn("recharts-area-dot",typeof e!="boolean"?e.className:""),i=t.key,o=EK(t,mLe);n=F.createElement(Xw,Ac({},o,{key:i,className:r}))}return n});function yh(e){"@babel/helpers - typeof";return yh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yh(e)}function ELe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function OLe(e,t){for(var n=0;n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ILe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function NLe(e){var t=e.option,n=e.isActive,r=$Le(e,DLe);return typeof t=="string"?F.createElement(A6,P0({option:F.createElement(Fw,P0({type:t},r)),isActive:n,shapeType:"symbols"},r)):F.createElement(A6,P0({option:t,isActive:n,shapeType:"symbols"},r))}function bh(e){"@babel/helpers - typeof";return bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bh(e)}function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function TFe(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function MFe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function RFe(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0?a:t&&t.length&&qe(i)&&qe(o)?t.slice(i,o+1):[]};function qK(e){return e==="number"?[0,"auto"]:void 0}var X6=function(t,n,r,i){var o=t.graphicalItems,a=t.tooltipAxis,s=u2(n,t);return r<0||!o||!o.length||r>=s.length?null:o.reduce(function(u,l){var c,f=(c=l.props.data)!==null&&c!==void 0?c:n;f&&t.dataStartIndex+t.dataEndIndex!==0&&t.dataEndIndex-t.dataStartIndex>=r&&(f=f.slice(t.dataStartIndex,t.dataEndIndex+1));var h;if(a.dataKey&&!a.allowDuplicatedCategory){var p=f===void 0?s:f;h=fb(p,a.dataKey,i)}else h=f&&f[r]||s[r];return h?[].concat(Sh(u),[IH(l,h)]):u},[])},mI=function(t,n,r,i){var o=i||{x:t.chartX,y:t.chartY},a=WFe(o,r),s=t.orderedTooltipTicks,u=t.tooltipAxis,l=t.tooltipTicks,c=KMe(a,s,l,u);if(c>=0&&l){var f=l[c]&&l[c].value,h=X6(t,n,c,f),p=HFe(r,s,c,o);return{activeTooltipIndex:c,activeLabel:f,activePayload:h,activeCoordinate:p}}return null},KFe=function(t,n){var r=n.axes,i=n.graphicalItems,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=t.stackOffset,p=RH(c,o);return r.reduce(function(m,v){var b,w=v.type.defaultProps!==void 0?Ee(Ee({},v.type.defaultProps),v.props):v.props,x=w.type,S=w.dataKey,O=w.allowDataOverflow,E=w.allowDuplicatedCategory,C=w.scale,k=w.ticks,M=w.includeHidden,N=w[a];if(m[N])return m;var z=u2(t.data,{graphicalItems:i.filter(function(Q){var J,ue=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a];return ue===N}),dataStartIndex:u,dataEndIndex:l}),H=z.length,V,ne,Z;yFe(w.domain,O,x)&&(V=f6(w.domain,null,O),p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category")));var G=qK(x);if(!V||V.length===0){var q,W=(q=w.domain)!==null&&q!==void 0?q:G;if(S){if(V=E0(z,S,x),x==="category"&&p){var j=$2e(V);E&&j?(ne=V,V=Yb(0,H)):E||(V=W7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0?Q:[].concat(Sh(Q),[J])},[]))}else if(x==="category")E?V=V.filter(function(Q){return Q!==""&&!Ut(Q)}):V=W7(W,V,v).reduce(function(Q,J){return Q.indexOf(J)>=0||J===""||Ut(J)?Q:[].concat(Sh(Q),[J])},[]);else if(x==="number"){var K=XMe(z,i.filter(function(Q){var J,ue,de=a in Q.props?Q.props[a]:(J=Q.type.defaultProps)===null||J===void 0?void 0:J[a],Se="hide"in Q.props?Q.props.hide:(ue=Q.type.defaultProps)===null||ue===void 0?void 0:ue.hide;return de===N&&(M||!Se)}),S,o,c);K&&(V=K)}p&&(x==="number"||C!=="auto")&&(Z=E0(z,S,"category"))}else p?V=Yb(0,H):s&&s[N]&&s[N].hasStack&&x==="number"?V=h==="expand"?[0,1]:$H(s[N].stackGroups,u,l):V=MH(z,i.filter(function(Q){var J=a in Q.props?Q.props[a]:Q.type.defaultProps[a],ue="hide"in Q.props?Q.props.hide:Q.type.defaultProps.hide;return J===N&&(M||!ue)}),x,c,!0);if(x==="number")V=G6(f,V,N,o,k),W&&(V=f6(W,V,O));else if(x==="category"&&W){var Y=W,oe=V.every(function(Q){return Y.indexOf(Q)>=0});oe&&(V=Y)}}return Ee(Ee({},m),{},kt({},N,Ee(Ee({},w),{},{axisType:o,domain:V,categoricalDomain:Z,duplicateDomain:ne,originalDomain:(b=w.domain)!==null&&b!==void 0?b:G,isCategorical:p,layout:c})))},{})},qFe=function(t,n){var r=n.graphicalItems,i=n.Axis,o=n.axisType,a=n.axisIdKey,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.layout,f=t.children,h=u2(t.data,{graphicalItems:r,dataStartIndex:u,dataEndIndex:l}),p=h.length,m=RH(c,o),v=-1;return r.reduce(function(b,w){var x=w.type.defaultProps!==void 0?Ee(Ee({},w.type.defaultProps),w.props):w.props,S=x[a],O=qK("number");if(!b[S]){v++;var E;return m?E=Yb(0,p):s&&s[S]&&s[S].hasStack?(E=$H(s[S].stackGroups,u,l),E=G6(f,E,S,o)):(E=f6(O,MH(h,r.filter(function(C){var k,M,N=a in C.props?C.props[a]:(k=C.type.defaultProps)===null||k===void 0?void 0:k[a],z="hide"in C.props?C.props.hide:(M=C.type.defaultProps)===null||M===void 0?void 0:M.hide;return N===S&&!z}),"number",c),i.defaultProps.allowDataOverflow),E=G6(f,E,S,o)),Ee(Ee({},b),{},kt({},S,Ee(Ee({axisType:o},i.defaultProps),{},{hide:!0,orientation:pa(UFe,"".concat(o,".").concat(v%2),null),domain:E,originalDomain:O,isCategorical:m,layout:c})))}return b},{})},GFe=function(t,n){var r=n.axisType,i=r===void 0?"xAxis":r,o=n.AxisComp,a=n.graphicalItems,s=n.stackGroups,u=n.dataStartIndex,l=n.dataEndIndex,c=t.children,f="".concat(i,"Id"),h=po(c,o),p={};return h.length?p=KFe(t,{axes:h,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l}):a&&a.length&&(p=qFe(t,{Axis:o,graphicalItems:a,axisType:i,axisIdKey:f,stackGroups:s,dataStartIndex:u,dataEndIndex:l})),p},YFe=function(t){var n=rl(t),r=su(n,!1,!0);return{tooltipTicks:r,orderedTooltipTicks:XA(r,function(i){return i.coordinate}),tooltipAxis:n,tooltipAxisBandSize:Bb(n,r)}},vI=function(t){var n=t.children,r=t.defaultShowTooltip,i=To(n,ch),o=0,a=0;return t.data&&t.data.length!==0&&(a=t.data.length-1),i&&i.props&&(i.props.startIndex>=0&&(o=i.props.startIndex),i.props.endIndex>=0&&(a=i.props.endIndex)),{chartX:0,chartY:0,dataStartIndex:o,dataEndIndex:a,activeTooltipIndex:-1,isTooltipActive:!!r}},ZFe=function(t){return!t||!t.length?!1:t.some(function(n){var r=fu(n&&n.type);return r&&r.indexOf("Bar")>=0})},yI=function(t){return t==="horizontal"?{numericAxisName:"yAxis",cateAxisName:"xAxis"}:t==="vertical"?{numericAxisName:"xAxis",cateAxisName:"yAxis"}:t==="centric"?{numericAxisName:"radiusAxis",cateAxisName:"angleAxis"}:{numericAxisName:"angleAxis",cateAxisName:"radiusAxis"}},XFe=function(t,n){var r=t.props,i=t.graphicalItems,o=t.xAxisMap,a=o===void 0?{}:o,s=t.yAxisMap,u=s===void 0?{}:s,l=r.width,c=r.height,f=r.children,h=r.margin||{},p=To(f,ch),m=To(f,Dd),v=Object.keys(u).reduce(function(E,C){var k=u[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,E[M]+k.width)):E},{left:h.left||0,right:h.right||0}),b=Object.keys(a).reduce(function(E,C){var k=a[C],M=k.orientation;return!k.mirror&&!k.hide?Ee(Ee({},E),{},kt({},M,pa(E,"".concat(M))+k.height)):E},{top:h.top||0,bottom:h.bottom||0}),w=Ee(Ee({},b),v),x=w.bottom;p&&(w.bottom+=p.props.height||ch.defaultProps.height),m&&n&&(w=YMe(w,i,r,n));var S=l-w.left-w.right,O=c-w.top-w.bottom;return Ee(Ee({brushBottom:x},w),{},{width:Math.max(S,0),height:Math.max(O,0)})},QFe=function(t,n){if(n==="xAxis")return t[n].width;if(n==="yAxis")return t[n].height},JFe=function(t){var n=t.chartName,r=t.GraphicalChild,i=t.defaultTooltipEventType,o=i===void 0?"axis":i,a=t.validateTooltipEventTypes,s=a===void 0?["axis"]:a,u=t.axisComponents,l=t.legendContent,c=t.formatAxisMap,f=t.defaultProps,h=function(w,x){var S=x.graphicalItems,O=x.stackGroups,E=x.offset,C=x.updateId,k=x.dataStartIndex,M=x.dataEndIndex,N=w.barSize,z=w.layout,H=w.barGap,V=w.barCategoryGap,ne=w.maxBarSize,Z=yI(z),G=Z.numericAxisName,q=Z.cateAxisName,W=ZFe(S),j=[];return S.forEach(function(K,Y){var oe=u2(w.data,{graphicalItems:[K],dataStartIndex:k,dataEndIndex:M}),Q=K.type.defaultProps!==void 0?Ee(Ee({},K.type.defaultProps),K.props):K.props,J=Q.dataKey,ue=Q.maxBarSize,de=Q["".concat(G,"Id")],Se=Q["".concat(q,"Id")],me={},Ze=u.reduce(function(Ue,je){var ke=x["".concat(je.axisType,"Map")],nt=Q["".concat(je.axisType,"Id")];ke&&ke[nt]||je.axisType==="zAxis"||rf();var mt=ke[nt];return Ee(Ee({},Ue),{},kt(kt({},je.axisType,mt),"".concat(je.axisType,"Ticks"),su(mt)))},me),Ae=Ze[q],Le=Ze["".concat(q,"Ticks")],$e=O&&O[de]&&O[de].hasStack&&lRe(K,O[de].stackGroups),be=fu(K.type).indexOf("Bar")>=0,yt=Bb(Ae,Le),lt=[],Nt=W&&qMe({barSize:N,stackGroups:O,totalSize:QFe(Ze,q)});if(be){var yn,nn,ie=Ut(ue)?ne:ue,pe=(yn=(nn=Bb(Ae,Le,!0))!==null&&nn!==void 0?nn:ie)!==null&&yn!==void 0?yn:0;lt=GMe({barGap:H,barCategoryGap:V,bandSize:pe!==yt?pe:yt,sizeList:Nt[Se],maxBarSize:ie}),pe!==yt&&(lt=lt.map(function(Ue){return Ee(Ee({},Ue),{},{position:Ee(Ee({},Ue.position),{},{offset:Ue.position.offset-pe/2})})}))}var ye=K&&K.type&&K.type.getComposedData;ye&&j.push({props:Ee(Ee({},ye(Ee(Ee({},Ze),{},{displayedData:oe,props:w,dataKey:J,item:K,bandSize:yt,barPosition:lt,offset:E,stackedData:$e,layout:z,dataStartIndex:k,dataEndIndex:M}))),{},kt(kt(kt({key:K.key||"item-".concat(Y)},G,Ze[G]),q,Ze[q]),"animationId",C)),childIndex:K2e(K,w.children),item:K})}),j},p=function(w,x){var S=w.props,O=w.dataStartIndex,E=w.dataEndIndex,C=w.updateId;if(!F9({props:S}))return null;var k=S.children,M=S.layout,N=S.stackOffset,z=S.data,H=S.reverseStackOrder,V=yI(M),ne=V.numericAxisName,Z=V.cateAxisName,G=po(k,r),q=aRe(z,G,"".concat(ne,"Id"),"".concat(Z,"Id"),N,H),W=u.reduce(function(Q,J){var ue="".concat(J.axisType,"Map");return Ee(Ee({},Q),{},kt({},ue,GFe(S,Ee(Ee({},J),{},{graphicalItems:G,stackGroups:J.axisType===ne&&q,dataStartIndex:O,dataEndIndex:E}))))},{}),j=XFe(Ee(Ee({},W),{},{props:S,graphicalItems:G}),x?.legendBBox);Object.keys(W).forEach(function(Q){W[Q]=c(S,W[Q],j,Q.replace("Map",""),n)});var K=W["".concat(Z,"Map")],Y=YFe(K),oe=h(S,Ee(Ee({},W),{},{dataStartIndex:O,dataEndIndex:E,updateId:C,graphicalItems:G,stackGroups:q,offset:j}));return Ee(Ee({formattedGraphicalItems:oe,graphicalItems:G,offset:j,stackGroups:q},Y),W)},m=function(b){function w(x){var S,O,E;return MFe(this,w),E=$Fe(this,w,[x]),kt(E,"eventEmitterSymbol",Symbol("rechartsEventEmitter")),kt(E,"accessibilityManager",new vFe),kt(E,"handleLegendBBoxUpdate",function(C){if(C){var k=E.state,M=k.dataStartIndex,N=k.dataEndIndex,z=k.updateId;E.setState(Ee({legendBBox:C},p({props:E.props,dataStartIndex:M,dataEndIndex:N,updateId:z},Ee(Ee({},E.state),{},{legendBBox:C}))))}}),kt(E,"handleReceiveSyncEvent",function(C,k,M){if(E.props.syncId===C){if(M===E.eventEmitterSymbol&&typeof E.props.syncMethod!="function")return;E.applySyncEvent(k)}}),kt(E,"handleBrushChange",function(C){var k=C.startIndex,M=C.endIndex;if(k!==E.state.dataStartIndex||M!==E.state.dataEndIndex){var N=E.state.updateId;E.setState(function(){return Ee({dataStartIndex:k,dataEndIndex:M},p({props:E.props,dataStartIndex:k,dataEndIndex:M,updateId:N},E.state))}),E.triggerSyncEvent({dataStartIndex:k,dataEndIndex:M})}}),kt(E,"handleMouseEnter",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseEnter;Wt(N)&&N(M,C)}}),kt(E,"triggeredAfterMouseMove",function(C){var k=E.getMouseInfo(C),M=k?Ee(Ee({},k),{},{isTooltipActive:!0}):{isTooltipActive:!1};E.setState(M),E.triggerSyncEvent(M);var N=E.props.onMouseMove;Wt(N)&&N(M,C)}),kt(E,"handleItemMouseEnter",function(C){E.setState(function(){return{isTooltipActive:!0,activeItem:C,activePayload:C.tooltipPayload,activeCoordinate:C.tooltipPosition||{x:C.cx,y:C.cy}}})}),kt(E,"handleItemMouseLeave",function(){E.setState(function(){return{isTooltipActive:!1}})}),kt(E,"handleMouseMove",function(C){C.persist(),E.throttleTriggeredAfterMouseMove(C)}),kt(E,"handleMouseLeave",function(C){E.throttleTriggeredAfterMouseMove.cancel();var k={isTooltipActive:!1};E.setState(k),E.triggerSyncEvent(k);var M=E.props.onMouseLeave;Wt(M)&&M(k,C)}),kt(E,"handleOuterEvent",function(C){var k=H2e(C),M=pa(E.props,"".concat(k));if(k&&Wt(M)){var N,z;/.*touch.*/i.test(k)?z=E.getMouseInfo(C.changedTouches[0]):z=E.getMouseInfo(C),M((N=z)!==null&&N!==void 0?N:{},C)}}),kt(E,"handleClick",function(C){var k=E.getMouseInfo(C);if(k){var M=Ee(Ee({},k),{},{isTooltipActive:!0});E.setState(M),E.triggerSyncEvent(M);var N=E.props.onClick;Wt(N)&&N(M,C)}}),kt(E,"handleMouseDown",function(C){var k=E.props.onMouseDown;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleMouseUp",function(C){var k=E.props.onMouseUp;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleTouchMove",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.throttleTriggeredAfterMouseMove(C.changedTouches[0])}),kt(E,"handleTouchStart",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseDown(C.changedTouches[0])}),kt(E,"handleTouchEnd",function(C){C.changedTouches!=null&&C.changedTouches.length>0&&E.handleMouseUp(C.changedTouches[0])}),kt(E,"handleDoubleClick",function(C){var k=E.props.onDoubleClick;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"handleContextMenu",function(C){var k=E.props.onContextMenu;if(Wt(k)){var M=E.getMouseInfo(C);k(M,C)}}),kt(E,"triggerSyncEvent",function(C){E.props.syncId!==void 0&&s3.emit(u3,E.props.syncId,C,E.eventEmitterSymbol)}),kt(E,"applySyncEvent",function(C){var k=E.props,M=k.layout,N=k.syncMethod,z=E.state.updateId,H=C.dataStartIndex,V=C.dataEndIndex;if(C.dataStartIndex!==void 0||C.dataEndIndex!==void 0)E.setState(Ee({dataStartIndex:H,dataEndIndex:V},p({props:E.props,dataStartIndex:H,dataEndIndex:V,updateId:z},E.state)));else if(C.activeTooltipIndex!==void 0){var ne=C.chartX,Z=C.chartY,G=C.activeTooltipIndex,q=E.state,W=q.offset,j=q.tooltipTicks;if(!W)return;if(typeof N=="function")G=N(j,C);else if(N==="value"){G=-1;for(var K=0;K=0){var $e,be;if(ne.dataKey&&!ne.allowDuplicatedCategory){var yt=typeof ne.dataKey=="function"?Le:"payload.".concat(ne.dataKey.toString());$e=fb(K,yt,G),be=Y&&oe&&fb(oe,yt,G)}else $e=K?.[Z],be=Y&&oe&&oe[Z];if(Se||de){var lt=C.props.activeIndex!==void 0?C.props.activeIndex:Z;return[y.cloneElement(C,Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:lt})),null,null]}if(!Ut($e))return[Ae].concat(Sh(E.renderActivePoints({item:N,activePoint:$e,basePoint:be,childIndex:Z,isRange:Y})))}else{var Nt,yn=(Nt=E.getItemByXY(E.state.activeCoordinate))!==null&&Nt!==void 0?Nt:{graphicalItem:Ae},nn=yn.graphicalItem,ie=nn.item,pe=ie===void 0?C:ie,ye=nn.childIndex,Ue=Ee(Ee(Ee({},N.props),Ze),{},{activeIndex:ye});return[y.cloneElement(pe,Ue),null,null]}return Y?[Ae,null,null]:[Ae,null]}),kt(E,"renderCustomized",function(C,k,M){return y.cloneElement(C,Ee(Ee({key:"recharts-customized-".concat(M)},E.props),E.state))}),kt(E,"renderMap",{CartesianGrid:{handler:Oy,once:!0},ReferenceArea:{handler:E.renderReferenceElement},ReferenceLine:{handler:Oy},ReferenceDot:{handler:E.renderReferenceElement},XAxis:{handler:Oy},YAxis:{handler:Oy},Brush:{handler:E.renderBrush,once:!0},Bar:{handler:E.renderGraphicChild},Line:{handler:E.renderGraphicChild},Area:{handler:E.renderGraphicChild},Radar:{handler:E.renderGraphicChild},RadialBar:{handler:E.renderGraphicChild},Scatter:{handler:E.renderGraphicChild},Pie:{handler:E.renderGraphicChild},Funnel:{handler:E.renderGraphicChild},Tooltip:{handler:E.renderCursor,once:!0},PolarGrid:{handler:E.renderPolarGrid,once:!0},PolarAngleAxis:{handler:E.renderPolarAxis},PolarRadiusAxis:{handler:E.renderPolarAxis},Customized:{handler:E.renderCustomized}}),E.clipPathId="".concat((S=x.id)!==null&&S!==void 0?S:vf("recharts"),"-clip"),E.throttleTriggeredAfterMouseMove=kW(E.triggeredAfterMouseMove,(O=x.throttleDelay)!==null&&O!==void 0?O:1e3/60),E.state={},E}return LFe(w,b),DFe(w,[{key:"componentDidMount",value:function(){var S,O;this.addListener(),this.accessibilityManager.setDetails({container:this.container,offset:{left:(S=this.props.margin.left)!==null&&S!==void 0?S:0,top:(O=this.props.margin.top)!==null&&O!==void 0?O:0},coordinateList:this.state.tooltipTicks,mouseHandlerCallback:this.triggeredAfterMouseMove,layout:this.props.layout}),this.displayDefaultTooltip()}},{key:"displayDefaultTooltip",value:function(){var S=this.props,O=S.children,E=S.data,C=S.height,k=S.layout,M=To(O,Js);if(M){var N=M.props.defaultIndex;if(!(typeof N!="number"||N<0||N>this.state.tooltipTicks.length-1)){var z=this.state.tooltipTicks[N]&&this.state.tooltipTicks[N].value,H=X6(this.state,E,N,z),V=this.state.tooltipTicks[N].coordinate,ne=(this.state.offset.top+C)/2,Z=k==="horizontal",G=Z?{x:V,y:ne}:{y:V,x:ne},q=this.state.formattedGraphicalItems.find(function(j){var K=j.item;return K.type.name==="Scatter"});q&&(G=Ee(Ee({},G),q.props.points[N].tooltipPosition),H=q.props.points[N].tooltipPayload);var W={activeTooltipIndex:N,isTooltipActive:!0,activeLabel:z,activePayload:H,activeCoordinate:G};this.setState(W),this.renderCursor(M),this.accessibilityManager.setIndex(N)}}}},{key:"getSnapshotBeforeUpdate",value:function(S,O){if(!this.props.accessibilityLayer)return null;if(this.state.tooltipTicks!==O.tooltipTicks&&this.accessibilityManager.setDetails({coordinateList:this.state.tooltipTicks}),this.props.layout!==S.layout&&this.accessibilityManager.setDetails({layout:this.props.layout}),this.props.margin!==S.margin){var E,C;this.accessibilityManager.setDetails({offset:{left:(E=this.props.margin.left)!==null&&E!==void 0?E:0,top:(C=this.props.margin.top)!==null&&C!==void 0?C:0}})}return null}},{key:"componentDidUpdate",value:function(S){OE([To(S.children,Js)],[To(this.props.children,Js)])||this.displayDefaultTooltip()}},{key:"componentWillUnmount",value:function(){this.removeListener(),this.throttleTriggeredAfterMouseMove.cancel()}},{key:"getTooltipEventType",value:function(){var S=To(this.props.children,Js);if(S&&typeof S.props.shared=="boolean"){var O=S.props.shared?"axis":"item";return s.indexOf(O)>=0?O:o}return o}},{key:"getMouseInfo",value:function(S){if(!this.container)return null;var O=this.container,E=O.getBoundingClientRect(),C=yPe(E),k={chartX:Math.round(S.pageX-C.left),chartY:Math.round(S.pageY-C.top)},M=E.width/O.offsetWidth||1,N=this.inRange(k.chartX,k.chartY,M);if(!N)return null;var z=this.state,H=z.xAxisMap,V=z.yAxisMap,ne=this.getTooltipEventType();if(ne!=="axis"&&H&&V){var Z=rl(H).scale,G=rl(V).scale,q=Z&&Z.invert?Z.invert(k.chartX):null,W=G&&G.invert?G.invert(k.chartY):null;return Ee(Ee({},k),{},{xValue:q,yValue:W})}var j=mI(this.state,this.props.data,this.props.layout,N);return j?Ee(Ee({},k),j):null}},{key:"inRange",value:function(S,O){var E=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,C=this.props.layout,k=S/E,M=O/E;if(C==="horizontal"||C==="vertical"){var N=this.state.offset,z=k>=N.left&&k<=N.left+N.width&&M>=N.top&&M<=N.top+N.height;return z?{x:k,y:M}:null}var H=this.state,V=H.angleAxisMap,ne=H.radiusAxisMap;if(V&&ne){var Z=rl(V);return q7({x:k,y:M},Z)}return null}},{key:"parseEventsOfWrapper",value:function(){var S=this.props.children,O=this.getTooltipEventType(),E=To(S,Js),C={};E&&O==="axis"&&(E.props.trigger==="click"?C={onClick:this.handleClick}:C={onMouseEnter:this.handleMouseEnter,onDoubleClick:this.handleDoubleClick,onMouseMove:this.handleMouseMove,onMouseLeave:this.handleMouseLeave,onTouchMove:this.handleTouchMove,onTouchStart:this.handleTouchStart,onTouchEnd:this.handleTouchEnd,onContextMenu:this.handleContextMenu});var k=db(this.props,this.handleOuterEvent);return Ee(Ee({},k),C)}},{key:"addListener",value:function(){s3.on(u3,this.handleReceiveSyncEvent)}},{key:"removeListener",value:function(){s3.removeListener(u3,this.handleReceiveSyncEvent)}},{key:"filterFormatItem",value:function(S,O,E){for(var C=this.state.formattedGraphicalItems,k=0,M=C.length;k{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:a="horizontal",dir:s,activationMode:u="automatic",...l}=e,c=Em(s),[f,h]=Za({prop:r,onChange:i,defaultProp:o});return I.jsx(tje,{scope:n,baseId:Fo(),value:f,onValueChange:h,orientation:a,dir:c,activationMode:u,children:I.jsx(pt.div,{dir:c,"data-orientation":a,...l,ref:t})})});YK.displayName=L5;var ZK="TabsList",XK=y.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=F5(ZK,n),a=GK(n);return I.jsx(Hz,{asChild:!0,...a,orientation:o.orientation,dir:o.dir,loop:r,children:I.jsx(pt.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});XK.displayName=ZK;var QK="TabsTrigger",JK=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,a=F5(QK,n),s=GK(n),u=nq(a.baseId,r),l=rq(a.baseId,r),c=r===a.value;return I.jsx(Kz,{asChild:!0,...s,focusable:!i,active:c,children:I.jsx(pt.button,{type:"button",role:"tab","aria-selected":c,"aria-controls":l,"data-state":c?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:u,...o,ref:t,onMouseDown:Ye(e.onMouseDown,f=>{!i&&f.button===0&&f.ctrlKey===!1?a.onValueChange(r):f.preventDefault()}),onKeyDown:Ye(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(r)}),onFocus:Ye(e.onFocus,()=>{const f=a.activationMode!=="manual";!c&&!i&&f&&a.onValueChange(r)})})})});JK.displayName=QK;var eq="TabsContent",tq=y.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...a}=e,s=F5(eq,n),u=nq(s.baseId,r),l=rq(s.baseId,r),c=r===s.value,f=y.useRef(c);return y.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),I.jsx(Gr,{present:i||c,children:({present:h})=>I.jsx(pt.div,{"data-state":c?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":u,hidden:!h,id:l,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&o})})});tq.displayName=eq;function nq(e,t){return`${e}-trigger-${t}`}function rq(e,t){return`${e}-content-${t}`}var DXe=YK,$Xe=XK,IXe=JK,NXe=tq;function Q6(e,[t,n]){return Math.min(n,Math.max(t,e))}function j5(e){const t=y.useRef({value:e,previous:e});return y.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var nje=[" ","Enter","ArrowUp","ArrowDown"],rje=[" ","Enter"],zm="Select",[l2,c2,ije]=nA(zm),[rp,LXe]=vi(zm,[ije,zl]),f2=zl(),[oje,ql]=rp(zm),[aje,sje]=rp(zm),iq=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:f,disabled:h,required:p,form:m}=e,v=f2(t),[b,w]=y.useState(null),[x,S]=y.useState(null),[O,E]=y.useState(!1),C=Em(l),[k=!1,M]=Za({prop:r,defaultProp:i,onChange:o}),[N,z]=Za({prop:a,defaultProp:s,onChange:u}),H=y.useRef(null),V=b?m||!!b.closest("form"):!0,[ne,Z]=y.useState(new Set),G=Array.from(ne).map(q=>q.props.value).join(";");return I.jsx(aw,{...v,children:I.jsxs(oje,{required:p,scope:t,trigger:b,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:O,onValueNodeHasChildrenChange:E,contentId:Fo(),value:N,onValueChange:z,open:k,onOpenChange:M,dir:C,triggerPointerDownPosRef:H,disabled:h,children:[I.jsx(l2.Provider,{scope:t,children:I.jsx(aje,{scope:e.__scopeSelect,onNativeOptionAdd:y.useCallback(q=>{Z(W=>new Set(W).add(q))},[]),onNativeOptionRemove:y.useCallback(q=>{Z(W=>{const j=new Set(W);return j.delete(q),j})},[]),children:n})}),V?I.jsxs(Tq,{"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:f,value:N,onChange:q=>z(q.target.value),disabled:h,form:m,children:[N===void 0?I.jsx("option",{value:""}):null,Array.from(ne)]},G):null]})})};iq.displayName=zm;var oq="SelectTrigger",aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=f2(n),a=ql(oq,n),s=a.disabled||r,u=Gt(t,a.onTriggerChange),l=c2(n),c=y.useRef("touch"),[f,h,p]=Mq(v=>{const b=l().filter(S=>!S.disabled),w=b.find(S=>S.value===a.value),x=Rq(b,v,w);x!==void 0&&a.onValueChange(x.value)}),m=v=>{s||(a.onOpenChange(!0),p()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return I.jsx(Am,{asChild:!0,...o,children:I.jsx(pt.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":kq(a.value)?"":void 0,...i,ref:u,onClick:Ye(i.onClick,v=>{v.currentTarget.focus(),c.current!=="mouse"&&m(v)}),onPointerDown:Ye(i.onPointerDown,v=>{c.current=v.pointerType;const b=v.target;b.hasPointerCapture(v.pointerId)&&b.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(m(v),v.preventDefault())}),onKeyDown:Ye(i.onKeyDown,v=>{const b=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(b&&v.key===" ")&&nje.includes(v.key)&&(m(),v.preventDefault())})})})});aq.displayName=oq;var sq="SelectValue",uq=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:a="",...s}=e,u=ql(sq,n),{onValueNodeHasChildrenChange:l}=u,c=o!==void 0,f=Gt(t,u.onValueNodeChange);return ii(()=>{l(c)},[l,c]),I.jsx(pt.span,{...s,ref:f,style:{pointerEvents:"none"},children:kq(u.value)?I.jsx(I.Fragment,{children:a}):o})});uq.displayName=sq;var uje="SelectIcon",lq=y.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return I.jsx(pt.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});lq.displayName=uje;var lje="SelectPortal",cq=e=>I.jsx(Lh,{asChild:!0,...e});cq.displayName=lje;var af="SelectContent",fq=y.forwardRef((e,t)=>{const n=ql(af,e.__scopeSelect),[r,i]=y.useState();if(ii(()=>{i(new DocumentFragment)},[]),!n.open){const o=r;return o?Au.createPortal(I.jsx(dq,{scope:e.__scopeSelect,children:I.jsx(l2.Slot,{scope:e.__scopeSelect,children:I.jsx("div",{children:e.children})})}),o):null}return I.jsx(hq,{...e,ref:t})});fq.displayName=af;var Ta=10,[dq,Gl]=rp(af),cje="SelectContentImpl",hq=y.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b,...w}=e,x=ql(af,n),[S,O]=y.useState(null),[E,C]=y.useState(null),k=Gt(t,me=>O(me)),[M,N]=y.useState(null),[z,H]=y.useState(null),V=c2(n),[ne,Z]=y.useState(!1),G=y.useRef(!1);y.useEffect(()=>{if(S)return Cm(S)},[S]),nw();const q=y.useCallback(me=>{const[Ze,...Ae]=V().map(be=>be.ref.current),[Le]=Ae.slice(-1),$e=document.activeElement;for(const be of me)if(be===$e||(be?.scrollIntoView({block:"nearest"}),be===Ze&&E&&(E.scrollTop=0),be===Le&&E&&(E.scrollTop=E.scrollHeight),be?.focus(),document.activeElement!==$e))return},[V,E]),W=y.useCallback(()=>q([M,S]),[q,M,S]);y.useEffect(()=>{ne&&W()},[ne,W]);const{onOpenChange:j,triggerPointerDownPosRef:K}=x;y.useEffect(()=>{if(S){let me={x:0,y:0};const Ze=Le=>{me={x:Math.abs(Math.round(Le.pageX)-(K.current?.x??0)),y:Math.abs(Math.round(Le.pageY)-(K.current?.y??0))}},Ae=Le=>{me.x<=10&&me.y<=10?Le.preventDefault():S.contains(Le.target)||j(!1),document.removeEventListener("pointermove",Ze),K.current=null};return K.current!==null&&(document.addEventListener("pointermove",Ze),document.addEventListener("pointerup",Ae,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Ze),document.removeEventListener("pointerup",Ae,{capture:!0})}}},[S,j,K]),y.useEffect(()=>{const me=()=>j(!1);return window.addEventListener("blur",me),window.addEventListener("resize",me),()=>{window.removeEventListener("blur",me),window.removeEventListener("resize",me)}},[j]);const[Y,oe]=Mq(me=>{const Ze=V().filter($e=>!$e.disabled),Ae=Ze.find($e=>$e.ref.current===document.activeElement),Le=Rq(Ze,me,Ae);Le&&setTimeout(()=>Le.ref.current.focus())}),Q=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&(N(me),Le&&(G.current=!0))},[x.value]),J=y.useCallback(()=>S?.focus(),[S]),ue=y.useCallback((me,Ze,Ae)=>{const Le=!G.current&&!Ae;(x.value!==void 0&&x.value===Ze||Le)&&H(me)},[x.value]),de=r==="popper"?J6:pq,Se=de===J6?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:f,collisionBoundary:h,collisionPadding:p,sticky:m,hideWhenDetached:v,avoidCollisions:b}:{};return I.jsx(dq,{scope:n,content:S,viewport:E,onViewportChange:C,itemRefCallback:Q,selectedItem:M,onItemLeave:J,itemTextRefCallback:ue,focusSelectedItem:W,selectedItemText:z,position:r,isPositioned:ne,searchRef:Y,children:I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(_m,{asChild:!0,trapped:x.open,onMountAutoFocus:me=>{me.preventDefault()},onUnmountAutoFocus:Ye(i,me=>{x.trigger?.focus({preventScroll:!0}),me.preventDefault()}),children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:me=>me.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:I.jsx(de,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:me=>me.preventDefault(),...w,...Se,onPlaced:()=>Z(!0),ref:k,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ye(w.onKeyDown,me=>{const Ze=me.ctrlKey||me.altKey||me.metaKey;if(me.key==="Tab"&&me.preventDefault(),!Ze&&me.key.length===1&&oe(me.key),["ArrowUp","ArrowDown","Home","End"].includes(me.key)){let Le=V().filter($e=>!$e.disabled).map($e=>$e.ref.current);if(["ArrowUp","End"].includes(me.key)&&(Le=Le.slice().reverse()),["ArrowUp","ArrowDown"].includes(me.key)){const $e=me.target,be=Le.indexOf($e);Le=Le.slice(be+1)}setTimeout(()=>q(Le)),me.preventDefault()}})})})})})})});hq.displayName=cje;var fje="SelectItemAlignedPosition",pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=ql(af,n),a=Gl(af,n),[s,u]=y.useState(null),[l,c]=y.useState(null),f=Gt(t,k=>c(k)),h=c2(n),p=y.useRef(!1),m=y.useRef(!0),{viewport:v,selectedItem:b,selectedItemText:w,focusSelectedItem:x}=a,S=y.useCallback(()=>{if(o.trigger&&o.valueNode&&s&&l&&v&&b&&w){const k=o.trigger.getBoundingClientRect(),M=l.getBoundingClientRect(),N=o.valueNode.getBoundingClientRect(),z=w.getBoundingClientRect();if(o.dir!=="rtl"){const $e=z.left-M.left,be=N.left-$e,yt=k.left-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.left=nn+"px"}else{const $e=M.right-z.right,be=window.innerWidth-N.right-$e,yt=window.innerWidth-k.right-be,lt=k.width+yt,Nt=Math.max(lt,M.width),yn=window.innerWidth-Ta,nn=Q6(be,[Ta,Math.max(Ta,yn-Nt)]);s.style.minWidth=lt+"px",s.style.right=nn+"px"}const H=h(),V=window.innerHeight-Ta*2,ne=v.scrollHeight,Z=window.getComputedStyle(l),G=parseInt(Z.borderTopWidth,10),q=parseInt(Z.paddingTop,10),W=parseInt(Z.borderBottomWidth,10),j=parseInt(Z.paddingBottom,10),K=G+q+ne+j+W,Y=Math.min(b.offsetHeight*5,K),oe=window.getComputedStyle(v),Q=parseInt(oe.paddingTop,10),J=parseInt(oe.paddingBottom,10),ue=k.top+k.height/2-Ta,de=V-ue,Se=b.offsetHeight/2,me=b.offsetTop+Se,Ze=G+q+me,Ae=K-Ze;if(Ze<=ue){const $e=H.length>0&&b===H[H.length-1].ref.current;s.style.bottom="0px";const be=l.clientHeight-v.offsetTop-v.offsetHeight,yt=Math.max(de,Se+($e?J:0)+be+W),lt=Ze+yt;s.style.height=lt+"px"}else{const $e=H.length>0&&b===H[0].ref.current;s.style.top="0px";const yt=Math.max(ue,G+v.offsetTop+($e?Q:0)+Se)+Ae;s.style.height=yt+"px",v.scrollTop=Ze-ue+v.offsetTop}s.style.margin=`${Ta}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r?.(),requestAnimationFrame(()=>p.current=!0)}},[h,o.trigger,o.valueNode,s,l,v,b,w,o.dir,r]);ii(()=>S(),[S]);const[O,E]=y.useState();ii(()=>{l&&E(window.getComputedStyle(l).zIndex)},[l]);const C=y.useCallback(k=>{k&&m.current===!0&&(S(),x?.(),m.current=!1)},[S,x]);return I.jsx(hje,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:I.jsx("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:O},children:I.jsx(pt.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});pq.displayName=fje;var dje="SelectPopperPosition",J6=y.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=Ta,...o}=e,a=f2(n);return I.jsx(sw,{...a,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});J6.displayName=dje;var[hje,B5]=rp(af,{}),e4="SelectViewport",gq=y.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=Gl(e4,n),a=B5(e4,n),s=Gt(t,o.onViewportChange),u=y.useRef(0);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),I.jsx(l2.Slot,{scope:n,children:I.jsx(pt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ye(i.onScroll,l=>{const c=l.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const p=Math.abs(u.current-c.scrollTop);if(p>0){const m=window.innerHeight-Ta*2,v=parseFloat(f.style.minHeight),b=parseFloat(f.style.height),w=Math.max(v,b);if(w0?O:0,f.style.justifyContent="flex-end")}}}u.current=c.scrollTop})})})]})});gq.displayName=e4;var mq="SelectGroup",[pje,gje]=rp(mq),vq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Fo();return I.jsx(pje,{scope:n,id:i,children:I.jsx(pt.div,{role:"group","aria-labelledby":i,...r,ref:t})})});vq.displayName=mq;var yq="SelectLabel",bq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=gje(yq,n);return I.jsx(pt.div,{id:i.id,...r,ref:t})});bq.displayName=yq;var dx="SelectItem",[mje,xq]=rp(dx),wq=y.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...a}=e,s=ql(dx,n),u=Gl(dx,n),l=s.value===r,[c,f]=y.useState(o??""),[h,p]=y.useState(!1),m=Gt(t,x=>u.itemRefCallback?.(x,r,i)),v=Fo(),b=y.useRef("touch"),w=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return I.jsx(mje,{scope:n,value:r,disabled:i,textId:v,isSelected:l,onItemTextChange:y.useCallback(x=>{f(S=>S||(x?.textContent??"").trim())},[]),children:I.jsx(l2.ItemSlot,{scope:n,value:r,disabled:i,textValue:c,children:I.jsx(pt.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:m,onFocus:Ye(a.onFocus,()=>p(!0)),onBlur:Ye(a.onBlur,()=>p(!1)),onClick:Ye(a.onClick,()=>{b.current!=="mouse"&&w()}),onPointerUp:Ye(a.onPointerUp,()=>{b.current==="mouse"&&w()}),onPointerDown:Ye(a.onPointerDown,x=>{b.current=x.pointerType}),onPointerMove:Ye(a.onPointerMove,x=>{b.current=x.pointerType,i?u.onItemLeave?.():b.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ye(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&u.onItemLeave?.()}),onKeyDown:Ye(a.onKeyDown,x=>{u.searchRef?.current!==""&&x.key===" "||(rje.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});wq.displayName=dx;var l0="SelectItemText",_q=y.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,a=ql(l0,n),s=Gl(l0,n),u=xq(l0,n),l=sje(l0,n),[c,f]=y.useState(null),h=Gt(t,w=>f(w),u.onItemTextChange,w=>s.itemTextRefCallback?.(w,u.value,u.disabled)),p=c?.textContent,m=y.useMemo(()=>I.jsx("option",{value:u.value,disabled:u.disabled,children:p},u.value),[u.disabled,u.value,p]),{onNativeOptionAdd:v,onNativeOptionRemove:b}=l;return ii(()=>(v(m),()=>b(m)),[v,b,m]),I.jsxs(I.Fragment,{children:[I.jsx(pt.span,{id:u.textId,...o,ref:h}),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Au.createPortal(o.children,a.valueNode):null]})});_q.displayName=l0;var Sq="SelectItemIndicator",Cq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return xq(Sq,n).isSelected?I.jsx(pt.span,{"aria-hidden":!0,...r,ref:t}):null});Cq.displayName=Sq;var t4="SelectScrollUpButton",Eq=y.forwardRef((e,t)=>{const n=Gl(t4,e.__scopeSelect),r=B5(t4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollTop>0;o(l)};const u=n.viewport;return s(),u.addEventListener("scroll",s),()=>u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop-u.offsetHeight)}}):null});Eq.displayName=t4;var n4="SelectScrollDownButton",Oq=y.forwardRef((e,t)=>{const n=Gl(n4,e.__scopeSelect),r=B5(n4,e.__scopeSelect),[i,o]=y.useState(!1),a=Gt(t,r.onScrollButtonChange);return ii(()=>{if(n.viewport&&n.isPositioned){let s=function(){const l=u.scrollHeight-u.clientHeight,c=Math.ceil(u.scrollTop)u.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),i?I.jsx(Aq,{...e,ref:a,onAutoScroll:()=>{const{viewport:s,selectedItem:u}=n;s&&u&&(s.scrollTop=s.scrollTop+u.offsetHeight)}}):null});Oq.displayName=n4;var Aq=y.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=Gl("SelectScrollButton",n),a=y.useRef(null),s=c2(n),u=y.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return y.useEffect(()=>()=>u(),[u]),ii(()=>{s().find(c=>c.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[s]),I.jsx(pt.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ye(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:Ye(i.onPointerMove,()=>{o.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:Ye(i.onPointerLeave,()=>{u()})})}),vje="SelectSeparator",Pq=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return I.jsx(pt.div,{"aria-hidden":!0,...r,ref:t})});Pq.displayName=vje;var r4="SelectArrow",yje=y.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=f2(n),o=ql(r4,n),a=Gl(r4,n);return o.open&&a.position==="popper"?I.jsx(uw,{...i,...r,ref:t}):null});yje.displayName=r4;function kq(e){return e===""||e===void 0}var Tq=y.forwardRef((e,t)=>{const{value:n,...r}=e,i=y.useRef(null),o=Gt(t,i),a=j5(n);return y.useEffect(()=>{const s=i.current,u=window.HTMLSelectElement.prototype,c=Object.getOwnPropertyDescriptor(u,"value").set;if(a!==n&&c){const f=new Event("change",{bubbles:!0});c.call(s,n),s.dispatchEvent(f)}},[a,n]),I.jsx(xA,{asChild:!0,children:I.jsx("select",{...r,ref:o,defaultValue:n})})});Tq.displayName="BubbleSelect";function Mq(e){const t=Vr(e),n=y.useRef(""),r=y.useRef(0),i=y.useCallback(a=>{const s=n.current+a;t(s),function u(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>u(""),1e3))}(s)},[t]),o=y.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function Rq(e,t,n){const i=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let a=bje(e,Math.max(o,0));i.length===1&&(a=a.filter(l=>l!==n));const u=a.find(l=>l.textValue.toLowerCase().startsWith(i.toLowerCase()));return u!==n?u:void 0}function bje(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var FXe=iq,jXe=aq,BXe=uq,zXe=lq,UXe=cq,VXe=fq,WXe=gq,HXe=vq,KXe=bq,qXe=wq,GXe=_q,YXe=Cq,ZXe=Eq,XXe=Oq,QXe=Pq;const z5=6048e5,xje=864e5,bI=Symbol.for("constructDateFrom");function oi(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&bI in e?e[bI](t):e instanceof Date?new e.constructor(t):new Date(t)}function Dn(e,t){return oi(t||e,e)}function Ui(e,t,n){const r=Dn(e,n?.in);return isNaN(t)?oi(n?.in||e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Qa(e,t,n){const r=Dn(e,n?.in);if(isNaN(t))return oi(n?.in||e,NaN);if(!t)return r;const i=r.getDate(),o=oi(n?.in||e,r.getTime());o.setMonth(r.getMonth()+t+1,0);const a=o.getDate();return i>=a?o:(r.setFullYear(o.getFullYear(),o.getMonth(),i),r)}let wje={};function Um(){return wje}function ba(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o=o.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function hx(e){const t=Dn(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function wf(e,...t){const n=oi.bind(null,e||t.find(r=>typeof r=="object"));return t.map(n)}function uf(e,t){const n=Dn(e,t?.in);return n.setHours(0,0,0,0),n}function xs(e,t,n){const[r,i]=wf(n?.in,e,t),o=uf(r),a=uf(i),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/xje)}function _je(e,t){const n=Dq(e,t),r=oi(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),sf(r)}function i4(e,t,n){return Ui(e,t*7,n)}function Sje(e,t,n){return Qa(e,t*12,n)}function Cje(e,t){let n,r=t?.in;return e.forEach(i=>{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n{!r&&typeof i=="object"&&(r=oi.bind(null,i));const o=Dn(i,r);(!n||n>o||isNaN(+o))&&(n=o)}),oi(r,n||NaN)}function uo(e,t,n){const[r,i]=wf(n?.in,e,t);return+uf(r)==+uf(i)}function U5(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oje(e){return!(!U5(e)&&typeof e!="number"||isNaN(+Dn(e)))}function nm(e,t,n){const[r,i]=wf(n?.in,e,t),o=r.getFullYear()-i.getFullYear(),a=r.getMonth()-i.getMonth();return o*12+a}function Aje(e,t,n){const[r,i]=wf(n?.in,e,t),o=ba(r,n),a=ba(i,n),s=+o-hx(o),u=+a-hx(a);return Math.round((s-u)/z5)}function V5(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function go(e,t){const n=Dn(e,t?.in);return n.setDate(1),n.setHours(0,0,0,0),n}function $q(e,t){const n=Dn(e,t?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function W5(e,t){const n=Um(),r=t?.weekStartsOn??t?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,i=Dn(e,t?.in),o=i.getDay(),a=(o{let r;const i=Pje[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",t.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Nd(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Tje={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Mje={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Rje={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Dje={date:Nd({formats:Tje,defaultWidth:"full"}),time:Nd({formats:Mje,defaultWidth:"full"}),dateTime:Nd({formats:Rje,defaultWidth:"full"})},$je={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ije=(e,t,n,r)=>$je[e];function ps(e){return(t,n)=>{const r=n?.context?String(n.context):"standalone";let i;if(r==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,s=n?.width?String(n.width):a;i=e.formattingValues[s]||e.formattingValues[a]}else{const a=e.defaultWidth,s=n?.width?String(n.width):e.defaultWidth;i=e.values[s]||e.values[a]}const o=e.argumentCallback?e.argumentCallback(t):t;return i[o]}}const Nje={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Lje={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Fje={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},jje={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Bje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},zje={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Uje=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Vje={ordinalNumber:Uje,era:ps({values:Nje,defaultWidth:"wide"}),quarter:ps({values:Lje,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:Fje,defaultWidth:"wide"}),day:ps({values:jje,defaultWidth:"wide"}),dayPeriod:ps({values:Bje,defaultWidth:"wide",formattingValues:zje,defaultFormattingWidth:"wide"})};function gs(e){return(t,n={})=>{const r=n.width,i=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],o=t.match(i);if(!o)return null;const a=o[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(s)?Hje(s,f=>f.test(a)):Wje(s,f=>f.test(a));let l;l=e.valueCallback?e.valueCallback(u):u,l=n.valueCallback?n.valueCallback(l):l;const c=t.slice(a.length);return{value:l,rest:c}}}function Wje(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Hje(e,t){for(let n=0;n{const r=t.match(e.matchPattern);if(!r)return null;const i=r[0],o=t.match(e.parsePattern);if(!o)return null;let a=e.valueCallback?e.valueCallback(o[0]):o[0];a=n.valueCallback?n.valueCallback(a):a;const s=t.slice(i.length);return{value:a,rest:s}}}const Kje=/^(\d+)(th|st|nd|rd)?/i,qje=/\d+/i,Gje={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Yje={any:[/^b/i,/^(a|c)/i]},Zje={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Xje={any:[/1/i,/2/i,/3/i,/4/i]},Qje={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Jje={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},eBe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},tBe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nBe={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},rBe={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},iBe={ordinalNumber:Nq({matchPattern:Kje,parsePattern:qje,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:Gje,defaultMatchWidth:"wide",parsePatterns:Yje,defaultParseWidth:"any"}),quarter:gs({matchPatterns:Zje,defaultMatchWidth:"wide",parsePatterns:Xje,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:Qje,defaultMatchWidth:"wide",parsePatterns:Jje,defaultParseWidth:"any"}),day:gs({matchPatterns:eBe,defaultMatchWidth:"wide",parsePatterns:tBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:nBe,defaultMatchWidth:"any",parsePatterns:rBe,defaultParseWidth:"any"})},Lq={code:"en-US",formatDistance:kje,formatLong:Dje,formatRelative:Ije,localize:Vje,match:iBe,options:{weekStartsOn:0,firstWeekContainsDate:1}};function oBe(e,t){const n=Dn(e,t?.in);return xs(n,$q(n))+1}function Fq(e,t){const n=Dn(e,t?.in),r=+sf(n)-+_je(n);return Math.round(r/z5)+1}function jq(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=Um(),o=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??i.firstWeekContainsDate??i.locale?.options?.firstWeekContainsDate??1,a=oi(t?.in||e,0);a.setFullYear(r+1,0,o),a.setHours(0,0,0,0);const s=ba(a,t),u=oi(t?.in||e,0);u.setFullYear(r,0,o),u.setHours(0,0,0,0);const l=ba(u,t);return+n>=+s?r+1:+n>=+l?r:r-1}function aBe(e,t){const n=Um(),r=t?.firstWeekContainsDate??t?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,i=jq(e,t),o=oi(t?.in||e,0);return o.setFullYear(i,0,r),o.setHours(0,0,0,0),ba(o,t)}function Bq(e,t){const n=Dn(e,t?.in),r=+ba(n,t)-+aBe(n,t);return Math.round(r/z5)+1}function Mn(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Ku={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return Mn(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):Mn(n+1,2)},d(e,t){return Mn(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return Mn(e.getHours()%12||12,t.length)},H(e,t){return Mn(e.getHours(),t.length)},m(e,t){return Mn(e.getMinutes(),t.length)},s(e,t){return Mn(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),i=Math.trunc(r*Math.pow(10,n-3));return Mn(i,t.length)}},Qf={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xI={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),i=r>0?r:1-r;return n.ordinalNumber(i,{unit:"year"})}return Ku.y(e,t)},Y:function(e,t,n,r){const i=jq(e,r),o=i>0?i:1-i;if(t==="YY"){const a=o%100;return Mn(a,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):Mn(o,t.length)},R:function(e,t){const n=Dq(e);return Mn(n,t.length)},u:function(e,t){const n=e.getFullYear();return Mn(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return Mn(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return Mn(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Ku.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return Mn(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const i=Bq(e,r);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):Mn(i,t.length)},I:function(e,t,n){const r=Fq(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):Mn(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Ku.d(e,t)},D:function(e,t,n){const r=oBe(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):Mn(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return Mn(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return Mn(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),i=r===0?7:r;switch(t){case"i":return String(i);case"ii":return Mn(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const i=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let i;switch(r===12?i=Qf.noon:r===0?i=Qf.midnight:i=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let i;switch(r>=17?i=Qf.evening:r>=12?i=Qf.afternoon:r>=4?i=Qf.morning:i=Qf.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Ku.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Ku.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):Mn(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Ku.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Ku.s(e,t)},S:function(e,t){return Ku.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return _I(r);case"XXXX":case"XX":return pc(r);case"XXXXX":case"XXX":default:return pc(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return _I(r);case"xxxx":case"xx":return pc(r);case"xxxxx":case"xxx":default:return pc(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+wI(r,":");case"OOOO":default:return"GMT"+pc(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+wI(r,":");case"zzzz":default:return"GMT"+pc(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return Mn(r,t.length)},T:function(e,t,n){return Mn(+e,t.length)}};function wI(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+Mn(o,2)}function _I(e,t){return e%60===0?(e>0?"-":"+")+Mn(Math.abs(e)/60,2):pc(e,t)}function pc(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),i=Mn(Math.trunc(r/60),2),o=Mn(r%60,2);return n+i+t+o}const SI=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},zq=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},sBe=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],i=n[2];if(!i)return SI(e,t);let o;switch(r){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",SI(r,t)).replace("{{time}}",zq(i,t))},uBe={p:zq,P:sBe},lBe=/^D+$/,cBe=/^Y+$/,fBe=["D","DD","YY","YYYY"];function dBe(e){return lBe.test(e)}function hBe(e){return cBe.test(e)}function pBe(e,t,n){const r=gBe(e,t,n);if(console.warn(r),fBe.includes(e))throw new RangeError(r)}function gBe(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const mBe=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vBe=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,yBe=/^'([^]*?)'?$/,bBe=/''/g,xBe=/[a-zA-Z]/;function _f(e,t,n){const r=Um(),i=n?.locale??r.locale??Lq,o=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,a=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,s=Dn(e,n?.in);if(!Oje(s))throw new RangeError("Invalid time value");let u=t.match(vBe).map(c=>{const f=c[0];if(f==="p"||f==="P"){const h=uBe[f];return h(c,i.formatLong)}return c}).join("").match(mBe).map(c=>{if(c==="''")return{isToken:!1,value:"'"};const f=c[0];if(f==="'")return{isToken:!1,value:wBe(c)};if(xI[f])return{isToken:!0,value:c};if(f.match(xBe))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:c}});i.localize.preprocessor&&(u=i.localize.preprocessor(s,u));const l={firstWeekContainsDate:o,weekStartsOn:a,locale:i};return u.map(c=>{if(!c.isToken)return c.value;const f=c.value;(!n?.useAdditionalWeekYearTokens&&hBe(f)||!n?.useAdditionalDayOfYearTokens&&dBe(f))&&pBe(f,t,String(e));const h=xI[f[0]];return h(s,f,i.localize,l)}).join("")}function wBe(e){const t=e.match(yBe);return t?t[1].replace(bBe,"'"):e}function _Be(e,t){const n=Dn(e,t?.in),r=n.getFullYear(),i=n.getMonth(),o=oi(n,0);return o.setFullYear(r,i+1,0),o.setHours(0,0,0,0),o.getDate()}function SBe(e){return Math.trunc(+Dn(e)/1e3)}function CBe(e,t){const n=Dn(e,t?.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(0,0,0,0),Dn(n,t?.in)}function EBe(e,t){const n=Dn(e,t?.in);return Aje(CBe(n,t),go(n,t),t)+1}function o4(e,t){return+Dn(e)>+Dn(t)}function Uq(e,t){return+Dn(e)<+Dn(t)}function OBe(e,t,n){const[r,i]=wf(n?.in,e,t);return+ba(r,n)==+ba(i,n)}function H5(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()&&r.getMonth()===i.getMonth()}function ABe(e,t,n){const[r,i]=wf(n?.in,e,t);return r.getFullYear()===i.getFullYear()}function c3(e,t,n){return Ui(e,-t,n)}function f3(e,t,n){const r=Dn(e,n?.in),i=r.getFullYear(),o=r.getDate(),a=oi(e,0);a.setFullYear(i,t,15),a.setHours(0,0,0,0);const s=_Be(a);return r.setMonth(t,Math.min(o,s)),r}function CI(e,t,n){const r=Dn(e,n?.in);return isNaN(+r)?oi(e,NaN):(r.setFullYear(t),r)}function JXe(e){return uf(Date.now(),e)}const PBe={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},kBe=(e,t,n)=>{let r;const i=PBe[e];return typeof i=="string"?r=i:t===1?r=i.one:r=i.other.replace("{{count}}",String(t)),n?.addSuffix?n.comparison&&n.comparison>0?r+"内":r+"前":r},TBe={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},MBe={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},RBe={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},DBe={date:Nd({formats:TBe,defaultWidth:"full"}),time:Nd({formats:MBe,defaultWidth:"full"}),dateTime:Nd({formats:RBe,defaultWidth:"full"})};function EI(e,t,n){const r="eeee p";return OBe(e,t,n)?r:e.getTime()>t.getTime()?"'下个'"+r:"'上个'"+r}const $Be={lastWeek:EI,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:EI,other:"PP p"},IBe=(e,t,n,r)=>{const i=$Be[e];return typeof i=="function"?i(t,n,r):i},NBe={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},LBe={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},FBe={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},jBe={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},BBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},zBe={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},UBe=(e,t)=>{const n=Number(e);switch(t?.unit){case"date":return n.toString()+"日";case"hour":return n.toString()+"时";case"minute":return n.toString()+"分";case"second":return n.toString()+"秒";default:return"第 "+n.toString()}},VBe={ordinalNumber:UBe,era:ps({values:NBe,defaultWidth:"wide"}),quarter:ps({values:LBe,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ps({values:FBe,defaultWidth:"wide"}),day:ps({values:jBe,defaultWidth:"wide"}),dayPeriod:ps({values:BBe,defaultWidth:"wide",formattingValues:zBe,defaultFormattingWidth:"wide"})},WBe=/^(第\s*)?\d+(日|时|分|秒)?/i,HBe=/\d+/i,KBe={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},qBe={any:[/^(前)/i,/^(公元)/i]},GBe={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},YBe={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},ZBe={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},XBe={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},QBe={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},JBe={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},eze={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},tze={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},nze={ordinalNumber:Nq({matchPattern:WBe,parsePattern:HBe,valueCallback:e=>parseInt(e,10)}),era:gs({matchPatterns:KBe,defaultMatchWidth:"wide",parsePatterns:qBe,defaultParseWidth:"any"}),quarter:gs({matchPatterns:GBe,defaultMatchWidth:"wide",parsePatterns:YBe,defaultParseWidth:"any",valueCallback:e=>e+1}),month:gs({matchPatterns:ZBe,defaultMatchWidth:"wide",parsePatterns:XBe,defaultParseWidth:"any"}),day:gs({matchPatterns:QBe,defaultMatchWidth:"wide",parsePatterns:JBe,defaultParseWidth:"any"}),dayPeriod:gs({matchPatterns:eze,defaultMatchWidth:"any",parsePatterns:tze,defaultParseWidth:"any"})},eQe={code:"zh-CN",formatDistance:kBe,formatLong:DBe,formatRelative:IBe,localize:VBe,match:nze,options:{weekStartsOn:1,firstWeekContainsDate:4}};var Rt=function(){return Rt=Object.assign||function(t){for(var n,r=1,i=arguments.length;r1&&(u||!l),f=t>1&&(l||!u),h=function(){r&&o(r)},p=function(){i&&o(i)};return I.jsx(Ize,{displayMonth:e.displayMonth,hideNext:c,hidePrevious:f,nextMonth:i,previousMonth:r,onPreviousClick:h,onNextClick:p})}function Nze(e){var t,n=Kn(),r=n.classNames,i=n.disableNavigation,o=n.styles,a=n.captionLayout,s=n.components,u=(t=s?.CaptionLabel)!==null&&t!==void 0?t:Hq,l;return i?l=I.jsx(u,{id:e.id,displayMonth:e.displayMonth}):a==="dropdown"?l=I.jsx(OI,{displayMonth:e.displayMonth,id:e.id}):a==="dropdown-buttons"?l=I.jsxs(I.Fragment,{children:[I.jsx(OI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id}),I.jsx(AI,{displayMonth:e.displayMonth,displayIndex:e.displayIndex,id:e.id})]}):l=I.jsxs(I.Fragment,{children:[I.jsx(u,{id:e.id,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(AI,{displayMonth:e.displayMonth,id:e.id})]}),I.jsx("div",{className:r.caption,style:o.caption,children:l})}function Lze(e){var t=Kn(),n=t.footer,r=t.styles,i=t.classNames.tfoot;return n?I.jsx("tfoot",{className:i,style:r.tfoot,children:I.jsx("tr",{children:I.jsx("td",{colSpan:8,children:n})})}):I.jsx(I.Fragment,{})}function Fze(e,t,n){for(var r=n?sf(new Date):ba(new Date,{locale:e,weekStartsOn:t}),i=[],o=0;o<7;o++){var a=Ui(r,o);i.push(a)}return i}function jze(){var e=Kn(),t=e.classNames,n=e.styles,r=e.showWeekNumber,i=e.locale,o=e.weekStartsOn,a=e.ISOWeek,s=e.formatters.formatWeekdayName,u=e.labels.labelWeekday,l=Fze(i,o,a);return I.jsxs("tr",{style:n.head_row,className:t.head_row,children:[r&&I.jsx("td",{style:n.head_cell,className:t.head_cell}),l.map(function(c,f){return I.jsx("th",{scope:"col",className:t.head_cell,style:n.head_cell,"aria-label":u(c,{locale:i}),children:s(c,{locale:i})},f)})]})}function Bze(){var e,t=Kn(),n=t.classNames,r=t.styles,i=t.components,o=(e=i?.HeadRow)!==null&&e!==void 0?e:jze;return I.jsx("thead",{style:r.head,className:n.head,children:I.jsx(o,{})})}function zze(e){var t=Kn(),n=t.locale,r=t.formatters.formatDay;return I.jsx(I.Fragment,{children:r(e.date,{locale:n})})}var K5=y.createContext(void 0);function Uze(e){if(!Vm(e.initialProps)){var t={selected:void 0,modifiers:{disabled:[]}};return I.jsx(K5.Provider,{value:t,children:e.children})}return I.jsx(Vze,{initialProps:e.initialProps,children:e.children})}function Vze(e){var t=e.initialProps,n=e.children,r=t.selected,i=t.min,o=t.max,a=function(l,c,f){var h,p;(h=t.onDayClick)===null||h===void 0||h.call(t,l,c,f);var m=!!(c.selected&&i&&r?.length===i);if(!m){var v=!!(!c.selected&&o&&r?.length===o);if(!v){var b=r?Vq([],r):[];if(c.selected){var w=b.findIndex(function(x){return uo(l,x)});b.splice(w,1)}else b.push(l);(p=t.onSelect)===null||p===void 0||p.call(t,b,l,c,f)}}},s={disabled:[]};r&&s.disabled.push(function(l){var c=o&&r.length>o-1,f=r.some(function(h){return uo(h,l)});return!!(c&&!f)});var u={selected:r,onDayClick:a,modifiers:s};return I.jsx(K5.Provider,{value:u,children:n})}function q5(){var e=y.useContext(K5);if(!e)throw new Error("useSelectMultiple must be used within a SelectMultipleProvider");return e}function Wze(e,t){var n=t||{},r=n.from,i=n.to;return r&&i?uo(i,e)&&uo(r,e)?void 0:uo(i,e)?{from:i,to:void 0}:uo(r,e)?void 0:o4(r,e)?{from:e,to:i}:{from:r,to:e}:i?o4(e,i)?{from:i,to:e}:{from:e,to:i}:r?Uq(e,r)?{from:e,to:r}:{from:r,to:e}:{from:e,to:void 0}}var G5=y.createContext(void 0);function Hze(e){if(!Wm(e.initialProps)){var t={selected:void 0,modifiers:{range_start:[],range_end:[],range_middle:[],disabled:[]}};return I.jsx(G5.Provider,{value:t,children:e.children})}return I.jsx(Kze,{initialProps:e.initialProps,children:e.children})}function Kze(e){var t=e.initialProps,n=e.children,r=t.selected,i=r||{},o=i.from,a=i.to,s=t.min,u=t.max,l=function(p,m,v){var b,w;(b=t.onDayClick)===null||b===void 0||b.call(t,p,m,v);var x=Wze(p,r);(w=t.onSelect)===null||w===void 0||w.call(t,x,p,m,v)},c={range_start:[],range_end:[],range_middle:[],disabled:[]};if(o?(c.range_start=[o],a?(c.range_end=[a],uo(o,a)||(c.range_middle=[{after:o,before:a}])):c.range_end=[o]):a&&(c.range_start=[a],c.range_end=[a]),s&&(o&&!a&&c.disabled.push({after:c3(o,s-1),before:Ui(o,s-1)}),o&&a&&c.disabled.push({after:o,before:Ui(o,s-1)}),!o&&a&&c.disabled.push({after:c3(a,s-1),before:Ui(a,s-1)})),u){if(o&&!a&&(c.disabled.push({before:Ui(o,-u+1)}),c.disabled.push({after:Ui(o,u-1)})),o&&a){var f=xs(a,o)+1,h=u-f;c.disabled.push({before:c3(o,h)}),c.disabled.push({after:Ui(a,h)})}!o&&a&&(c.disabled.push({before:Ui(a,-u+1)}),c.disabled.push({after:Ui(a,u-1)}))}return I.jsx(G5.Provider,{value:{selected:r,onDayClick:l,modifiers:c},children:n})}function Y5(){var e=y.useContext(G5);if(!e)throw new Error("useSelectRange must be used within a SelectRangeProvider");return e}function r1(e){return Array.isArray(e)?Vq([],e):e!==void 0?[e]:[]}function qze(e){var t={};return Object.entries(e).forEach(function(n){var r=n[0],i=n[1];t[r]=r1(i)}),t}var Ja;(function(e){e.Outside="outside",e.Disabled="disabled",e.Selected="selected",e.Hidden="hidden",e.Today="today",e.RangeStart="range_start",e.RangeEnd="range_end",e.RangeMiddle="range_middle"})(Ja||(Ja={}));var Gze=Ja.Selected,Ys=Ja.Disabled,Yze=Ja.Hidden,Zze=Ja.Today,d3=Ja.RangeEnd,h3=Ja.RangeMiddle,p3=Ja.RangeStart,Xze=Ja.Outside;function Qze(e,t,n){var r,i=(r={},r[Gze]=r1(e.selected),r[Ys]=r1(e.disabled),r[Yze]=r1(e.hidden),r[Zze]=[e.today],r[d3]=[],r[h3]=[],r[p3]=[],r[Xze]=[],r);return e.fromDate&&i[Ys].push({before:e.fromDate}),e.toDate&&i[Ys].push({after:e.toDate}),Vm(e)?i[Ys]=i[Ys].concat(t.modifiers[Ys]):Wm(e)&&(i[Ys]=i[Ys].concat(n.modifiers[Ys]),i[p3]=n.modifiers[p3],i[h3]=n.modifiers[h3],i[d3]=n.modifiers[d3]),i}var Gq=y.createContext(void 0);function Jze(e){var t=Kn(),n=q5(),r=Y5(),i=Qze(t,n,r),o=qze(t.modifiers),a=Rt(Rt({},i),o);return I.jsx(Gq.Provider,{value:a,children:e.children})}function Yq(){var e=y.useContext(Gq);if(!e)throw new Error("useModifiers must be used within a ModifiersProvider");return e}function eUe(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function tUe(e){return!!(e&&typeof e=="object"&&"from"in e)}function nUe(e){return!!(e&&typeof e=="object"&&"after"in e)}function rUe(e){return!!(e&&typeof e=="object"&&"before"in e)}function iUe(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function oUe(e,t){var n,r=t.from,i=t.to;if(r&&i){var o=xs(i,r)<0;o&&(n=[i,r],r=n[0],i=n[1]);var a=xs(e,r)>=0&&xs(i,e)>=0;return a}return i?uo(i,e):r?uo(r,e):!1}function aUe(e){return U5(e)}function sUe(e){return Array.isArray(e)&&e.every(U5)}function uUe(e,t){return t.some(function(n){if(typeof n=="boolean")return n;if(aUe(n))return uo(e,n);if(sUe(n))return n.includes(e);if(tUe(n))return oUe(e,n);if(iUe(n))return n.dayOfWeek.includes(e.getDay());if(eUe(n)){var r=xs(n.before,e),i=xs(n.after,e),o=r>0,a=i<0,s=o4(n.before,n.after);return s?a&&o:o||a}return nUe(n)?xs(e,n.after)>0:rUe(n)?xs(n.before,e)>0:typeof n=="function"?n(e):!1})}function Z5(e,t,n){var r=Object.keys(t).reduce(function(o,a){var s=t[a];return uUe(e,s)&&o.push(a),o},[]),i={};return r.forEach(function(o){return i[o]=!0}),n&&!H5(e,n)&&(i.outside=!0),i}function lUe(e,t){for(var n=go(e[0]),r=V5(e[e.length-1]),i,o,a=n;a<=r;){var s=Z5(a,t),u=!s.disabled&&!s.hidden;if(!u){a=Ui(a,1);continue}if(s.selected)return a;s.today&&!o&&(o=a),i||(i=a),a=Ui(a,1)}return o||i}var cUe=365;function Zq(e,t){var n=t.moveBy,r=t.direction,i=t.context,o=t.modifiers,a=t.retry,s=a===void 0?{count:0,lastFocused:e}:a,u=i.weekStartsOn,l=i.fromDate,c=i.toDate,f=i.locale,h={day:Ui,week:i4,month:Qa,year:Sje,startOfWeek:function(b){return i.ISOWeek?sf(b):ba(b,{locale:f,weekStartsOn:u})},endOfWeek:function(b){return i.ISOWeek?Iq(b):W5(b,{locale:f,weekStartsOn:u})}},p=h[n](e,r==="after"?1:-1);r==="before"&&l?p=Cje([l,p]):r==="after"&&c&&(p=Eje([c,p]));var m=!0;if(o){var v=Z5(p,o);m=!v.disabled&&!v.hidden}return m?p:s.count>cUe?s.lastFocused:Zq(p,{moveBy:n,direction:r,context:i,modifiers:o,retry:Rt(Rt({},s),{count:s.count+1})})}var Xq=y.createContext(void 0);function fUe(e){var t=Hm(),n=Yq(),r=y.useState(),i=r[0],o=r[1],a=y.useState(),s=a[0],u=a[1],l=lUe(t.displayMonths,n),c=i??(s&&t.isDateDisplayed(s))?s:l,f=function(){u(i),o(void 0)},h=function(b){o(b)},p=Kn(),m=function(b,w){if(i){var x=Zq(i,{moveBy:b,direction:w,context:p,modifiers:n});uo(i,x)||(t.goToDate(x,i),h(x))}},v={focusedDay:i,focusTarget:c,blur:f,focus:h,focusDayAfter:function(){return m("day","after")},focusDayBefore:function(){return m("day","before")},focusWeekAfter:function(){return m("week","after")},focusWeekBefore:function(){return m("week","before")},focusMonthBefore:function(){return m("month","before")},focusMonthAfter:function(){return m("month","after")},focusYearBefore:function(){return m("year","before")},focusYearAfter:function(){return m("year","after")},focusStartOfWeek:function(){return m("startOfWeek","before")},focusEndOfWeek:function(){return m("endOfWeek","after")}};return I.jsx(Xq.Provider,{value:v,children:e.children})}function X5(){var e=y.useContext(Xq);if(!e)throw new Error("useFocusContext must be used within a FocusProvider");return e}function dUe(e,t){var n=Yq(),r=Z5(e,n,t);return r}var Q5=y.createContext(void 0);function hUe(e){if(!d2(e.initialProps)){var t={selected:void 0};return I.jsx(Q5.Provider,{value:t,children:e.children})}return I.jsx(pUe,{initialProps:e.initialProps,children:e.children})}function pUe(e){var t=e.initialProps,n=e.children,r=function(o,a,s){var u,l,c;if((u=t.onDayClick)===null||u===void 0||u.call(t,o,a,s),a.selected&&!t.required){(l=t.onSelect)===null||l===void 0||l.call(t,void 0,o,a,s);return}(c=t.onSelect)===null||c===void 0||c.call(t,o,o,a,s)},i={selected:t.selected,onDayClick:r};return I.jsx(Q5.Provider,{value:i,children:n})}function Qq(){var e=y.useContext(Q5);if(!e)throw new Error("useSelectSingle must be used within a SelectSingleProvider");return e}function gUe(e,t){var n=Kn(),r=Qq(),i=q5(),o=Y5(),a=X5(),s=a.focusDayAfter,u=a.focusDayBefore,l=a.focusWeekAfter,c=a.focusWeekBefore,f=a.blur,h=a.focus,p=a.focusMonthBefore,m=a.focusMonthAfter,v=a.focusYearBefore,b=a.focusYearAfter,w=a.focusStartOfWeek,x=a.focusEndOfWeek,S=function(W){var j,K,Y,oe;d2(n)?(j=r.onDayClick)===null||j===void 0||j.call(r,e,t,W):Vm(n)?(K=i.onDayClick)===null||K===void 0||K.call(i,e,t,W):Wm(n)?(Y=o.onDayClick)===null||Y===void 0||Y.call(o,e,t,W):(oe=n.onDayClick)===null||oe===void 0||oe.call(n,e,t,W)},O=function(W){var j;h(e),(j=n.onDayFocus)===null||j===void 0||j.call(n,e,t,W)},E=function(W){var j;f(),(j=n.onDayBlur)===null||j===void 0||j.call(n,e,t,W)},C=function(W){var j;(j=n.onDayMouseEnter)===null||j===void 0||j.call(n,e,t,W)},k=function(W){var j;(j=n.onDayMouseLeave)===null||j===void 0||j.call(n,e,t,W)},M=function(W){var j;(j=n.onDayPointerEnter)===null||j===void 0||j.call(n,e,t,W)},N=function(W){var j;(j=n.onDayPointerLeave)===null||j===void 0||j.call(n,e,t,W)},z=function(W){var j;(j=n.onDayTouchCancel)===null||j===void 0||j.call(n,e,t,W)},H=function(W){var j;(j=n.onDayTouchEnd)===null||j===void 0||j.call(n,e,t,W)},V=function(W){var j;(j=n.onDayTouchMove)===null||j===void 0||j.call(n,e,t,W)},ne=function(W){var j;(j=n.onDayTouchStart)===null||j===void 0||j.call(n,e,t,W)},Z=function(W){var j;(j=n.onDayKeyUp)===null||j===void 0||j.call(n,e,t,W)},G=function(W){var j;switch(W.key){case"ArrowLeft":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?s():u();break;case"ArrowRight":W.preventDefault(),W.stopPropagation(),n.dir==="rtl"?u():s();break;case"ArrowDown":W.preventDefault(),W.stopPropagation(),l();break;case"ArrowUp":W.preventDefault(),W.stopPropagation(),c();break;case"PageUp":W.preventDefault(),W.stopPropagation(),W.shiftKey?v():p();break;case"PageDown":W.preventDefault(),W.stopPropagation(),W.shiftKey?b():m();break;case"Home":W.preventDefault(),W.stopPropagation(),w();break;case"End":W.preventDefault(),W.stopPropagation(),x();break}(j=n.onDayKeyDown)===null||j===void 0||j.call(n,e,t,W)},q={onClick:S,onFocus:O,onBlur:E,onKeyDown:G,onKeyUp:Z,onMouseEnter:C,onMouseLeave:k,onPointerEnter:M,onPointerLeave:N,onTouchCancel:z,onTouchEnd:H,onTouchMove:V,onTouchStart:ne};return q}function mUe(){var e=Kn(),t=Qq(),n=q5(),r=Y5(),i=d2(e)?t.selected:Vm(e)?n.selected:Wm(e)?r.selected:void 0;return i}function vUe(e){return Object.values(Ja).includes(e)}function yUe(e,t){var n=[e.classNames.day];return Object.keys(t).forEach(function(r){var i=e.modifiersClassNames[r];if(i)n.push(i);else if(vUe(r)){var o=e.classNames["day_".concat(r)];o&&n.push(o)}}),n}function bUe(e,t){var n=Rt({},e.styles.day);return Object.keys(t).forEach(function(r){var i;n=Rt(Rt({},n),(i=e.modifiersStyles)===null||i===void 0?void 0:i[r])}),n}function xUe(e,t,n){var r,i,o,a=Kn(),s=X5(),u=dUe(e,t),l=gUe(e,u),c=mUe(),f=!!(a.onDayClick||a.mode!=="default");y.useEffect(function(){var C;u.outside||s.focusedDay&&f&&uo(s.focusedDay,e)&&((C=n.current)===null||C===void 0||C.focus())},[s.focusedDay,e,n,f,u.outside]);var h=yUe(a,u).join(" "),p=bUe(a,u),m=!!(u.outside&&!a.showOutsideDays||u.hidden),v=(o=(i=a.components)===null||i===void 0?void 0:i.DayContent)!==null&&o!==void 0?o:zze,b=I.jsx(v,{date:e,displayMonth:t,activeModifiers:u}),w={style:p,className:h,children:b,role:"gridcell"},x=s.focusTarget&&uo(s.focusTarget,e)&&!u.outside,S=s.focusedDay&&uo(s.focusedDay,e),O=Rt(Rt(Rt({},w),(r={disabled:u.disabled,role:"gridcell"},r["aria-selected"]=u.selected,r.tabIndex=S||x?0:-1,r)),l),E={isButton:f,isHidden:m,activeModifiers:u,selectedDays:c,buttonProps:O,divProps:w};return E}function wUe(e){var t=y.useRef(null),n=xUe(e.date,e.displayMonth,t);return n.isHidden?I.jsx("div",{role:"gridcell"}):n.isButton?I.jsx(px,Rt({name:"day",ref:t},n.buttonProps)):I.jsx("div",Rt({},n.divProps))}function _Ue(e){var t=e.number,n=e.dates,r=Kn(),i=r.onWeekNumberClick,o=r.styles,a=r.classNames,s=r.locale,u=r.labels.labelWeekNumber,l=r.formatters.formatWeekNumber,c=l(Number(t),{locale:s});if(!i)return I.jsx("span",{className:a.weeknumber,style:o.weeknumber,children:c});var f=u(Number(t),{locale:s}),h=function(p){i(t,n,p)};return I.jsx(px,{name:"week-number","aria-label":f,className:a.weeknumber,style:o.weeknumber,onClick:h,children:c})}function SUe(e){var t,n,r=Kn(),i=r.styles,o=r.classNames,a=r.showWeekNumber,s=r.components,u=(t=s?.Day)!==null&&t!==void 0?t:wUe,l=(n=s?.WeekNumber)!==null&&n!==void 0?n:_Ue,c;return a&&(c=I.jsx("td",{className:o.cell,style:i.cell,children:I.jsx(l,{number:e.weekNumber,dates:e.dates})})),I.jsxs("tr",{className:o.row,style:i.row,children:[c,e.dates.map(function(f){return I.jsx("td",{className:o.cell,style:i.cell,role:"presentation",children:I.jsx(u,{displayMonth:e.displayMonth,date:f})},SBe(f))})]})}function PI(e,t,n){for(var r=n?.ISOWeek?Iq(t):W5(t,n),i=n?.ISOWeek?sf(e):ba(e,n),o=xs(r,i),a=[],s=0;s<=o;s++)a.push(Ui(i,s));var u=a.reduce(function(l,c){var f=n?.ISOWeek?Fq(c):Bq(c,n),h=l.find(function(p){return p.weekNumber===f});return h?(h.dates.push(c),l):(l.push({weekNumber:f,dates:[c]}),l)},[]);return u}function CUe(e,t){var n=PI(go(e),V5(e),t);if(t?.useFixedWeeks){var r=EBe(e,t);if(r<6){var i=n[n.length-1],o=i.dates[i.dates.length-1],a=i4(o,6-r),s=PI(i4(o,1),a,t);n.push.apply(n,s)}}return n}function EUe(e){var t,n,r,i=Kn(),o=i.locale,a=i.classNames,s=i.styles,u=i.hideHead,l=i.fixedWeeks,c=i.components,f=i.weekStartsOn,h=i.firstWeekContainsDate,p=i.ISOWeek,m=CUe(e.displayMonth,{useFixedWeeks:!!l,ISOWeek:p,locale:o,weekStartsOn:f,firstWeekContainsDate:h}),v=(t=c?.Head)!==null&&t!==void 0?t:Bze,b=(n=c?.Row)!==null&&n!==void 0?n:SUe,w=(r=c?.Footer)!==null&&r!==void 0?r:Lze;return I.jsxs("table",{id:e.id,className:a.table,style:s.table,role:"grid","aria-labelledby":e["aria-labelledby"],children:[!u&&I.jsx(v,{}),I.jsx("tbody",{className:a.tbody,style:s.tbody,children:m.map(function(x){return I.jsx(b,{displayMonth:e.displayMonth,dates:x.dates,weekNumber:x.weekNumber},x.weekNumber)})}),I.jsx(w,{displayMonth:e.displayMonth})]})}function OUe(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}var AUe=OUe()?y.useLayoutEffect:y.useEffect,g3=!1,PUe=0;function kI(){return"react-day-picker-".concat(++PUe)}function kUe(e){var t,n=e??(g3?kI():null),r=y.useState(n),i=r[0],o=r[1];return AUe(function(){i===null&&o(kI())},[]),y.useEffect(function(){g3===!1&&(g3=!0)},[]),(t=e??i)!==null&&t!==void 0?t:void 0}function TUe(e){var t,n,r=Kn(),i=r.dir,o=r.classNames,a=r.styles,s=r.components,u=Hm().displayMonths,l=kUe(r.id?"".concat(r.id,"-").concat(e.displayIndex):void 0),c=r.id?"".concat(r.id,"-grid-").concat(e.displayIndex):void 0,f=[o.month],h=a.month,p=e.displayIndex===0,m=e.displayIndex===u.length-1,v=!p&&!m;i==="rtl"&&(t=[p,m],m=t[0],p=t[1]),p&&(f.push(o.caption_start),h=Rt(Rt({},h),a.caption_start)),m&&(f.push(o.caption_end),h=Rt(Rt({},h),a.caption_end)),v&&(f.push(o.caption_between),h=Rt(Rt({},h),a.caption_between));var b=(n=s?.Caption)!==null&&n!==void 0?n:Nze;return I.jsxs("div",{className:f.join(" "),style:h,children:[I.jsx(b,{id:l,displayMonth:e.displayMonth,displayIndex:e.displayIndex}),I.jsx(EUe,{id:c,"aria-labelledby":l,displayMonth:e.displayMonth})]},e.displayIndex)}function MUe(e){var t=Kn(),n=t.classNames,r=t.styles;return I.jsx("div",{className:n.months,style:r.months,children:e.children})}function RUe(e){var t,n,r=e.initialProps,i=Kn(),o=X5(),a=Hm(),s=y.useState(!1),u=s[0],l=s[1];y.useEffect(function(){i.initialFocus&&o.focusTarget&&(u||(o.focus(o.focusTarget),l(!0)))},[i.initialFocus,u,o.focus,o.focusTarget,o]);var c=[i.classNames.root,i.className];i.numberOfMonths>1&&c.push(i.classNames.multiple_months),i.showWeekNumber&&c.push(i.classNames.with_weeknumber);var f=Rt(Rt({},i.styles.root),i.style),h=Object.keys(r).filter(function(m){return m.startsWith("data-")}).reduce(function(m,v){var b;return Rt(Rt({},m),(b={},b[v]=r[v],b))},{}),p=(n=(t=r.components)===null||t===void 0?void 0:t.Months)!==null&&n!==void 0?n:MUe;return I.jsx("div",Rt({className:c.join(" "),style:f,dir:i.dir,id:i.id,nonce:r.nonce,title:r.title,lang:r.lang},h,{children:I.jsx(p,{children:a.displayMonths.map(function(m,v){return I.jsx(TUe,{displayIndex:v,displayMonth:m},v)})})}))}function DUe(e){var t=e.children,n=rze(e,["children"]);return I.jsx(_ze,{initialProps:n,children:I.jsx(Rze,{children:I.jsx(hUe,{initialProps:n,children:I.jsx(Uze,{initialProps:n,children:I.jsx(Hze,{initialProps:n,children:I.jsx(Jze,{children:I.jsx(fUe,{children:t})})})})})})})}function tQe(e){return I.jsx(DUe,Rt({},e,{children:I.jsx(RUe,{initialProps:e})}))}var J5="Popover",[Jq,nQe]=vi(J5,[zl]),Km=zl(),[$Ue,Yl]=Jq(J5),eG=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!1}=e,s=Km(t),u=y.useRef(null),[l,c]=y.useState(!1),[f=!1,h]=Za({prop:r,defaultProp:i,onChange:o});return I.jsx(aw,{...s,children:I.jsx($Ue,{scope:t,contentId:Fo(),triggerRef:u,open:f,onOpenChange:h,onOpenToggle:y.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:y.useCallback(()=>c(!0),[]),onCustomAnchorRemove:y.useCallback(()=>c(!1),[]),modal:a,children:n})})};eG.displayName=J5;var tG="PopoverAnchor",IUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(tG,n),o=Km(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:s}=i;return y.useEffect(()=>(a(),()=>s()),[a,s]),I.jsx(Am,{...o,...r,ref:t})});IUe.displayName=tG;var nG="PopoverTrigger",rG=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(nG,n),o=Km(n),a=Gt(t,i.triggerRef),s=I.jsx(pt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":uG(i.open),...r,ref:a,onClick:Ye(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:I.jsx(Am,{asChild:!0,...o,children:s})});rG.displayName=nG;var eP="PopoverPortal",[NUe,LUe]=Jq(eP,{forceMount:void 0}),iG=e=>{const{__scopePopover:t,forceMount:n,children:r,container:i}=e,o=Yl(eP,t);return I.jsx(NUe,{scope:t,forceMount:n,children:I.jsx(Gr,{present:n||o.open,children:I.jsx(Lh,{asChild:!0,container:i,children:r})})})};iG.displayName=eP;var Ch="PopoverContent",oG=y.forwardRef((e,t)=>{const n=LUe(Ch,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,o=Yl(Ch,e.__scopePopover);return I.jsx(Gr,{present:r||o.open,children:o.modal?I.jsx(FUe,{...i,ref:t}):I.jsx(jUe,{...i,ref:t})})});oG.displayName=Ch;var FUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(null),i=Gt(t,r),o=y.useRef(!1);return y.useEffect(()=>{const a=r.current;if(a)return Cm(a)},[]),I.jsx(Sm,{as:Al,allowPinchZoom:!0,children:I.jsx(aG,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ye(e.onCloseAutoFocus,a=>{a.preventDefault(),o.current||n.triggerRef.current?.focus()}),onPointerDownOutside:Ye(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,u=s.button===0&&s.ctrlKey===!0,l=s.button===2||u;o.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:Ye(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),jUe=y.forwardRef((e,t)=>{const n=Yl(Ch,e.__scopePopover),r=y.useRef(!1),i=y.useRef(!1);return I.jsx(aG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;n.triggerRef.current?.contains(a)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),aG=y.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,disableOutsidePointerEvents:a,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onInteractOutside:c,...f}=e,h=Yl(Ch,n),p=Km(n);return nw(),I.jsx(_m,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:I.jsx(Nh,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:c,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:I.jsx(sw,{"data-state":uG(h.open),role:"dialog",id:h.contentId,...p,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),sG="PopoverClose",BUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Yl(sG,n);return I.jsx(pt.button,{type:"button",...r,ref:t,onClick:Ye(e.onClick,()=>i.onOpenChange(!1))})});BUe.displayName=sG;var zUe="PopoverArrow",UUe=y.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,i=Km(n);return I.jsx(uw,{...i,...r,ref:t})});UUe.displayName=zUe;function uG(e){return e?"open":"closed"}var rQe=eG,iQe=rG,oQe=iG,aQe=oG,gx={exports:{}};/** * @license * Lodash * Copyright OpenJS Foundation and other contributors * Released under MIT license * Based on Underscore.js 1.8.3 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */gx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,N=512,z=30,H="...",V=800,ne=16,Z=1,G=2,q=3,W=1/0,j=9007199254740991,K=17976931348623157e292,Y=NaN,oe=4294967295,Q=oe-1,J=oe>>>1,ue=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",N],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",me="[object AsyncFunction]",Ze="[object Boolean]",Ae="[object Date]",Le="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",ie="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Ht="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",yo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),qn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,bo=/<%=([\s\S]+?)%>/g,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sf=/^\w*$/,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),T=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,L=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,re=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Qe=wt+Je+ut,Fe="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",ve="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ge="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+ve+ge+De,vt="['’]",Lt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Yt="["+Fe+"]",sn="["+Ke+"]",un="[^"+xt+ze+te+Fe+Ke+Pe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="["+Pe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+kn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",T5="["+Te+"]?",pZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+T5+Nr+")*",gZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mZ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",M5=T5+Nr+pZ,vZ="(?:"+[Yt,Gn,mn].join("|")+")"+M5,yZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",bZ=RegExp(vt,"g"),xZ=RegExp($t,"g"),_2=RegExp(jt+"(?="+jt+")|"+yZ+M5,"g"),wZ=RegExp([kn+"?"+sn+"+"+$r+"(?="+[Ft,kn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,kn+Zn,"$"].join("|")+")",kn+"?"+Zn+"+"+$r,kn+"+"+Ir,mZ,gZ,te,vZ].join("|"),"g"),_Z=RegExp("["+Yn+xt+Qe+Te+"]"),SZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,CZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],EZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[yo]=!0,Xn[de]=Xn[Se]=Xn[Ht]=Xn[Ze]=Xn[wn]=Xn[Ae]=Xn[$e]=Xn[be]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ye]=Xn[Ue]=Xn[je]=Xn[mt]=!1;var Un={};Un[de]=Un[Se]=Un[Ht]=Un[wn]=Un[Ze]=Un[Ae]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ye]=Un[Ue]=Un[je]=Un[ke]=Un[bi]=Un[Rr]=Un[Xi]=Un[yo]=!0,Un[$e]=Un[be]=Un[mt]=!1;var OZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},AZ={"&":"&","<":"<",">":">",'"':""","'":"'"},PZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},kZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TZ=parseFloat,MZ=parseInt,R5=typeof la=="object"&&la&&la.Object===Object&&la,RZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=R5||RZ||Function("return this")(),S2=t&&!t.nodeType&&t,Xl=S2&&!0&&e&&!e.nodeType&&e,D5=Xl&&Xl.exports===S2,C2=D5&&R5.process,qo=function(){try{var ce=Xl&&Xl.require&&Xl.require("util").types;return ce||C2&&C2.binding&&C2.binding("util")}catch{}}(),$5=qo&&qo.isArrayBuffer,I5=qo&&qo.isDate,N5=qo&&qo.isMap,L5=qo&&qo.isRegExp,F5=qo&&qo.isSet,j5=qo&&qo.isTypedArray;function xo(ce,Oe,we){switch(we.length){case 0:return ce.call(Oe);case 1:return ce.call(Oe,we[0]);case 2:return ce.call(Oe,we[0],we[1]);case 3:return ce.call(Oe,we[0],we[1],we[2])}return ce.apply(Oe,we)}function DZ(ce,Oe,we,ot){for(var Bt=-1,Sn=ce==null?0:ce.length;++Bt-1}function E2(ce,Oe,we){for(var ot=-1,Bt=ce==null?0:ce.length;++ot-1;);return we}function q5(ce,Oe){for(var we=ce.length;we--&&Cf(Oe,ce[we],0)>-1;);return we}function UZ(ce,Oe){for(var we=ce.length,ot=0;we--;)ce[we]===Oe&&++ot;return ot}var VZ=k2(OZ),WZ=k2(AZ);function HZ(ce){return"\\"+kZ[ce]}function KZ(ce,Oe){return ce==null?n:ce[Oe]}function Ef(ce){return _Z.test(ce)}function qZ(ce){return SZ.test(ce)}function GZ(ce){for(var Oe,we=[];!(Oe=ce.next()).done;)we.push(Oe.value);return we}function D2(ce){var Oe=-1,we=Array(ce.size);return ce.forEach(function(ot,Bt){we[++Oe]=[Bt,ot]}),we}function G5(ce,Oe){return function(we){return ce(Oe(we))}}function Nu(ce,Oe){for(var we=-1,ot=ce.length,Bt=0,Sn=[];++we-1}function IX(d,g){var _=this.__data__,P=dv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=MX,Ls.prototype.delete=RX,Ls.prototype.get=DX,Ls.prototype.has=$X,Ls.prototype.set=IX;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function NX(){this.size=0,this.__data__={hash:new Jl,map:new(sp||Ls),string:new Jl}}function LX(d){var g=Cv(this,d).delete(d);return this.size-=g?1:0,g}function FX(d){return Cv(this,d).get(d)}function jX(d){return Cv(this,d).has(d)}function BX(d,g){var _=Cv(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=NX,Fs.prototype.delete=LX,Fs.prototype.get=FX,Fs.prototype.has=jX,Fs.prototype.set=BX;function ec(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function zX(d){return this.__data__.set(d,u),this}function UX(d){return this.__data__.has(d)}ec.prototype.add=ec.prototype.push=zX,ec.prototype.has=UX;function Ea(d){var g=this.__data__=new Ls(d);this.size=g.size}function VX(){this.__data__=new Ls,this.size=0}function WX(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function HX(d){return this.__data__.get(d)}function KX(d){return this.__data__.has(d)}function qX(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!sp||P.length=g?d:g)),d}function Xo(d,g,_,P,R,U){var X,se=g&f,fe=g&h,Me=g&p;if(_&&(X=R?_(d,P,R,U):_(d)),X!==n)return X;if(!lr(d))return d;var Re=Vt(d);if(Re){if(X=jQ(d),!se)return Qi(d,X)}else{var Ie=_i(d),et=Ie==be||Ie==yt;if(Uu(d))return T8(d,se);if(Ie==nn||Ie==de||et&&!R){if(X=fe||et?{}:Y8(d),!se)return fe?PQ(d,XX(X,d)):AQ(d,a8(X,d))}else{if(!Un[Ie])return R?d:{};X=BQ(d,Ie,se)}}U||(U=new Ea);var ft=U.get(d);if(ft)return ft;U.set(d,X),Ck(d)?d.forEach(function(Pt){X.add(Xo(Pt,g,_,Pt,d,U))}):_k(d)&&d.forEach(function(Pt,on){X.set(on,Xo(Pt,g,_,on,d,U))});var At=Me?fe?o_:i_:fe?eo:Qr,Qt=Re?n:At(d);return Go(Qt||d,function(Pt,on){Qt&&(on=Pt,Pt=d[on]),fp(X,on,Xo(Pt,g,_,on,d,U))}),X}function QX(d){var g=Qr(d);return function(_){return s8(_,d,g)}}function s8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var R=_[P],U=g[R],X=d[R];if(X===n&&!(R in d)||!U(X))return!1}return!0}function u8(d,g,_){if(typeof d!="function")throw new Yo(a);return yp(function(){d.apply(n,_)},g)}function dp(d,g,_,P){var R=-1,U=Ym,X=!0,se=d.length,fe=[],Me=g.length;if(!se)return fe;_&&(g=rr(g,wo(_))),P?(U=E2,X=!1):g.length>=i&&(U=op,X=!1,g=new ec(g));e:for(;++RR?0:R+_),P=P===n||P>R?R:Zt(P),P<0&&(P+=R),P=_>P?0:Ok(P);_0&&_(se)?g>1?li(se,g-1,_,P,R):Iu(R,se):P||(R[R.length]=se)}return R}var B2=N8(),f8=N8(!0);function os(d,g){return d&&B2(d,g,Qr)}function z2(d,g){return d&&f8(d,g,Qr)}function pv(d,g){return $u(g,function(_){return Vs(d[_])})}function nc(d,g){g=Bu(g,d);for(var _=0,P=g.length;d!=null&&_g}function tQ(d,g){return d!=null&&Tn.call(d,g)}function nQ(d,g){return d!=null&&g in jn(d)}function rQ(d,g,_){return d>=wi(g,_)&&d=120&&Re.length>=120)?new ec(X&&Re):n}Re=d[0];var Ie=-1,et=se[0];e:for(;++Ie-1;)se!==d&&ov.call(se,fe,1),ov.call(d,fe,1);return d}function _8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var R=g[_];if(_==P||R!==U){var U=R;Us(R)?ov.call(d,R,1):X2(d,R)}}return d}function G2(d,g){return d+uv(n8()*(g-d+1))}function mQ(d,g,_,P){for(var R=-1,U=Fr(sv((g-d)/(_||1)),0),X=we(U);U--;)X[P?U:++R]=d,d+=_;return X}function Y2(d,g){var _="";if(!d||g<1||g>j)return _;do g%2&&(_+=d),g=uv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return d_(Q8(d,g,to),d+"")}function vQ(d){return o8(Nf(d))}function yQ(d,g){var _=Nf(d);return Ev(_,tc(g,0,_.length))}function gp(d,g,_,P){if(!lr(d))return d;g=Bu(g,d);for(var R=-1,U=g.length,X=U-1,se=d;se!=null&&++RR?0:R+g),_=_>R?R:_,_<0&&(_+=R),R=g>_?0:_-g>>>0,g>>>=0;for(var U=we(R);++P>>1,X=d[U];X!==null&&!So(X)&&(_?X<=g:X=i){var Me=g?null:RQ(d);if(Me)return Xm(Me);X=!1,R=op,fe=new ec}else fe=g?[]:se;e:for(;++P=P?d:Qo(d,g,_)}var k8=lX||function(d){return ui.clearTimeout(d)};function T8(d,g){if(g)return d.slice();var _=d.length,P=X5?X5(_):new d.constructor(_);return d.copy(P),P}function t_(d){var g=new d.constructor(d.byteLength);return new rv(g).set(new rv(d)),g}function SQ(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function CQ(d){var g=new d.constructor(d.source,Be.exec(d));return g.lastIndex=d.lastIndex,g}function EQ(d){return cp?jn(cp.call(d)):{}}function M8(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function R8(d,g){if(d!==g){var _=d!==n,P=d===null,R=d===d,U=So(d),X=g!==n,se=g===null,fe=g===g,Me=So(g);if(!se&&!Me&&!U&&d>g||U&&X&&fe&&!se&&!Me||P&&X&&fe||!_&&fe||!R)return 1;if(!P&&!U&&!Me&&d=se)return fe;var Me=_[P];return fe*(Me=="desc"?-1:1)}}return d.index-g.index}function D8(d,g,_,P){for(var R=-1,U=d.length,X=_.length,se=-1,fe=g.length,Me=Fr(U-X,0),Re=we(fe+Me),Ie=!P;++se1?_[R-1]:n,X=R>2?_[2]:n;for(U=d.length>3&&typeof U=="function"?(R--,U):n,X&&Li(_[0],_[1],X)&&(U=R<3?n:U,R=1),g=jn(g);++P-1?R[U?g[X]:X]:n}}function j8(d){return zs(function(g){var _=g.length,P=_,R=Zo.prototype.thru;for(d&&g.reverse();P--;){var U=g[P];if(typeof U!="function")throw new Yo(a);if(R&&!X&&Sv(U)=="wrapper")var X=new Zo([],!0)}for(P=X?P:_;++P<_;){U=g[P];var se=Sv(U),fe=se=="wrapper"?a_(U):n;fe&&c_(fe[0])&&fe[1]==(k|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[Sv(fe[0])].apply(X,fe[3]):X=U.length==1&&c_(U)?X[se]():X.thru(U)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Vt(Re))return X.plant(Re).value();for(var Ie=0,et=_?g[Ie].apply(this,Me):Re;++Ie<_;)et=g[Ie].call(this,et);return et}})}function bv(d,g,_,P,R,U,X,se,fe,Me){var Re=g&k,Ie=g&b,et=g&w,ft=g&(S|O),At=g&N,Qt=et?n:mp(d);function Pt(){for(var on=arguments.length,pn=we(on),Co=on;Co--;)pn[Co]=arguments[Co];if(ft)var Fi=$f(Pt),Eo=UZ(pn,Fi);if(P&&(pn=D8(pn,P,R,ft)),U&&(pn=$8(pn,U,X,ft)),on-=Eo,ft&&on1&&pn.reverse(),Re&&fese))return!1;var Me=U.get(d),Re=U.get(g);if(Me&&Re)return Me==g&&Re==d;var Ie=-1,et=!0,ft=_&v?new ec:n;for(U.set(d,g),U.set(g,d);++Ie1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace($,`{ + */gx.exports;(function(e,t){(function(){var n,r="4.17.21",i=200,o="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",s="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",l=500,c="__lodash_placeholder__",f=1,h=2,p=4,m=1,v=2,b=1,w=2,x=4,S=8,O=16,E=32,C=64,k=128,M=256,N=512,z=30,H="...",V=800,ne=16,Z=1,G=2,q=3,W=1/0,j=9007199254740991,K=17976931348623157e292,Y=NaN,oe=4294967295,Q=oe-1,J=oe>>>1,ue=[["ary",k],["bind",b],["bindKey",w],["curry",S],["curryRight",O],["flip",N],["partial",E],["partialRight",C],["rearg",M]],de="[object Arguments]",Se="[object Array]",me="[object AsyncFunction]",Ze="[object Boolean]",Ae="[object Date]",Le="[object DOMException]",$e="[object Error]",be="[object Function]",yt="[object GeneratorFunction]",lt="[object Map]",Nt="[object Number]",yn="[object Null]",nn="[object Object]",ie="[object Promise]",pe="[object Proxy]",ye="[object RegExp]",Ue="[object Set]",je="[object String]",ke="[object Symbol]",nt="[object Undefined]",mt="[object WeakMap]",xn="[object WeakSet]",Ht="[object ArrayBuffer]",wn="[object DataView]",Ii="[object Float32Array]",br="[object Float64Array]",yi="[object Int8Array]",sr="[object Int16Array]",si="[object Int32Array]",bi="[object Uint8Array]",Rr="[object Uint8ClampedArray]",Xi="[object Uint16Array]",yo="[object Uint32Array]",xi=/\b__p \+= '';/g,Dr=/\b(__p \+=) '' \+/g,Sa=/(__e\(.*?\)|\b__t\)) \+\n'';/g,_t=/&(?:amp|lt|gt|quot|#39);/g,hn=/[&<>"']/g,_n=RegExp(_t.source),qn=RegExp(hn.source),ur=/<%-([\s\S]+?)%>/g,Xr=/<%([\s\S]+?)%>/g,bo=/<%=([\s\S]+?)%>/g,Zl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Sf=/^\w*$/,ae=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,le=/[\\^$.*+?()[\]{}|]/g,xe=RegExp(le.source),T=/^\s+/,D=/\s/,$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,A=/\{\n\/\* \[wrapped with (.+)\] \*/,L=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,re=/[()=,{}\[\]\/\s]/,he=/\\(\\)?/g,Ce=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Be=/\w*$/,He=/^[-+]0x[0-9a-f]+$/i,ct=/^0b[01]+$/i,Ne=/^\[object .+?Constructor\]$/,rt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,Ot=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,gt=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,xt="\\ud800-\\udfff",wt="\\u0300-\\u036f",Je="\\ufe20-\\ufe2f",ut="\\u20d0-\\u20ff",Qe=wt+Je+ut,Fe="\\u2700-\\u27bf",Ke="a-z\\xdf-\\xf6\\xf8-\\xff",Ge="\\xac\\xb1\\xd7\\xf7",ve="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ge="\\u2000-\\u206f",De=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Pe="A-Z\\xc0-\\xd6\\xd8-\\xde",Te="\\ufe0e\\ufe0f",ze=Ge+ve+ge+De,vt="['’]",Lt="["+xt+"]",Ft="["+ze+"]",$t="["+Qe+"]",te="\\d+",Yt="["+Fe+"]",sn="["+Ke+"]",un="[^"+xt+ze+te+Fe+Ke+Pe+"]",jt="\\ud83c[\\udffb-\\udfff]",ln="(?:"+$t+"|"+jt+")",rn="[^"+xt+"]",Gn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",kn="["+Pe+"]",Yn="\\u200d",Zn="(?:"+sn+"|"+un+")",xr="(?:"+kn+"|"+un+")",$r="(?:"+vt+"(?:d|ll|m|re|s|t|ve))?",Ir="(?:"+vt+"(?:D|LL|M|RE|S|T|VE))?",Nr=ln+"?",MP="["+Te+"]?",pZ="(?:"+Yn+"(?:"+[rn,Gn,mn].join("|")+")"+MP+Nr+")*",gZ="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mZ="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",RP=MP+Nr+pZ,vZ="(?:"+[Yt,Gn,mn].join("|")+")"+RP,yZ="(?:"+[rn+$t+"?",$t,Gn,mn,Lt].join("|")+")",bZ=RegExp(vt,"g"),xZ=RegExp($t,"g"),_2=RegExp(jt+"(?="+jt+")|"+yZ+RP,"g"),wZ=RegExp([kn+"?"+sn+"+"+$r+"(?="+[Ft,kn,"$"].join("|")+")",xr+"+"+Ir+"(?="+[Ft,kn+Zn,"$"].join("|")+")",kn+"?"+Zn+"+"+$r,kn+"+"+Ir,mZ,gZ,te,vZ].join("|"),"g"),_Z=RegExp("["+Yn+xt+Qe+Te+"]"),SZ=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,CZ=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],EZ=-1,Xn={};Xn[Ii]=Xn[br]=Xn[yi]=Xn[sr]=Xn[si]=Xn[bi]=Xn[Rr]=Xn[Xi]=Xn[yo]=!0,Xn[de]=Xn[Se]=Xn[Ht]=Xn[Ze]=Xn[wn]=Xn[Ae]=Xn[$e]=Xn[be]=Xn[lt]=Xn[Nt]=Xn[nn]=Xn[ye]=Xn[Ue]=Xn[je]=Xn[mt]=!1;var Un={};Un[de]=Un[Se]=Un[Ht]=Un[wn]=Un[Ze]=Un[Ae]=Un[Ii]=Un[br]=Un[yi]=Un[sr]=Un[si]=Un[lt]=Un[Nt]=Un[nn]=Un[ye]=Un[Ue]=Un[je]=Un[ke]=Un[bi]=Un[Rr]=Un[Xi]=Un[yo]=!0,Un[$e]=Un[be]=Un[mt]=!1;var OZ={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},AZ={"&":"&","<":"<",">":">",'"':""","'":"'"},PZ={"&":"&","<":"<",">":">",""":'"',"'":"'"},kZ={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},TZ=parseFloat,MZ=parseInt,DP=typeof la=="object"&&la&&la.Object===Object&&la,RZ=typeof self=="object"&&self&&self.Object===Object&&self,ui=DP||RZ||Function("return this")(),S2=t&&!t.nodeType&&t,Xl=S2&&!0&&e&&!e.nodeType&&e,$P=Xl&&Xl.exports===S2,C2=$P&&DP.process,qo=function(){try{var ce=Xl&&Xl.require&&Xl.require("util").types;return ce||C2&&C2.binding&&C2.binding("util")}catch{}}(),IP=qo&&qo.isArrayBuffer,NP=qo&&qo.isDate,LP=qo&&qo.isMap,FP=qo&&qo.isRegExp,jP=qo&&qo.isSet,BP=qo&&qo.isTypedArray;function xo(ce,Oe,we){switch(we.length){case 0:return ce.call(Oe);case 1:return ce.call(Oe,we[0]);case 2:return ce.call(Oe,we[0],we[1]);case 3:return ce.call(Oe,we[0],we[1],we[2])}return ce.apply(Oe,we)}function DZ(ce,Oe,we,ot){for(var Bt=-1,Sn=ce==null?0:ce.length;++Bt-1}function E2(ce,Oe,we){for(var ot=-1,Bt=ce==null?0:ce.length;++ot-1;);return we}function GP(ce,Oe){for(var we=ce.length;we--&&Cf(Oe,ce[we],0)>-1;);return we}function UZ(ce,Oe){for(var we=ce.length,ot=0;we--;)ce[we]===Oe&&++ot;return ot}var VZ=k2(OZ),WZ=k2(AZ);function HZ(ce){return"\\"+kZ[ce]}function KZ(ce,Oe){return ce==null?n:ce[Oe]}function Ef(ce){return _Z.test(ce)}function qZ(ce){return SZ.test(ce)}function GZ(ce){for(var Oe,we=[];!(Oe=ce.next()).done;)we.push(Oe.value);return we}function D2(ce){var Oe=-1,we=Array(ce.size);return ce.forEach(function(ot,Bt){we[++Oe]=[Bt,ot]}),we}function YP(ce,Oe){return function(we){return ce(Oe(we))}}function Nu(ce,Oe){for(var we=-1,ot=ce.length,Bt=0,Sn=[];++we-1}function IX(d,g){var _=this.__data__,P=hv(_,d);return P<0?(++this.size,_.push([d,g])):_[P][1]=g,this}Ls.prototype.clear=MX,Ls.prototype.delete=RX,Ls.prototype.get=DX,Ls.prototype.has=$X,Ls.prototype.set=IX;function Fs(d){var g=-1,_=d==null?0:d.length;for(this.clear();++g<_;){var P=d[g];this.set(P[0],P[1])}}function NX(){this.size=0,this.__data__={hash:new Jl,map:new(sp||Ls),string:new Jl}}function LX(d){var g=Ev(this,d).delete(d);return this.size-=g?1:0,g}function FX(d){return Ev(this,d).get(d)}function jX(d){return Ev(this,d).has(d)}function BX(d,g){var _=Ev(this,d),P=_.size;return _.set(d,g),this.size+=_.size==P?0:1,this}Fs.prototype.clear=NX,Fs.prototype.delete=LX,Fs.prototype.get=FX,Fs.prototype.has=jX,Fs.prototype.set=BX;function ec(d){var g=-1,_=d==null?0:d.length;for(this.__data__=new Fs;++g<_;)this.add(d[g])}function zX(d){return this.__data__.set(d,u),this}function UX(d){return this.__data__.has(d)}ec.prototype.add=ec.prototype.push=zX,ec.prototype.has=UX;function Ea(d){var g=this.__data__=new Ls(d);this.size=g.size}function VX(){this.__data__=new Ls,this.size=0}function WX(d){var g=this.__data__,_=g.delete(d);return this.size=g.size,_}function HX(d){return this.__data__.get(d)}function KX(d){return this.__data__.has(d)}function qX(d,g){var _=this.__data__;if(_ instanceof Ls){var P=_.__data__;if(!sp||P.length=g?d:g)),d}function Xo(d,g,_,P,R,U){var X,se=g&f,fe=g&h,Me=g&p;if(_&&(X=R?_(d,P,R,U):_(d)),X!==n)return X;if(!lr(d))return d;var Re=Vt(d);if(Re){if(X=jQ(d),!se)return Qi(d,X)}else{var Ie=_i(d),et=Ie==be||Ie==yt;if(Uu(d))return M8(d,se);if(Ie==nn||Ie==de||et&&!R){if(X=fe||et?{}:Z8(d),!se)return fe?PQ(d,XX(X,d)):AQ(d,s8(X,d))}else{if(!Un[Ie])return R?d:{};X=BQ(d,Ie,se)}}U||(U=new Ea);var ft=U.get(d);if(ft)return ft;U.set(d,X),Ek(d)?d.forEach(function(Pt){X.add(Xo(Pt,g,_,Pt,d,U))}):Sk(d)&&d.forEach(function(Pt,on){X.set(on,Xo(Pt,g,_,on,d,U))});var At=Me?fe?o_:i_:fe?eo:Qr,Qt=Re?n:At(d);return Go(Qt||d,function(Pt,on){Qt&&(on=Pt,Pt=d[on]),fp(X,on,Xo(Pt,g,_,on,d,U))}),X}function QX(d){var g=Qr(d);return function(_){return u8(_,d,g)}}function u8(d,g,_){var P=_.length;if(d==null)return!P;for(d=jn(d);P--;){var R=_[P],U=g[R],X=d[R];if(X===n&&!(R in d)||!U(X))return!1}return!0}function l8(d,g,_){if(typeof d!="function")throw new Yo(a);return yp(function(){d.apply(n,_)},g)}function dp(d,g,_,P){var R=-1,U=Zm,X=!0,se=d.length,fe=[],Me=g.length;if(!se)return fe;_&&(g=rr(g,wo(_))),P?(U=E2,X=!1):g.length>=i&&(U=op,X=!1,g=new ec(g));e:for(;++RR?0:R+_),P=P===n||P>R?R:Zt(P),P<0&&(P+=R),P=_>P?0:Ak(P);_0&&_(se)?g>1?li(se,g-1,_,P,R):Iu(R,se):P||(R[R.length]=se)}return R}var B2=L8(),d8=L8(!0);function os(d,g){return d&&B2(d,g,Qr)}function z2(d,g){return d&&d8(d,g,Qr)}function gv(d,g){return $u(g,function(_){return Vs(d[_])})}function nc(d,g){g=Bu(g,d);for(var _=0,P=g.length;d!=null&&_g}function tQ(d,g){return d!=null&&Tn.call(d,g)}function nQ(d,g){return d!=null&&g in jn(d)}function rQ(d,g,_){return d>=wi(g,_)&&d=120&&Re.length>=120)?new ec(X&&Re):n}Re=d[0];var Ie=-1,et=se[0];e:for(;++Ie-1;)se!==d&&av.call(se,fe,1),av.call(d,fe,1);return d}function S8(d,g){for(var _=d?g.length:0,P=_-1;_--;){var R=g[_];if(_==P||R!==U){var U=R;Us(R)?av.call(d,R,1):X2(d,R)}}return d}function G2(d,g){return d+lv(r8()*(g-d+1))}function mQ(d,g,_,P){for(var R=-1,U=Fr(uv((g-d)/(_||1)),0),X=we(U);U--;)X[P?U:++R]=d,d+=_;return X}function Y2(d,g){var _="";if(!d||g<1||g>j)return _;do g%2&&(_+=d),g=lv(g/2),g&&(d+=d);while(g);return _}function tn(d,g){return d_(J8(d,g,to),d+"")}function vQ(d){return a8(Nf(d))}function yQ(d,g){var _=Nf(d);return Ov(_,tc(g,0,_.length))}function gp(d,g,_,P){if(!lr(d))return d;g=Bu(g,d);for(var R=-1,U=g.length,X=U-1,se=d;se!=null&&++RR?0:R+g),_=_>R?R:_,_<0&&(_+=R),R=g>_?0:_-g>>>0,g>>>=0;for(var U=we(R);++P>>1,X=d[U];X!==null&&!So(X)&&(_?X<=g:X=i){var Me=g?null:RQ(d);if(Me)return Qm(Me);X=!1,R=op,fe=new ec}else fe=g?[]:se;e:for(;++P=P?d:Qo(d,g,_)}var T8=lX||function(d){return ui.clearTimeout(d)};function M8(d,g){if(g)return d.slice();var _=d.length,P=QP?QP(_):new d.constructor(_);return d.copy(P),P}function t_(d){var g=new d.constructor(d.byteLength);return new iv(g).set(new iv(d)),g}function SQ(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.byteLength)}function CQ(d){var g=new d.constructor(d.source,Be.exec(d));return g.lastIndex=d.lastIndex,g}function EQ(d){return cp?jn(cp.call(d)):{}}function R8(d,g){var _=g?t_(d.buffer):d.buffer;return new d.constructor(_,d.byteOffset,d.length)}function D8(d,g){if(d!==g){var _=d!==n,P=d===null,R=d===d,U=So(d),X=g!==n,se=g===null,fe=g===g,Me=So(g);if(!se&&!Me&&!U&&d>g||U&&X&&fe&&!se&&!Me||P&&X&&fe||!_&&fe||!R)return 1;if(!P&&!U&&!Me&&d=se)return fe;var Me=_[P];return fe*(Me=="desc"?-1:1)}}return d.index-g.index}function $8(d,g,_,P){for(var R=-1,U=d.length,X=_.length,se=-1,fe=g.length,Me=Fr(U-X,0),Re=we(fe+Me),Ie=!P;++se1?_[R-1]:n,X=R>2?_[2]:n;for(U=d.length>3&&typeof U=="function"?(R--,U):n,X&&Li(_[0],_[1],X)&&(U=R<3?n:U,R=1),g=jn(g);++P-1?R[U?g[X]:X]:n}}function B8(d){return zs(function(g){var _=g.length,P=_,R=Zo.prototype.thru;for(d&&g.reverse();P--;){var U=g[P];if(typeof U!="function")throw new Yo(a);if(R&&!X&&Cv(U)=="wrapper")var X=new Zo([],!0)}for(P=X?P:_;++P<_;){U=g[P];var se=Cv(U),fe=se=="wrapper"?a_(U):n;fe&&c_(fe[0])&&fe[1]==(k|S|E|M)&&!fe[4].length&&fe[9]==1?X=X[Cv(fe[0])].apply(X,fe[3]):X=U.length==1&&c_(U)?X[se]():X.thru(U)}return function(){var Me=arguments,Re=Me[0];if(X&&Me.length==1&&Vt(Re))return X.plant(Re).value();for(var Ie=0,et=_?g[Ie].apply(this,Me):Re;++Ie<_;)et=g[Ie].call(this,et);return et}})}function xv(d,g,_,P,R,U,X,se,fe,Me){var Re=g&k,Ie=g&b,et=g&w,ft=g&(S|O),At=g&N,Qt=et?n:mp(d);function Pt(){for(var on=arguments.length,pn=we(on),Co=on;Co--;)pn[Co]=arguments[Co];if(ft)var Fi=$f(Pt),Eo=UZ(pn,Fi);if(P&&(pn=$8(pn,P,R,ft)),U&&(pn=I8(pn,U,X,ft)),on-=Eo,ft&&on1&&pn.reverse(),Re&&fese))return!1;var Me=U.get(d),Re=U.get(g);if(Me&&Re)return Me==g&&Re==d;var Ie=-1,et=!0,ft=_&v?new ec:n;for(U.set(d,g),U.set(g,d);++Ie1?"& ":"")+g[P],g=g.join(_>2?", ":" "),d.replace($,`{ /* [wrapped with `+g+`] */ -`)}function UQ(d){return Vt(d)||oc(d)||!!(e8&&d&&d[e8])}function Us(d,g){var _=typeof d;return g=g??j,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=V)return arguments[0]}else g=0;return d.apply(n,arguments)}}function Ev(d,g){var _=-1,P=d.length,R=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,ck(d,_)});function fk(d){var g=B(d);return g.__chain__=!0,g}function JJ(d,g){return g(d),d}function Ov(d,g){return g(d)}var eee=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,R=function(U){return j2(U,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(R):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Ov,args:[R],thisArg:n}),new Zo(P,this.__chain__).thru(function(U){return g&&!U.length&&U.push(n),U}))});function tee(){return fk(this)}function nee(){return new Zo(this.value(),this.__chain__)}function ree(){this.__values__===n&&(this.__values__=Ek(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function iee(){return this}function oee(d){for(var g,_=this;_ instanceof fv;){var P=ik(_);P.__index__=0,P.__values__=n,g?R.__wrapped__=P:g=P;var R=P;_=_.__wrapped__}return R.__wrapped__=d,g}function aee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Ov,args:[h_],thisArg:n}),new Zo(g,this.__chain__)}return this.thru(h_)}function see(){return A8(this.__wrapped__,this.__actions__)}var uee=yv(function(d,g,_){Tn.call(d,_)?++d[_]:js(d,_,1)});function lee(d,g,_){var P=Vt(d)?B5:JX;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function cee(d,g){var _=Vt(d)?$u:c8;return _(d,Et(g,3))}var fee=F8(ok),dee=F8(ak);function hee(d,g){return li(Av(d,g),1)}function pee(d,g){return li(Av(d,g),W)}function gee(d,g,_){return _=_===n?1:Zt(_),li(Av(d,g),_)}function dk(d,g){var _=Vt(d)?Go:Fu;return _(d,Et(g,3))}function hk(d,g){var _=Vt(d)?$Z:l8;return _(d,Et(g,3))}var mee=yv(function(d,g,_){Tn.call(d,_)?d[_].push(g):js(d,_,[g])});function vee(d,g,_,P){d=Ji(d)?d:Nf(d),_=_&&!P?Zt(_):0;var R=d.length;return _<0&&(_=Fr(R+_,0)),Rv(d)?_<=R&&d.indexOf(g,_)>-1:!!R&&Cf(d,g,_)>-1}var yee=tn(function(d,g,_){var P=-1,R=typeof g=="function",U=Ji(d)?we(d.length):[];return Fu(d,function(X){U[++P]=R?xo(g,X,_):hp(X,g,_)}),U}),bee=yv(function(d,g,_){js(d,_,g)});function Av(d,g){var _=Vt(d)?rr:m8;return _(d,Et(g,3))}function xee(d,g,_,P){return d==null?[]:(Vt(g)||(g=g==null?[]:[g]),_=P?n:_,Vt(_)||(_=_==null?[]:[_]),x8(d,g,_))}var wee=yv(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function _ee(d,g,_){var P=Vt(d)?O2:W5,R=arguments.length<3;return P(d,Et(g,4),_,R,Fu)}function See(d,g,_){var P=Vt(d)?IZ:W5,R=arguments.length<3;return P(d,Et(g,4),_,R,l8)}function Cee(d,g){var _=Vt(d)?$u:c8;return _(d,Tv(Et(g,3)))}function Eee(d){var g=Vt(d)?o8:vQ;return g(d)}function Oee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Zt(g);var P=Vt(d)?GX:yQ;return P(d,g)}function Aee(d){var g=Vt(d)?YX:xQ;return g(d)}function Pee(d){if(d==null)return 0;if(Ji(d))return Rv(d)?Of(d):d.length;var g=_i(d);return g==lt||g==Ue?d.size:H2(d).length}function kee(d,g,_){var P=Vt(d)?A2:wQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var Tee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),x8(d,li(g,1),[])}),Pv=cX||function(){return ui.Date.now()};function Mee(d,g){if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){if(--d<1)return g.apply(this,arguments)}}function pk(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function gk(d,g){var _;if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var g_=tn(function(d,g,_){var P=b;if(_.length){var R=Nu(_,$f(g_));P|=E}return Bs(d,P,g,_,R)}),mk=tn(function(d,g,_){var P=b|w;if(_.length){var R=Nu(_,$f(mk));P|=E}return Bs(g,P,d,_,R)});function vk(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=vk.placeholder,P}function yk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=yk.placeholder,P}function bk(d,g,_){var P,R,U,X,se,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof d!="function")throw new Yo(a);g=ea(g)||0,lr(_)&&(Re=!!_.leading,Ie="maxWait"in _,U=Ie?Fr(ea(_.maxWait)||0,g):U,et="trailing"in _?!!_.trailing:et);function ft(_r){var Aa=P,Hs=R;return P=R=n,Me=_r,X=d.apply(Hs,Aa),X}function At(_r){return Me=_r,se=yp(on,g),Re?ft(_r):X}function Qt(_r){var Aa=_r-fe,Hs=_r-Me,Fk=g-Aa;return Ie?wi(Fk,U-Hs):Fk}function Pt(_r){var Aa=_r-fe,Hs=_r-Me;return fe===n||Aa>=g||Aa<0||Ie&&Hs>=U}function on(){var _r=Pv();if(Pt(_r))return pn(_r);se=yp(on,Qt(_r))}function pn(_r){return se=n,et&&P?ft(_r):(P=R=n,X)}function Co(){se!==n&&k8(se),Me=0,P=fe=R=se=n}function Fi(){return se===n?X:pn(Pv())}function Eo(){var _r=Pv(),Aa=Pt(_r);if(P=arguments,R=this,fe=_r,Aa){if(se===n)return At(fe);if(Ie)return k8(se),se=yp(on,g),ft(fe)}return se===n&&(se=yp(on,g)),X}return Eo.cancel=Co,Eo.flush=Fi,Eo}var Ree=tn(function(d,g){return u8(d,1,g)}),Dee=tn(function(d,g,_){return u8(d,ea(g)||0,_)});function $ee(d){return Bs(d,N)}function kv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Yo(a);var _=function(){var P=arguments,R=g?g.apply(this,P):P[0],U=_.cache;if(U.has(R))return U.get(R);var X=d.apply(this,P);return _.cache=U.set(R,X)||U,X};return _.cache=new(kv.Cache||Fs),_}kv.Cache=Fs;function Tv(d){if(typeof d!="function")throw new Yo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function Iee(d){return gk(2,d)}var Nee=_Q(function(d,g){g=g.length==1&&Vt(g[0])?rr(g[0],wo(Et())):rr(li(g,1),wo(Et()));var _=g.length;return tn(function(P){for(var R=-1,U=wi(P.length,_);++R=g}),oc=h8(function(){return arguments}())?h8:function(d){return pr(d)&&Tn.call(d,"callee")&&!J5.call(d,"callee")},Vt=we.isArray,Xee=$5?wo($5):oQ;function Ji(d){return d!=null&&Mv(d.length)&&!Vs(d)}function wr(d){return pr(d)&&Ji(d)}function Qee(d){return d===!0||d===!1||pr(d)&&Ni(d)==Ze}var Uu=dX||A_,Jee=I5?wo(I5):aQ;function ete(d){return pr(d)&&d.nodeType===1&&!bp(d)}function tte(d){if(d==null)return!0;if(Ji(d)&&(Vt(d)||typeof d=="string"||typeof d.splice=="function"||Uu(d)||If(d)||oc(d)))return!d.length;var g=_i(d);if(g==lt||g==Ue)return!d.size;if(vp(d))return!H2(d).length;for(var _ in d)if(Tn.call(d,_))return!1;return!0}function nte(d,g){return pp(d,g)}function rte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?pp(d,g,n,_):!!P}function v_(d){if(!pr(d))return!1;var g=Ni(d);return g==$e||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!bp(d)}function ite(d){return typeof d=="number"&&t8(d)}function Vs(d){if(!lr(d))return!1;var g=Ni(d);return g==be||g==yt||g==me||g==pe}function wk(d){return typeof d=="number"&&d==Zt(d)}function Mv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=j}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var _k=N5?wo(N5):uQ;function ote(d,g){return d===g||W2(d,g,s_(g))}function ate(d,g,_){return _=typeof _=="function"?_:n,W2(d,g,s_(g),_)}function ste(d){return Sk(d)&&d!=+d}function ute(d){if(HQ(d))throw new Bt(o);return p8(d)}function lte(d){return d===null}function cte(d){return d==null}function Sk(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function bp(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=iv(d);if(g===null)return!0;var _=Tn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&ev.call(_)==aX}var y_=L5?wo(L5):lQ;function fte(d){return wk(d)&&d>=-j&&d<=j}var Ck=F5?wo(F5):cQ;function Rv(d){return typeof d=="string"||!Vt(d)&&pr(d)&&Ni(d)==je}function So(d){return typeof d=="symbol"||pr(d)&&Ni(d)==ke}var If=j5?wo(j5):fQ;function dte(d){return d===n}function hte(d){return pr(d)&&_i(d)==mt}function pte(d){return pr(d)&&Ni(d)==xn}var gte=_v(K2),mte=_v(function(d,g){return d<=g});function Ek(d){if(!d)return[];if(Ji(d))return Rv(d)?Ca(d):Qi(d);if(ap&&d[ap])return GZ(d[ap]());var g=_i(d),_=g==lt?D2:g==Ue?Xm:Nf;return _(d)}function Ws(d){if(!d)return d===0?d:0;if(d=ea(d),d===W||d===-W){var g=d<0?-1:1;return g*K}return d===d?d:0}function Zt(d){var g=Ws(d),_=g%1;return g===g?_?g-_:g:0}function Ok(d){return d?tc(Zt(d),0,oe):0}function ea(d){if(typeof d=="number")return d;if(So(d))return Y;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=H5(d);var _=ct.test(d);return _||rt.test(d)?MZ(d.slice(2),_?2:8):He.test(d)?Y:+d}function Ak(d){return as(d,eo(d))}function vte(d){return d?tc(Zt(d),-j,j):d===0?d:0}function On(d){return d==null?"":_o(d)}var yte=Rf(function(d,g){if(vp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)Tn.call(g,_)&&fp(d,_,g[_])}),Pk=Rf(function(d,g){as(g,eo(g),d)}),Dv=Rf(function(d,g,_,P){as(g,eo(g),d,P)}),bte=Rf(function(d,g,_,P){as(g,Qr(g),d,P)}),xte=zs(j2);function wte(d,g){var _=Mf(d);return g==null?_:a8(_,g)}var _te=tn(function(d,g){d=jn(d);var _=-1,P=g.length,R=P>2?g[2]:n;for(R&&Li(g[0],g[1],R)&&(P=1);++_1),U}),as(d,o_(d),_),P&&(_=Xo(_,f|h|p,DQ));for(var R=g.length;R--;)X2(_,g[R]);return _});function Bte(d,g){return Tk(d,Tv(Et(g)))}var zte=zs(function(d,g){return d==null?{}:pQ(d,g)});function Tk(d,g){if(d==null)return{};var _=rr(o_(d),function(P){return[P]});return g=Et(g),w8(d,_,function(P,R){return g(P,R[0])})}function Ute(d,g,_){g=Bu(g,d);var P=-1,R=g.length;for(R||(R=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var R=n8();return wi(d+R*(g-d+TZ("1e-"+((R+"").length-1))),g)}return G2(d,g)}var Jte=Df(function(d,g,_){return g=g.toLowerCase(),d+(_?Dk(g):g)});function Dk(d){return w_(On(d).toLowerCase())}function $k(d){return d=On(d),d&&d.replace(Ot,VZ).replace(xZ,"")}function ene(d,g,_){d=On(d),g=_o(g);var P=d.length;_=_===n?P:tc(Zt(_),0,P);var R=_;return _-=g.length,_>=0&&d.slice(_,R)==g}function tne(d){return d=On(d),d&&qn.test(d)?d.replace(hn,WZ):d}function nne(d){return d=On(d),d&&xe.test(d)?d.replace(le,"\\$&"):d}var rne=Df(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),ine=Df(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),one=L8("toLowerCase");function ane(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;if(!g||P>=g)return d;var R=(g-P)/2;return wv(uv(R),_)+d+wv(sv(R),_)}function sne(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;return g&&P>>0,_?(d=On(d),d&&(typeof g=="string"||g!=null&&!y_(g))&&(g=_o(g),!g&&Ef(d))?zu(Ca(d),0,_):d.split(g,_)):[]}var pne=Df(function(d,g,_){return d+(_?" ":"")+w_(g)});function gne(d,g,_){return d=On(d),_=_==null?0:tc(Zt(_),0,d.length),g=_o(g),d.slice(_,_+g.length)==g}function mne(d,g,_){var P=B.templateSettings;_&&Li(d,g,_)&&(g=n),d=On(d),g=Dv({},g,P,W8);var R=Dv({},g.imports,P.imports,W8),U=Qr(R),X=R2(R,U),se,fe,Me=0,Re=g.interpolate||gt,Ie="__p += '",et=$2((g.escape||gt).source+"|"+Re.source+"|"+(Re===bo?Ce:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(Tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EZ+"]")+` +`)}function UQ(d){return Vt(d)||oc(d)||!!(t8&&d&&d[t8])}function Us(d,g){var _=typeof d;return g=g??j,!!g&&(_=="number"||_!="symbol"&&bt.test(d))&&d>-1&&d%1==0&&d0){if(++g>=V)return arguments[0]}else g=0;return d.apply(n,arguments)}}function Ov(d,g){var _=-1,P=d.length,R=P-1;for(g=g===n?P:g;++_1?d[g-1]:n;return _=typeof _=="function"?(d.pop(),_):n,fk(d,_)});function dk(d){var g=B(d);return g.__chain__=!0,g}function JJ(d,g){return g(d),d}function Av(d,g){return g(d)}var eee=zs(function(d){var g=d.length,_=g?d[0]:0,P=this.__wrapped__,R=function(U){return j2(U,d)};return g>1||this.__actions__.length||!(P instanceof cn)||!Us(_)?this.thru(R):(P=P.slice(_,+_+(g?1:0)),P.__actions__.push({func:Av,args:[R],thisArg:n}),new Zo(P,this.__chain__).thru(function(U){return g&&!U.length&&U.push(n),U}))});function tee(){return dk(this)}function nee(){return new Zo(this.value(),this.__chain__)}function ree(){this.__values__===n&&(this.__values__=Ok(this.value()));var d=this.__index__>=this.__values__.length,g=d?n:this.__values__[this.__index__++];return{done:d,value:g}}function iee(){return this}function oee(d){for(var g,_=this;_ instanceof dv;){var P=ok(_);P.__index__=0,P.__values__=n,g?R.__wrapped__=P:g=P;var R=P;_=_.__wrapped__}return R.__wrapped__=d,g}function aee(){var d=this.__wrapped__;if(d instanceof cn){var g=d;return this.__actions__.length&&(g=new cn(this)),g=g.reverse(),g.__actions__.push({func:Av,args:[h_],thisArg:n}),new Zo(g,this.__chain__)}return this.thru(h_)}function see(){return P8(this.__wrapped__,this.__actions__)}var uee=bv(function(d,g,_){Tn.call(d,_)?++d[_]:js(d,_,1)});function lee(d,g,_){var P=Vt(d)?zP:JX;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}function cee(d,g){var _=Vt(d)?$u:f8;return _(d,Et(g,3))}var fee=j8(ak),dee=j8(sk);function hee(d,g){return li(Pv(d,g),1)}function pee(d,g){return li(Pv(d,g),W)}function gee(d,g,_){return _=_===n?1:Zt(_),li(Pv(d,g),_)}function hk(d,g){var _=Vt(d)?Go:Fu;return _(d,Et(g,3))}function pk(d,g){var _=Vt(d)?$Z:c8;return _(d,Et(g,3))}var mee=bv(function(d,g,_){Tn.call(d,_)?d[_].push(g):js(d,_,[g])});function vee(d,g,_,P){d=Ji(d)?d:Nf(d),_=_&&!P?Zt(_):0;var R=d.length;return _<0&&(_=Fr(R+_,0)),Dv(d)?_<=R&&d.indexOf(g,_)>-1:!!R&&Cf(d,g,_)>-1}var yee=tn(function(d,g,_){var P=-1,R=typeof g=="function",U=Ji(d)?we(d.length):[];return Fu(d,function(X){U[++P]=R?xo(g,X,_):hp(X,g,_)}),U}),bee=bv(function(d,g,_){js(d,_,g)});function Pv(d,g){var _=Vt(d)?rr:v8;return _(d,Et(g,3))}function xee(d,g,_,P){return d==null?[]:(Vt(g)||(g=g==null?[]:[g]),_=P?n:_,Vt(_)||(_=_==null?[]:[_]),w8(d,g,_))}var wee=bv(function(d,g,_){d[_?0:1].push(g)},function(){return[[],[]]});function _ee(d,g,_){var P=Vt(d)?O2:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,Fu)}function See(d,g,_){var P=Vt(d)?IZ:HP,R=arguments.length<3;return P(d,Et(g,4),_,R,c8)}function Cee(d,g){var _=Vt(d)?$u:f8;return _(d,Mv(Et(g,3)))}function Eee(d){var g=Vt(d)?a8:vQ;return g(d)}function Oee(d,g,_){(_?Li(d,g,_):g===n)?g=1:g=Zt(g);var P=Vt(d)?GX:yQ;return P(d,g)}function Aee(d){var g=Vt(d)?YX:xQ;return g(d)}function Pee(d){if(d==null)return 0;if(Ji(d))return Dv(d)?Of(d):d.length;var g=_i(d);return g==lt||g==Ue?d.size:H2(d).length}function kee(d,g,_){var P=Vt(d)?A2:wQ;return _&&Li(d,g,_)&&(g=n),P(d,Et(g,3))}var Tee=tn(function(d,g){if(d==null)return[];var _=g.length;return _>1&&Li(d,g[0],g[1])?g=[]:_>2&&Li(g[0],g[1],g[2])&&(g=[g[0]]),w8(d,li(g,1),[])}),kv=cX||function(){return ui.Date.now()};function Mee(d,g){if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){if(--d<1)return g.apply(this,arguments)}}function gk(d,g,_){return g=_?n:g,g=d&&g==null?d.length:g,Bs(d,k,n,n,n,n,g)}function mk(d,g){var _;if(typeof g!="function")throw new Yo(a);return d=Zt(d),function(){return--d>0&&(_=g.apply(this,arguments)),d<=1&&(g=n),_}}var g_=tn(function(d,g,_){var P=b;if(_.length){var R=Nu(_,$f(g_));P|=E}return Bs(d,P,g,_,R)}),vk=tn(function(d,g,_){var P=b|w;if(_.length){var R=Nu(_,$f(vk));P|=E}return Bs(g,P,d,_,R)});function yk(d,g,_){g=_?n:g;var P=Bs(d,S,n,n,n,n,n,g);return P.placeholder=yk.placeholder,P}function bk(d,g,_){g=_?n:g;var P=Bs(d,O,n,n,n,n,n,g);return P.placeholder=bk.placeholder,P}function xk(d,g,_){var P,R,U,X,se,fe,Me=0,Re=!1,Ie=!1,et=!0;if(typeof d!="function")throw new Yo(a);g=ea(g)||0,lr(_)&&(Re=!!_.leading,Ie="maxWait"in _,U=Ie?Fr(ea(_.maxWait)||0,g):U,et="trailing"in _?!!_.trailing:et);function ft(_r){var Aa=P,Hs=R;return P=R=n,Me=_r,X=d.apply(Hs,Aa),X}function At(_r){return Me=_r,se=yp(on,g),Re?ft(_r):X}function Qt(_r){var Aa=_r-fe,Hs=_r-Me,jk=g-Aa;return Ie?wi(jk,U-Hs):jk}function Pt(_r){var Aa=_r-fe,Hs=_r-Me;return fe===n||Aa>=g||Aa<0||Ie&&Hs>=U}function on(){var _r=kv();if(Pt(_r))return pn(_r);se=yp(on,Qt(_r))}function pn(_r){return se=n,et&&P?ft(_r):(P=R=n,X)}function Co(){se!==n&&T8(se),Me=0,P=fe=R=se=n}function Fi(){return se===n?X:pn(kv())}function Eo(){var _r=kv(),Aa=Pt(_r);if(P=arguments,R=this,fe=_r,Aa){if(se===n)return At(fe);if(Ie)return T8(se),se=yp(on,g),ft(fe)}return se===n&&(se=yp(on,g)),X}return Eo.cancel=Co,Eo.flush=Fi,Eo}var Ree=tn(function(d,g){return l8(d,1,g)}),Dee=tn(function(d,g,_){return l8(d,ea(g)||0,_)});function $ee(d){return Bs(d,N)}function Tv(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new Yo(a);var _=function(){var P=arguments,R=g?g.apply(this,P):P[0],U=_.cache;if(U.has(R))return U.get(R);var X=d.apply(this,P);return _.cache=U.set(R,X)||U,X};return _.cache=new(Tv.Cache||Fs),_}Tv.Cache=Fs;function Mv(d){if(typeof d!="function")throw new Yo(a);return function(){var g=arguments;switch(g.length){case 0:return!d.call(this);case 1:return!d.call(this,g[0]);case 2:return!d.call(this,g[0],g[1]);case 3:return!d.call(this,g[0],g[1],g[2])}return!d.apply(this,g)}}function Iee(d){return mk(2,d)}var Nee=_Q(function(d,g){g=g.length==1&&Vt(g[0])?rr(g[0],wo(Et())):rr(li(g,1),wo(Et()));var _=g.length;return tn(function(P){for(var R=-1,U=wi(P.length,_);++R=g}),oc=p8(function(){return arguments}())?p8:function(d){return pr(d)&&Tn.call(d,"callee")&&!e8.call(d,"callee")},Vt=we.isArray,Xee=IP?wo(IP):oQ;function Ji(d){return d!=null&&Rv(d.length)&&!Vs(d)}function wr(d){return pr(d)&&Ji(d)}function Qee(d){return d===!0||d===!1||pr(d)&&Ni(d)==Ze}var Uu=dX||A_,Jee=NP?wo(NP):aQ;function ete(d){return pr(d)&&d.nodeType===1&&!bp(d)}function tte(d){if(d==null)return!0;if(Ji(d)&&(Vt(d)||typeof d=="string"||typeof d.splice=="function"||Uu(d)||If(d)||oc(d)))return!d.length;var g=_i(d);if(g==lt||g==Ue)return!d.size;if(vp(d))return!H2(d).length;for(var _ in d)if(Tn.call(d,_))return!1;return!0}function nte(d,g){return pp(d,g)}function rte(d,g,_){_=typeof _=="function"?_:n;var P=_?_(d,g):n;return P===n?pp(d,g,n,_):!!P}function v_(d){if(!pr(d))return!1;var g=Ni(d);return g==$e||g==Le||typeof d.message=="string"&&typeof d.name=="string"&&!bp(d)}function ite(d){return typeof d=="number"&&n8(d)}function Vs(d){if(!lr(d))return!1;var g=Ni(d);return g==be||g==yt||g==me||g==pe}function _k(d){return typeof d=="number"&&d==Zt(d)}function Rv(d){return typeof d=="number"&&d>-1&&d%1==0&&d<=j}function lr(d){var g=typeof d;return d!=null&&(g=="object"||g=="function")}function pr(d){return d!=null&&typeof d=="object"}var Sk=LP?wo(LP):uQ;function ote(d,g){return d===g||W2(d,g,s_(g))}function ate(d,g,_){return _=typeof _=="function"?_:n,W2(d,g,s_(g),_)}function ste(d){return Ck(d)&&d!=+d}function ute(d){if(HQ(d))throw new Bt(o);return g8(d)}function lte(d){return d===null}function cte(d){return d==null}function Ck(d){return typeof d=="number"||pr(d)&&Ni(d)==Nt}function bp(d){if(!pr(d)||Ni(d)!=nn)return!1;var g=ov(d);if(g===null)return!0;var _=Tn.call(g,"constructor")&&g.constructor;return typeof _=="function"&&_ instanceof _&&tv.call(_)==aX}var y_=FP?wo(FP):lQ;function fte(d){return _k(d)&&d>=-j&&d<=j}var Ek=jP?wo(jP):cQ;function Dv(d){return typeof d=="string"||!Vt(d)&&pr(d)&&Ni(d)==je}function So(d){return typeof d=="symbol"||pr(d)&&Ni(d)==ke}var If=BP?wo(BP):fQ;function dte(d){return d===n}function hte(d){return pr(d)&&_i(d)==mt}function pte(d){return pr(d)&&Ni(d)==xn}var gte=Sv(K2),mte=Sv(function(d,g){return d<=g});function Ok(d){if(!d)return[];if(Ji(d))return Dv(d)?Ca(d):Qi(d);if(ap&&d[ap])return GZ(d[ap]());var g=_i(d),_=g==lt?D2:g==Ue?Qm:Nf;return _(d)}function Ws(d){if(!d)return d===0?d:0;if(d=ea(d),d===W||d===-W){var g=d<0?-1:1;return g*K}return d===d?d:0}function Zt(d){var g=Ws(d),_=g%1;return g===g?_?g-_:g:0}function Ak(d){return d?tc(Zt(d),0,oe):0}function ea(d){if(typeof d=="number")return d;if(So(d))return Y;if(lr(d)){var g=typeof d.valueOf=="function"?d.valueOf():d;d=lr(g)?g+"":g}if(typeof d!="string")return d===0?d:+d;d=KP(d);var _=ct.test(d);return _||rt.test(d)?MZ(d.slice(2),_?2:8):He.test(d)?Y:+d}function Pk(d){return as(d,eo(d))}function vte(d){return d?tc(Zt(d),-j,j):d===0?d:0}function On(d){return d==null?"":_o(d)}var yte=Rf(function(d,g){if(vp(g)||Ji(g)){as(g,Qr(g),d);return}for(var _ in g)Tn.call(g,_)&&fp(d,_,g[_])}),kk=Rf(function(d,g){as(g,eo(g),d)}),$v=Rf(function(d,g,_,P){as(g,eo(g),d,P)}),bte=Rf(function(d,g,_,P){as(g,Qr(g),d,P)}),xte=zs(j2);function wte(d,g){var _=Mf(d);return g==null?_:s8(_,g)}var _te=tn(function(d,g){d=jn(d);var _=-1,P=g.length,R=P>2?g[2]:n;for(R&&Li(g[0],g[1],R)&&(P=1);++_1),U}),as(d,o_(d),_),P&&(_=Xo(_,f|h|p,DQ));for(var R=g.length;R--;)X2(_,g[R]);return _});function Bte(d,g){return Mk(d,Mv(Et(g)))}var zte=zs(function(d,g){return d==null?{}:pQ(d,g)});function Mk(d,g){if(d==null)return{};var _=rr(o_(d),function(P){return[P]});return g=Et(g),_8(d,_,function(P,R){return g(P,R[0])})}function Ute(d,g,_){g=Bu(g,d);var P=-1,R=g.length;for(R||(R=1,d=n);++Pg){var P=d;d=g,g=P}if(_||d%1||g%1){var R=r8();return wi(d+R*(g-d+TZ("1e-"+((R+"").length-1))),g)}return G2(d,g)}var Jte=Df(function(d,g,_){return g=g.toLowerCase(),d+(_?$k(g):g)});function $k(d){return w_(On(d).toLowerCase())}function Ik(d){return d=On(d),d&&d.replace(Ot,VZ).replace(xZ,"")}function ene(d,g,_){d=On(d),g=_o(g);var P=d.length;_=_===n?P:tc(Zt(_),0,P);var R=_;return _-=g.length,_>=0&&d.slice(_,R)==g}function tne(d){return d=On(d),d&&qn.test(d)?d.replace(hn,WZ):d}function nne(d){return d=On(d),d&&xe.test(d)?d.replace(le,"\\$&"):d}var rne=Df(function(d,g,_){return d+(_?"-":"")+g.toLowerCase()}),ine=Df(function(d,g,_){return d+(_?" ":"")+g.toLowerCase()}),one=F8("toLowerCase");function ane(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;if(!g||P>=g)return d;var R=(g-P)/2;return _v(lv(R),_)+d+_v(uv(R),_)}function sne(d,g,_){d=On(d),g=Zt(g);var P=g?Of(d):0;return g&&P>>0,_?(d=On(d),d&&(typeof g=="string"||g!=null&&!y_(g))&&(g=_o(g),!g&&Ef(d))?zu(Ca(d),0,_):d.split(g,_)):[]}var pne=Df(function(d,g,_){return d+(_?" ":"")+w_(g)});function gne(d,g,_){return d=On(d),_=_==null?0:tc(Zt(_),0,d.length),g=_o(g),d.slice(_,_+g.length)==g}function mne(d,g,_){var P=B.templateSettings;_&&Li(d,g,_)&&(g=n),d=On(d),g=$v({},g,P,H8);var R=$v({},g.imports,P.imports,H8),U=Qr(R),X=R2(R,U),se,fe,Me=0,Re=g.interpolate||gt,Ie="__p += '",et=$2((g.escape||gt).source+"|"+Re.source+"|"+(Re===bo?Ce:gt).source+"|"+(g.evaluate||gt).source+"|$","g"),ft="//# sourceURL="+(Tn.call(g,"sourceURL")?(g.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++EZ+"]")+` `;d.replace(et,function(Pt,on,pn,Co,Fi,Eo){return pn||(pn=Co),Ie+=d.slice(Me,Eo).replace(ht,HZ),on&&(se=!0,Ie+=`' + __e(`+on+`) + '`),Fi&&(fe=!0,Ie+=`'; @@ -482,12 +482,12 @@ __p += '`),pn&&(Ie+=`' + function print() { __p += __j.call(arguments, '') } `:`; `)+Ie+`return __p -}`;var Qt=Nk(function(){return Sn(U,ft+"return "+Ie).apply(n,X)});if(Qt.source=Ie,v_(Qt))throw Qt;return Qt}function vne(d){return On(d).toLowerCase()}function yne(d){return On(d).toUpperCase()}function bne(d,g,_){if(d=On(d),d&&(_||g===n))return H5(d);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=Ca(g),U=K5(P,R),X=q5(P,R)+1;return zu(P,U,X).join("")}function xne(d,g,_){if(d=On(d),d&&(_||g===n))return d.slice(0,Y5(d)+1);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=q5(P,Ca(g))+1;return zu(P,0,R).join("")}function wne(d,g,_){if(d=On(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=_o(g)))return d;var P=Ca(d),R=K5(P,Ca(g));return zu(P,R).join("")}function _ne(d,g){var _=z,P=H;if(lr(g)){var R="separator"in g?g.separator:R;_="length"in g?Zt(g.length):_,P="omission"in g?_o(g.omission):P}d=On(d);var U=d.length;if(Ef(d)){var X=Ca(d);U=X.length}if(_>=U)return d;var se=_-Of(P);if(se<1)return P;var fe=X?zu(X,0,se).join(""):d.slice(0,se);if(R===n)return fe+P;if(X&&(se+=fe.length-se),y_(R)){if(d.slice(se).search(R)){var Me,Re=fe;for(R.global||(R=$2(R.source,On(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?se:Ie)}}else if(d.indexOf(_o(R),se)!=se){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+P}function Sne(d){return d=On(d),d&&_n.test(d)?d.replace(_t,QZ):d}var Cne=Df(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),w_=L8("toUpperCase");function Ik(d,g,_){return d=On(d),g=_?n:g,g===n?qZ(d)?tX(d):FZ(d):d.match(g)||[]}var Nk=tn(function(d,g){try{return xo(d,n,g)}catch(_){return v_(_)?_:new Bt(_)}}),Ene=zs(function(d,g){return Go(g,function(_){_=ss(_),js(d,_,g_(d[_],d))}),d});function One(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Yo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var R=-1;++Rj)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var R=M2(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Zt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),R=B[P?"take"+(g=="last"?"Right":""):g],U=P||/^find/.test(g);R&&(B.prototype[g]=function(){var X=this.__wrapped__,se=P?[1]:arguments,fe=X instanceof cn,Me=se[0],Re=fe||Vt(X),Ie=function(on){var pn=R.apply(B,Iu([on],se));return P&&et?pn[0]:pn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,At=U&&!et,Qt=fe&&!ft;if(!U&&Re){X=Qt?X:new cn(this);var Pt=d.apply(X,se);return Pt.__actions__.push({func:Ov,args:[Ie],thisArg:n}),new Zo(Pt,et)}return At&&Qt?d.apply(this,se):(Pt=this.thru(Ie),At?P?Pt.value()[0]:Pt.value():Pt)})}),Go(["pop","push","shift","sort","splice","unshift"],function(d){var g=Qm[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var R=arguments;if(P&&!this.__chain__){var U=this.value();return g.apply(Vt(U)?U:[],R)}return this[_](function(X){return g.apply(Vt(X)?X:[],R)})}}),os(cn.prototype,function(d,g){var _=B[g];if(_){var P=_.name+"";Tn.call(Tf,P)||(Tf[P]=[]),Tf[P].push({name:g,func:_})}}),Tf[bv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=SX,cn.prototype.reverse=CX,cn.prototype.value=EX,B.prototype.at=eee,B.prototype.chain=tee,B.prototype.commit=nee,B.prototype.next=ree,B.prototype.plant=oee,B.prototype.reverse=aee,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=see,B.prototype.first=B.prototype.head,ap&&(B.prototype[ap]=iee),B},Af=nX();Xl?((Xl.exports=Af)._=Af,S2._=Af):ui._=Af}).call(la)})(gx,gx.exports);var oQe=gx.exports;function UUe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var e5="ScrollArea",[lG,aQe]=vi(e5),[VUe,_a]=lG(e5),cG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),N=Gt(t,H=>u(H)),z=Cm(i);return I.jsx(VUe,{scope:n,type:r,dir:z,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:I.jsx(pt.div,{dir:z,...a,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});cG.displayName=e5;var fG="ScrollAreaViewport",dG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=_a(fG,n),s=y.useRef(null),u=Gt(t,s,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});dG.displayName=fG;var $s="ScrollAreaScrollbar",WUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?I.jsx(HUe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(KUe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(hG,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(t5,{...r,ref:t}):null});WUe.displayName=$s;var HUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(hG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),KUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=p2(()=>u("SCROLL_END"),100),[s,u]=UUe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),I.jsx(Gr,{present:n||s!=="hidden",children:I.jsx(t5,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),hG=y.forwardRef((e,t)=>{const n=_a($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=p2(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=_a($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=vG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return JUe(h,a.current,s,p)}return n==="horizontal"?I.jsx(qUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=kI(h,s,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?I.jsx(GUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=kI(h,s);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),qUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:vx(a.paddingLeft),paddingEnd:vx(a.paddingRight)}})}})}),GUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:vx(a.paddingTop),paddingEnd:vx(a.paddingBottom)}})}})}),[YUe,pG]=lG($s),gG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=_a($s,n),[m,v]=y.useState(null),b=Gt(t,N=>v(N)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Vr(c),C=Vr(u),k=p2(f,10);function M(N){if(w.current){const z=N.clientX-w.current.left,H=N.clientY-w.current.top;l({x:z,y:H})}}return y.useEffect(()=>{const N=z=>{const H=z.target;m?.contains(H)&&E(z,O)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Eh(m,k),Eh(p.content,k),I.jsx(YUe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Vr(o),onThumbPointerUp:Vr(a),onThumbPositionChange:C,onThumbPointerDown:Vr(s),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(N))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,N=>{const z=N.target;z.hasPointerCapture(N.pointerId)&&z.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),mx="ScrollAreaThumb",ZUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pG(mx,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(XUe,{ref:t,...r})})}),XUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=_a(mx,n),a=pG(mx,n),{onThumbPositionChange:s}=a,u=Gt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=p2(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=eVe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});ZUe.displayName=mx;var n5="ScrollAreaCorner",mG=y.forwardRef((e,t)=>{const n=_a(n5,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(QUe,{...e,ref:t}):null});mG.displayName=n5;var QUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=_a(n5,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Eh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Eh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vx(e){return e?parseInt(e,10):0}function vG(e,t){const n=e/t;return isNaN(n)?0:n}function h2(e){const t=vG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function JUe(e,t,n,r="ltr"){const i=h2(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return yG([u,l],f)(e)}function kI(e,t,n="ltr"){const r=h2(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=Q6(e,u);return yG([0,a],[0,s])(l)}function yG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function p2(e,t){const n=Vr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Eh(e,t){const n=Vr(t);ii(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var sQe=cG,uQe=dG,lQe=mG,r5="Progress",i5=100,[tVe,cQe]=vi(r5),[nVe,rVe]=tVe(r5),xG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=iVe,...a}=e;(i||i===0)&&!TI(i)&&console.error(oVe(`${i}`,"Progress"));const s=TI(i)?i:i5;r!==null&&!MI(r,s)&&console.error(aVe(`${r}`,"Progress"));const u=MI(r,s)?r:null,l=yx(u)?o(u,s):void 0;return I.jsx(nVe,{scope:n,value:u,max:s,children:I.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":yx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":SG(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});xG.displayName=r5;var wG="ProgressIndicator",_G=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=rVe(wG,n);return I.jsx(pt.div,{"data-state":SG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});_G.displayName=wG;function iVe(e,t){return`${Math.round(e/t*100)}%`}function SG(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yx(e){return typeof e=="number"}function TI(e){return yx(e)&&!isNaN(e)&&e>0}function MI(e,t){return yx(e)&&!isNaN(e)&&e<=t&&e>=0}function oVe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${i5}\`.`}function aVe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: +}`;var Qt=Lk(function(){return Sn(U,ft+"return "+Ie).apply(n,X)});if(Qt.source=Ie,v_(Qt))throw Qt;return Qt}function vne(d){return On(d).toLowerCase()}function yne(d){return On(d).toUpperCase()}function bne(d,g,_){if(d=On(d),d&&(_||g===n))return KP(d);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=Ca(g),U=qP(P,R),X=GP(P,R)+1;return zu(P,U,X).join("")}function xne(d,g,_){if(d=On(d),d&&(_||g===n))return d.slice(0,ZP(d)+1);if(!d||!(g=_o(g)))return d;var P=Ca(d),R=GP(P,Ca(g))+1;return zu(P,0,R).join("")}function wne(d,g,_){if(d=On(d),d&&(_||g===n))return d.replace(T,"");if(!d||!(g=_o(g)))return d;var P=Ca(d),R=qP(P,Ca(g));return zu(P,R).join("")}function _ne(d,g){var _=z,P=H;if(lr(g)){var R="separator"in g?g.separator:R;_="length"in g?Zt(g.length):_,P="omission"in g?_o(g.omission):P}d=On(d);var U=d.length;if(Ef(d)){var X=Ca(d);U=X.length}if(_>=U)return d;var se=_-Of(P);if(se<1)return P;var fe=X?zu(X,0,se).join(""):d.slice(0,se);if(R===n)return fe+P;if(X&&(se+=fe.length-se),y_(R)){if(d.slice(se).search(R)){var Me,Re=fe;for(R.global||(R=$2(R.source,On(Be.exec(R))+"g")),R.lastIndex=0;Me=R.exec(Re);)var Ie=Me.index;fe=fe.slice(0,Ie===n?se:Ie)}}else if(d.indexOf(_o(R),se)!=se){var et=fe.lastIndexOf(R);et>-1&&(fe=fe.slice(0,et))}return fe+P}function Sne(d){return d=On(d),d&&_n.test(d)?d.replace(_t,QZ):d}var Cne=Df(function(d,g,_){return d+(_?" ":"")+g.toUpperCase()}),w_=F8("toUpperCase");function Nk(d,g,_){return d=On(d),g=_?n:g,g===n?qZ(d)?tX(d):FZ(d):d.match(g)||[]}var Lk=tn(function(d,g){try{return xo(d,n,g)}catch(_){return v_(_)?_:new Bt(_)}}),Ene=zs(function(d,g){return Go(g,function(_){_=ss(_),js(d,_,g_(d[_],d))}),d});function One(d){var g=d==null?0:d.length,_=Et();return d=g?rr(d,function(P){if(typeof P[1]!="function")throw new Yo(a);return[_(P[0]),P[1]]}):[],tn(function(P){for(var R=-1;++Rj)return[];var _=oe,P=wi(d,oe);g=Et(g),d-=oe;for(var R=M2(P,g);++_0||g<0)?new cn(_):(d<0?_=_.takeRight(-d):d&&(_=_.drop(d)),g!==n&&(g=Zt(g),_=g<0?_.dropRight(-g):_.take(g-d)),_)},cn.prototype.takeRightWhile=function(d){return this.reverse().takeWhile(d).reverse()},cn.prototype.toArray=function(){return this.take(oe)},os(cn.prototype,function(d,g){var _=/^(?:filter|find|map|reject)|While$/.test(g),P=/^(?:head|last)$/.test(g),R=B[P?"take"+(g=="last"?"Right":""):g],U=P||/^find/.test(g);R&&(B.prototype[g]=function(){var X=this.__wrapped__,se=P?[1]:arguments,fe=X instanceof cn,Me=se[0],Re=fe||Vt(X),Ie=function(on){var pn=R.apply(B,Iu([on],se));return P&&et?pn[0]:pn};Re&&_&&typeof Me=="function"&&Me.length!=1&&(fe=Re=!1);var et=this.__chain__,ft=!!this.__actions__.length,At=U&&!et,Qt=fe&&!ft;if(!U&&Re){X=Qt?X:new cn(this);var Pt=d.apply(X,se);return Pt.__actions__.push({func:Av,args:[Ie],thisArg:n}),new Zo(Pt,et)}return At&&Qt?d.apply(this,se):(Pt=this.thru(Ie),At?P?Pt.value()[0]:Pt.value():Pt)})}),Go(["pop","push","shift","sort","splice","unshift"],function(d){var g=Jm[d],_=/^(?:push|sort|unshift)$/.test(d)?"tap":"thru",P=/^(?:pop|shift)$/.test(d);B.prototype[d]=function(){var R=arguments;if(P&&!this.__chain__){var U=this.value();return g.apply(Vt(U)?U:[],R)}return this[_](function(X){return g.apply(Vt(X)?X:[],R)})}}),os(cn.prototype,function(d,g){var _=B[g];if(_){var P=_.name+"";Tn.call(Tf,P)||(Tf[P]=[]),Tf[P].push({name:g,func:_})}}),Tf[xv(n,w).name]=[{name:"wrapper",func:n}],cn.prototype.clone=SX,cn.prototype.reverse=CX,cn.prototype.value=EX,B.prototype.at=eee,B.prototype.chain=tee,B.prototype.commit=nee,B.prototype.next=ree,B.prototype.plant=oee,B.prototype.reverse=aee,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=see,B.prototype.first=B.prototype.head,ap&&(B.prototype[ap]=iee),B},Af=nX();Xl?((Xl.exports=Af)._=Af,S2._=Af):ui._=Af}).call(la)})(gx,gx.exports);var sQe=gx.exports;function VUe(e,t){return y.useReducer((n,r)=>t[n][r]??n,e)}var tP="ScrollArea",[lG,uQe]=vi(tP),[WUe,_a]=lG(tP),cG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:i,scrollHideDelay:o=600,...a}=e,[s,u]=y.useState(null),[l,c]=y.useState(null),[f,h]=y.useState(null),[p,m]=y.useState(null),[v,b]=y.useState(null),[w,x]=y.useState(0),[S,O]=y.useState(0),[E,C]=y.useState(!1),[k,M]=y.useState(!1),N=Gt(t,H=>u(H)),z=Em(i);return I.jsx(WUe,{scope:n,type:r,dir:z,scrollHideDelay:o,scrollArea:s,viewport:l,onViewportChange:c,content:f,onContentChange:h,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:E,onScrollbarXEnabledChange:C,scrollbarY:v,onScrollbarYChange:b,scrollbarYEnabled:k,onScrollbarYEnabledChange:M,onCornerWidthChange:x,onCornerHeightChange:O,children:I.jsx(pt.div,{dir:z,...a,ref:N,style:{position:"relative","--radix-scroll-area-corner-width":w+"px","--radix-scroll-area-corner-height":S+"px",...e.style}})})});cG.displayName=tP;var fG="ScrollAreaViewport",dG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:i,...o}=e,a=_a(fG,n),s=y.useRef(null),u=Gt(t,s,a.onViewportChange);return I.jsxs(I.Fragment,{children:[I.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),I.jsx(pt.div,{"data-radix-scroll-area-viewport":"",...o,ref:u,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:I.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});dG.displayName=fG;var $s="ScrollAreaScrollbar",HUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),{onScrollbarXEnabledChange:o,onScrollbarYEnabledChange:a}=i,s=e.orientation==="horizontal";return y.useEffect(()=>(s?o(!0):a(!0),()=>{s?o(!1):a(!1)}),[s,o,a]),i.type==="hover"?I.jsx(KUe,{...r,ref:t,forceMount:n}):i.type==="scroll"?I.jsx(qUe,{...r,ref:t,forceMount:n}):i.type==="auto"?I.jsx(hG,{...r,ref:t,forceMount:n}):i.type==="always"?I.jsx(nP,{...r,ref:t}):null});HUe.displayName=$s;var KUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),[o,a]=y.useState(!1);return y.useEffect(()=>{const s=i.scrollArea;let u=0;if(s){const l=()=>{window.clearTimeout(u),a(!0)},c=()=>{u=window.setTimeout(()=>a(!1),i.scrollHideDelay)};return s.addEventListener("pointerenter",l),s.addEventListener("pointerleave",c),()=>{window.clearTimeout(u),s.removeEventListener("pointerenter",l),s.removeEventListener("pointerleave",c)}}},[i.scrollArea,i.scrollHideDelay]),I.jsx(Gr,{present:n||o,children:I.jsx(hG,{"data-state":o?"visible":"hidden",...r,ref:t})})}),qUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=_a($s,e.__scopeScrollArea),o=e.orientation==="horizontal",a=p2(()=>u("SCROLL_END"),100),[s,u]=VUe("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return y.useEffect(()=>{if(s==="idle"){const l=window.setTimeout(()=>u("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(l)}},[s,i.scrollHideDelay,u]),y.useEffect(()=>{const l=i.viewport,c=o?"scrollLeft":"scrollTop";if(l){let f=l[c];const h=()=>{const p=l[c];f!==p&&(u("SCROLL"),a()),f=p};return l.addEventListener("scroll",h),()=>l.removeEventListener("scroll",h)}},[i.viewport,o,u,a]),I.jsx(Gr,{present:n||s!=="hidden",children:I.jsx(nP,{"data-state":s==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:Ye(e.onPointerEnter,()=>u("POINTER_ENTER")),onPointerLeave:Ye(e.onPointerLeave,()=>u("POINTER_LEAVE"))})})}),hG=y.forwardRef((e,t)=>{const n=_a($s,e.__scopeScrollArea),{forceMount:r,...i}=e,[o,a]=y.useState(!1),s=e.orientation==="horizontal",u=p2(()=>{if(n.viewport){const l=n.viewport.offsetWidth{const{orientation:n="vertical",...r}=e,i=_a($s,e.__scopeScrollArea),o=y.useRef(null),a=y.useRef(0),[s,u]=y.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=vG(s.viewport,s.content),c={...r,sizes:s,onSizesChange:u,hasThumb:l>0&&l<1,onThumbChange:h=>o.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,p){return eVe(h,a.current,s,p)}return n==="horizontal"?I.jsx(GUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollLeft,p=TI(h,s,i.dir);o.current.style.transform=`translate3d(${p}px, 0, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollLeft=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollLeft=f(h,i.dir))}}):n==="vertical"?I.jsx(YUe,{...c,ref:t,onThumbPositionChange:()=>{if(i.viewport&&o.current){const h=i.viewport.scrollTop,p=TI(h,s);o.current.style.transform=`translate3d(0, ${p}px, 0)`}},onWheelScroll:h=>{i.viewport&&(i.viewport.scrollTop=h)},onDragScroll:h=>{i.viewport&&(i.viewport.scrollTop=f(h))}}):null}),GUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarXChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"horizontal",...i,ref:l,sizes:n,style:{bottom:0,left:o.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:o.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.x),onDragScroll:c=>e.onDragScroll(c.x),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollLeft+c.deltaX;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:u.current.clientWidth,paddingStart:vx(a.paddingLeft),paddingEnd:vx(a.paddingRight)}})}})}),YUe=y.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...i}=e,o=_a($s,e.__scopeScrollArea),[a,s]=y.useState(),u=y.useRef(null),l=Gt(t,u,o.onScrollbarYChange);return y.useEffect(()=>{u.current&&s(getComputedStyle(u.current))},[u]),I.jsx(gG,{"data-orientation":"vertical",...i,ref:l,sizes:n,style:{top:0,right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":h2(n)+"px",...e.style},onThumbPointerDown:c=>e.onThumbPointerDown(c.y),onDragScroll:c=>e.onDragScroll(c.y),onWheelScroll:(c,f)=>{if(o.viewport){const h=o.viewport.scrollTop+c.deltaY;e.onWheelScroll(h),bG(h,f)&&c.preventDefault()}},onResize:()=>{u.current&&o.viewport&&a&&r({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:u.current.clientHeight,paddingStart:vx(a.paddingTop),paddingEnd:vx(a.paddingBottom)}})}})}),[ZUe,pG]=lG($s),gG=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:i,onThumbChange:o,onThumbPointerUp:a,onThumbPointerDown:s,onThumbPositionChange:u,onDragScroll:l,onWheelScroll:c,onResize:f,...h}=e,p=_a($s,n),[m,v]=y.useState(null),b=Gt(t,N=>v(N)),w=y.useRef(null),x=y.useRef(""),S=p.viewport,O=r.content-r.viewport,E=Vr(c),C=Vr(u),k=p2(f,10);function M(N){if(w.current){const z=N.clientX-w.current.left,H=N.clientY-w.current.top;l({x:z,y:H})}}return y.useEffect(()=>{const N=z=>{const H=z.target;m?.contains(H)&&E(z,O)};return document.addEventListener("wheel",N,{passive:!1}),()=>document.removeEventListener("wheel",N,{passive:!1})},[S,m,O,E]),y.useEffect(C,[r,C]),Eh(m,k),Eh(p.content,k),I.jsx(ZUe,{scope:n,scrollbar:m,hasThumb:i,onThumbChange:Vr(o),onThumbPointerUp:Vr(a),onThumbPositionChange:C,onThumbPointerDown:Vr(s),children:I.jsx(pt.div,{...h,ref:b,style:{position:"absolute",...h.style},onPointerDown:Ye(e.onPointerDown,N=>{N.button===0&&(N.target.setPointerCapture(N.pointerId),w.current=m.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",p.viewport&&(p.viewport.style.scrollBehavior="auto"),M(N))}),onPointerMove:Ye(e.onPointerMove,M),onPointerUp:Ye(e.onPointerUp,N=>{const z=N.target;z.hasPointerCapture(N.pointerId)&&z.releasePointerCapture(N.pointerId),document.body.style.webkitUserSelect=x.current,p.viewport&&(p.viewport.style.scrollBehavior=""),w.current=null})})})}),mx="ScrollAreaThumb",XUe=y.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=pG(mx,e.__scopeScrollArea);return I.jsx(Gr,{present:n||i.hasThumb,children:I.jsx(QUe,{ref:t,...r})})}),QUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...i}=e,o=_a(mx,n),a=pG(mx,n),{onThumbPositionChange:s}=a,u=Gt(t,f=>a.onThumbChange(f)),l=y.useRef(void 0),c=p2(()=>{l.current&&(l.current(),l.current=void 0)},100);return y.useEffect(()=>{const f=o.viewport;if(f){const h=()=>{if(c(),!l.current){const p=tVe(f,s);l.current=p,s()}};return s(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[o.viewport,c,s]),I.jsx(pt.div,{"data-state":a.hasThumb?"visible":"hidden",...i,ref:u,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:Ye(e.onPointerDownCapture,f=>{const p=f.target.getBoundingClientRect(),m=f.clientX-p.left,v=f.clientY-p.top;a.onThumbPointerDown({x:m,y:v})}),onPointerUp:Ye(e.onPointerUp,a.onThumbPointerUp)})});XUe.displayName=mx;var rP="ScrollAreaCorner",mG=y.forwardRef((e,t)=>{const n=_a(rP,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?I.jsx(JUe,{...e,ref:t}):null});mG.displayName=rP;var JUe=y.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,i=_a(rP,n),[o,a]=y.useState(0),[s,u]=y.useState(0),l=!!(o&&s);return Eh(i.scrollbarX,()=>{const c=i.scrollbarX?.offsetHeight||0;i.onCornerHeightChange(c),u(c)}),Eh(i.scrollbarY,()=>{const c=i.scrollbarY?.offsetWidth||0;i.onCornerWidthChange(c),a(c)}),l?I.jsx(pt.div,{...r,ref:t,style:{width:o,height:s,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function vx(e){return e?parseInt(e,10):0}function vG(e,t){const n=e/t;return isNaN(n)?0:n}function h2(e){const t=vG(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function eVe(e,t,n,r="ltr"){const i=h2(n),o=i/2,a=t||o,s=i-a,u=n.scrollbar.paddingStart+a,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,c=n.content-n.viewport,f=r==="ltr"?[0,c]:[c*-1,0];return yG([u,l],f)(e)}function TI(e,t,n="ltr"){const r=h2(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,o=t.scrollbar.size-i,a=t.content-t.viewport,s=o-r,u=n==="ltr"?[0,a]:[a*-1,0],l=Q6(e,u);return yG([0,a],[0,s])(l)}function yG(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bG(e,t){return e>0&&e{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function i(){const o={left:e.scrollLeft,top:e.scrollTop},a=n.left!==o.left,s=n.top!==o.top;(a||s)&&t(),n=o,r=window.requestAnimationFrame(i)}(),()=>window.cancelAnimationFrame(r)};function p2(e,t){const n=Vr(e),r=y.useRef(0);return y.useEffect(()=>()=>window.clearTimeout(r.current),[]),y.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Eh(e,t){const n=Vr(t);ii(()=>{let r=0;if(e){const i=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return i.observe(e),()=>{window.cancelAnimationFrame(r),i.unobserve(e)}}},[e,n])}var lQe=cG,cQe=dG,fQe=mG,iP="Progress",oP=100,[nVe,dQe]=vi(iP),[rVe,iVe]=nVe(iP),xG=y.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:i,getValueLabel:o=oVe,...a}=e;(i||i===0)&&!MI(i)&&console.error(aVe(`${i}`,"Progress"));const s=MI(i)?i:oP;r!==null&&!RI(r,s)&&console.error(sVe(`${r}`,"Progress"));const u=RI(r,s)?r:null,l=yx(u)?o(u,s):void 0;return I.jsx(rVe,{scope:n,value:u,max:s,children:I.jsx(pt.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":yx(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":SG(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})});xG.displayName=iP;var wG="ProgressIndicator",_G=y.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,i=iVe(wG,n);return I.jsx(pt.div,{"data-state":SG(i.value,i.max),"data-value":i.value??void 0,"data-max":i.max,...r,ref:t})});_G.displayName=wG;function oVe(e,t){return`${Math.round(e/t*100)}%`}function SG(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function yx(e){return typeof e=="number"}function MI(e){return yx(e)&&!isNaN(e)&&e>0}function RI(e,t){return yx(e)&&!isNaN(e)&&e<=t&&e>=0}function aVe(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${oP}\`.`}function sVe(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: - a positive number - - less than the value passed to \`max\` (or ${i5} if no \`max\` prop is set) + - less than the value passed to \`max\` (or ${oP} if no \`max\` prop is set) - \`null\` or \`undefined\` if the progress is indeterminate. -Defaulting to \`null\`.`}var fQe=xG,dQe=_G,sVe="Separator",RI="horizontal",uVe=["horizontal","vertical"],CG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=RI,...i}=e,o=lVe(r)?r:RI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});CG.displayName=sVe;function lVe(e){return uVe.includes(e)}var hQe=CG,o5="Switch",[cVe,pQe]=vi(o5),[fVe,dVe]=cVe(o5),EG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return I.jsxs(fVe,{scope:n,checked:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":PG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&I.jsx(hVe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});EG.displayName=o5;var OG="SwitchThumb",AG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=dVe(OG,n);return I.jsx(pt.span,{"data-state":PG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});AG.displayName=OG;var hVe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=FP(n),s=lA(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function PG(e){return e?"checked":"unchecked"}var gQe=EG,mQe=AG;/** +Defaulting to \`null\`.`}var hQe=xG,pQe=_G,uVe="Separator",DI="horizontal",lVe=["horizontal","vertical"],CG=y.forwardRef((e,t)=>{const{decorative:n,orientation:r=DI,...i}=e,o=cVe(r)?r:DI,s=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return I.jsx(pt.div,{"data-orientation":o,...s,...i,ref:t})});CG.displayName=uVe;function cVe(e){return lVe.includes(e)}var gQe=CG,aP="Switch",[fVe,mQe]=vi(aP),[dVe,hVe]=fVe(aP),EG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,S=>p(S)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l});return I.jsxs(dVe,{scope:n,checked:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"switch","aria-checked":w,"aria-required":a,"data-state":PG(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onClick:Ye(e.onClick,S=>{x(O=>!O),b&&(v.current=S.isPropagationStopped(),v.current||S.stopPropagation())})}),b&&I.jsx(pVe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"}})]})});EG.displayName=aP;var OG="SwitchThumb",AG=y.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,i=hVe(OG,n);return I.jsx(pt.span,{"data-state":PG(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});AG.displayName=OG;var pVe=e=>{const{control:t,checked:n,bubbles:r=!0,...i}=e,o=y.useRef(null),a=j5(n),s=lA(t);return y.useEffect(()=>{const u=o.current,l=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(l,"checked").set;if(a!==n&&f){const h=new Event("click",{bubbles:r});f.call(u,n),u.dispatchEvent(h)}},[a,n,r]),I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function PG(e){return e?"checked":"unchecked"}var vQe=EG,yQe=AG;/** * table-core * * Copyright (c) TanStack @@ -496,10 +496,10 @@ Defaulting to \`null\`.`}var fQe=xG,dQe=_G,sVe="Separator",RI="horizontal",uVe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function fl(e,t){return typeof e=="function"?e(t):e}function Vo(e,t){return n=>{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function g2(e){return e instanceof Function}function pVe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function gVe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{t.setState(r=>({...r,[e]:fl(n,r[e])}))}}function g2(e){return e instanceof Function}function gVe(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function mVe(e,t){const n=[],r=i=>{i.forEach(o=>{n.push(o);const a=t(o);a!=null&&a.length&&r(a)})};return r(e),n}function St(e,t,n){let r=[],i;return o=>{let a;n.key&&n.debug&&(a=Date.now());const s=e(o);if(!(s.length!==r.length||s.some((c,f)=>r[f]!==c)))return i;r=s;let l;if(n.key&&n.debug&&(l=Date.now()),i=t(...s),n==null||n.onChange==null||n.onChange(i),n.key&&n.debug&&n!=null&&n.debug()){const c=Math.round((Date.now()-a)*100)/100,f=Math.round((Date.now()-l)*100)/100,h=f/16,p=(m,v)=>{for(m=String(m);m.length{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function mVe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function vVe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function DI(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const yVe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Oy(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Oy(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oy(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Oy(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function Oy(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=DI(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>DI(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const a5=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>gVe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>mVe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},kG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};kG.autoRemove=e=>qa(e);const TG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};TG.autoRemove=e=>qa(e);const MG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};MG.autoRemove=e=>qa(e);const RG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};RG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const DG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});DG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const $G=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});$G.autoRemove=e=>qa(e)||!(e!=null&&e.length);const IG=(e,t,n)=>e.getValue(t)===n;IG.autoRemove=e=>qa(e);const NG=(e,t,n)=>e.getValue(t)==n;NG.autoRemove=e=>qa(e);const s5=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};s5.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};s5.autoRemove=e=>qa(e)||qa(e[0])&&qa(e[1]);const eu={includesString:kG,includesStringSensitive:TG,equalsString:MG,arrIncludes:RG,arrIncludesAll:DG,arrIncludesSome:$G,equals:IG,weakEquals:NG,inNumberRange:s5};function qa(e){return e==null||e===""}const xVe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return g2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=fl(n,o?o.value:void 0);if($I(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if($I(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function $I(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const wVe=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),_Ve=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},SVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},CVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},OVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!pVe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},AVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),PVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,kVe=(e,t)=>t.length,m3={sum:wVe,min:_Ve,max:SVe,extent:CVe,mean:EVe,median:OVe,unique:AVe,uniqueCount:PVe,count:kVe},TVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return m3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return m3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:m3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function MVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const RVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[T0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=T0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=T0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return MVe(o,n,r)},Ct(e.options,"debugTable"))}},v3=()=>({left:[],right:[]}),DVe={getInitialState:e=>({columnPinning:v3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?v3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:v3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},Ay={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},y3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),$Ve={getDefaultColumnDef:()=>Ay,getInitialState:e=>({columnSizing:{},columnSizingInfo:y3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Ay.minSize,(r=o??e.columnDef.size)!=null?r:Ay.size),(i=e.columnDef.maxSize)!=null?i:Ay.maxSize)},e.getStart=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),b3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=b3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(N=>{let[z,H]=N;l[z]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=IVe()?{passive:!1}:!1;b3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?y3():(n=e.initialState.columnSizingInfo)!=null?n:y3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let Py=null;function IVe(){if(typeof Py=="boolean")return Py;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return Py=e,Py}function b3(e){return e.type==="touchstart"}const NVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function T0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const LVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},FVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return g2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},jVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},a4=0,s4=10,x3=()=>({pageIndex:a4,pageSize:s4}),BVe={getInitialState:e=>({...e,pagination:{...x3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?x3():(i=e.initialState.pagination)!=null?i:x3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?a4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:a4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?s4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:s4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},w3=()=>({top:[],bottom:[]}),zVe={getInitialState:e=>({rowPinning:w3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?w3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:w3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},UVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{u4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return u4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return u5(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},u4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>u4(e,s.id,n,r,i))};function _3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=u5(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function u5(e,t){var n;return(n=t[e.id])!=null?n:!1}function l4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(u5(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=l4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const c4=/([0-9]+)/gm,VVe=(e,t,n)=>LG(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),WVe=(e,t,n)=>LG(Il(e.getValue(n)),Il(t.getValue(n))),HVe=(e,t,n)=>l5(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),KVe=(e,t,n)=>l5(Il(e.getValue(n)),Il(t.getValue(n))),qVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rl5(e.getValue(n),t.getValue(n));function l5(e,t){return e===t?0:e>t?1:-1}function Il(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function LG(e,t){const n=e.split(c4).filter(Boolean),r=t.split(c4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zp={alphanumeric:VVe,alphanumericCaseSensitive:WVe,text:HVe,textCaseSensitive:KVe,datetime:qVe,basic:GVe},YVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Zp.datetime;if(typeof o=="string"&&(r=!0,o.split(c4).length>1))return Zp.alphanumeric}return r?Zp.text:Zp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},ZVe=[yVe,NVe,RVe,DVe,bVe,xVe,LVe,FVe,YVe,TVe,jVe,BVe,zVe,UVe,$Ve];function XVe(e){var t,n;const r=[...ZVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=fl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=vVe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function QVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function FG(e,t,n){return n.options.filterFromLeafRows?JVe(e,t,n):eWe(e,t,n)}function JVe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function wQe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=QVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function _Qe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** + color: hsl(${Math.max(0,Math.min(120-120*h,120))}deg 100% 31%);`,n?.key)}return i}}function Ct(e,t,n,r){return{debug:()=>{var i;return(i=e?.debugAll)!=null?i:e[t]},key:!1,onChange:r}}function vVe(e,t,n,r){const i=()=>{var a;return(a=o.getValue())!=null?a:e.options.renderFallbackValue},o={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(r),renderValue:i,getContext:St(()=>[e,n,t,o],(a,s,u,l)=>({table:a,column:s,row:u,cell:l,getValue:l.getValue,renderValue:l.renderValue}),Ct(e.options,"debugCells"))};return e._features.forEach(a=>{a.createCell==null||a.createCell(o,n,t,e)},{}),o}function yVe(e,t,n,r){var i,o;const s={...e._getDefaultColumnDef(),...t},u=s.accessorKey;let l=(i=(o=s.id)!=null?o:u?typeof String.prototype.replaceAll=="function"?u.replaceAll(".","_"):u.replace(/\./g,"_"):void 0)!=null?i:typeof s.header=="string"?s.header:void 0,c;if(s.accessorFn?c=s.accessorFn:u&&(u.includes(".")?c=h=>{let p=h;for(const v of u.split(".")){var m;p=(m=p)==null?void 0:m[v]}return p}:c=h=>h[s.accessorKey]),!l)throw new Error;let f={id:`${String(l)}`,accessorFn:c,parent:r,depth:n,columnDef:s,columns:[],getFlatColumns:St(()=>[!0],()=>{var h;return[f,...(h=f.columns)==null?void 0:h.flatMap(p=>p.getFlatColumns())]},Ct(e.options,"debugColumns")),getLeafColumns:St(()=>[e._getOrderColumnsFn()],h=>{var p;if((p=f.columns)!=null&&p.length){let m=f.columns.flatMap(v=>v.getLeafColumns());return h(m)}return[f]},Ct(e.options,"debugColumns"))};for(const h of e._features)h.createColumn==null||h.createColumn(f,e);return f}const Ei="debugHeaders";function $I(e,t,n){var r;let o={id:(r=n.id)!=null?r:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const a=[],s=u=>{u.subHeaders&&u.subHeaders.length&&u.subHeaders.map(s),a.push(u)};return s(o),a},getContext:()=>({table:e,header:o,column:t})};return e._features.forEach(a=>{a.createHeader==null||a.createHeader(o,e)}),o}const bVe={createTable:e=>{e.getHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>{var o,a;const s=(o=r?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?o:[],u=(a=i?.map(f=>n.find(h=>h.id===f)).filter(Boolean))!=null?a:[],l=n.filter(f=>!(r!=null&&r.includes(f.id))&&!(i!=null&&i.includes(f.id)));return Ay(t,[...s,...l,...u],e)},Ct(e.options,Ei)),e.getCenterHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r,i)=>(n=n.filter(o=>!(r!=null&&r.includes(o.id))&&!(i!=null&&i.includes(o.id))),Ay(t,n,e,"center")),Ct(e.options,Ei)),e.getLeftHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Ay(t,o,e,"left")},Ct(e.options,Ei)),e.getRightHeaderGroups=St(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,r)=>{var i;const o=(i=r?.map(a=>n.find(s=>s.id===a)).filter(Boolean))!=null?i:[];return Ay(t,o,e,"right")},Ct(e.options,Ei)),e.getFooterGroups=St(()=>[e.getHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getLeftFooterGroups=St(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getCenterFooterGroups=St(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getRightFooterGroups=St(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),Ct(e.options,Ei)),e.getFlatHeaders=St(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getLeftFlatHeaders=St(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterFlatHeaders=St(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getRightFlatHeaders=St(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),Ct(e.options,Ei)),e.getCenterLeafHeaders=St(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeftLeafHeaders=St(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getRightLeafHeaders=St(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var r;return!((r=n.subHeaders)!=null&&r.length)}),Ct(e.options,Ei)),e.getLeafHeaders=St(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,r)=>{var i,o,a,s,u,l;return[...(i=(o=t[0])==null?void 0:o.headers)!=null?i:[],...(a=(s=n[0])==null?void 0:s.headers)!=null?a:[],...(u=(l=r[0])==null?void 0:l.headers)!=null?u:[]].map(c=>c.getLeafHeaders()).flat()},Ct(e.options,Ei))}};function Ay(e,t,n,r){var i,o;let a=0;const s=function(h,p){p===void 0&&(p=1),a=Math.max(a,p),h.filter(m=>m.getIsVisible()).forEach(m=>{var v;(v=m.columns)!=null&&v.length&&s(m.columns,p+1)},0)};s(e);let u=[];const l=(h,p)=>{const m={depth:p,id:[r,`${p}`].filter(Boolean).join("_"),headers:[]},v=[];h.forEach(b=>{const w=[...v].reverse()[0],x=b.column.depth===m.depth;let S,O=!1;if(x&&b.column.parent?S=b.column.parent:(S=b.column,O=!0),w&&w?.column===S)w.subHeaders.push(b);else{const E=$I(n,S,{id:[r,p,S.id,b?.id].filter(Boolean).join("_"),isPlaceholder:O,placeholderId:O?`${v.filter(C=>C.column===S).length}`:void 0,depth:p,index:v.length});E.subHeaders.push(b),v.push(E)}m.headers.push(b),b.headerGroup=m}),u.push(m),p>0&&l(v,p-1)},c=t.map((h,p)=>$I(n,h,{depth:a,index:p}));l(c,a-1),u.reverse();const f=h=>h.filter(m=>m.column.getIsVisible()).map(m=>{let v=0,b=0,w=[0];m.subHeaders&&m.subHeaders.length?(w=[],f(m.subHeaders).forEach(S=>{let{colSpan:O,rowSpan:E}=S;v+=O,w.push(E)})):v=1;const x=Math.min(...w);return b=b+x,m.colSpan=v,m.rowSpan=b,{colSpan:v,rowSpan:b}});return f((i=(o=u[0])==null?void 0:o.headers)!=null?i:[]),u}const sP=(e,t,n,r,i,o,a)=>{let s={id:t,index:r,original:n,depth:i,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:u=>{if(s._valuesCache.hasOwnProperty(u))return s._valuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return s._valuesCache[u]=l.accessorFn(s.original,r),s._valuesCache[u]},getUniqueValues:u=>{if(s._uniqueValuesCache.hasOwnProperty(u))return s._uniqueValuesCache[u];const l=e.getColumn(u);if(l!=null&&l.accessorFn)return l.columnDef.getUniqueValues?(s._uniqueValuesCache[u]=l.columnDef.getUniqueValues(s.original,r),s._uniqueValuesCache[u]):(s._uniqueValuesCache[u]=[s.getValue(u)],s._uniqueValuesCache[u])},renderValue:u=>{var l;return(l=s.getValue(u))!=null?l:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>mVe(s.subRows,u=>u.subRows),getParentRow:()=>s.parentId?e.getRow(s.parentId,!0):void 0,getParentRows:()=>{let u=[],l=s;for(;;){const c=l.getParentRow();if(!c)break;u.push(c),l=c}return u.reverse()},getAllCells:St(()=>[e.getAllLeafColumns()],u=>u.map(l=>vVe(e,s,l,l.id)),Ct(e.options,"debugRows")),_getAllCellsByColumnId:St(()=>[s.getAllCells()],u=>u.reduce((l,c)=>(l[c.column.id]=c,l),{}),Ct(e.options,"debugRows"))};for(let u=0;u{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},kG=(e,t,n)=>{var r,i;const o=n==null||(r=n.toString())==null?void 0:r.toLowerCase();return!!(!((i=e.getValue(t))==null||(i=i.toString())==null||(i=i.toLowerCase())==null)&&i.includes(o))};kG.autoRemove=e=>qa(e);const TG=(e,t,n)=>{var r;return!!(!((r=e.getValue(t))==null||(r=r.toString())==null)&&r.includes(n))};TG.autoRemove=e=>qa(e);const MG=(e,t,n)=>{var r;return((r=e.getValue(t))==null||(r=r.toString())==null?void 0:r.toLowerCase())===n?.toLowerCase()};MG.autoRemove=e=>qa(e);const RG=(e,t,n)=>{var r;return(r=e.getValue(t))==null?void 0:r.includes(n)};RG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const DG=(e,t,n)=>!n.some(r=>{var i;return!((i=e.getValue(t))!=null&&i.includes(r))});DG.autoRemove=e=>qa(e)||!(e!=null&&e.length);const $G=(e,t,n)=>n.some(r=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(r)});$G.autoRemove=e=>qa(e)||!(e!=null&&e.length);const IG=(e,t,n)=>e.getValue(t)===n;IG.autoRemove=e=>qa(e);const NG=(e,t,n)=>e.getValue(t)==n;NG.autoRemove=e=>qa(e);const uP=(e,t,n)=>{let[r,i]=n;const o=e.getValue(t);return o>=r&&o<=i};uP.resolveFilterValue=e=>{let[t,n]=e,r=typeof t!="number"?parseFloat(t):t,i=typeof n!="number"?parseFloat(n):n,o=t===null||Number.isNaN(r)?-1/0:r,a=n===null||Number.isNaN(i)?1/0:i;if(o>a){const s=o;o=a,a=s}return[o,a]};uP.autoRemove=e=>qa(e)||qa(e[0])&&qa(e[1]);const eu={includesString:kG,includesStringSensitive:TG,equalsString:MG,arrIncludes:RG,arrIncludesAll:DG,arrIncludesSome:$G,equals:IG,weakEquals:NG,inNumberRange:uP};function qa(e){return e==null||e===""}const wVe={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:Vo("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);return typeof r=="string"?eu.includesString:typeof r=="number"?eu.inNumberRange:typeof r=="boolean"||r!==null&&typeof r=="object"?eu.equals:Array.isArray(r)?eu.arrIncludes:eu.weakEquals},e.getFilterFn=()=>{var n,r;return g2(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(r=t.options.filterFns)==null?void 0:r[e.columnDef.filterFn])!=null?n:eu[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,r,i;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((r=t.options.enableColumnFilters)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(r=>r.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,r;return(n=(r=t.getState().columnFilters)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(r=>{const i=e.getFilterFn(),o=r?.find(c=>c.id===e.id),a=fl(n,o?o.value:void 0);if(II(i,a,e)){var s;return(s=r?.filter(c=>c.id!==e.id))!=null?s:[]}const u={id:e.id,value:a};if(o){var l;return(l=r?.map(c=>c.id===e.id?u:c))!=null?l:[]}return r!=null&&r.length?[...r,u]:[u]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),r=i=>{var o;return(o=fl(t,i))==null?void 0:o.filter(a=>{const s=n.find(u=>u.id===a.id);if(s){const u=s.getFilterFn();if(II(u,a.value,s))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(r)},e.resetColumnFilters=t=>{var n,r;e.setColumnFilters(t?[]:(n=(r=e.initialState)==null?void 0:r.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function II(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const _Ve=(e,t,n)=>n.reduce((r,i)=>{const o=i.getValue(e);return r+(typeof o=="number"?o:0)},0),SVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r>o||r===void 0&&o>=o)&&(r=o)}),r},CVe=(e,t,n)=>{let r;return n.forEach(i=>{const o=i.getValue(e);o!=null&&(r=o)&&(r=o)}),r},EVe=(e,t,n)=>{let r,i;return n.forEach(o=>{const a=o.getValue(e);a!=null&&(r===void 0?a>=a&&(r=i=a):(r>a&&(r=a),i{let n=0,r=0;if(t.forEach(i=>{let o=i.getValue(e);o!=null&&(o=+o)>=o&&(++n,r+=o)}),n)return r/n},AVe=(e,t)=>{if(!t.length)return;const n=t.map(o=>o.getValue(e));if(!gVe(n))return;if(n.length===1)return n[0];const r=Math.floor(n.length/2),i=n.sort((o,a)=>o-a);return n.length%2!==0?i[r]:(i[r-1]+i[r])/2},PVe=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),kVe=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,TVe=(e,t)=>t.length,m3={sum:_Ve,min:SVe,max:CVe,extent:EVe,mean:OVe,median:AVe,unique:PVe,uniqueCount:kVe,count:TVe},MVe={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:Vo("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(r=>r!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,r;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((r=t.options.enableGrouping)!=null?r:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],r=n?.getValue(e.id);if(typeof r=="number")return m3.sum;if(Object.prototype.toString.call(r)==="[object Date]")return m3.extent},e.getAggregationFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(r=t.options.aggregationFns)==null?void 0:r[e.columnDef.aggregationFn])!=null?n:m3[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,r;e.setGrouping(t?[]:(n=(r=e.initialState)==null?void 0:r.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const r=t.getColumn(n);return r!=null&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,r)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var i;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((i=n.subRows)!=null&&i.length)}}};function RVe(e,t,n){if(!(t!=null&&t.length)||!n)return e;const r=e.filter(o=>!t.includes(o.id));return n==="remove"?r:[...t.map(o=>e.find(a=>a.id===o)).filter(Boolean),...r]}const DVe={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:Vo("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=St(n=>[T0(t,n)],n=>n.findIndex(r=>r.id===e.id),Ct(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var r;return((r=T0(t,n)[0])==null?void 0:r.id)===e.id},e.getIsLastColumn=n=>{var r;const i=T0(t,n);return((r=i[i.length-1])==null?void 0:r.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=St(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,r)=>i=>{let o=[];if(!(t!=null&&t.length))o=i;else{const a=[...t],s=[...i];for(;s.length&&a.length;){const u=a.shift(),l=s.findIndex(c=>c.id===u);l>-1&&o.push(s.splice(l,1)[0])}o=[...o,...s]}return RVe(o,n,r)},Ct(e.options,"debugTable"))}},v3=()=>({left:[],right:[]}),$Ve={getInitialState:e=>({columnPinning:v3(),...e}),getDefaultOptions:e=>({onColumnPinningChange:Vo("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const r=e.getLeafColumns().map(i=>i.id).filter(Boolean);t.setColumnPinning(i=>{var o,a;if(n==="right"){var s,u;return{left:((s=i?.left)!=null?s:[]).filter(f=>!(r!=null&&r.includes(f))),right:[...((u=i?.right)!=null?u:[]).filter(f=>!(r!=null&&r.includes(f))),...r]}}if(n==="left"){var l,c;return{left:[...((l=i?.left)!=null?l:[]).filter(f=>!(r!=null&&r.includes(f))),...r],right:((c=i?.right)!=null?c:[]).filter(f=>!(r!=null&&r.includes(f)))}}return{left:((o=i?.left)!=null?o:[]).filter(f=>!(r!=null&&r.includes(f))),right:((a=i?.right)!=null?a:[]).filter(f=>!(r!=null&&r.includes(f)))}})},e.getCanPin=()=>e.getLeafColumns().some(r=>{var i,o,a;return((i=r.columnDef.enablePinning)!=null?i:!0)&&((o=(a=t.options.enableColumnPinning)!=null?a:t.options.enablePinning)!=null?o:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(s=>s.id),{left:r,right:i}=t.getState().columnPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"left":a?"right":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();return i?(n=(r=t.getState().columnPinning)==null||(r=r[i])==null?void 0:r.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,r,i)=>{const o=[...r??[],...i??[]];return n.filter(a=>!o.includes(a.column.id))},Ct(t.options,"debugRows")),e.getLeftVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"left"})),Ct(t.options,"debugRows")),e.getRightVisibleCells=St(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,r)=>(r??[]).map(o=>n.find(a=>a.column.id===o)).filter(Boolean).map(o=>({...o,position:"right"})),Ct(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,r;return e.setColumnPinning(t?v3():(n=(r=e.initialState)==null?void 0:r.columnPinning)!=null?n:v3())},e.getIsSomeColumnsPinned=t=>{var n;const r=e.getState().columnPinning;if(!t){var i,o;return!!((i=r.left)!=null&&i.length||(o=r.right)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e.getLeftLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getRightLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(r=>t.find(i=>i.id===r)).filter(Boolean),Ct(e.options,"debugColumns")),e.getCenterLeafColumns=St(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,r)=>{const i=[...n??[],...r??[]];return t.filter(o=>!i.includes(o.id))},Ct(e.options,"debugColumns"))}},Py={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},y3=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),IVe={getDefaultColumnDef:()=>Py,getInitialState:e=>({columnSizing:{},columnSizingInfo:y3(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:Vo("columnSizing",e),onColumnSizingInfoChange:Vo("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,r,i;const o=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:Py.minSize,(r=o??e.columnDef.size)!=null?r:Py.size),(i=e.columnDef.maxSize)!=null?i:Py.maxSize)},e.getStart=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(0,e.getIndex(n)).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.getAfter=St(n=>[n,T0(t,n),t.getState().columnSizing],(n,r)=>r.slice(e.getIndex(n)+1).reduce((i,o)=>i+o.getSize(),0),Ct(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:r,...i}=n;return i})},e.getCanResize=()=>{var n,r;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((r=t.options.enableColumnResizing)!=null?r:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const r=i=>{if(i.subHeaders.length)i.subHeaders.forEach(r);else{var o;n+=(o=i.column.getSize())!=null?o:0}};return r(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const r=t.getColumn(e.column.id),i=r?.getCanResize();return o=>{if(!r||!i||(o.persist==null||o.persist(),b3(o)&&o.touches&&o.touches.length>1))return;const a=e.getSize(),s=e?e.getLeafHeaders().map(w=>[w.column.id,w.column.getSize()]):[[r.id,r.getSize()]],u=b3(o)?Math.round(o.touches[0].clientX):o.clientX,l={},c=(w,x)=>{typeof x=="number"&&(t.setColumnSizingInfo(S=>{var O,E;const C=t.options.columnResizeDirection==="rtl"?-1:1,k=(x-((O=S?.startOffset)!=null?O:0))*C,M=Math.max(k/((E=S?.startSize)!=null?E:0),-.999999);return S.columnSizingStart.forEach(N=>{let[z,H]=N;l[z]=Math.round(Math.max(H+H*M,0)*100)/100}),{...S,deltaOffset:k,deltaPercentage:M}}),(t.options.columnResizeMode==="onChange"||w==="end")&&t.setColumnSizing(S=>({...S,...l})))},f=w=>c("move",w),h=w=>{c("end",w),t.setColumnSizingInfo(x=>({...x,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},p=n||typeof document<"u"?document:null,m={moveHandler:w=>f(w.clientX),upHandler:w=>{p?.removeEventListener("mousemove",m.moveHandler),p?.removeEventListener("mouseup",m.upHandler),h(w.clientX)}},v={moveHandler:w=>(w.cancelable&&(w.preventDefault(),w.stopPropagation()),f(w.touches[0].clientX),!1),upHandler:w=>{var x;p?.removeEventListener("touchmove",v.moveHandler),p?.removeEventListener("touchend",v.upHandler),w.cancelable&&(w.preventDefault(),w.stopPropagation()),h((x=w.touches[0])==null?void 0:x.clientX)}},b=NVe()?{passive:!1}:!1;b3(o)?(p?.addEventListener("touchmove",v.moveHandler,b),p?.addEventListener("touchend",v.upHandler,b)):(p?.addEventListener("mousemove",m.moveHandler,b),p?.addEventListener("mouseup",m.upHandler,b)),t.setColumnSizingInfo(w=>({...w,startOffset:u,startSize:a,deltaOffset:0,deltaPercentage:0,columnSizingStart:s,isResizingColumn:r.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?y3():(n=e.initialState.columnSizingInfo)!=null?n:y3())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((r,i)=>r+i.getSize(),0))!=null?t:0}}};let ky=null;function NVe(){if(typeof ky=="boolean")return ky;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return ky=e,ky}function b3(e){return e.type==="touchstart"}const LVe={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:Vo("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(r=>({...r,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,r;const i=e.columns;return(n=i.length?i.some(o=>o.getIsVisible()):(r=t.getState().columnVisibility)==null?void 0:r[e.id])!=null?n:!0},e.getCanHide=()=>{var n,r;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((r=t.options.enableHiding)!=null?r:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=St(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(r=>r.column.getIsVisible()),Ct(t.options,"debugRows")),e.getVisibleCells=St(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,r,i)=>[...n,...r,...i],Ct(t.options,"debugRows"))},createTable:e=>{const t=(n,r)=>St(()=>[r(),r().filter(i=>i.getIsVisible()).map(i=>i.id).join("_")],i=>i.filter(o=>o.getIsVisible==null?void 0:o.getIsVisible()),Ct(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var r;e.setColumnVisibility(n?{}:(r=e.initialState.columnVisibility)!=null?r:{})},e.toggleAllColumnsVisible=n=>{var r;n=(r=n)!=null?r:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((i,o)=>({...i,[o.id]:n||!(o.getCanHide!=null&&o.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var r;e.toggleAllColumnsVisible((r=n.target)==null?void 0:r.checked)}}};function T0(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const FVe={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},jVe={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:Vo("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const r=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof r=="string"||typeof r=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,r,i,o;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((r=t.options.enableGlobalFilter)!=null?r:!0)&&((i=t.options.enableFilters)!=null?i:!0)&&((o=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?o:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>eu.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:r}=e.options;return g2(r)?r:r==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[r])!=null?t:eu[r]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},BVe={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:Vo("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetExpanded)!=null?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=r=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(r),e.toggleAllRowsExpanded=r=>{r??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=r=>{var i,o;e.setExpanded(r?{}:(i=(o=e.initialState)==null?void 0:o.expanded)!=null?i:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(r=>r.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>r=>{r.persist==null||r.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const r=e.getState().expanded;return r===!0||Object.values(r).some(Boolean)},e.getIsAllRowsExpanded=()=>{const r=e.getState().expanded;return typeof r=="boolean"?r===!0:!(!Object.keys(r).length||e.getRowModel().flatRows.some(i=>!i.getIsExpanded()))},e.getExpandedDepth=()=>{let r=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(o=>{const a=o.split(".");r=Math.max(r,a.length)}),r},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(r=>{var i;const o=r===!0?!0:!!(r!=null&&r[e.id]);let a={};if(r===!0?Object.keys(t.getRowModel().rowsById).forEach(s=>{a[s]=!0}):a=r,n=(i=n)!=null?i:!o,!o&&n)return{...a,[e.id]:!0};if(o&&!n){const{[e.id]:s,...u}=a;return u}return r})},e.getIsExpanded=()=>{var n;const r=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:r===!0||r?.[e.id])},e.getCanExpand=()=>{var n,r,i;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((r=t.options.enableExpanding)!=null?r:!0)&&!!((i=e.subRows)!=null&&i.length)},e.getIsAllParentsExpanded=()=>{let n=!0,r=e;for(;n&&r.parentId;)r=t.getRow(r.parentId,!0),n=r.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},a4=0,s4=10,x3=()=>({pageIndex:a4,pageSize:s4}),zVe={getInitialState:e=>({...e,pagination:{...x3(),...e?.pagination}}),getDefaultOptions:e=>({onPaginationChange:Vo("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var r,i;if(!t){e._queue(()=>{t=!0});return}if((r=(i=e.options.autoResetAll)!=null?i:e.options.autoResetPageIndex)!=null?r:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=r=>{const i=o=>fl(r,o);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(i)},e.resetPagination=r=>{var i;e.setPagination(r?x3():(i=e.initialState.pagination)!=null?i:x3())},e.setPageIndex=r=>{e.setPagination(i=>{let o=fl(r,i.pageIndex);const a=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return o=Math.max(0,Math.min(o,a)),{...i,pageIndex:o}})},e.resetPageIndex=r=>{var i,o;e.setPageIndex(r?a4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageIndex)!=null?i:a4)},e.resetPageSize=r=>{var i,o;e.setPageSize(r?s4:(i=(o=e.initialState)==null||(o=o.pagination)==null?void 0:o.pageSize)!=null?i:s4)},e.setPageSize=r=>{e.setPagination(i=>{const o=Math.max(1,fl(r,i.pageSize)),a=i.pageSize*i.pageIndex,s=Math.floor(a/o);return{...i,pageIndex:s,pageSize:o}})},e.setPageCount=r=>e.setPagination(i=>{var o;let a=fl(r,(o=e.options.pageCount)!=null?o:-1);return typeof a=="number"&&(a=Math.max(-1,a)),{...i,pageCount:a}}),e.getPageOptions=St(()=>[e.getPageCount()],r=>{let i=[];return r&&r>0&&(i=[...new Array(r)].fill(null).map((o,a)=>a)),i},Ct(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:r}=e.getState().pagination,i=e.getPageCount();return i===-1?!0:i===0?!1:re.setPageIndex(r=>r-1),e.nextPage=()=>e.setPageIndex(r=>r+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var r;return(r=e.options.pageCount)!=null?r:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var r;return(r=e.options.rowCount)!=null?r:e.getPrePaginationRowModel().rows.length}}},w3=()=>({top:[],bottom:[]}),UVe={getInitialState:e=>({rowPinning:w3(),...e}),getDefaultOptions:e=>({onRowPinningChange:Vo("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,r,i)=>{const o=r?e.getLeafRows().map(u=>{let{id:l}=u;return l}):[],a=i?e.getParentRows().map(u=>{let{id:l}=u;return l}):[],s=new Set([...a,e.id,...o]);t.setRowPinning(u=>{var l,c;if(n==="bottom"){var f,h;return{top:((f=u?.top)!=null?f:[]).filter(v=>!(s!=null&&s.has(v))),bottom:[...((h=u?.bottom)!=null?h:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)]}}if(n==="top"){var p,m;return{top:[...((p=u?.top)!=null?p:[]).filter(v=>!(s!=null&&s.has(v))),...Array.from(s)],bottom:((m=u?.bottom)!=null?m:[]).filter(v=>!(s!=null&&s.has(v)))}}return{top:((l=u?.top)!=null?l:[]).filter(v=>!(s!=null&&s.has(v))),bottom:((c=u?.bottom)!=null?c:[]).filter(v=>!(s!=null&&s.has(v)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:r,enablePinning:i}=t.options;return typeof r=="function"?r(e):(n=r??i)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:r,bottom:i}=t.getState().rowPinning,o=n.some(s=>r?.includes(s)),a=n.some(s=>i?.includes(s));return o?"top":a?"bottom":!1},e.getPinnedIndex=()=>{var n,r;const i=e.getIsPinned();if(!i)return-1;const o=(n=i==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(a=>{let{id:s}=a;return s});return(r=o?.indexOf(e.id))!=null?r:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,r;return e.setRowPinning(t?w3():(n=(r=e.initialState)==null?void 0:r.rowPinning)!=null?n:w3())},e.getIsSomeRowsPinned=t=>{var n;const r=e.getState().rowPinning;if(!t){var i,o;return!!((i=r.top)!=null&&i.length||(o=r.bottom)!=null&&o.length)}return!!((n=r[t])!=null&&n.length)},e._getPinnedRows=(t,n,r)=>{var i;return((i=e.options.keepPinnedRows)==null||i?(n??[]).map(a=>{const s=e.getRow(a,!0);return s.getIsAllParentsExpanded()?s:null}):(n??[]).map(a=>t.find(s=>s.id===a))).filter(Boolean).map(a=>({...a,position:r}))},e.getTopRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),Ct(e.options,"debugRows")),e.getBottomRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),Ct(e.options,"debugRows")),e.getCenterRows=St(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,r)=>{const i=new Set([...n??[],...r??[]]);return t.filter(o=>!i.has(o.id))},Ct(e.options,"debugRows"))}},VVe={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:Vo("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const r={...n},i=e.getPreGroupedRowModel().flatRows;return t?i.forEach(o=>{o.getCanSelect()&&(r[o.id]=!0)}):i.forEach(o=>{delete r[o.id]}),r})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const r=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),i={...n};return e.getRowModel().rows.forEach(o=>{u4(i,o.id,r,!0,e)}),i}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=St(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getFilteredSelectedRowModel=St(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getGroupedSelectedRowModel=St(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?_3(e,n):{rows:[],flatRows:[],rowsById:{}},Ct(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let r=!!(t.length&&Object.keys(n).length);return r&&t.some(i=>i.getCanSelect()&&!n[i.id])&&(r=!1),r},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(i=>i.getCanSelect()),{rowSelection:n}=e.getState();let r=!!t.length;return r&&t.some(i=>!n[i.id])&&(r=!1),r},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,r)=>{const i=e.getIsSelected();t.setRowSelection(o=>{var a;if(n=typeof n<"u"?n:!i,e.getCanSelect()&&i===n)return o;const s={...o};return u4(s,e.id,n,(a=r?.selectChildren)!=null?a:!0,t),s})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return lP(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return l4(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return r=>{var i;n&&e.toggleSelected((i=r.target)==null?void 0:i.checked)}}}},u4=(e,t,n,r,i)=>{var o;const a=i.getRow(t,!0);n?(a.getCanMultiSelect()||Object.keys(e).forEach(s=>delete e[s]),a.getCanSelect()&&(e[t]=!0)):delete e[t],r&&(o=a.subRows)!=null&&o.length&&a.getCanSelectSubRows()&&a.subRows.forEach(s=>u4(e,s.id,n,r,i))};function _3(e,t){const n=e.getState().rowSelection,r=[],i={},o=function(a,s){return a.map(u=>{var l;const c=lP(u,n);if(c&&(r.push(u),i[u.id]=u),(l=u.subRows)!=null&&l.length&&(u={...u,subRows:o(u.subRows)}),c)return u}).filter(Boolean)};return{rows:o(t.rows),flatRows:r,rowsById:i}}function lP(e,t){var n;return(n=t[e.id])!=null?n:!1}function l4(e,t,n){var r;if(!((r=e.subRows)!=null&&r.length))return!1;let i=!0,o=!1;return e.subRows.forEach(a=>{if(!(o&&!i)&&(a.getCanSelect()&&(lP(a,t)?o=!0:i=!1),a.subRows&&a.subRows.length)){const s=l4(a,t);s==="all"?o=!0:(s==="some"&&(o=!0),i=!1)}}),i?"all":o?"some":!1}const c4=/([0-9]+)/gm,WVe=(e,t,n)=>LG(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),HVe=(e,t,n)=>LG(Il(e.getValue(n)),Il(t.getValue(n))),KVe=(e,t,n)=>cP(Il(e.getValue(n)).toLowerCase(),Il(t.getValue(n)).toLowerCase()),qVe=(e,t,n)=>cP(Il(e.getValue(n)),Il(t.getValue(n))),GVe=(e,t,n)=>{const r=e.getValue(n),i=t.getValue(n);return r>i?1:rcP(e.getValue(n),t.getValue(n));function cP(e,t){return e===t?0:e>t?1:-1}function Il(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function LG(e,t){const n=e.split(c4).filter(Boolean),r=t.split(c4).filter(Boolean);for(;n.length&&r.length;){const i=n.shift(),o=r.shift(),a=parseInt(i,10),s=parseInt(o,10),u=[a,s].sort();if(isNaN(u[0])){if(i>o)return 1;if(o>i)return-1;continue}if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>s)return 1;if(s>a)return-1}return n.length-r.length}const Zp={alphanumeric:WVe,alphanumericCaseSensitive:HVe,text:KVe,textCaseSensitive:qVe,datetime:GVe,basic:YVe},ZVe={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:Vo("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let r=!1;for(const i of n){const o=i?.getValue(e.id);if(Object.prototype.toString.call(o)==="[object Date]")return Zp.datetime;if(typeof o=="string"&&(r=!0,o.split(c4).length>1))return Zp.alphanumeric}return r?Zp.text:Zp.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof n?.getValue(e.id)=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,r;if(!e)throw new Error;return g2(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(r=t.options.sortingFns)==null?void 0:r[e.columnDef.sortingFn])!=null?n:Zp[e.columnDef.sortingFn]},e.toggleSorting=(n,r)=>{const i=e.getNextSortingOrder(),o=typeof n<"u"&&n!==null;t.setSorting(a=>{const s=a?.find(p=>p.id===e.id),u=a?.findIndex(p=>p.id===e.id);let l=[],c,f=o?n:i==="desc";if(a!=null&&a.length&&e.getCanMultiSort()&&r?s?c="toggle":c="add":a!=null&&a.length&&u!==a.length-1?c="replace":s?c="toggle":c="replace",c==="toggle"&&(o||i||(c="remove")),c==="add"){var h;l=[...a,{id:e.id,desc:f}],l.splice(0,l.length-((h=t.options.maxMultiSortColCount)!=null?h:Number.MAX_SAFE_INTEGER))}else c==="toggle"?l=a.map(p=>p.id===e.id?{...p,desc:f}:p):c==="remove"?l=a.filter(p=>p.id!==e.id):l=[{id:e.id,desc:f}];return l})},e.getFirstSortDir=()=>{var n,r;return((n=(r=e.columnDef.sortDescFirst)!=null?r:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var r,i;const o=e.getFirstSortDir(),a=e.getIsSorted();return a?a!==o&&((r=t.options.enableSortingRemoval)==null||r)&&(!(n&&(i=t.options.enableMultiRemove)!=null)||i)?!1:a==="desc"?"asc":"desc":o},e.getCanSort=()=>{var n,r;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((r=t.options.enableSorting)!=null?r:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,r;return(n=(r=e.columnDef.enableMultiSort)!=null?r:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const r=(n=t.getState().sorting)==null?void 0:n.find(i=>i.id===e.id);return r?r.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,r;return(n=(r=t.getState().sorting)==null?void 0:r.findIndex(i=>i.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(r=>r.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return r=>{n&&(r.persist==null||r.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(r):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,r;e.setSorting(t?[]:(n=(r=e.initialState)==null?void 0:r.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},XVe=[bVe,LVe,DVe,$Ve,xVe,wVe,FVe,jVe,ZVe,MVe,BVe,zVe,UVe,VVe,IVe];function QVe(e){var t,n;const r=[...XVe,...(t=e._features)!=null?t:[]];let i={_features:r};const o=i._features.reduce((h,p)=>Object.assign(h,p.getDefaultOptions==null?void 0:p.getDefaultOptions(i)),{}),a=h=>i.options.mergeOptions?i.options.mergeOptions(o,h):{...o,...h};let u={...{},...(n=e.initialState)!=null?n:{}};i._features.forEach(h=>{var p;u=(p=h.getInitialState==null?void 0:h.getInitialState(u))!=null?p:u});const l=[];let c=!1;const f={_features:r,options:{...o,...e},initialState:u,_queue:h=>{l.push(h),c||(c=!0,Promise.resolve().then(()=>{for(;l.length;)l.shift()();c=!1}).catch(p=>setTimeout(()=>{throw p})))},reset:()=>{i.setState(i.initialState)},setOptions:h=>{const p=fl(h,i.options);i.options=a(p)},getState:()=>i.options.state,setState:h=>{i.options.onStateChange==null||i.options.onStateChange(h)},_getRowId:(h,p,m)=>{var v;return(v=i.options.getRowId==null?void 0:i.options.getRowId(h,p,m))!=null?v:`${m?[m.id,p].join("."):p}`},getCoreRowModel:()=>(i._getCoreRowModel||(i._getCoreRowModel=i.options.getCoreRowModel(i)),i._getCoreRowModel()),getRowModel:()=>i.getPaginationRowModel(),getRow:(h,p)=>{let m=(p?i.getPrePaginationRowModel():i.getRowModel()).rowsById[h];if(!m&&(m=i.getCoreRowModel().rowsById[h],!m))throw new Error;return m},_getDefaultColumnDef:St(()=>[i.options.defaultColumn],h=>{var p;return h=(p=h)!=null?p:{},{header:m=>{const v=m.header.column.columnDef;return v.accessorKey?v.accessorKey:v.accessorFn?v.id:null},cell:m=>{var v,b;return(v=(b=m.renderValue())==null||b.toString==null?void 0:b.toString())!=null?v:null},...i._features.reduce((m,v)=>Object.assign(m,v.getDefaultColumnDef==null?void 0:v.getDefaultColumnDef()),{}),...h}},Ct(e,"debugColumns")),_getColumnDefs:()=>i.options.columns,getAllColumns:St(()=>[i._getColumnDefs()],h=>{const p=function(m,v,b){return b===void 0&&(b=0),m.map(w=>{const x=yVe(i,w,b,v),S=w;return x.columns=S.columns?p(S.columns,x,b+1):[],x})};return p(h)},Ct(e,"debugColumns")),getAllFlatColumns:St(()=>[i.getAllColumns()],h=>h.flatMap(p=>p.getFlatColumns()),Ct(e,"debugColumns")),_getAllFlatColumnsById:St(()=>[i.getAllFlatColumns()],h=>h.reduce((p,m)=>(p[m.id]=m,p),{}),Ct(e,"debugColumns")),getAllLeafColumns:St(()=>[i.getAllColumns(),i._getOrderColumnsFn()],(h,p)=>{let m=h.flatMap(v=>v.getLeafColumns());return p(m)},Ct(e,"debugColumns")),getColumn:h=>i._getAllFlatColumnsById()[h]};Object.assign(i,f);for(let h=0;hSt(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},r=function(i,o,a){o===void 0&&(o=0);const s=[];for(let l=0;le._autoResetPageIndex()))}function JVe(e){const t=[],n=r=>{var i;t.push(r),(i=r.subRows)!=null&&i.length&&r.getIsExpanded()&&r.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function FG(e,t,n){return n.options.filterFromLeafRows?eWe(e,t,n):tWe(e,t,n)}function eWe(e,t,n){var r;const i=[],o={},a=(r=n.options.maxLeafRowFilterDepth)!=null?r:100,s=function(u,l){l===void 0&&(l=0);const c=[];for(let h=0;hSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter,e.getFilteredRowModel()],(n,r,i)=>{if(!n.rows.length||!(r!=null&&r.length)&&!i)return n;const o=[...r.map(s=>s.id).filter(s=>s!==t),i?"__global__":void 0].filter(Boolean),a=s=>{for(let u=0;uSt(()=>{var n;return[(n=e.getColumn(t))==null?void 0:n.getFacetedRowModel()]},n=>{if(!n)return new Map;let r=new Map;for(let o=0;oSt(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,r)=>{if(!t.rows.length||!(n!=null&&n.length)&&!r){for(let h=0;h{var p;const m=e.getColumn(h.id);if(!m)return;const v=m.getFilterFn();v&&i.push({id:h.id,filterFn:v,resolvedValue:(p=v.resolveFilterValue==null?void 0:v.resolveFilterValue(h.value))!=null?p:h.value})});const a=(n??[]).map(h=>h.id),s=e.getGlobalFilterFn(),u=e.getAllLeafColumns().filter(h=>h.getCanGlobalFilter());r&&s&&u.length&&(a.push("__global__"),u.forEach(h=>{var p;o.push({id:h.id,filterFn:s,resolvedValue:(p=s.resolveFilterValue==null?void 0:s.resolveFilterValue(r))!=null?p:r})}));let l,c;for(let h=0;h{p.columnFiltersMeta[v]=b})}if(o.length){for(let m=0;m{p.columnFiltersMeta[v]=b})){p.columnFilters.__global__=!0;break}}p.columnFilters.__global__!==!0&&(p.columnFilters.__global__=!1)}}const f=h=>{for(let p=0;pe._autoResetPageIndex()))}function SQe(e){return t=>St(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,r)=>{if(!r.rows.length)return r;const{pageSize:i,pageIndex:o}=n;let{rows:a,flatRows:s,rowsById:u}=r;const l=i*o,c=l+i;a=a.slice(l,c);let f;t.options.paginateExpandedRows?f={rows:a,flatRows:s,rowsById:u}:f=JVe({rows:a,flatRows:s,rowsById:u}),f.flatRows=[];const h=p=>{f.flatRows.push(p),p.subRows.length&&p.subRows.forEach(h)};return f.rows.forEach(h),f},Ct(t.options,"debugTable"))}function CQe(){return e=>St(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const r=e.getState().sorting,i=[],o=r.filter(u=>{var l;return(l=e.getColumn(u.id))==null?void 0:l.getCanSort()}),a={};o.forEach(u=>{const l=e.getColumn(u.id);l&&(a[u.id]={sortUndefined:l.columnDef.sortUndefined,invertSorting:l.columnDef.invertSorting,sortingFn:l.getSortingFn()})});const s=u=>{const l=u.map(c=>({...c}));return l.sort((c,f)=>{for(let p=0;p{var f;i.push(c),(f=c.subRows)!=null&&f.length&&(c.subRows=s(c.subRows))}),l};return{rows:s(n.rows),flatRows:i,rowsById:n.rowsById}},Ct(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** * react-table * * Copyright (c) TanStack @@ -508,32 +508,32 @@ Defaulting to \`null\`.`}var fQe=xG,dQe=_G,sVe="Separator",RI="horizontal",uVe=[ * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function SQe(e,t){return e?tWe(e)?y.createElement(e,t):e:null}function tWe(e){return nWe(e)||typeof e=="function"||rWe(e)}function nWe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function rWe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function CQe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:XVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const jG=Object.freeze({left:0,top:0,width:16,height:16}),bx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),c5=Object.freeze({...jG,...bx}),f4=Object.freeze({...c5,body:"",hidden:!1});function iWe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function II(e,t){const n=iWe(e,t);for(const r in f4)r in bx?r in e&&!(r in n)&&(n[r]=bx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function oWe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function aWe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=II(r[s]||i[s],o)}return a(t),n.forEach(a),II(e,o)}function BG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=oWe(e);for(const i in r){const o=r[i];o&&(t(i,aWe(e,i,o)),n.push(i))}return n}const sWe={provider:"",aliases:{},not_found:{},...jG};function S3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function zG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!S3(e,sWe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!S3(o,f4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!S3(o,f4))return null}return t}const UG=/^[a-z0-9]+(-[a-z0-9]+)*$/,m2=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!r1(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!r1(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!r1(s,n)?null:s}return null},r1=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,NI=Object.create(null);function uWe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function lf(e,t){const n=NI[e]||(NI[e]=Object.create(null));return n[t]||(n[t]=uWe(e,t))}function f5(e,t){return zG(t)?BG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function lWe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let nm=!1;function VG(e){return typeof e=="boolean"&&(nm=e),nm}function LI(e){const t=typeof e=="string"?m2(e,!0,nm):e;if(t){const n=lf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function cWe(e,t){const n=m2(e,!0,nm);if(!n)return!1;const r=lf(n.provider,n.prefix);return t?lWe(r,n.name,t):(r.missing.add(n.name),!0)}function fWe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),nm&&!t&&!e.prefix){let i=!1;return zG(e)&&(e.prefix="",BG(e,(o,a)=>{cWe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!r1({provider:t,prefix:n,name:"a"}))return!1;const r=lf(t,n);return!!f5(r,e)}const WG=Object.freeze({width:null,height:null}),HG=Object.freeze({...WG,...bx}),dWe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,hWe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function FI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(dWe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=hWe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function pWe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function gWe(e,t){return e?""+e+""+t:t}function mWe(e,t,n){const r=pWe(e);return gWe(r.defs,t+r.content+n)}const vWe=e=>e==="unset"||e==="undefined"||e==="none";function yWe(e,t){const n={...c5,...e},r={...HG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=mWe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=FI(f,u/l)):(c=a==="auto"?u:a,f=s===null?FI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{vWe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const bWe=/\sid="(\S+)"/g,xWe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let wWe=0;function _We(e,t=xWe){const n=[];let r;for(;r=bWe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(wWe++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const d4=Object.create(null);function SWe(e,t){d4[e]=t}function h4(e){return d4[e]||d4[""]}function d5(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const h5=Object.create(null),Xp=["https://api.simplesvg.com","https://api.unisvg.com"],i1=[];for(;Xp.length>0;)Xp.length===1||Math.random()>.5?i1.push(Xp.shift()):i1.push(Xp.pop());h5[""]=d5({resources:["https://api.iconify.design"].concat(i1)});function CWe(e,t){const n=d5(t);return n===null?!1:(h5[e]=n,!0)}function p5(e){return h5[e]}const EWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let jI=EWe();function OWe(e,t){const n=p5(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function AWe(e){return e===404}const PWe=(e,t,n)=>{const r=[],i=OWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function kWe(e){if(typeof e=="string"){const t=p5(e);if(t)return t.path}return"/"}const TWe=(e,t,n)=>{if(!jI){n("abort",424);return}let r=kWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;jI(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(AWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},MWe={prepare:PWe,send:TWe};function RWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=lf(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function KG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function DWe(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||KG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let $We=0;function IWe(e,t,n){const r=$We++,i=KG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function NWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?m2(i,t,n):i;o&&r.push(o)}),r}var LWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function FWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const N=k!=="success";switch(h=h.filter(z=>z!==C),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(N){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const z=e.resources.indexOf(C.resource);z!==-1&&z!==e.index&&(e.index=z)}u="completed",p.forEach(z=>{z(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,N)=>{O(k,M,N)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function qG(e){const t={...LWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=FWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function BI(){}const C3=Object.create(null);function jWe(e){if(!C3[e]){const t=p5(e);if(!t)return;const n=qG(t),r={config:t,redundancy:n};C3[e]=r}return C3[e]}function BWe(e,t,n){let r,i;if(typeof e=="string"){const o=h4(e);if(!o)return n(void 0,424),BI;i=o.send;const a=jWe(e);a&&(r=a.redundancy)}else{const o=d5(e);if(o){r=qG(o);const a=e.resources?e.resources[0]:"",s=h4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),BI):r.query(t,i,n)().abort}const zI="iconify2",rm="iconify",GG=rm+"-count",UI=rm+"-version",YG=36e5,zWe=168,UWe=50;function p4(e,t){try{return e.getItem(t)}catch{}}function g5(e,t,n){try{return e.setItem(t,n),!0}catch{}}function VI(e,t){try{e.removeItem(t)}catch{}}function g4(e,t){return g5(e,GG,t.toString())}function m4(e){return parseInt(p4(e,GG))||0}const v2={local:!0,session:!0},ZG={local:new Set,session:new Set};let m5=!1;function VWe(e){m5=e}let ky=typeof window>"u"?{}:window;function XG(e){const t=e+"Storage";try{if(ky&&ky[t]&&typeof ky[t].length=="number")return ky[t]}catch{}v2[e]=!1}function QG(e,t){const n=XG(e);if(!n)return;const r=p4(n,UI);if(r!==zI){if(r){const s=m4(n);for(let u=0;u{const u=rm+s.toString(),l=p4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}VI(n,u)}};let a=m4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,g4(n,a)):ZG[e].add(s))}function JG(){if(!m5){VWe(!0);for(const e in v2)QG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=lf(r,i);if(!f5(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function WWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in v2)QG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function HWe(e,t){m5||JG();function n(r){let i;if(!v2[r]||!(i=XG(r)))return;const o=ZG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=m4(i),a>=UWe||!g4(i,a+1))return;const s={cached:Math.floor(Date.now()/YG),provider:e.provider,data:t};return g5(i,rm+a.toString(),JSON.stringify(s))}t.lastModified&&!WWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function KWe(){}function qWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,DWe(e)}))}function GWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(UG)?t:n).push(r)}),{valid:t,invalid:n}}function Qp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!f5(e,n).length){i();return}r&&HWe(e,n)}catch(o){console.error(o)}i(),qWe(e)}function WI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function YWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){WI(e.loadIcons(i,r,n),c=>{Qp(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);WI(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;Qp(e,[c],p,!1)})});return}const{valid:a,invalid:s}=GWe(i);if(s.length&&Qp(e,s,null,!1),!a.length)return;const u=r.match(UG)?h4(n):null;if(!u){Qp(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{BWe(n,c,f=>{Qp(e,c.icons,f,!0)})})}))}const ZWe=(e,t)=>{const n=NWe(e,!0,VG()),r=RWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,KWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(lf(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=lf(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&YWe(u,l)}),IWe(t,r,o)};function XWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in WG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const QWe=/[\s,]+/;function JWe(e,t){t.split(QWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function eHe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function tHe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function nHe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function rHe(e){return"data:image/svg+xml,"+nHe(e)}function iHe(e){return'url("'+rHe(e)+'")'}let M0;function oHe(){try{M0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{M0=null}}function aHe(e){return M0===void 0&&oHe(),M0?M0.createHTML(e):e}const eY={...HG,inline:!1},sHe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},uHe={display:"inline-block"},v4={backgroundColor:"currentColor"},tY={backgroundColor:"transparent"},HI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},KI={WebkitMask:v4,mask:v4,background:tY};for(const e in KI){const t=KI[e];for(const n in HI)t[e+n]=HI[n]}const lHe={...eY,inline:!0};function qI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const cHe=(e,t,n)=>{const r=t.inline?lHe:eY,i=XWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?sHe:{}};if(n){const b=m2(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&JWe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=eHe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=yWe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:aHe(_We(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=tHe(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":iHe(v),width:qI(c.width),height:qI(c.height),...uHe,...m?v4:tY,...s},y.createElement("span",u)};VG(!0);SWe("",MWe);if(typeof document<"u"&&typeof window<"u"){JG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!fWe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;CWe(n,i)||console.error(r)}catch{console.error(r)}}}}function nY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=LI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=LI(m);if(l({name:m,data:v}))if(v===void 0){const b=ZWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?cHe({...c5,...h},e,f):e.children?e.children:y.createElement("span",{})}const EQe=y.forwardRef((e,t)=>nY({...e,_ref:t}));y.forwardRef((e,t)=>nY({inline:!0,...e,_ref:t}));var rY="AlertDialog",[fHe,OQe]=vi(rY,[ez]),Du=ez(),iY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(tge,{...r,...n,modal:!0})};iY.displayName=rY;var dHe="AlertDialogTrigger",oY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(nge,{...i,...r,ref:t})});oY.displayName=dHe;var hHe="AlertDialogPortal",aY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(rge,{...r,...n})};aY.displayName=hHe;var pHe="AlertDialogOverlay",sY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ige,{...i,...r,ref:t})});sY.displayName=pHe;var Ld="AlertDialogContent",[gHe,mHe]=fHe(Ld),uY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Du(n),a=y.useRef(null),s=Gt(t,a),u=y.useRef(null);return I.jsx(X0e,{contentName:Ld,titleName:lY,docsSlug:"alert-dialog",children:I.jsx(gHe,{scope:n,cancelRef:u,children:I.jsxs(oge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(OO,{children:r}),I.jsx(yHe,{contentRef:a})]})})})});uY.displayName=Ld;var lY="AlertDialogTitle",cY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(age,{...i,...r,ref:t})});cY.displayName=lY;var fY="AlertDialogDescription",dY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(sge,{...i,...r,ref:t})});dY.displayName=fY;var vHe="AlertDialogAction",hY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(mz,{...i,...r,ref:t})});hY.displayName=vHe;var pY="AlertDialogCancel",gY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=mHe(pY,n),o=Du(n),a=Gt(t,i);return I.jsx(mz,{...o,...r,ref:a})});gY.displayName=pY;var yHe=({contentRef:e})=>{const t=`\`${Ld}\` requires a description for the component to be accessible for screen reader users. + */function EQe(e,t){return e?nWe(e)?y.createElement(e,t):e:null}function nWe(e){return rWe(e)||typeof e=="function"||iWe(e)}function rWe(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function iWe(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function OQe(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=y.useState(()=>({current:QVe(t)})),[r,i]=y.useState(()=>n.current.initialState);return n.current.setOptions(o=>({...o,...e,state:{...r,...e.state},onStateChange:a=>{i(a),e.onStateChange==null||e.onStateChange(a)}})),n.current}const jG=Object.freeze({left:0,top:0,width:16,height:16}),bx=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),fP=Object.freeze({...jG,...bx}),f4=Object.freeze({...fP,body:"",hidden:!1});function oWe(e,t){const n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);const r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function NI(e,t){const n=oWe(e,t);for(const r in f4)r in bx?r in e&&!(r in n)&&(n[r]=bx[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function aWe(e,t){const n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function o(a){if(n[a])return i[a]=[];if(!(a in i)){i[a]=null;const s=r[a]&&r[a].parent,u=s&&o(s);u&&(i[a]=[s].concat(u))}return i[a]}return Object.keys(n).concat(Object.keys(r)).forEach(o),i}function sWe(e,t,n){const r=e.icons,i=e.aliases||Object.create(null);let o={};function a(s){o=NI(r[s]||i[s],o)}return a(t),n.forEach(a),NI(e,o)}function BG(e,t){const n=[];if(typeof e!="object"||typeof e.icons!="object")return n;e.not_found instanceof Array&&e.not_found.forEach(i=>{t(i,null),n.push(i)});const r=aWe(e);for(const i in r){const o=r[i];o&&(t(i,sWe(e,i,o)),n.push(i))}return n}const uWe={provider:"",aliases:{},not_found:{},...jG};function S3(e,t){for(const n in t)if(n in e&&typeof e[n]!=typeof t[n])return!1;return!0}function zG(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!S3(e,uWe))return null;const n=t.icons;for(const i in n){const o=n[i];if(!i||typeof o.body!="string"||!S3(o,f4))return null}const r=t.aliases||Object.create(null);for(const i in r){const o=r[i],a=o.parent;if(!i||typeof a!="string"||!n[a]&&!r[a]||!S3(o,f4))return null}return t}const UG=/^[a-z0-9]+(-[a-z0-9]+)*$/,m2=(e,t,n,r="")=>{const i=e.split(":");if(e.slice(0,1)==="@"){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){const s=i.pop(),u=i.pop(),l={provider:i.length>0?i[0]:r,prefix:u,name:s};return t&&!i1(l)?null:l}const o=i[0],a=o.split("-");if(a.length>1){const s={provider:r,prefix:a.shift(),name:a.join("-")};return t&&!i1(s)?null:s}if(n&&r===""){const s={provider:r,prefix:"",name:o};return t&&!i1(s,n)?null:s}return null},i1=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,LI=Object.create(null);function lWe(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function lf(e,t){const n=LI[e]||(LI[e]=Object.create(null));return n[t]||(n[t]=lWe(e,t))}function dP(e,t){return zG(t)?BG(t,(n,r)=>{r?e.icons[n]=r:e.missing.add(n)}):[]}function cWe(e,t,n){try{if(typeof n.body=="string")return e.icons[t]={...n},!0}catch{}return!1}let rm=!1;function VG(e){return typeof e=="boolean"&&(rm=e),rm}function FI(e){const t=typeof e=="string"?m2(e,!0,rm):e;if(t){const n=lf(t.provider,t.prefix),r=t.name;return n.icons[r]||(n.missing.has(r)?null:void 0)}}function fWe(e,t){const n=m2(e,!0,rm);if(!n)return!1;const r=lf(n.provider,n.prefix);return t?cWe(r,n.name,t):(r.missing.add(n.name),!0)}function dWe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),rm&&!t&&!e.prefix){let i=!1;return zG(e)&&(e.prefix="",BG(e,(o,a)=>{fWe(o,a)&&(i=!0)})),i}const n=e.prefix;if(!i1({provider:t,prefix:n,name:"a"}))return!1;const r=lf(t,n);return!!dP(r,e)}const WG=Object.freeze({width:null,height:null}),HG=Object.freeze({...WG,...bx}),hWe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,pWe=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function jI(e,t,n){if(t===1)return e;if(n=n||100,typeof e=="number")return Math.ceil(e*t*n)/n;if(typeof e!="string")return e;const r=e.split(hWe);if(r===null||!r.length)return e;const i=[];let o=r.shift(),a=pWe.test(o);for(;;){if(a){const s=parseFloat(o);isNaN(s)?i.push(o):i.push(Math.ceil(s*t*n)/n)}else i.push(o);if(o=r.shift(),o===void 0)return i.join("");a=!a}}function gWe(e,t="defs"){let n="";const r=e.indexOf("<"+t);for(;r>=0;){const i=e.indexOf(">",r),o=e.indexOf("",o);if(a===-1)break;n+=e.slice(i+1,o).trim(),e=e.slice(0,r).trim()+e.slice(a+1)}return{defs:n,content:e}}function mWe(e,t){return e?""+e+""+t:t}function vWe(e,t,n){const r=gWe(e);return mWe(r.defs,t+r.content+n)}const yWe=e=>e==="unset"||e==="undefined"||e==="none";function bWe(e,t){const n={...fP,...e},r={...HG,...t},i={left:n.left,top:n.top,width:n.width,height:n.height};let o=n.body;[n,r].forEach(v=>{const b=[],w=v.hFlip,x=v.vFlip;let S=v.rotate;w?x?S+=2:(b.push("translate("+(i.width+i.left).toString()+" "+(0-i.top).toString()+")"),b.push("scale(-1 1)"),i.top=i.left=0):x&&(b.push("translate("+(0-i.left).toString()+" "+(i.height+i.top).toString()+")"),b.push("scale(1 -1)"),i.top=i.left=0);let O;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:O=i.height/2+i.top,b.unshift("rotate(90 "+O.toString()+" "+O.toString()+")");break;case 2:b.unshift("rotate(180 "+(i.width/2+i.left).toString()+" "+(i.height/2+i.top).toString()+")");break;case 3:O=i.width/2+i.left,b.unshift("rotate(-90 "+O.toString()+" "+O.toString()+")");break}S%2===1&&(i.left!==i.top&&(O=i.left,i.left=i.top,i.top=O),i.width!==i.height&&(O=i.width,i.width=i.height,i.height=O)),b.length&&(o=vWe(o,'',""))});const a=r.width,s=r.height,u=i.width,l=i.height;let c,f;a===null?(f=s===null?"1em":s==="auto"?l:s,c=jI(f,u/l)):(c=a==="auto"?u:a,f=s===null?jI(c,l/u):s==="auto"?l:s);const h={},p=(v,b)=>{yWe(b)||(h[v]=b.toString())};p("width",c),p("height",f);const m=[i.left,i.top,u,l];return h.viewBox=m.join(" "),{attributes:h,viewBox:m,body:o}}const xWe=/\sid="(\S+)"/g,wWe="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let _We=0;function SWe(e,t=wWe){const n=[];let r;for(;r=xWe.exec(e);)n.push(r[1]);if(!n.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return n.forEach(o=>{const a=typeof t=="function"?t(o):t+(_We++).toString(),s=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+s+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}const d4=Object.create(null);function CWe(e,t){d4[e]=t}function h4(e){return d4[e]||d4[""]}function hP(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const pP=Object.create(null),Xp=["https://api.simplesvg.com","https://api.unisvg.com"],o1=[];for(;Xp.length>0;)Xp.length===1||Math.random()>.5?o1.push(Xp.shift()):o1.push(Xp.pop());pP[""]=hP({resources:["https://api.iconify.design"].concat(o1)});function EWe(e,t){const n=hP(t);return n===null?!1:(pP[e]=n,!0)}function gP(e){return pP[e]}const OWe=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let BI=OWe();function AWe(e,t){const n=gP(e);if(!n)return 0;let r;if(!n.maxURL)r=0;else{let i=0;n.resources.forEach(a=>{i=Math.max(i,a.length)});const o=t+".json?icons=";r=n.maxURL-i-n.path.length-o.length}return r}function PWe(e){return e===404}const kWe=(e,t,n)=>{const r=[],i=AWe(e,t),o="icons";let a={type:o,provider:e,prefix:t,icons:[]},s=0;return n.forEach((u,l)=>{s+=u.length+1,s>=i&&l>0&&(r.push(a),a={type:o,provider:e,prefix:t,icons:[]},s=u.length),a.icons.push(u)}),r.push(a),r};function TWe(e){if(typeof e=="string"){const t=gP(e);if(t)return t.path}return"/"}const MWe=(e,t,n)=>{if(!BI){n("abort",424);return}let r=TWe(t.provider);switch(t.type){case"icons":{const o=t.prefix,s=t.icons.join(","),u=new URLSearchParams({icons:s});r+=o+".json?"+u.toString();break}case"custom":{const o=t.uri;r+=o.slice(0,1)==="/"?o.slice(1):o;break}default:n("abort",400);return}let i=503;BI(e+r).then(o=>{const a=o.status;if(a!==200){setTimeout(()=>{n(PWe(a)?"abort":"next",a)});return}return i=501,o.json()}).then(o=>{if(typeof o!="object"||o===null){setTimeout(()=>{o===404?n("abort",o):n("next",i)});return}setTimeout(()=>{n("success",o)})}).catch(()=>{n("next",i)})},RWe={prepare:kWe,send:MWe};function DWe(e){const t={loaded:[],missing:[],pending:[]},n=Object.create(null);e.sort((i,o)=>i.provider!==o.provider?i.provider.localeCompare(o.provider):i.prefix!==o.prefix?i.prefix.localeCompare(o.prefix):i.name.localeCompare(o.name));let r={provider:"",prefix:"",name:""};return e.forEach(i=>{if(r.name===i.name&&r.prefix===i.prefix&&r.provider===i.provider)return;r=i;const o=i.provider,a=i.prefix,s=i.name,u=n[o]||(n[o]=Object.create(null)),l=u[a]||(u[a]=lf(o,a));let c;s in l.icons?c=t.loaded:a===""||l.missing.has(s)?c=t.missing:c=t.pending;const f={provider:o,prefix:a,name:s};c.push(f)}),t}function KG(e,t){e.forEach(n=>{const r=n.loaderCallbacks;r&&(n.loaderCallbacks=r.filter(i=>i.id!==t))})}function $We(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let n=!1;const r=e.provider,i=e.prefix;t.forEach(o=>{const a=o.icons,s=a.pending.length;a.pending=a.pending.filter(u=>{if(u.prefix!==i)return!0;const l=u.name;if(e.icons[l])a.loaded.push({provider:r,prefix:i,name:l});else if(e.missing.has(l))a.missing.push({provider:r,prefix:i,name:l});else return n=!0,!0;return!1}),a.pending.length!==s&&(n||KG([e],o.id),o.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),o.abort))})}))}let IWe=0;function NWe(e,t,n){const r=IWe++,i=KG.bind(null,n,r);if(!t.pending.length)return i;const o={id:r,icons:t,callback:e,abort:i};return n.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(o)}),i}function LWe(e,t=!0,n=!1){const r=[];return e.forEach(i=>{const o=typeof i=="string"?m2(i,t,n):i;o&&r.push(o)}),r}var FWe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function jWe(e,t,n,r){const i=e.resources.length,o=e.random?Math.floor(Math.random()*i):e.index;let a;if(e.random){let C=e.resources.slice(0);for(a=[];C.length>1;){const k=Math.floor(Math.random()*C.length);a.push(C[k]),C=C.slice(0,k).concat(C.slice(k+1))}a=a.concat(C)}else a=e.resources.slice(o).concat(e.resources.slice(0,o));const s=Date.now();let u="pending",l=0,c,f=null,h=[],p=[];typeof r=="function"&&p.push(r);function m(){f&&(clearTimeout(f),f=null)}function v(){u==="pending"&&(u="aborted"),m(),h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function b(C,k){k&&(p=[]),typeof C=="function"&&p.push(C)}function w(){return{startTime:s,payload:t,status:u,queriesSent:l,queriesPending:h.length,subscribe:b,abort:v}}function x(){u="failed",p.forEach(C=>{C(void 0,c)})}function S(){h.forEach(C=>{C.status==="pending"&&(C.status="aborted")}),h=[]}function O(C,k,M){const N=k!=="success";switch(h=h.filter(z=>z!==C),u){case"pending":break;case"failed":if(N||!e.dataAfterTimeout)return;break;default:return}if(k==="abort"){c=M,x();return}if(N){c=M,h.length||(a.length?E():x());return}if(m(),S(),!e.random){const z=e.resources.indexOf(C.resource);z!==-1&&z!==e.index&&(e.index=z)}u="completed",p.forEach(z=>{z(M)})}function E(){if(u!=="pending")return;m();const C=a.shift();if(C===void 0){if(h.length){f=setTimeout(()=>{m(),u==="pending"&&(S(),x())},e.timeout);return}x();return}const k={status:"pending",resource:C,callback:(M,N)=>{O(k,M,N)}};h.push(k),l++,f=setTimeout(E,e.rotate),n(C,t,k.callback)}return setTimeout(E),w}function qG(e){const t={...FWe,...e};let n=[];function r(){n=n.filter(s=>s().status==="pending")}function i(s,u,l){const c=jWe(t,s,u,(f,h)=>{r(),l&&l(f,h)});return n.push(c),c}function o(s){return n.find(u=>s(u))||null}return{query:i,find:o,setIndex:s=>{t.index=s},getIndex:()=>t.index,cleanup:r}}function zI(){}const C3=Object.create(null);function BWe(e){if(!C3[e]){const t=gP(e);if(!t)return;const n=qG(t),r={config:t,redundancy:n};C3[e]=r}return C3[e]}function zWe(e,t,n){let r,i;if(typeof e=="string"){const o=h4(e);if(!o)return n(void 0,424),zI;i=o.send;const a=BWe(e);a&&(r=a.redundancy)}else{const o=hP(e);if(o){r=qG(o);const a=e.resources?e.resources[0]:"",s=h4(a);s&&(i=s.send)}}return!r||!i?(n(void 0,424),zI):r.query(t,i,n)().abort}const UI="iconify2",im="iconify",GG=im+"-count",VI=im+"-version",YG=36e5,UWe=168,VWe=50;function p4(e,t){try{return e.getItem(t)}catch{}}function mP(e,t,n){try{return e.setItem(t,n),!0}catch{}}function WI(e,t){try{e.removeItem(t)}catch{}}function g4(e,t){return mP(e,GG,t.toString())}function m4(e){return parseInt(p4(e,GG))||0}const v2={local:!0,session:!0},ZG={local:new Set,session:new Set};let vP=!1;function WWe(e){vP=e}let Ty=typeof window>"u"?{}:window;function XG(e){const t=e+"Storage";try{if(Ty&&Ty[t]&&typeof Ty[t].length=="number")return Ty[t]}catch{}v2[e]=!1}function QG(e,t){const n=XG(e);if(!n)return;const r=p4(n,VI);if(r!==UI){if(r){const s=m4(n);for(let u=0;u{const u=im+s.toString(),l=p4(n,u);if(typeof l=="string"){try{const c=JSON.parse(l);if(typeof c=="object"&&typeof c.cached=="number"&&c.cached>i&&typeof c.provider=="string"&&typeof c.data=="object"&&typeof c.data.prefix=="string"&&t(c,s))return!0}catch{}WI(n,u)}};let a=m4(n);for(let s=a-1;s>=0;s--)o(s)||(s===a-1?(a--,g4(n,a)):ZG[e].add(s))}function JG(){if(!vP){WWe(!0);for(const e in v2)QG(e,t=>{const n=t.data,r=t.provider,i=n.prefix,o=lf(r,i);if(!dP(o,n).length)return!1;const a=n.lastModified||-1;return o.lastModifiedCached=o.lastModifiedCached?Math.min(o.lastModifiedCached,a):a,!0})}}function HWe(e,t){const n=e.lastModifiedCached;if(n&&n>=t)return n===t;if(e.lastModifiedCached=t,n)for(const r in v2)QG(r,i=>{const o=i.data;return i.provider!==e.provider||o.prefix!==e.prefix||o.lastModified===t});return!0}function KWe(e,t){vP||JG();function n(r){let i;if(!v2[r]||!(i=XG(r)))return;const o=ZG[r];let a;if(o.size)o.delete(a=Array.from(o).shift());else if(a=m4(i),a>=VWe||!g4(i,a+1))return;const s={cached:Math.floor(Date.now()/YG),provider:e.provider,data:t};return mP(i,im+a.toString(),JSON.stringify(s))}t.lastModified&&!HWe(e,t.lastModified)||Object.keys(t.icons).length&&(t.not_found&&(t=Object.assign({},t),delete t.not_found),n("local")||n("session"))}function qWe(){}function GWe(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,$We(e)}))}function YWe(e){const t=[],n=[];return e.forEach(r=>{(r.match(UG)?t:n).push(r)}),{valid:t,invalid:n}}function Qp(e,t,n,r){function i(){const o=e.pendingIcons;t.forEach(a=>{o&&o.delete(a),e.icons[a]||e.missing.add(a)})}if(n&&typeof n=="object")try{if(!dP(e,n).length){i();return}r&&KWe(e,n)}catch(o){console.error(o)}i(),GWe(e)}function HI(e,t){e instanceof Promise?e.then(n=>{t(n)}).catch(()=>{t(null)}):t(e)}function ZWe(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:n,prefix:r}=e,i=e.iconsToLoad;if(delete e.iconsToLoad,!i||!i.length)return;const o=e.loadIcon;if(e.loadIcons&&(i.length>1||!o)){HI(e.loadIcons(i,r,n),c=>{Qp(e,i,c,!1)});return}if(o){i.forEach(c=>{const f=o(c,r,n);HI(f,h=>{const p=h?{prefix:r,icons:{[c]:h}}:null;Qp(e,[c],p,!1)})});return}const{valid:a,invalid:s}=YWe(i);if(s.length&&Qp(e,s,null,!1),!a.length)return;const u=r.match(UG)?h4(n):null;if(!u){Qp(e,a,null,!1);return}u.prepare(n,r,a).forEach(c=>{zWe(n,c,f=>{Qp(e,c.icons,f,!0)})})}))}const XWe=(e,t)=>{const n=LWe(e,!0,VG()),r=DWe(n);if(!r.pending.length){let u=!0;return setTimeout(()=>{u&&t(r.loaded,r.missing,r.pending,qWe)}),()=>{u=!1}}const i=Object.create(null),o=[];let a,s;return r.pending.forEach(u=>{const{provider:l,prefix:c}=u;if(c===s&&l===a)return;a=l,s=c,o.push(lf(l,c));const f=i[l]||(i[l]=Object.create(null));f[c]||(f[c]=[])}),r.pending.forEach(u=>{const{provider:l,prefix:c,name:f}=u,h=lf(l,c),p=h.pendingIcons||(h.pendingIcons=new Set);p.has(f)||(p.add(f),i[l][c].push(f))}),o.forEach(u=>{const l=i[u.provider][u.prefix];l.length&&ZWe(u,l)}),NWe(t,r,o)};function QWe(e,t){const n={...e};for(const r in t){const i=t[r],o=typeof i;r in WG?(i===null||i&&(o==="string"||o==="number"))&&(n[r]=i):o===typeof n[r]&&(n[r]=r==="rotate"?i%4:i)}return n}const JWe=/[\s,]+/;function eHe(e,t){t.split(JWe).forEach(n=>{switch(n.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function tHe(e,t=0){const n=e.replace(/^-?[0-9.]*/,"");function r(i){for(;i<0;)i+=4;return i%4}if(n===""){const i=parseInt(e);return isNaN(i)?0:r(i)}else if(n!==e){let i=0;switch(n){case"%":i=25;break;case"deg":i=90}if(i){let o=parseFloat(e.slice(0,e.length-n.length));return isNaN(o)?0:(o=o/i,o%1===0?r(o):0)}}return t}function nHe(e,t){let n=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in t)n+=" "+r+'="'+t[r]+'"';return'"+e+""}function rHe(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(//g,"%3E").replace(/\s+/g," ")}function iHe(e){return"data:image/svg+xml,"+rHe(e)}function oHe(e){return'url("'+iHe(e)+'")'}let M0;function aHe(){try{M0=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{M0=null}}function sHe(e){return M0===void 0&&aHe(),M0?M0.createHTML(e):e}const eY={...HG,inline:!1},uHe={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},lHe={display:"inline-block"},v4={backgroundColor:"currentColor"},tY={backgroundColor:"transparent"},KI={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},qI={WebkitMask:v4,mask:v4,background:tY};for(const e in qI){const t=qI[e];for(const n in KI)t[e+n]=KI[n]}const cHe={...eY,inline:!0};function GI(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const fHe=(e,t,n)=>{const r=t.inline?cHe:eY,i=QWe(r,t),o=t.mode||"svg",a={},s=t.style||{},u={...o==="svg"?uHe:{}};if(n){const b=m2(n,!1,!0);if(b){const w=["iconify"],x=["provider","prefix"];for(const S of x)b[S]&&w.push("iconify--"+b[S]);u.className=w.join(" ")}}for(let b in t){const w=t[b];if(w!==void 0)switch(b){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":u.ref=w;break;case"className":u[b]=(u[b]?u[b]+" ":"")+w;break;case"inline":case"hFlip":case"vFlip":i[b]=w===!0||w==="true"||w===1;break;case"flip":typeof w=="string"&&eHe(i,w);break;case"color":a.color=w;break;case"rotate":typeof w=="string"?i[b]=tHe(w):typeof w=="number"&&(i[b]=w);break;case"ariaHidden":case"aria-hidden":w!==!0&&w!=="true"&&delete u["aria-hidden"];break;default:r[b]===void 0&&(u[b]=w)}}const l=bWe(e,i),c=l.attributes;if(i.inline&&(a.verticalAlign="-0.125em"),o==="svg"){u.style={...a,...s},Object.assign(u,c);let b=0,w=t.id;return typeof w=="string"&&(w=w.replace(/-/g,"_")),u.dangerouslySetInnerHTML={__html:sHe(SWe(l.body,w?()=>w+"ID"+b++:"iconifyReact"))},y.createElement("svg",u)}const{body:f,width:h,height:p}=e,m=o==="mask"||(o==="bg"?!1:f.indexOf("currentColor")!==-1),v=nHe(f,{...c,width:h+"",height:p+""});return u.style={...a,"--svg":oHe(v),width:GI(c.width),height:GI(c.height),...lHe,...m?v4:tY,...s},y.createElement("span",u)};VG(!0);CWe("",RWe);if(typeof document<"u"&&typeof window<"u"){JG();const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,n="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(r=>{try{(typeof r!="object"||r===null||r instanceof Array||typeof r.icons!="object"||typeof r.prefix!="string"||!dWe(r))&&console.error(n)}catch{console.error(n)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let n in t){const r="IconifyProviders["+n+"] is invalid.";try{const i=t[n];if(typeof i!="object"||!i||i.resources===void 0)continue;EWe(n,i)||console.error(r)}catch{console.error(r)}}}}function nY(e){const[t,n]=y.useState(!!e.ssr),[r,i]=y.useState({});function o(p){if(p){const m=e.icon;if(typeof m=="object")return{name:"",data:m};const v=FI(m);if(v)return{name:m,data:v}}return{name:""}}const[a,s]=y.useState(o(!!e.ssr));function u(){const p=r.callback;p&&(p(),i({}))}function l(p){if(JSON.stringify(a)!==JSON.stringify(p))return u(),s(p),!0}function c(){var p;const m=e.icon;if(typeof m=="object"){l({name:"",data:m});return}const v=FI(m);if(l({name:m,data:v}))if(v===void 0){const b=XWe([m],c);i({callback:b})}else v&&((p=e.onLoad)===null||p===void 0||p.call(e,m))}y.useEffect(()=>(n(!0),u),[]),y.useEffect(()=>{t&&c()},[e.icon,t]);const{name:f,data:h}=a;return h?fHe({...fP,...h},e,f):e.children?e.children:y.createElement("span",{})}const AQe=y.forwardRef((e,t)=>nY({...e,_ref:t}));y.forwardRef((e,t)=>nY({inline:!0,...e,_ref:t}));var rY="AlertDialog",[dHe,PQe]=vi(rY,[tz]),Du=tz(),iY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(tge,{...r,...n,modal:!0})};iY.displayName=rY;var hHe="AlertDialogTrigger",oY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(nge,{...i,...r,ref:t})});oY.displayName=hHe;var pHe="AlertDialogPortal",aY=e=>{const{__scopeAlertDialog:t,...n}=e,r=Du(t);return I.jsx(rge,{...r,...n})};aY.displayName=pHe;var gHe="AlertDialogOverlay",sY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(ige,{...i,...r,ref:t})});sY.displayName=gHe;var Ld="AlertDialogContent",[mHe,vHe]=dHe(Ld),uY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:r,...i}=e,o=Du(n),a=y.useRef(null),s=Gt(t,a),u=y.useRef(null);return I.jsx(X0e,{contentName:Ld,titleName:lY,docsSlug:"alert-dialog",children:I.jsx(mHe,{scope:n,cancelRef:u,children:I.jsxs(oge,{role:"alertdialog",...o,...i,ref:s,onOpenAutoFocus:Ye(i.onOpenAutoFocus,l=>{l.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:l=>l.preventDefault(),onInteractOutside:l=>l.preventDefault(),children:[I.jsx(OO,{children:r}),I.jsx(bHe,{contentRef:a})]})})})});uY.displayName=Ld;var lY="AlertDialogTitle",cY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(age,{...i,...r,ref:t})});cY.displayName=lY;var fY="AlertDialogDescription",dY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(sge,{...i,...r,ref:t})});dY.displayName=fY;var yHe="AlertDialogAction",hY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,i=Du(n);return I.jsx(vz,{...i,...r,ref:t})});hY.displayName=yHe;var pY="AlertDialogCancel",gY=y.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=vHe(pY,n),o=Du(n),a=Gt(t,i);return I.jsx(vz,{...o,...r,ref:a})});gY.displayName=pY;var bHe=({contentRef:e})=>{const t=`\`${Ld}\` requires a description for the component to be accessible for screen reader users. You can add a description to the \`${Ld}\` by passing a \`${fY}\` component as a child, which also benefits sighted users by adding visible context to the dialog. Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ld}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. -For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},AQe=iY,PQe=oY,kQe=aY,TQe=sY,MQe=uY,RQe=hY,DQe=gY,$Qe=cY,IQe=dY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!_He(n))throw TypeError("Stringified UUID is invalid");return n}function mY(e,t,n){e=e||{};var r=e.random||(e.rng||xHe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,SHe(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function CHe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function EHe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var vY=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new PHe;function im(e){"@babel/helpers - typeof";return im=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},im(e)}function kHe(e,t){if(im(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(im(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function THe(e){var t=kHe(e,"string");return im(t)=="symbol"?t:t+""}function MHe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $He(e,t){if(e){if(typeof e=="string")return GI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return GI(e,t)}}function GI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var s=DHe(n),u;!(u=s()).done;){var l=u.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function O3(e,t){var n=e.split(` +For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return y.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},kQe=iY,TQe=oY,MQe=aY,RQe=sY,DQe=uY,$Qe=hY,IQe=gY,NQe=cY,LQe=dY;function fs(){return fs=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:0,n=(ci[e[t+0]]+ci[e[t+1]]+ci[e[t+2]]+ci[e[t+3]]+"-"+ci[e[t+4]]+ci[e[t+5]]+"-"+ci[e[t+6]]+ci[e[t+7]]+"-"+ci[e[t+8]]+ci[e[t+9]]+"-"+ci[e[t+10]]+ci[e[t+11]]+ci[e[t+12]]+ci[e[t+13]]+ci[e[t+14]]+ci[e[t+15]]).toLowerCase();if(!SHe(n))throw TypeError("Stringified UUID is invalid");return n}function mY(e,t,n){e=e||{};var r=e.random||(e.rng||wHe)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,CHe(r)}function Ar(e){return y.createElement("i",{className:"rmel-iconfont rmel-icon-"+e.type})}function EHe(e){return y.createElement("div",{className:"rc-md-navigation "+(e.visible?"visible":"in-visible")},y.createElement("div",{className:"navigation-nav left"},y.createElement("div",{className:"button-wrap"},e.left)),y.createElement("div",{className:"navigation-nav right"},y.createElement("div",{className:"button-wrap"},e.right)))}function OHe(e){return y.createElement("div",{className:"tool-bar",style:e.style},e.children)}var vY=function(e){Fn(t,e);function t(){for(var n,r=arguments.length,i=new Array(r),o=0;o"u")){var r="enUS";if(navigator.language){var i=navigator.language.split("-");r=i[0],i.length!==1&&(r+=i[i.length-1].toUpperCase())}if(navigator.browserLanguage){var o=navigator.browserLanguage.split("-");r=o[0],o[1]&&(r+=o[1].toUpperCase())}this.current!==r&&this.isAvailable(r)&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))}},t.isAvailable=function(r){return typeof this.langs[r]<"u"},t.add=function(r,i){this.langs[r]=i},t.setCurrent=function(r){if(!this.isAvailable(r))throw new Error("Language "+r+" is not exists");this.current!==r&&(this.current=r,dl.emit(dl.EVENT_LANG_CHANGE,this,r,this.langs[r]))},t.get=function(r,i){var o=this.langs[this.current][r]||"";return i&&Object.keys(i).forEach(function(a){o=o.replace(new RegExp("\\{"+a+"\\}","g"),i[a])}),o},t.getCurrent=function(){return this.current},e}(),Ln=new kHe;function om(e){"@babel/helpers - typeof";return om=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},om(e)}function THe(e,t){if(om(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(om(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}function MHe(e){var t=THe(e,"string");return om(t)=="symbol"?t:t+""}function RHe(e,t){for(var n=0;n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function IHe(e,t){if(e){if(typeof e=="string")return YI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return YI(e,t)}}function YI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0)for(var s=$He(n),u;!(u=s()).done;){var l=u.value;if(typeof a[l]<"u"&&!a[l])return!1}else if(a.metaKey||a.ctrlKey||a.shiftKey||a.altKey)return!1;return a.key?a.key===i:a.keyCode===r}function O3(e,t){var n=e.split(` `),r=e.substr(0,t).split(` `),i=r.length,o=r[r.length-1].length,a=n[r.length-1],s=r.length>1?r[r.length-2]:null,u=n.length>r.length?n[r.length]:null;return{line:i,col:o,beforeText:e.substr(0,t),afterText:e.substr(t),curLine:a,prevLine:s,nextLine:u}}var nd={bold:["**","**"],italic:["*","*"],underline:["++","++"],strikethrough:["~~","~~"],quote:[` > `,` -`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var My=1;My<=6;My++)nd["h"+My]=[` -`+IHe("#",My)+" ",` -`];function LHe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],s=["|"],u="",l=1;l<=i;l++)o.push(" Head |"),s.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)u+=` +`],inlinecode:["`","`"],code:["\n```\n","\n```\n"]};for(var Ry=1;Ry<=6;Ry++)nd["h"+Ry]=[` +`+NHe("#",Ry)+" ",` +`];function FHe(e){for(var t=e.row,n=t===void 0?2:t,r=e.col,i=r===void 0?2:r,o=["|"],a=["|"],s=["|"],u="",l=1;l<=i;l++)o.push(" Head |"),s.push(" --- |"),a.push(" Data |");for(var c=1;c<=n;c++)u+=` `+a.join("");return o.join("")+` -`+s.join("")+u}function YI(e,t){var n=t;if(n.substr(0,1)!==` +`+s.join("")+u}function ZI(e,t){var n=t;if(n.substr(0,1)!==` `&&(n=` `+n),e==="unordered")return n.length>1?n.replace(/\n/g,` * `).trim():"* ";var r=1;return n.length>1?n.replace(/\n/g,function(){return` `+r+++". "}).trim():"1. "}function A3(e,t){return{text:e,newBlock:t,selection:{start:e.length,end:e.length}}}function x4(e,t,n){if(typeof nd[t]<"u")return{text:""+nd[t][0]+e+nd[t][1],selection:{start:nd[t][0].length,end:nd[t][0].length+e.length}};switch(t){case"tab":var r=n.tabMapValue===1?" ":" ".repeat(n.tabMapValue),i=r+e.replace(/\n/g,` `+r),o=e.includes(` -`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return A3(YI("unordered",e),!0);case"order":return A3(YI("order",e),!0);case"hr":return A3("---",!0);case"table":return{text:LHe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function bY(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=bY(e[r],t[r]);return}n[r]=t[r]}),n}function FHe(e){for(var t=fs({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function zHe(e,t){if(e){if(typeof e=="string")return XI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return XI(e,t)}}function XI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[f.comp.align]=[]);var h=f.comp.pluginName==="divider"?mY():f.comp.pluginName;c[f.comp.align].push(y.createElement(f.comp,{editor:i,editorConfig:i.config,config:fs({},f.comp.defaultConfig||{},f.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var s=this.config.syncScrollMode,u=s===void 0?[]:s;u.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return v5(a)?a.then(function(s){return o.setHtml(s)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,s=i.key,u=i.currentTarget;if((a===13||s==="Enter")&&this.composing===!1){var l=u.value,c=u.selectionStart,f=O3(l,c),h=function(){var x=u.value.substr(0,c-f.curLine.length)+u.value.substr(c);o.setText(x,void 0,{start:c-f.curLine.length,end:c-f.curLine.length}),i.preventDefault()},p=function(x){o.insertText(` -`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},m=f.curLine.match(/^(\s*?)\* /);if(m){if(/^(\s*?)\* $/.test(f.curLine)){h();return}p(m[0]);return}var v=f.curLine.match(/^(\s*?)(\d+)\. /);if(v){if(/^(\s*?)(\d+)\. $/.test(f.curLine)){h();return}var b=""+v[1]+(parseInt(v[2],10)+1)+". ";p(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fs({},RHe);var o=i.selectionStart,a=i.selectionEnd,s=(i.value||"").slice(o,a);return{start:o,end:a,text:s}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),s=o?fs({},o):{};if(i==="image"&&(s=fs({},s,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(s=fs({},s,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var u=this.getMdValue().slice(0,a.start).lastIndexOf(` +`)?e.match(/\n/g).length:0;return{text:i,selection:{start:n.tabMapValue,end:n.tabMapValue*(o+1)+e.length}};case"unordered":return A3(ZI("unordered",e),!0);case"order":return A3(ZI("order",e),!0);case"hr":return A3("---",!0);case"table":return{text:FHe(n),newBlock:!0};case"image":return{text:"!["+(e||n.target)+"]("+(n.imageUrl||"")+")",selection:{start:2,end:e.length+2}};case"link":return{text:"["+e+"]("+(n.linkUrl||"")+")",selection:{start:1,end:e.length+1}}}return{text:e,selection:{start:0,end:e.length}}}function bY(e,t){var n={};return Object.keys(e).forEach(function(r){if(typeof t[r]>"u"){n[r]=e[r];return}if(typeof t[r]=="object"){Array.isArray(t[r])?n[r]=[].concat(t[r]):n[r]=bY(e[r],t[r]);return}n[r]=t[r]}),n}function jHe(e){for(var t=fs({},e),n=arguments.length,r=new Array(n>1?n-1:0),i=1;i=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function UHe(e,t){if(e){if(typeof e=="string")return QI(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return QI(e,t)}}function QI(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n"u"&&(c[f.comp.align]=[]);var h=f.comp.pluginName==="divider"?mY():f.comp.pluginName;c[f.comp.align].push(y.createElement(f.comp,{editor:i,editorConfig:i.config,config:fs({},f.comp.defaultConfig||{},f.config||{}),key:h}))}),c},n.handleSyncScroll=function(i,o){var a=this;if(i===this.shouldSyncScroll){this.props.onScroll&&this.props.onScroll(o,i),this.emitter.emit(this.emitter.EVENT_SCROLL,o,i);var s=this.config.syncScrollMode,u=s===void 0?[]:s;u.includes(i==="md"?"rightFollowLeft":"leftFollowRight")&&(this.hasContentChanged&&this.nodeMdText.current&&this.nodeMdPreviewWrapper.current&&(this.scrollScale=this.nodeMdText.current.scrollHeight/this.nodeMdPreviewWrapper.current.scrollHeight,this.hasContentChanged=!1),this.isSyncingScroll||(this.isSyncingScroll=!0,requestAnimationFrame(function(){a.nodeMdText.current&&a.nodeMdPreviewWrapper.current&&(i==="md"?a.nodeMdPreviewWrapper.current.scrollTop=a.nodeMdText.current.scrollTop/a.scrollScale:a.nodeMdText.current.scrollTop=a.nodeMdPreviewWrapper.current.scrollTop*a.scrollScale),a.isSyncingScroll=!1})))}},n.renderHTML=function(i){var o=this;if(!this.props.renderHTML)return console.error("renderHTML props is required!"),Promise.resolve();var a=this.props.renderHTML(i);return yP(a)?a.then(function(s){return o.setHtml(s)}):typeof a=="function"?this.setHtml(a()):this.setHtml(a)},n.setHtml=function(i){var o=this;return new Promise(function(a){o.setState({html:i},a)})},n.handleToggleMenu=function(){this.setView({menu:!this.state.view.menu})},n.handleFocus=function(i){var o=this.props.onFocus;o&&o(i),this.emitter.emit(this.emitter.EVENT_FOCUS,i)},n.handleBlur=function(i){var o=this.props.onBlur;o&&o(i),this.emitter.emit(this.emitter.EVENT_BLUR,i)},n.handleChange=function(i){i.persist();var o=i.target.value;this.setText(o,i)},n.handlePaste=function(i){if(!(!this.config.allowPasteImage||!this.config.onImageUpload)){var o=i.nativeEvent,a=(o.clipboardData||window.clipboardData).items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}},n.handleDrop=function(i){if(this.config.onImageUpload){var o=i.nativeEvent;if(o.dataTransfer){var a=o.dataTransfer.items;a&&(i.preventDefault(),this.uploadWithDataTransfer(a))}}},n.handleEditorKeyDown=function(i){var o=this,a=i.keyCode,s=i.key,u=i.currentTarget;if((a===13||s==="Enter")&&this.composing===!1){var l=u.value,c=u.selectionStart,f=O3(l,c),h=function(){var x=u.value.substr(0,c-f.curLine.length)+u.value.substr(c);o.setText(x,void 0,{start:c-f.curLine.length,end:c-f.curLine.length}),i.preventDefault()},p=function(x){o.insertText(` +`+x,!1,{start:x.length+1,end:x.length+1}),i.preventDefault()},m=f.curLine.match(/^(\s*?)\* /);if(m){if(/^(\s*?)\* $/.test(f.curLine)){h();return}p(m[0]);return}var v=f.curLine.match(/^(\s*?)(\d+)\. /);if(v){if(/^(\s*?)(\d+)\. $/.test(f.curLine)){h();return}var b=""+v[1]+(parseInt(v[2],10)+1)+". ";p(b);return}}this.emitter.emit(this.emitter.EVENT_EDITOR_KEY_DOWN,i)},n.handleLocaleUpdate=function(){this.forceUpdate()},n.getMdElement=function(){return this.nodeMdText.current},n.getHtmlElement=function(){return this.nodeMdPreviewWrapper.current},n.clearSelection=function(){this.nodeMdText.current&&this.nodeMdText.current.setSelectionRange(0,0,"none")},n.getSelection=function(){var i=this.nodeMdText.current;if(!i)return fs({},DHe);var o=i.selectionStart,a=i.selectionEnd,s=(i.value||"").slice(o,a);return{start:o,end:a,text:s}},n.setSelection=function(i){this.nodeMdText.current&&(this.nodeMdText.current.setSelectionRange(i.start,i.end,"forward"),this.nodeMdText.current.focus())},n.insertMarkdown=function(i,o){o===void 0&&(o={});var a=this.getSelection(),s=o?fs({},o):{};if(i==="image"&&(s=fs({},s,{target:o.target||a.text||"",imageUrl:o.imageUrl||this.config.imageUrl})),i==="link"&&(s=fs({},s,{linkUrl:this.config.linkUrl})),i==="tab"&&a.start!==a.end){var u=this.getMdValue().slice(0,a.start).lastIndexOf(` `)+1;this.setSelection({start:u,end:a.end})}var l=x4(a.text,i,s),c=l.text,f=l.selection;if(l.newBlock){var h=O3(this.getMdValue(),a.start),p=h.col,m=h.curLine;p>0&&m.length>0&&(c=` `+c,f&&(f.start++,f.end++));var v=h.afterText;a.start!==a.end&&(v=O3(this.getMdValue(),a.end).afterText),v.trim()!==""&&v.substr(0,2)!==` @@ -541,12 +541,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `&&(c+=` `),c+=` `)}this.insertText(c,!0,f)},n.insertPlaceholder=function(i,o){var a=this;this.insertText(i,!0),o.then(function(s){var u=a.getMdValue().replace(i,s);a.setText(u)})},n.insertText=function(i,o,a){i===void 0&&(i=""),o===void 0&&(o=!1);var s=this.state.text,u=this.getSelection(),l=s.slice(0,u.start),c=s.slice(o?u.end:u.start,s.length);this.setText(l+i+c,void 0,a?{start:a.start+l.length,end:a.end+l.length}:{start:u.start,end:u.start})},n.setText=function(i,o,a){var s=this;i===void 0&&(i="");var u=this.config.onChangeTrigger,l=u===void 0?"both":u,c=i.replace(/↵/g,` -`);if(this.state.text!==i){this.setState({text:c}),this.props.onChange&&(l==="both"||l==="beforeRender")&&this.props.onChange({text:c,html:this.getHtmlValue()},o),this.emitter.emit(this.emitter.EVENT_CHANGE,i,o,typeof o>"u"),a&&setTimeout(function(){return s.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var f=this.renderHTML(c);(l==="both"||l==="afterRender")&&f.then(function(){s.props.onChange&&s.props.onChange({text:s.state.text,html:s.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(s){return o.offKeyboard(s)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=P3(this.keyboardListeners),a;!(a=o()).done;){var s=a.value;if(NHe(i,s)){i.preventDefault(),s.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fs({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fs({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u0&&i.onImageChanged(s.target.files[0])}}))},t}(vr);RY.pluginName="image";var DY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Ln.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Ar,{type:"link"}))},t}(vr);DY.pluginName="link";var $Y=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Ln.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Ar,{type:"list-ordered"}))},t}(vr);$Y.pluginName="list-ordered";var IY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Ln.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Ar,{type:"list-unordered"}))},t}(vr);IY.pluginName="list-unordered";var WHe=100,HHe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?WHe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),NY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(Bn(i)),i.handleRedo=i.handleRedo.bind(Bn(i)),i.handleUndo=i.handleUndo.bind(Bn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new HHe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var s=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){s.logger.getLast()!==i&&(s.logger.push(i),s.lastPop=null,s.forceUpdate()),window.clearTimeout(s.timerId),s.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Ln.get("btnUndo"),onClick:this.handleUndo},y.createElement(Ar,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Ln.get("btnRedo"),onClick:this.handleRedo},y.createElement(Ar,{type:"redo"})))},t}(vr);NY.pluginName="logger";var Oi;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Oi||(Oi={}));var b5=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(Bn(i)),i.handleChange=i.handleChange.bind(Bn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Oi.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Oi.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Oi.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Oi.SHOW_ALL:return{icon:"view-split",title:"All"};case Oi.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Ln.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Ar,{type:i.icon}))}return null},yY(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Oi.SHOW_ALL,Oi.SHOW_MD,Oi.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Oi.SHOW_ALL),1),i.md||a.splice(a.indexOf(Oi.SHOW_MD),1),i.html||a.splice(a.indexOf(Oi.SHOW_HTML),1));var s=Oi.SHOW_MD;if(o.html&&(s=Oi.SHOW_HTML),o.html&&o.md&&(s=Oi.SHOW_ALL),a.length===0)return s;if(a.length===1)return a[0];var u=a.indexOf(s);return u"u"),a&&setTimeout(function(){return s.setSelection(a)}),this.hasContentChanged||(this.hasContentChanged=!0);var f=this.renderHTML(c);(l==="both"||l==="afterRender")&&f.then(function(){s.props.onChange&&s.props.onChange({text:s.state.text,html:s.getHtmlValue()},o)})}},n.getMdValue=function(){return this.state.text},n.getHtmlValue=function(){return typeof this.state.html=="string"?this.state.html:this.nodeMdPreview.current?this.nodeMdPreview.current.getHtml():""},n.onKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(a){return o.onKeyboard(a)});return}this.keyboardListeners.includes(i)||this.keyboardListeners.push(i)},n.offKeyboard=function(i){var o=this;if(Array.isArray(i)){i.forEach(function(s){return o.offKeyboard(s)});return}var a=this.keyboardListeners.indexOf(i);a>=0&&this.keyboardListeners.splice(a,1)},n.handleKeyDown=function(i){for(var o=P3(this.keyboardListeners),a;!(a=o()).done;){var s=a.value;if(LHe(i,s)){i.preventDefault(),s.callback(i);return}}this.emitter.emit(this.emitter.EVENT_KEY_DOWN,i)},n.getEventType=function(i){switch(i){case"change":return this.emitter.EVENT_CHANGE;case"fullscreen":return this.emitter.EVENT_FULL_SCREEN;case"viewchange":return this.emitter.EVENT_VIEW_CHANGE;case"keydown":return this.emitter.EVENT_KEY_DOWN;case"editor_keydown":return this.emitter.EVENT_EDITOR_KEY_DOWN;case"blur":return this.emitter.EVENT_BLUR;case"focus":return this.emitter.EVENT_FOCUS;case"scroll":return this.emitter.EVENT_SCROLL}},n.on=function(i,o){var a=this.getEventType(i);a&&this.emitter.on(a,o)},n.off=function(i,o){var a=this.getEventType(i);a&&this.emitter.off(a,o)},n.setView=function(i){var o=this,a=fs({},this.state.view,i);this.setState({view:a},function(){o.emitter.emit(o.emitter.EVENT_VIEW_CHANGE,a)})},n.getView=function(){return fs({},this.state.view)},n.fullScreen=function(i){var o=this;this.state.fullScreen!==i&&this.setState({fullScreen:i},function(){o.emitter.emit(o.emitter.EVENT_FULL_SCREEN,i)})},n.registerPluginApi=function(i,o){this.pluginApis.set(i,o)},n.unregisterPluginApi=function(i){this.pluginApis.delete(i)},n.callPluginApi=function(i){var o=this.pluginApis.get(i);if(!o)throw new Error("API "+i+" not found");for(var a=arguments.length,s=new Array(a>1?a-1:0),u=1;u0&&i.onImageChanged(s.target.files[0])}}))},t}(vr);RY.pluginName="image";var DY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"k",keyCode:75,aliasCommand:!0,withKey:["ctrlKey"],callback:function(){return i.editor.insertMarkdown("link")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-link",title:Ln.get("btnLink"),onClick:function(){return i.editor.insertMarkdown("link")}},y.createElement(Ar,{type:"link"}))},t}(vr);DY.pluginName="link";var $Y=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"7",keyCode:55,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("order")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-ordered",title:Ln.get("btnOrdered"),onClick:function(){return i.editor.insertMarkdown("order")}},y.createElement(Ar,{type:"list-ordered"}))},t}(vr);$Y.pluginName="list-ordered";var IY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboard={key:"8",keyCode:56,withKey:["ctrlKey","shiftKey"],aliasCommand:!0,callback:function(){return i.editor.insertMarkdown("unordered")}},i}var n=t.prototype;return n.componentDidMount=function(){this.editorConfig.shortcuts&&this.editor.onKeyboard(this.handleKeyboard)},n.componentWillUnmount=function(){this.editor.offKeyboard(this.handleKeyboard)},n.render=function(){var i=this;return y.createElement("span",{className:"button button-type-unordered",title:Ln.get("btnUnordered"),onClick:function(){return i.editor.insertMarkdown("unordered")}},y.createElement(Ar,{type:"list-unordered"}))},t}(vr);IY.pluginName="list-unordered";var HHe=100,KHe=function(){function e(n){n===void 0&&(n={}),this.record=[],this.recycle=[],this.initValue="";var r=n,i=r.maxSize,o=i===void 0?HHe:i;this.maxSize=o}var t=e.prototype;return t.push=function(r){for(var i=this.record.push(r);this.record.length>this.maxSize;)this.record.shift();return i},t.get=function(){return this.record},t.getLast=function(){var r=this.record.length;return this.record[r-1]},t.undo=function(r){var i=this.record.pop();if(typeof i>"u")return this.initValue;if(i!==r)return this.recycle.push(i),i;var o=this.record.pop();return typeof o>"u"?(this.recycle.push(i),this.initValue):(this.recycle.push(i),o)},t.redo=function(){var r=this.recycle.pop();if(typeof r<"u")return this.push(r),r},t.cleanRedo=function(){this.recycle=[]},t.getUndoCount=function(){return this.undo.length},t.getRedoCount=function(){return this.recycle.length},e}(),NY=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleKeyboards=[],i.lastPop=null,i.handleChange=i.handleChange.bind(Bn(i)),i.handleRedo=i.handleRedo.bind(Bn(i)),i.handleUndo=i.handleUndo.bind(Bn(i)),i.handleKeyboards=[{key:"y",keyCode:89,withKey:["ctrlKey"],callback:i.handleRedo},{key:"z",keyCode:90,withKey:["metaKey","shiftKey"],callback:i.handleRedo},{key:"z",keyCode:90,aliasCommand:!0,withKey:["ctrlKey"],callback:i.handleUndo}],i.logger=new KHe({maxSize:i.editorConfig.loggerMaxSize}),i.editor.registerPluginApi("undo",i.handleUndo),i.editor.registerPluginApi("redo",i.handleRedo),i}var n=t.prototype;return n.handleUndo=function(){var i=this.logger.undo(this.editor.getMdValue());typeof i<"u"&&(this.pause(),this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleRedo=function(){var i=this.logger.redo();typeof i<"u"&&(this.lastPop=i,this.editor.setText(i),this.forceUpdate())},n.handleChange=function(i,o,a){var s=this;if(!(this.logger.getLast()===i||this.lastPop!==null&&this.lastPop===i)){if(this.logger.cleanRedo(),a){this.logger.push(i),this.lastPop=null,this.forceUpdate();return}this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.timerId=window.setTimeout(function(){s.logger.getLast()!==i&&(s.logger.push(i),s.lastPop=null,s.forceUpdate()),window.clearTimeout(s.timerId),s.timerId=0},this.editorConfig.loggerInterval)}},n.componentDidMount=function(){var i=this;this.editor.on("change",this.handleChange),this.handleKeyboards.forEach(function(o){return i.editor.onKeyboard(o)}),this.logger.initValue=this.editor.getMdValue(),this.forceUpdate()},n.componentWillUnmount=function(){var i=this;this.timerId&&window.clearTimeout(this.timerId),this.editor.off("change",this.handleChange),this.editor.unregisterPluginApi("undo"),this.editor.unregisterPluginApi("redo"),this.handleKeyboards.forEach(function(o){return i.editor.offKeyboard(o)})},n.pause=function(){this.timerId&&(window.clearTimeout(this.timerId),this.timerId=void 0)},n.render=function(){var i=this.logger.getUndoCount()>1||this.logger.initValue!==this.editor.getMdValue(),o=this.logger.getRedoCount()>0;return y.createElement(y.Fragment,null,y.createElement("span",{className:"button button-type-undo "+(i?"":"disabled"),title:Ln.get("btnUndo"),onClick:this.handleUndo},y.createElement(Ar,{type:"undo"})),y.createElement("span",{className:"button button-type-redo "+(o?"":"disabled"),title:Ln.get("btnRedo"),onClick:this.handleRedo},y.createElement(Ar,{type:"redo"})))},t}(vr);NY.pluginName="logger";var Oi;(function(e){e[e.SHOW_ALL=0]="SHOW_ALL",e[e.SHOW_MD=1]="SHOW_MD",e[e.SHOW_HTML=2]="SHOW_HTML"})(Oi||(Oi={}));var xP=function(e){Fn(t,e);function t(r){var i;return i=e.call(this,r)||this,i.handleClick=i.handleClick.bind(Bn(i)),i.handleChange=i.handleChange.bind(Bn(i)),i.state={view:i.editor.getView()},i}var n=t.prototype;return n.handleClick=function(){switch(this.next){case Oi.SHOW_ALL:this.editor.setView({html:!0,md:!0});break;case Oi.SHOW_HTML:this.editor.setView({html:!0,md:!1});break;case Oi.SHOW_MD:this.editor.setView({html:!1,md:!0});break}},n.handleChange=function(i){this.setState({view:i})},n.componentDidMount=function(){this.editor.on("viewchange",this.handleChange)},n.componentWillUnmount=function(){this.editor.off("viewchange",this.handleChange)},n.getDisplayInfo=function(){var i=this.next;switch(i){case Oi.SHOW_ALL:return{icon:"view-split",title:"All"};case Oi.SHOW_HTML:return{icon:"visibility",title:"Preview"};default:return{icon:"keyboard",title:"Editor"}}},n.render=function(){if(this.isDisplay){var i=this.getDisplayInfo();return y.createElement("span",{className:"button button-type-mode",title:Ln.get("btnMode"+i.title),onClick:this.handleClick},y.createElement(Ar,{type:i.icon}))}return null},yY(t,[{key:"isDisplay",get:function(){var i=this.editorConfig.canView;return i?[i.html,i.md,i.both].filter(function(o){return o}).length>=2:!1}},{key:"next",get:function(){var i=this.editorConfig.canView,o=this.state.view,a=[Oi.SHOW_ALL,Oi.SHOW_MD,Oi.SHOW_HTML];i&&(i.both||a.splice(a.indexOf(Oi.SHOW_ALL),1),i.md||a.splice(a.indexOf(Oi.SHOW_MD),1),i.html||a.splice(a.indexOf(Oi.SHOW_HTML),1));var s=Oi.SHOW_MD;if(o.html&&(s=Oi.SHOW_HTML),o.html&&o.md&&(s=Oi.SHOW_ALL),a.length===0)return s;if(a.length===1)return a[0];var u=a.indexOf(s);return u=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((s&248)===240&&o+91114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Oh.defaultChars=";/?:@&=+$,#";Oh.componentChars="";const JI={};function YHe(e){let t=JI[e];if(t)return t;t=JI[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=YHe(t);let i="";for(let o=0,a=e.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}Km.defaultChars=";/?:@&=+$,-_.!~*'()#";Km.componentChars="-_.!~*'()";function w5(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function xx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const ZHe=/^([a-z0-9.+-]+:)/i,XHe=/:[0-9]*$/,QHe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,JHe=["<",">",'"',"`"," ","\r",` -`," "],eKe=["{","}","|","\\","^","`"].concat(JHe),tKe=["'"].concat(eKe),eN=["%","/","?",";","#"].concat(tKe),tN=["/","?","#"],nKe=255,nN=/^[+a-z0-9A-Z_-]{0,63}$/,rKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,rN={javascript:!0,"javascript:":!0},iN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function _5(e,t){if(e&&e instanceof xx)return e;const n=new xx;return n.parse(e,t),n}xx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=QHe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=ZHe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&rN[a])&&(o=o.substr(2),this.slashes=!0)),!rN[a]&&(i||a&&!iN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(nN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(rKe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>nKe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),iN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xx.prototype.parseHost=function(e){let t=XHe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const iKe=Object.freeze(Object.defineProperty({__proto__:null,decode:Oh,encode:Km,format:w5,parse:_5},Symbol.toStringTag,{value:"Module"})),LY=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,FY=/[\0-\x1F\x7F-\x9F]/,oKe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,S5=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,jY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,BY=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,aKe=Object.freeze(Object.defineProperty({__proto__:null,Any:LY,Cc:FY,Cf:oKe,P:S5,S:jY,Z:BY},Symbol.toStringTag,{value:"Module"})),sKe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),uKe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var k3;const lKe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),cKe=(k3=String.fromCodePoint)!==null&&k3!==void 0?k3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function fKe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=lKe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const dKe=32;var hl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hl||(hl={}));function w4(e){return e>=ni.ZERO&&e<=ni.NINE}function hKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function pKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||w4(e)}function gKe(e){return e===ni.EQUALS||pKe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var il;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(il||(il={}));class mKe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=il.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|dKe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==il.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==il.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function zY(e){let t="";const n=new mKe(e,r=>t+=cKe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function vKe(e,t,n,r){const i=(t&hl.BRANCH_LENGTH)>>7,o=t&hl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const yKe=zY(sKe);zY(uKe);function UY(e,t=il.Legacy){return yKe(e,t)}function bKe(e){return Object.prototype.toString.call(e)}function C5(e){return bKe(e)==="[object String]"}const xKe=Object.prototype.hasOwnProperty;function wKe(e,t){return xKe.call(e,t)}function y2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function VY(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function E5(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function wx(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const WY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,_Ke=/&([a-z#][a-z0-9]{1,31});/gi,SKe=new RegExp(WY.source+"|"+_Ke.source,"gi"),CKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function EKe(e,t){if(t.charCodeAt(0)===35&&CKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return E5(r)?wx(r):e}const n=UY(e);return n!==e?n:e}function OKe(e){return e.indexOf("\\")<0?e:e.replace(WY,"$1")}function Ah(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(SKe,function(t,n,r){return n||EKe(t,r)})}const AKe=/[&<>"]/,PKe=/[&<>"]/g,kKe={"&":"&","<":"<",">":">",'"':"""};function TKe(e){return kKe[e]}function Nl(e){return AKe.test(e)?e.replace(PKe,TKe):e}const MKe=/[.?*+^$[\]\\(){}|-]/g;function RKe(e){return e.replace(MKe,"\\$&")}function Hn(e){switch(e){case 9:case 32:return!0}return!1}function om(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function am(e){return S5.test(e)||jY.test(e)}function sm(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function b2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const DKe={mdurl:iKe,ucmicro:aKe},$Ke=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:VY,assign:y2,escapeHtml:Nl,escapeRE:RKe,fromCodePoint:wx,has:wKe,isMdAsciiPunct:sm,isPunctChar:am,isSpace:Hn,isString:C5,isValidEntityCode:E5,isWhiteSpace:om,lib:DKe,normalizeReference:b2,unescapeAll:Ah,unescapeMd:OKe},Symbol.toStringTag,{value:"Module"}));function IKe(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Ah(e.slice(t,i)),o.pos=i,o.ok=!0),o}function LKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Nl(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Nl(e[t].content)+` +*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var o="",a=0;a=55296&&c<=57343?i+="���":i+=String.fromCharCode(c),o+=6;continue}}if((s&248)===240&&o+91114111?i+="����":(f-=65536,i+=String.fromCharCode(55296+(f>>10),56320+(f&1023))),o+=9;continue}}i+="�"}return i})}Oh.defaultChars=";/?:@&=+$,#";Oh.componentChars="";const eN={};function ZHe(e){let t=eN[e];if(t)return t;t=eN[e]=[];for(let n=0;n<128;n++){const r=String.fromCharCode(n);/^[0-9a-z]$/i.test(r)?t.push(r):t.push("%"+("0"+n.toString(16).toUpperCase()).slice(-2))}for(let n=0;n"u"&&(n=!0);const r=ZHe(t);let i="";for(let o=0,a=e.length;o=55296&&s<=57343){if(s>=55296&&s<=56319&&o+1=56320&&u<=57343){i+=encodeURIComponent(e[o]+e[o+1]),o++;continue}}i+="%EF%BF%BD";continue}i+=encodeURIComponent(e[o])}return i}qm.defaultChars=";/?:@&=+$,-_.!~*'()#";qm.componentChars="-_.!~*'()";function _P(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function xx(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const XHe=/^([a-z0-9.+-]+:)/i,QHe=/:[0-9]*$/,JHe=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,eKe=["<",">",'"',"`"," ","\r",` +`," "],tKe=["{","}","|","\\","^","`"].concat(eKe),nKe=["'"].concat(tKe),tN=["%","/","?",";","#"].concat(nKe),nN=["/","?","#"],rKe=255,rN=/^[+a-z0-9A-Z_-]{0,63}$/,iKe=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,iN={javascript:!0,"javascript:":!0},oN={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function SP(e,t){if(e&&e instanceof xx)return e;const n=new xx;return n.parse(e,t),n}xx.prototype.parse=function(e,t){let n,r,i,o=e;if(o=o.trim(),!t&&e.split("#").length===1){const l=JHe.exec(o);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}let a=XHe.exec(o);if(a&&(a=a[0],n=a.toLowerCase(),this.protocol=a,o=o.substr(a.length)),(t||a||o.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=o.substr(0,2)==="//",i&&!(a&&iN[a])&&(o=o.substr(2),this.slashes=!0)),!iN[a]&&(i||a&&!oN[a])){let l=-1;for(let m=0;m127?x+="x":x+=w[S];if(!x.match(rN)){const S=m.slice(0,v),O=m.slice(v+1),E=w.match(iKe);E&&(S.push(E[1]),O.unshift(E[2])),O.length&&(o=O.join(".")+o),this.hostname=S.join(".");break}}}}this.hostname.length>rKe&&(this.hostname=""),p&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const s=o.indexOf("#");s!==-1&&(this.hash=o.substr(s),o=o.slice(0,s));const u=o.indexOf("?");return u!==-1&&(this.search=o.substr(u),o=o.slice(0,u)),o&&(this.pathname=o),oN[n]&&this.hostname&&!this.pathname&&(this.pathname=""),this};xx.prototype.parseHost=function(e){let t=QHe.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const oKe=Object.freeze(Object.defineProperty({__proto__:null,decode:Oh,encode:qm,format:_P,parse:SP},Symbol.toStringTag,{value:"Module"})),LY=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,FY=/[\0-\x1F\x7F-\x9F]/,aKe=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,CP=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,jY=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,BY=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,sKe=Object.freeze(Object.defineProperty({__proto__:null,Any:LY,Cc:FY,Cf:aKe,P:CP,S:jY,Z:BY},Symbol.toStringTag,{value:"Module"})),uKe=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),lKe=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var k3;const cKe=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fKe=(k3=String.fromCodePoint)!==null&&k3!==void 0?k3:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function dKe(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=cKe.get(e))!==null&&t!==void 0?t:e}var ni;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(ni||(ni={}));const hKe=32;var hl;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(hl||(hl={}));function w4(e){return e>=ni.ZERO&&e<=ni.NINE}function pKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_F||e>=ni.LOWER_A&&e<=ni.LOWER_F}function gKe(e){return e>=ni.UPPER_A&&e<=ni.UPPER_Z||e>=ni.LOWER_A&&e<=ni.LOWER_Z||w4(e)}function mKe(e){return e===ni.EQUALS||gKe(e)}var Jr;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(Jr||(Jr={}));var il;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(il||(il={}));class vKe{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Jr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=il.Strict}startEntity(t){this.decodeMode=t,this.state=Jr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Jr.EntityStart:return t.charCodeAt(n)===ni.NUM?(this.state=Jr.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Jr.NamedEntity,this.stateNamedEntity(t,n));case Jr.NumericStart:return this.stateNumericStart(t,n);case Jr.NumericDecimal:return this.stateNumericDecimal(t,n);case Jr.NumericHex:return this.stateNumericHex(t,n);case Jr.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|hKe)===ni.LOWER_X?(this.state=Jr.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Jr.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n>14;for(;n>14,o!==0){if(a===ni.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==il.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&hl.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~hl.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Jr.NamedEntity:return this.result!==0&&(this.decodeMode!==il.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Jr.NumericDecimal:return this.emitNumericEntity(0,2);case Jr.NumericHex:return this.emitNumericEntity(0,3);case Jr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Jr.EntityStart:return 0}}}function zY(e){let t="";const n=new vKe(e,r=>t+=fKe(r));return function(i,o){let a=0,s=0;for(;(s=i.indexOf("&",s))>=0;){t+=i.slice(a,s),n.startEntity(o);const l=n.write(i,s+1);if(l<0){a=s+n.end();break}a=s+l,s=l===0?a+1:a}const u=t+i.slice(a);return t="",u}}function yKe(e,t,n,r){const i=(t&hl.BRANCH_LENGTH)>>7,o=t&hl.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const u=r-o;return u<0||u>=i?-1:e[n+u]-1}let a=n,s=a+i-1;for(;a<=s;){const u=a+s>>>1,l=e[u];if(lr)s=u-1;else return e[u+i]}return-1}const bKe=zY(uKe);zY(lKe);function UY(e,t=il.Legacy){return bKe(e,t)}function xKe(e){return Object.prototype.toString.call(e)}function EP(e){return xKe(e)==="[object String]"}const wKe=Object.prototype.hasOwnProperty;function _Ke(e,t){return wKe.call(e,t)}function y2(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){if(n){if(typeof n!="object")throw new TypeError(n+"must be object");Object.keys(n).forEach(function(r){e[r]=n[r]})}}),e}function VY(e,t,n){return[].concat(e.slice(0,t),n,e.slice(t+1))}function OP(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function wx(e){if(e>65535){e-=65536;const t=55296+(e>>10),n=56320+(e&1023);return String.fromCharCode(t,n)}return String.fromCharCode(e)}const WY=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,SKe=/&([a-z#][a-z0-9]{1,31});/gi,CKe=new RegExp(WY.source+"|"+SKe.source,"gi"),EKe=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function OKe(e,t){if(t.charCodeAt(0)===35&&EKe.test(t)){const r=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return OP(r)?wx(r):e}const n=UY(e);return n!==e?n:e}function AKe(e){return e.indexOf("\\")<0?e:e.replace(WY,"$1")}function Ah(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(CKe,function(t,n,r){return n||OKe(t,r)})}const PKe=/[&<>"]/,kKe=/[&<>"]/g,TKe={"&":"&","<":"<",">":">",'"':"""};function MKe(e){return TKe[e]}function Nl(e){return PKe.test(e)?e.replace(kKe,MKe):e}const RKe=/[.?*+^$[\]\\(){}|-]/g;function DKe(e){return e.replace(RKe,"\\$&")}function Hn(e){switch(e){case 9:case 32:return!0}return!1}function am(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function sm(e){return CP.test(e)||jY.test(e)}function um(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function b2(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const $Ke={mdurl:oKe,ucmicro:sKe},IKe=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt:VY,assign:y2,escapeHtml:Nl,escapeRE:DKe,fromCodePoint:wx,has:_Ke,isMdAsciiPunct:um,isPunctChar:sm,isSpace:Hn,isString:EP,isValidEntityCode:OP,isWhiteSpace:am,lib:$Ke,normalizeReference:b2,unescapeAll:Ah,unescapeMd:AKe},Symbol.toStringTag,{value:"Module"}));function NKe(e,t,n){let r,i,o,a;const s=e.posMax,u=e.pos;for(e.pos=t+1,r=1;e.pos32))return o;if(r===41){if(a===0)break;a--}i++}return t===i||a!==0||(o.str=Ah(e.slice(t,i)),o.pos=i,o.ok=!0),o}function FKe(e,t,n,r){let i,o=t;const a={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(r)a.str=r.str,a.marker=r.marker;else{if(o>=n)return a;let s=e.charCodeAt(o);if(s!==34&&s!==39&&s!==40)return a;t++,o++,s===40&&(s=41),a.marker=s}for(;o"+Nl(o.content)+""};Is.code_block=function(e,t,n,r,i){const o=e[t];return""+Nl(e[t].content)+` `};Is.fence=function(e,t,n,r,i){const o=e[t],a=o.info?Ah(o.info).trim():"";let s="",u="";if(a){const c=a.split(/(\s+)/g);s=c[0],u=c.slice(2).join("")}let l;if(n.highlight?l=n.highlight(o.content,s,u)||Nl(o.content):l=Nl(o.content),l.indexOf("${l} `}return`
${l}
@@ -558,6 +558,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `};Is.text=function(e,t){return Nl(e[t].content)};Is.html_block=function(e,t){return e[t].content};Is.html_inline=function(e,t){return e[t].content};function ip(){this.rules=y2({},Is)}ip.prototype.renderAttrs=function(t){let n,r,i;if(!t.attrs)return"";for(i="",n=0,r=t.attrs.length;n `:">",o};ip.prototype.renderInline=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};is.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function HY(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}HY.prototype.Token=is;const jKe=/\r\n?|\n/g,BKe=/\0/g;function zKe(e){let t;t=e.src.replace(jKe,` -`),t=t.replace(BKe,"�"),e.src=t}function UKe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function VKe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function HKe(e){return/^<\/a\s*>/i.test(e)}function KKe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(WKe(s.content)&&o>0&&o--,HKe(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const u=s.content;let l=e.md.linkify.match(u);const c=[];let f=s.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let p=0;ph){const E=new e.Token("text","",0);E.content=u.slice(h,w),E.level=f,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",v]],x.level=f++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=f,c.push(S);const O=new e.Token("link_close","a",-1);O.level=--f,O.markup="linkify",O.info="auto",c.push(O),h=l[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(GKe,ZKe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function QKe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&KY.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function JKe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(qKe.test(e.tokens[t].content)&&XKe(e.tokens[t].children),KY.test(e.tokens[t].content)&&QKe(e.tokens[t].children))}const eqe=/['"]/,oN=/['"]/g,aN="’";function Ry(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function tqe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let s=o.content,u=0,l=s.length;e:for(;u=0)m=s.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=w),!f&&!h){p&&(o.content=Ry(o.content,c.index,aN));continue}if(h)for(n=r.length-1;n>=0;n--){let O=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!eqe.test(e.tokens[t].content)||tqe(e.tokens[t].children,e)}function rqe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ns.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ns.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Hn(this.src.charCodeAt(--t)))return t+1;return t};Ns.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ns.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,s=t;sr?o[a]=new Array(u-r+1).join(" ")+this.src.slice(c,f):o[a]=this.src.slice(c,f)}return o.join("")};Ns.prototype.Token=is;const iqe=65536;function M3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function sN(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Hn(s)||a===45&&Hn(s))return!1;for(;o=4)return!1;l=sN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let O=0;O=4||(l=sN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=f-l.length,S>iqe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` -`,o.map=[t,e.line],!0}function sqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=lN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=uN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[u,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const z=e.tight,H=e.tShift[u],V=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=H,e.sCount[u]=V,e.tight=z,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,N[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let G=0,q=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let N=!1;for(let z=0,H=k.length;z"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const hqe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],pqe="[a-zA-Z_:][a-zA-Z0-9:._-]*",gqe="[^\"'=<>`\\x00-\\x20]+",mqe="'[^']*'",vqe='"[^"]*"',yqe="(?:"+gqe+"|"+mqe+"|"+vqe+")",bqe="(?:\\s+"+pqe+"(?:\\s*=\\s*"+yqe+")?)",qY="<[A-Za-z][A-Za-z0-9\\-]*"+bqe+"*\\s*\\/?>",GY="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",xqe="",wqe="<[?][\\s\\S]*?[?]>",_qe="]*>",Sqe="",Cqe=new RegExp("^(?:"+qY+"|"+GY+"|"+xqe+"|"+wqe+"|"+_qe+"|"+Sqe+")"),Eqe=new RegExp("^(?:"+qY+"|"+GY+")"),Jf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Eqe.source+"\\s*$"),/^$/,!1]];function Oqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Hn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function Pqe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};qm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(Rqe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function $qe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){A5[e.charCodeAt(0)]=1});function Iqe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&A5[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Nqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function Bqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;fN(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[b2(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function Uqe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[b2(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const Vqe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Wqe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Hqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(Wqe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Vqe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function Kqe(e){return/^\s]/i.test(e)}function qqe(e){return/^<\/a\s*>/i.test(e)}function Gqe(e){const t=e|32;return t>=97&&t<=122}function Yqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Gqe(i))return!1;const o=e.src.slice(r).match(Cqe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],Kqe(a.content)&&e.linkLevel++,qqe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Zqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Xqe=/^&([a-z][a-z0-9]{1,31});/i;function Qqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Zqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=E5(a)?wx(a):wx(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Xqe);if(o){const a=UY(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function dN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function Jqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;dN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Gm.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Gm.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function _4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function w2(e){return Object.prototype.toString.call(e)}function nGe(e){return w2(e)==="[object String]"}function rGe(e){return w2(e)==="[object Object]"}function iGe(e){return w2(e)==="[object RegExp]"}function hN(e){return w2(e)==="[object Function]"}function oGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const XY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function aGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||XY.hasOwnProperty(n)},!1)}const sGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},uGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",lGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function cGe(e){e.__index__=-1,e.__text_cache__=""}function fGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function pN(){return function(e,t){t.normalize(e)}}function _x(e){const t=e.re=tGe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(uGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,rGe(u)){iGe(u.validate)?l.validate=fGe(u.validate):hN(u.validate)?l.validate=u.validate:o(s,u),hN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=pN();return}if(nGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:pN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(oGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),cGe(e)}function dGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function S4(e,t){const n=new dGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||aGe(e)&&(t=e,e={}),this.__opts__=_4({},XY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=_4({},sGe,e),this.__compiled__={},this.__tlds__=lGe,this.__tlds_replaced__=!1,this.re={},_x(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,_x(this),this};Wo.prototype.set=function(t){return this.__opts__=_4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(S4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(S4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,S4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),_x(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_x(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Fd=2147483647,ws=36,P5=1,um=26,hGe=38,pGe=700,QY=72,JY=128,eZ="-",gGe=/^xn--/,mGe=/[^\0-\x7F]/,vGe=/[\x2E\u3002\uFF0E\uFF61]/g,yGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$3=ws-P5,_s=Math.floor,I3=String.fromCharCode;function Ju(e){throw new RangeError(yGe[e])}function bGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function tZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(vGe,".");const i=e.split("."),o=bGe(i,t).join(".");return r+o}function nZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),wGe=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},gN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},rZ=function(e,t,n){let r=0;for(e=n?_s(e/pGe):e>>1,e+=_s(e/t);e>$3*um>>1;r+=ws)e=_s(e/$3);return _s(r+($3+1)*e/(e+hGe))},iZ=function(e){const t=[],n=e.length;let r=0,i=JY,o=QY,a=e.lastIndexOf(eZ);a<0&&(a=0);for(let s=0;s=128&&Ju("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Ju("invalid-input");const h=wGe(e.charCodeAt(s++));h>=ws&&Ju("invalid-input"),h>_s((Fd-r)/c)&&Ju("overflow"),r+=h*c;const p=f<=o?P5:f>=o+um?um:f-o;if(h_s(Fd/m)&&Ju("overflow"),c*=m}const l=t.length+1;o=rZ(r-u,l,u==0),_s(r/l)>Fd-i&&Ju("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},oZ=function(e){const t=[];e=nZ(e);const n=e.length;let r=JY,i=0,o=QY;for(const u of e)u<128&&t.push(I3(u));const a=t.length;let s=a;for(a&&t.push(eZ);s=r&&c_s((Fd-i)/l)&&Ju("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cFd&&Ju("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?P5:h>=o+um?um:h-o;if(f=0))try{t.hostname=aZ.toASCII(t.hostname)}catch{}return Km(w5(t))}function RGe(e){const t=_5(e,!0);if(t.hostname&&(!t.protocol||sZ.indexOf(t.protocol)>=0))try{t.hostname=aZ.toUnicode(t.hostname)}catch{}return Oh(w5(t),Oh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||C5(e)||(t=e||{},e="default"),this.inline=new Gm,this.block=new x2,this.core=new O5,this.renderer=new ip,this.linkify=new Wo,this.validateLink=TGe,this.normalizeLink=MGe,this.normalizeLinkText=RGe,this.utils=$Ke,this.helpers=y2({},FKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return y2(this.options,e),this};es.prototype.configure=function(e){const t=this;if(C5(e)){const n=e;if(e=AGe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var uZ={exports:{}};(function(e){(function(t){var n=function(T){var D,$=new Float64Array(16);if(T)for(D=0;D>24&255,T[D+1]=$>>16&255,T[D+2]=$>>8&255,T[D+3]=$&255,T[D+4]=A>>24&255,T[D+5]=A>>16&255,T[D+6]=A>>8&255,T[D+7]=A&255}function v(T,D,$,A,L){var ee,re=0;for(ee=0;ee>>8)-1}function b(T,D,$,A){return v(T,D,$,A,16)}function w(T,D,$,A){return v(T,D,$,A,32)}function x(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;Je=Je+L|0,ut=ut+ee|0,Qe=Qe+re|0,Fe=Fe+he|0,Ke=Ke+Ce|0,Ge=Ge+Be|0,ve=ve+He|0,ge=ge+ct|0,De=De+Ne|0,Pe=Pe+rt|0,Te=Te+bt|0,ze=ze+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Qe>>>0&255,T[9]=Qe>>>8&255,T[10]=Qe>>>16&255,T[11]=Qe>>>24&255,T[12]=Fe>>>0&255,T[13]=Fe>>>8&255,T[14]=Fe>>>16&255,T[15]=Fe>>>24&255,T[16]=Ke>>>0&255,T[17]=Ke>>>8&255,T[18]=Ke>>>16&255,T[19]=Ke>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=ve>>>0&255,T[25]=ve>>>8&255,T[26]=ve>>>16&255,T[27]=ve>>>24&255,T[28]=ge>>>0&255,T[29]=ge>>>8&255,T[30]=ge>>>16&255,T[31]=ge>>>24&255,T[32]=De>>>0&255,T[33]=De>>>8&255,T[34]=De>>>16&255,T[35]=De>>>24&255,T[36]=Pe>>>0&255,T[37]=Pe>>>8&255,T[38]=Pe>>>16&255,T[39]=Pe>>>24&255,T[40]=Te>>>0&255,T[41]=Te>>>8&255,T[42]=Te>>>16&255,T[43]=Te>>>24&255,T[44]=ze>>>0&255,T[45]=ze>>>8&255,T[46]=ze>>>16&255,T[47]=ze>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Te>>>0&255,T[9]=Te>>>8&255,T[10]=Te>>>16&255,T[11]=Te>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=ve>>>0&255,T[17]=ve>>>8&255,T[18]=ve>>>16&255,T[19]=ve>>>24&255,T[20]=ge>>>0&255,T[21]=ge>>>8&255,T[22]=ge>>>16&255,T[23]=ge>>>24&255,T[24]=De>>>0&255,T[25]=De>>>8&255,T[26]=De>>>16&255,T[27]=De>>>24&255,T[28]=Pe>>>0&255,T[29]=Pe>>>8&255,T[30]=Pe>>>16&255,T[31]=Pe>>>24&255}function O(T,D,$,A){x(T,D,$,A)}function E(T,D,$,A){S(T,D,$,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,D,$,A,L,ee,re){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;L>=64;){for(O(Ce,he,re,C),He=0;He<64;He++)T[D+He]=$[A+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;L-=64,D+=64,A+=64}if(L>0)for(O(Ce,he,re,C),He=0;He=64;){for(O(re,ee,L,C),Ce=0;Ce<64;Ce++)T[D+Ce]=re[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(O(re,ee,L,C),Ce=0;Ce<$;Ce++)T[D+Ce]=re[Ce];return 0}function N(T,D,$,A,L){var ee=new Uint8Array(32);E(ee,A,L,C);for(var re=new Uint8Array(8),he=0;he<8;he++)re[he]=A[he+16];return M(T,D,$,re,ee)}function z(T,D,$,A,L,ee,re){var he=new Uint8Array(32);E(he,ee,re,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return k(T,D,$,A,L,Ce,he)}var H=function(T){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,A,L,ee,re,he,Ce;D=T[0]&255|(T[1]&255)<<8,this.r[0]=D&8191,$=T[2]&255|(T[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=($>>>10|A<<6)&7939,L=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|L<<9)&8191,ee=T[8]&255|(T[9]&255)<<8,this.r[4]=(L>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,re=T[10]&255|(T[11]&255)<<8,this.r[6]=(ee>>>14|re<<2)&8191,he=T[12]&255|(T[13]&255)<<8,this.r[7]=(re>>>11|he<<5)&8065,Ce=T[14]&255|(T[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};H.prototype.blocks=function(T,D,$){for(var A=this.fin?0:2048,L,ee,re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe=this.h[0],Ke=this.h[1],Ge=this.h[2],ve=this.h[3],ge=this.h[4],De=this.h[5],Pe=this.h[6],Te=this.h[7],ze=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Yt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];$>=16;)L=T[D+0]&255|(T[D+1]&255)<<8,Fe+=L&8191,ee=T[D+2]&255|(T[D+3]&255)<<8,Ke+=(L>>>13|ee<<3)&8191,re=T[D+4]&255|(T[D+5]&255)<<8,Ge+=(ee>>>10|re<<6)&8191,he=T[D+6]&255|(T[D+7]&255)<<8,ve+=(re>>>7|he<<9)&8191,Ce=T[D+8]&255|(T[D+9]&255)<<8,ge+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=T[D+10]&255|(T[D+11]&255)<<8,Pe+=(Ce>>>14|Be<<2)&8191,He=T[D+12]&255|(T[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=T[D+14]&255|(T[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ne=0,rt=Ne,rt+=Fe*Lt,rt+=Ke*(5*rn),rt+=Ge*(5*ln),rt+=ve*(5*jt),rt+=ge*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*sn),rt+=Pe*(5*Yt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=vt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Fe*Ft,bt+=Ke*Lt,bt+=Ge*(5*rn),bt+=ve*(5*ln),bt+=ge*(5*jt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Pe*(5*sn),bt+=Te*(5*Yt),bt+=ze*(5*te),bt+=vt*(5*$t),Ne+=bt>>>13,bt&=8191,Ot=Ne,Ot+=Fe*$t,Ot+=Ke*Ft,Ot+=Ge*Lt,Ot+=ve*(5*rn),Ot+=ge*(5*ln),Ne=Ot>>>13,Ot&=8191,Ot+=De*(5*jt),Ot+=Pe*(5*un),Ot+=Te*(5*sn),Ot+=ze*(5*Yt),Ot+=vt*(5*te),Ne+=Ot>>>13,Ot&=8191,gt=Ne,gt+=Fe*te,gt+=Ke*$t,gt+=Ge*Ft,gt+=ve*Lt,gt+=ge*(5*rn),Ne=gt>>>13,gt&=8191,gt+=De*(5*ln),gt+=Pe*(5*jt),gt+=Te*(5*un),gt+=ze*(5*sn),gt+=vt*(5*Yt),Ne+=gt>>>13,gt&=8191,ht=Ne,ht+=Fe*Yt,ht+=Ke*te,ht+=Ge*$t,ht+=ve*Ft,ht+=ge*Lt,Ne=ht>>>13,ht&=8191,ht+=De*(5*rn),ht+=Pe*(5*ln),ht+=Te*(5*jt),ht+=ze*(5*un),ht+=vt*(5*sn),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Fe*sn,xt+=Ke*Yt,xt+=Ge*te,xt+=ve*$t,xt+=ge*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Lt,xt+=Pe*(5*rn),xt+=Te*(5*ln),xt+=ze*(5*jt),xt+=vt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Fe*un,wt+=Ke*sn,wt+=Ge*Yt,wt+=ve*te,wt+=ge*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Pe*Lt,wt+=Te*(5*rn),wt+=ze*(5*ln),wt+=vt*(5*jt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Fe*jt,Je+=Ke*un,Je+=Ge*sn,Je+=ve*Yt,Je+=ge*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Pe*Ft,Je+=Te*Lt,Je+=ze*(5*rn),Je+=vt*(5*ln),Ne+=Je>>>13,Je&=8191,ut=Ne,ut+=Fe*ln,ut+=Ke*jt,ut+=Ge*un,ut+=ve*sn,ut+=ge*Yt,Ne=ut>>>13,ut&=8191,ut+=De*te,ut+=Pe*$t,ut+=Te*Ft,ut+=ze*Lt,ut+=vt*(5*rn),Ne+=ut>>>13,ut&=8191,Qe=Ne,Qe+=Fe*rn,Qe+=Ke*ln,Qe+=Ge*jt,Qe+=ve*un,Qe+=ge*sn,Ne=Qe>>>13,Qe&=8191,Qe+=De*Yt,Qe+=Pe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=vt*Lt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Fe=rt,Ke=bt,Ge=Ot,ve=gt,ge=ht,De=xt,Pe=wt,Te=Je,ze=ut,vt=Qe,D+=16,$-=16;this.h[0]=Fe,this.h[1]=Ke,this.h[2]=Ge,this.h[3]=ve,this.h[4]=ge,this.h[5]=De,this.h[6]=Pe,this.h[7]=Te,this.h[8]=ze,this.h[9]=vt},H.prototype.finish=function(T,D){var $=new Uint16Array(10),A,L,ee,re;if(this.leftover){for(re=this.leftover,this.buffer[re++]=1;re<16;re++)this.buffer[re]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,re=2;re<10;re++)this.h[re]+=A,A=this.h[re]>>>13,this.h[re]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,$[0]=this.h[0]+5,A=$[0]>>>13,$[0]&=8191,re=1;re<10;re++)$[re]=this.h[re]+A,A=$[re]>>>13,$[re]&=8191;for($[9]-=8192,L=(A^1)-1,re=0;re<10;re++)$[re]&=L;for(L=~L,re=0;re<10;re++)this.h[re]=this.h[re]&L|$[re];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,re=1;re<8;re++)ee=(this.h[re]+this.pad[re]|0)+(ee>>>16)|0,this.h[re]=ee&65535;T[D+0]=this.h[0]>>>0&255,T[D+1]=this.h[0]>>>8&255,T[D+2]=this.h[1]>>>0&255,T[D+3]=this.h[1]>>>8&255,T[D+4]=this.h[2]>>>0&255,T[D+5]=this.h[2]>>>8&255,T[D+6]=this.h[3]>>>0&255,T[D+7]=this.h[3]>>>8&255,T[D+8]=this.h[4]>>>0&255,T[D+9]=this.h[4]>>>8&255,T[D+10]=this.h[5]>>>0&255,T[D+11]=this.h[5]>>>8&255,T[D+12]=this.h[6]>>>0&255,T[D+13]=this.h[6]>>>8&255,T[D+14]=this.h[7]>>>0&255,T[D+15]=this.h[7]>>>8&255},H.prototype.update=function(T,D,$){var A,L;if(this.leftover){for(L=16-this.leftover,L>$&&(L=$),A=0;A=16&&(L=$-$%16,this.blocks(T,D,L),D+=L,$-=L),$){for(A=0;A<$;A++)this.buffer[this.leftover+A]=T[D+A];this.leftover+=$}};function V(T,D,$,A,L,ee){var re=new H(ee);return re.update($,A,L),re.finish(T,D),0}function ne(T,D,$,A,L,ee){var re=new Uint8Array(16);return V(re,0,$,A,L,ee),b(T,D,re,0)}function Z(T,D,$,A,L){var ee;if($<32)return-1;for(z(T,0,D,0,$,A,L),V(T,16,T,32,$-32,T),ee=0;ee<16;ee++)T[ee]=0;return 0}function G(T,D,$,A,L){var ee,re=new Uint8Array(32);if($<32||(N(re,0,32,A,L),ne(D,16,D,32,$-32,re)!==0))return-1;for(z(T,0,D,0,$,A,L),ee=0;ee<32;ee++)T[ee]=0;return 0}function q(T,D){var $;for($=0;$<16;$++)T[$]=D[$]|0}function W(T){var D,$,A=1;for(D=0;D<16;D++)$=T[D]+A+65535,A=Math.floor($/65536),T[D]=$-A*65536;T[0]+=A-1+37*(A-1)}function j(T,D,$){for(var A,L=~($-1),ee=0;ee<16;ee++)A=L&(T[ee]^D[ee]),T[ee]^=A,D[ee]^=A}function K(T,D){var $,A,L,ee=n(),re=n();for($=0;$<16;$++)re[$]=D[$];for(W(re),W(re),W(re),A=0;A<2;A++){for(ee[0]=re[0]-65517,$=1;$<15;$++)ee[$]=re[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=re[15]-32767-(ee[14]>>16&1),L=ee[15]>>16&1,ee[14]&=65535,j(re,ee,1-L)}for($=0;$<16;$++)T[2*$]=re[$]&255,T[2*$+1]=re[$]>>8}function Y(T,D){var $=new Uint8Array(32),A=new Uint8Array(32);return K($,T),K(A,D),w($,0,A,0)}function oe(T){var D=new Uint8Array(32);return K(D,T),D[0]&1}function Q(T,D){var $;for($=0;$<16;$++)T[$]=D[2*$]+(D[2*$+1]<<8);T[15]&=32767}function J(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]+$[A]}function ue(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]-$[A]}function de(T,D,$){var A,L,ee=0,re=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Je=0,ut=0,Qe=0,Fe=0,Ke=0,Ge=0,ve=0,ge=0,De=0,Pe=0,Te=0,ze=0,vt=0,Lt=0,Ft=0,$t=0,te=$[0],Yt=$[1],sn=$[2],un=$[3],jt=$[4],ln=$[5],rn=$[6],Gn=$[7],mn=$[8],kn=$[9],Yn=$[10],Zn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];A=D[0],ee+=A*te,re+=A*Yt,he+=A*sn,Ce+=A*un,Be+=A*jt,He+=A*ln,ct+=A*rn,Ne+=A*Gn,rt+=A*mn,bt+=A*kn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Je+=A*Nr,A=D[1],re+=A*te,he+=A*Yt,Ce+=A*sn,Be+=A*un,He+=A*jt,ct+=A*ln,Ne+=A*rn,rt+=A*Gn,bt+=A*mn,Ot+=A*kn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Je+=A*Ir,ut+=A*Nr,A=D[2],he+=A*te,Ce+=A*Yt,Be+=A*sn,He+=A*un,ct+=A*jt,Ne+=A*ln,rt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*kn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Je+=A*$r,ut+=A*Ir,Qe+=A*Nr,A=D[3],Ce+=A*te,Be+=A*Yt,He+=A*sn,ct+=A*un,Ne+=A*jt,rt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*kn,xt+=A*Yn,wt+=A*Zn,Je+=A*xr,ut+=A*$r,Qe+=A*Ir,Fe+=A*Nr,A=D[4],Be+=A*te,He+=A*Yt,ct+=A*sn,Ne+=A*un,rt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*kn,wt+=A*Yn,Je+=A*Zn,ut+=A*xr,Qe+=A*$r,Fe+=A*Ir,Ke+=A*Nr,A=D[5],He+=A*te,ct+=A*Yt,Ne+=A*sn,rt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*kn,Je+=A*Yn,ut+=A*Zn,Qe+=A*xr,Fe+=A*$r,Ke+=A*Ir,Ge+=A*Nr,A=D[6],ct+=A*te,Ne+=A*Yt,rt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Je+=A*kn,ut+=A*Yn,Qe+=A*Zn,Fe+=A*xr,Ke+=A*$r,Ge+=A*Ir,ve+=A*Nr,A=D[7],Ne+=A*te,rt+=A*Yt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Je+=A*mn,ut+=A*kn,Qe+=A*Yn,Fe+=A*Zn,Ke+=A*xr,Ge+=A*$r,ve+=A*Ir,ge+=A*Nr,A=D[8],rt+=A*te,bt+=A*Yt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Je+=A*Gn,ut+=A*mn,Qe+=A*kn,Fe+=A*Yn,Ke+=A*Zn,Ge+=A*xr,ve+=A*$r,ge+=A*Ir,De+=A*Nr,A=D[9],bt+=A*te,Ot+=A*Yt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Je+=A*rn,ut+=A*Gn,Qe+=A*mn,Fe+=A*kn,Ke+=A*Yn,Ge+=A*Zn,ve+=A*xr,ge+=A*$r,De+=A*Ir,Pe+=A*Nr,A=D[10],Ot+=A*te,gt+=A*Yt,ht+=A*sn,xt+=A*un,wt+=A*jt,Je+=A*ln,ut+=A*rn,Qe+=A*Gn,Fe+=A*mn,Ke+=A*kn,Ge+=A*Yn,ve+=A*Zn,ge+=A*xr,De+=A*$r,Pe+=A*Ir,Te+=A*Nr,A=D[11],gt+=A*te,ht+=A*Yt,xt+=A*sn,wt+=A*un,Je+=A*jt,ut+=A*ln,Qe+=A*rn,Fe+=A*Gn,Ke+=A*mn,Ge+=A*kn,ve+=A*Yn,ge+=A*Zn,De+=A*xr,Pe+=A*$r,Te+=A*Ir,ze+=A*Nr,A=D[12],ht+=A*te,xt+=A*Yt,wt+=A*sn,Je+=A*un,ut+=A*jt,Qe+=A*ln,Fe+=A*rn,Ke+=A*Gn,Ge+=A*mn,ve+=A*kn,ge+=A*Yn,De+=A*Zn,Pe+=A*xr,Te+=A*$r,ze+=A*Ir,vt+=A*Nr,A=D[13],xt+=A*te,wt+=A*Yt,Je+=A*sn,ut+=A*un,Qe+=A*jt,Fe+=A*ln,Ke+=A*rn,Ge+=A*Gn,ve+=A*mn,ge+=A*kn,De+=A*Yn,Pe+=A*Zn,Te+=A*xr,ze+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=D[14],wt+=A*te,Je+=A*Yt,ut+=A*sn,Qe+=A*un,Fe+=A*jt,Ke+=A*ln,Ge+=A*rn,ve+=A*Gn,ge+=A*mn,De+=A*kn,Pe+=A*Yn,Te+=A*Zn,ze+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=D[15],Je+=A*te,ut+=A*Yt,Qe+=A*sn,Fe+=A*un,Ke+=A*jt,Ge+=A*ln,ve+=A*rn,ge+=A*Gn,De+=A*mn,Pe+=A*kn,Te+=A*Yn,ze+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,ee+=38*ut,re+=38*Qe,he+=38*Fe,Ce+=38*Ke,Be+=38*Ge,He+=38*ve,ct+=38*ge,Ne+=38*De,rt+=38*Pe,bt+=38*Te,Ot+=38*ze,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),T[0]=ee,T[1]=re,T[2]=he,T[3]=Ce,T[4]=Be,T[5]=He,T[6]=ct,T[7]=Ne,T[8]=rt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Je}function Se(T,D){de(T,D,D)}function me(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=253;A>=0;A--)Se($,$),A!==2&&A!==4&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ze(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=250;A>=0;A--)Se($,$),A!==1&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ae(T,D,$){var A=new Uint8Array(32),L=new Float64Array(80),ee,re,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(re=0;re<31;re++)A[re]=D[re];for(A[31]=D[31]&127|64,A[0]&=248,Q(L,$),re=0;re<16;re++)Ce[re]=L[re],He[re]=he[re]=Be[re]=0;for(he[0]=He[0]=1,re=254;re>=0;--re)ee=A[re>>>3]>>>(re&7)&1,j(he,Ce,ee),j(Be,He,ee),J(ct,he,Be),ue(he,he,Be),J(Be,Ce,He),ue(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),ue(he,he,Be),Se(Ce,he),ue(Be,He,Ne),de(he,Be,u),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,L),Se(Ce,ct),j(he,Ce,ee),j(Be,He,ee);for(re=0;re<16;re++)L[re+16]=he[re],L[re+32]=Be[re],L[re+48]=Ce[re],L[re+64]=He[re];var rt=L.subarray(32),bt=L.subarray(16);return me(rt,rt),de(bt,bt,rt),K(T,bt),0}function Le(T,D){return Ae(T,D,o)}function $e(T,D){return r(D,32),Le(T,D)}function be(T,D,$){var A=new Uint8Array(32);return Ae(A,$,D),E(T,i,A,C)}var yt=Z,lt=G;function Nt(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),yt(T,D,$,A,re)}function yn(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),lt(T,D,$,A,re)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(T,D,$,A){for(var L=new Int32Array(16),ee=new Int32Array(16),re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe,Ke,Ge,ve,ge,De,Pe,Te,ze,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],te=T[4],Yt=T[5],sn=T[6],un=T[7],jt=D[0],ln=D[1],rn=D[2],Gn=D[3],mn=D[4],kn=D[5],Yn=D[6],Zn=D[7],xr=0;A>=128;){for(Ke=0;Ke<16;Ke++)Ge=8*Ke+xr,L[Ke]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[Ke]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(Ke=0;Ke<80;Ke++)if(re=vt,he=Lt,Ce=Ft,Be=$t,He=te,ct=Yt,Ne=sn,rt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=kn,Je=Yn,ut=Zn,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(te>>>14|mn<<18)^(te>>>18|mn<<14)^(mn>>>9|te<<23),ge=(mn>>>14|te<<18)^(mn>>>18|te<<14)^(te>>>9|mn<<23),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=te&Yt^~te&sn,ge=mn&kn^~mn&Yn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=nn[Ke*2],ge=nn[Ke*2+1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=L[Ke%16],ge=ee[Ke%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Fe=De&65535|Pe<<16,ve=Qe,ge=Fe,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),ge=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=vt&Lt^vt&Ft^Lt&Ft,ge=jt&ln^jt&rn^ln&rn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,ut=De&65535|Pe<<16,ve=Be,ge=ht,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=Qe,ge=Fe,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Pe<<16,Lt=re,Ft=he,$t=Ce,te=Be,Yt=He,sn=ct,un=Ne,vt=rt,ln=bt,rn=Ot,Gn=gt,mn=ht,kn=xt,Yn=wt,Zn=Je,jt=ut,Ke%16===15)for(Ge=0;Ge<16;Ge++)ve=L[Ge],ge=ee[Ge],De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=L[(Ge+9)%16],ge=ee[(Ge+9)%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+1)%16],Fe=ee[(Ge+1)%16],ve=(Qe>>>1|Fe<<31)^(Qe>>>8|Fe<<24)^Qe>>>7,ge=(Fe>>>1|Qe<<31)^(Fe>>>8|Qe<<24)^(Fe>>>7|Qe<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+14)%16],Fe=ee[(Ge+14)%16],ve=(Qe>>>19|Fe<<13)^(Fe>>>29|Qe<<3)^Qe>>>6,ge=(Fe>>>19|Qe<<13)^(Qe>>>29|Fe<<3)^(Fe>>>6|Qe<<26),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,L[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Pe<<16;ve=vt,ge=jt,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[0],ge=D[0],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[0]=vt=Te&65535|ze<<16,D[0]=jt=De&65535|Pe<<16,ve=Lt,ge=ln,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[1],ge=D[1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[1]=Lt=Te&65535|ze<<16,D[1]=ln=De&65535|Pe<<16,ve=Ft,ge=rn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[2],ge=D[2],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[2]=Ft=Te&65535|ze<<16,D[2]=rn=De&65535|Pe<<16,ve=$t,ge=Gn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[3],ge=D[3],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[3]=$t=Te&65535|ze<<16,D[3]=Gn=De&65535|Pe<<16,ve=te,ge=mn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[4],ge=D[4],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[4]=te=Te&65535|ze<<16,D[4]=mn=De&65535|Pe<<16,ve=Yt,ge=kn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[5],ge=D[5],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[5]=Yt=Te&65535|ze<<16,D[5]=kn=De&65535|Pe<<16,ve=sn,ge=Yn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[6],ge=D[6],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[6]=sn=Te&65535|ze<<16,D[6]=Yn=De&65535|Pe<<16,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[7],ge=D[7],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[7]=un=Te&65535|ze<<16,D[7]=Zn=De&65535|Pe<<16,xr+=128,A-=128}return A}function pe(T,D,$){var A=new Int32Array(8),L=new Int32Array(8),ee=new Uint8Array(256),re,he=$;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,L[0]=4089235720,L[1]=2227873595,L[2]=4271175723,L[3]=1595750129,L[4]=2917565137,L[5]=725511199,L[6]=4215389547,L[7]=327033209,ie(A,L,D,$),$%=128,re=0;re<$;re++)ee[re]=D[he-$+re];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,m(ee,$-8,he/536870912|0,he<<3),ie(A,L,ee,$),re=0;re<8;re++)m(T,8*re,A[re],L[re]);return 0}function ye(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n(),Be=n(),He=n();ue($,T[1],T[0]),ue(He,D[1],D[0]),de($,$,He),J(A,T[0],T[1]),J(He,D[0],D[1]),de(A,A,He),de(L,T[3],D[3]),de(L,L,c),de(ee,T[2],D[2]),J(ee,ee,ee),ue(re,A,$),ue(he,ee,L),J(Ce,ee,L),J(Be,A,$),de(T[0],re,he),de(T[1],Be,Ce),de(T[2],Ce,he),de(T[3],re,Be)}function Ue(T,D,$){var A;for(A=0;A<4;A++)j(T[A],D[A],$)}function je(T,D){var $=n(),A=n(),L=n();me(L,D[2]),de($,D[0],L),de(A,D[1],L),K(T,A),T[31]^=oe($)<<7}function ke(T,D,$){var A,L;for(q(T[0],a),q(T[1],s),q(T[2],s),q(T[3],a),L=255;L>=0;--L)A=$[L/8|0]>>(L&7)&1,Ue(T,D,A),ye(D,T),ye(T,T),Ue(T,D,A)}function nt(T,D){var $=[n(),n(),n(),n()];q($[0],f),q($[1],h),q($[2],s),de($[3],f,h),ke(T,$,D)}function mt(T,D,$){var A=new Uint8Array(64),L=[n(),n(),n(),n()],ee;for($||r(D,32),pe(A,D,32),A[0]&=248,A[31]&=127,A[31]|=64,nt(L,A),je(T,L),ee=0;ee<32;ee++)D[ee+32]=T[ee];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ht(T,D){var $,A,L,ee;for(A=63;A>=32;--A){for($=0,L=A-32,ee=A-12;L>4)*xn[L],$=D[L]>>8,D[L]&=255;for(L=0;L<32;L++)D[L]-=$*xn[L];for(A=0;A<32;A++)D[A+1]+=D[A]>>8,T[A]=D[A]&255}function wn(T){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=T[$];for($=0;$<64;$++)T[$]=0;Ht(T,D)}function Ii(T,D,$,A){var L=new Uint8Array(64),ee=new Uint8Array(64),re=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(L,A,32),L[0]&=248,L[31]&=127,L[31]|=64;var ct=$+64;for(he=0;he<$;he++)T[64+he]=D[he];for(he=0;he<32;he++)T[32+he]=L[32+he];for(pe(re,T.subarray(32),$+32),wn(re),nt(He,re),je(T,He),he=32;he<64;he++)T[he]=A[he];for(pe(ee,T,$+64),wn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=re[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*L[Ce];return Ht(T.subarray(32),Be),ct}function br(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n();return q(T[2],s),Q(T[1],D),Se(L,T[1]),de(ee,L,l),ue(L,L,T[2]),J(ee,T[2],ee),Se(re,ee),Se(he,re),de(Ce,he,re),de($,Ce,L),de($,$,ee),Ze($,$),de($,$,L),de($,$,ee),de($,$,ee),de(T[0],$,ee),Se(A,T[0]),de(A,A,ee),Y(A,L)&&de(T[0],T[0],p),Se(A,T[0]),de(A,A,ee),Y(A,L)?-1:(oe(T[0])===D[31]>>7&&ue(T[0],a,T[0]),de(T[3],T[0],T[1]),0)}function yi(T,D,$,A){var L,ee=new Uint8Array(32),re=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,A))return-1;for(L=0;L<$;L++)T[L]=D[L];for(L=0;L<32;L++)T[L+32]=A[L];if(pe(re,T,$),wn(re),ke(he,Ce,re),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(L=0;L<$;L++)T[L]=0;return-1}for(L=0;L<$;L++)T[L]=D[L+64];return $}var sr=32,si=24,bi=32,Rr=16,Xi=32,yo=32,xi=32,Dr=32,Sa=32,_t=si,hn=bi,_n=Rr,qn=64,ur=32,Xr=64,bo=32,Zl=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:z,crypto_stream:N,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:V,crypto_onetimeauth_verify:ne,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Ae,crypto_scalarmult_base:Le,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:Nt,crypto_box_open:yn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:mt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:sr,crypto_secretbox_NONCEBYTES:si,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Xi,crypto_scalarmult_SCALARBYTES:yo,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:Sa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:_n,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:bo,crypto_hash_BYTES:Zl,gf:n,D:l,L:xn,pack25519:K,unpack25519:Q,M:de,A:J,S:Se,Z:ue,pow2523:Ze,add:ye,set25519:q,modL:Ht,scalarmult:ke,scalarbase:nt};function Sf(T,D){if(T.length!==sr)throw new Error("bad key size");if(D.length!==si)throw new Error("bad nonce size")}function ae(T,D){if(T.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var T=0;T=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),D=new Uint8Array(Xr);return mt(T,D),{publicKey:T,secretKey:D}},t.sign.keyPair.fromSecretKey=function(T){if(le(T),T.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),I.jsxs($Ge,{scope:n,state:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Sl(w)?"mixed":w,"aria-required":a,"data-state":hZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Sl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&I.jsx(NGe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Sl(o)?!1:o})]})});cZ.displayName=k5;var fZ="CheckboxIndicator",dZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=IGe(fZ,n);return I.jsx(Gr,{present:r||Sl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":hZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});dZ.displayName=fZ;var NGe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=FP(n),u=lA(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Sl(n),p.call(c,Sl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Sl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Sl(e){return e==="indeterminate"}function hZ(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}var jQe=cZ,BQe=dZ;export{AZe as $,WGe as A,the as B,jYe as C,BYe as D,UYe as E,FYe as F,tge as G,ige as H,lYe as I,oge as J,mz as K,JYe as L,sge as M,nge as N,FGe as O,VGe as P,TYe as Q,F as R,Al as S,age as T,rge as U,tYe as V,dZe as W,kge as X,Tge as Y,OZe as Z,ZYe as _,KGe as a,BXe as a$,vZe as a0,yZe as a1,wZe as a2,_Ze as a3,CZe as a4,KYe as a5,SZe as a6,tZe as a7,xZe as a8,EZe as a9,xYe as aA,CYe as aB,dYe as aC,eYe as aD,IZe as aE,oZe as aF,hXe as aG,SXe as aH,_Xe as aI,hYe as aJ,bYe as aK,EXe as aL,OXe as aM,AXe as aN,HGe as aO,RXe as aP,DXe as aQ,$Xe as aR,MXe as aS,NXe as aT,FXe as aU,LXe as aV,jXe as aW,GYe as aX,GXe as aY,XYe as aZ,YXe as a_,gZe as aa,mZe as ab,bZe as ac,kZe as ad,DZe as ae,TZe as af,MZe as ag,LYe as ah,zGe as ai,JGe as aj,rYe as ak,yYe as al,GGe as am,iYe as an,pYe as ao,nYe as ap,uYe as aq,vYe as ar,mYe as as,cYe as at,gYe as au,QGe as av,ZGe as aw,oYe as ax,SYe as ay,_Ye as az,gm as b,fXe as b$,zXe as b0,UXe as b1,WXe as b2,HXe as b3,qXe as b4,KXe as b5,ZXe as b6,VXe as b7,JXe as b8,YYe as b9,uQe as bA,lQe as bB,WUe as bC,ZUe as bD,oQe as bE,lXe as bF,NZe as bG,BZe as bH,FZe as bI,XXe as bJ,Ui as bK,fQe as bL,dQe as bM,sXe as bN,mXe as bO,dXe as bP,eXe as bQ,YZe as bR,GZe as bS,hQe as bT,XGe as bU,wYe as bV,fYe as bW,YGe as bX,gQe as bY,mQe as bZ,$Ye as b_,rQe as ba,iQe as bb,tQe as bc,nQe as bd,c3 as be,DYe as bf,_f as bg,VZe as bh,PXe as bi,kXe as bj,$P as bk,IP as bl,JNe as bm,Js as bn,xf as bo,tp as bp,QXe as bq,LZe as br,zZe as bs,uXe as bt,UZe as bu,xXe as bv,bXe as bw,tXe as bx,yXe as by,sQe as bz,dn as c,nZe as c0,rZe as c1,SQe as c2,EQe as c3,ZZe as c4,jZe as c5,TQe as c6,MQe as c7,$Qe as c8,IQe as c9,LQe as cA,pXe as cB,QZe as cC,nXe as cD,cXe as cE,JZe as cF,gXe as cG,iXe as cH,jQe as cI,BQe as cJ,QYe as cK,cZe as cL,qYe as cM,eZe as cN,lZe as cO,rXe as cP,UGe as cQ,HZe as cR,jUe as cS,aZe as cT,XZe as cU,WZe as cV,RQe as ca,DQe as cb,AQe as cc,PQe as cd,kQe as ce,iZe as cf,sZe as cg,vXe as ch,CQe as ci,vQe as cj,xQe as ck,wQe as cl,_Qe as cm,aXe as cn,KZe as co,qZe as cp,wXe as cq,es as cr,yr as cs,oXe as ct,yQe as cu,bQe as cv,uZe as cw,Jc as cx,RZe as cy,NQe as cz,jGe as d,qr as e,PYe as f,OYe as g,AYe as h,EYe as i,I as j,Yi as k,NYe as l,Uk as m,RYe as n,BGe as o,kYe as p,VYe as q,y as r,zO as s,qGe as t,zF as u,sYe as v,aYe as w,HYe as x,WYe as y,zYe as z}; +`;break}return r};ip.prototype.render=function(e,t,n){let r="";const i=this.rules;for(let o=0,a=e.length;o=0&&(r=this.attrs[n][1]),r};is.prototype.attrJoin=function(t,n){const r=this.attrIndex(t);r<0?this.attrPush([t,n]):this.attrs[r][1]=this.attrs[r][1]+" "+n};function HY(e,t,n){this.src=e,this.env=n,this.tokens=[],this.inlineMode=!1,this.md=t}HY.prototype.Token=is;const BKe=/\r\n?|\n/g,zKe=/\0/g;function UKe(e){let t;t=e.src.replace(BKe,` +`),t=t.replace(zKe,"�"),e.src=t}function VKe(e){let t;e.inlineMode?(t=new e.Token("inline","",0),t.content=e.src,t.map=[0,1],t.children=[],e.tokens.push(t)):e.md.block.parse(e.src,e.md,e.env,e.tokens)}function WKe(e){const t=e.tokens;for(let n=0,r=t.length;n\s]/i.test(e)}function KKe(e){return/^<\/a\s*>/i.test(e)}function qKe(e){const t=e.tokens;if(e.md.options.linkify)for(let n=0,r=t.length;n=0;a--){const s=i[a];if(s.type==="link_close"){for(a--;i[a].level!==s.level&&i[a].type!=="link_open";)a--;continue}if(s.type==="html_inline"&&(HKe(s.content)&&o>0&&o--,KKe(s.content)&&o++),!(o>0)&&s.type==="text"&&e.md.linkify.test(s.content)){const u=s.content;let l=e.md.linkify.match(u);const c=[];let f=s.level,h=0;l.length>0&&l[0].index===0&&a>0&&i[a-1].type==="text_special"&&(l=l.slice(1));for(let p=0;ph){const E=new e.Token("text","",0);E.content=u.slice(h,w),E.level=f,c.push(E)}const x=new e.Token("link_open","a",1);x.attrs=[["href",v]],x.level=f++,x.markup="linkify",x.info="auto",c.push(x);const S=new e.Token("text","",0);S.content=b,S.level=f,c.push(S);const O=new e.Token("link_close","a",-1);O.level=--f,O.markup="linkify",O.info="auto",c.push(O),h=l[p].lastIndex}if(h=0;n--){const r=e[n];r.type==="text"&&!t&&(r.content=r.content.replace(YKe,XKe)),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function JKe(e){let t=0;for(let n=e.length-1;n>=0;n--){const r=e[n];r.type==="text"&&!t&&KY.test(r.content)&&(r.content=r.content.replace(/\+-/g,"±").replace(/\.{2,}/g,"…").replace(/([?!])…/g,"$1..").replace(/([?!]){4,}/g,"$1$1$1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]|$)/mg,"$1—").replace(/(^|\s)--(?=\s|$)/mg,"$1–").replace(/(^|[^-\s])--(?=[^-\s]|$)/mg,"$1–")),r.type==="link_open"&&r.info==="auto"&&t--,r.type==="link_close"&&r.info==="auto"&&t++}}function eqe(e){let t;if(e.md.options.typographer)for(t=e.tokens.length-1;t>=0;t--)e.tokens[t].type==="inline"&&(GKe.test(e.tokens[t].content)&&QKe(e.tokens[t].children),KY.test(e.tokens[t].content)&&JKe(e.tokens[t].children))}const tqe=/['"]/,aN=/['"]/g,sN="’";function Dy(e,t,n){return e.slice(0,t)+n+e.slice(t+1)}function nqe(e,t){let n;const r=[];for(let i=0;i=0&&!(r[n].level<=a);n--);if(r.length=n+1,o.type!=="text")continue;let s=o.content,u=0,l=s.length;e:for(;u=0)m=s.charCodeAt(c.index-1);else for(n=i-1;n>=0&&!(e[n].type==="softbreak"||e[n].type==="hardbreak");n--)if(e[n].content){m=e[n].content.charCodeAt(e[n].content.length-1);break}let v=32;if(u=48&&m<=57&&(h=f=!1),f&&h&&(f=b,h=w),!f&&!h){p&&(o.content=Dy(o.content,c.index,sN));continue}if(h)for(n=r.length-1;n>=0;n--){let O=r[n];if(r[n].level=0;t--)e.tokens[t].type!=="inline"||!tqe.test(e.tokens[t].content)||nqe(e.tokens[t].children,e)}function iqe(e){let t,n;const r=e.tokens,i=r.length;for(let o=0;o0&&this.level++,this.tokens.push(r),r};Ns.prototype.isEmpty=function(t){return this.bMarks[t]+this.tShift[t]>=this.eMarks[t]};Ns.prototype.skipEmptyLines=function(t){for(let n=this.lineMax;tn;)if(!Hn(this.src.charCodeAt(--t)))return t+1;return t};Ns.prototype.skipChars=function(t,n){for(let r=this.src.length;tr;)if(n!==this.src.charCodeAt(--t))return t+1;return t};Ns.prototype.getLines=function(t,n,r,i){if(t>=n)return"";const o=new Array(n-t);for(let a=0,s=t;sr?o[a]=new Array(u-r+1).join(" ")+this.src.slice(c,f):o[a]=this.src.slice(c,f)}return o.join("")};Ns.prototype.Token=is;const oqe=65536;function M3(e,t){const n=e.bMarks[t]+e.tShift[t],r=e.eMarks[t];return e.src.slice(n,r)}function uN(e){const t=[],n=e.length;let r=0,i=e.charCodeAt(r),o=!1,a=0,s="";for(;rn)return!1;let i=t+1;if(e.sCount[i]=4)return!1;let o=e.bMarks[i]+e.tShift[i];if(o>=e.eMarks[i])return!1;const a=e.src.charCodeAt(o++);if(a!==124&&a!==45&&a!==58||o>=e.eMarks[i])return!1;const s=e.src.charCodeAt(o++);if(s!==124&&s!==45&&s!==58&&!Hn(s)||a===45&&Hn(s))return!1;for(;o=4)return!1;l=uN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop();const f=l.length;if(f===0||f!==c.length)return!1;if(r)return!0;const h=e.parentType;e.parentType="table";const p=e.md.block.ruler.getRules("blockquote"),m=e.push("table_open","table",1),v=[t,0];m.map=v;const b=e.push("thead_open","thead",1);b.map=[t,t+1];const w=e.push("tr_open","tr",1);w.map=[t,t+1];for(let O=0;O=4||(l=uN(u),l.length&&l[0]===""&&l.shift(),l.length&&l[l.length-1]===""&&l.pop(),S+=f-l.length,S>oqe))break;if(i===t+2){const C=e.push("tbody_open","tbody",1);C.map=x=[t+2,0]}const E=e.push("tr_open","tr",1);E.map=[i,i+1];for(let C=0;C=4){r++,i=r;continue}break}e.line=i;const o=e.push("code_block","code",0);return o.content=e.getLines(t,i,4+e.blkIndent,!1)+` +`,o.map=[t,e.line],!0}function uqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||i+3>o)return!1;const a=e.src.charCodeAt(i);if(a!==126&&a!==96)return!1;let s=i;i=e.skipChars(i,a);let u=i-s;if(u<3)return!1;const l=e.src.slice(s,i),c=e.src.slice(i,o);if(a===96&&c.indexOf(String.fromCharCode(a))>=0)return!1;if(r)return!0;let f=t,h=!1;for(;f++,!(f>=n||(i=s=e.bMarks[f]+e.tShift[f],o=e.eMarks[f],i=4)&&(i=e.skipChars(i,a),!(i-s=4||e.src.charCodeAt(i)!==62)return!1;if(r)return!0;const s=[],u=[],l=[],c=[],f=e.md.block.ruler.getRules("blockquote"),h=e.parentType;e.parentType="blockquote";let p=!1,m;for(m=t;m=o)break;if(e.src.charCodeAt(i++)===62&&!S){let E=e.sCount[m]+1,C,k;e.src.charCodeAt(i)===32?(i++,E++,k=!1,C=!0):e.src.charCodeAt(i)===9?(C=!0,(e.bsCount[m]+E)%4===3?(i++,E++,k=!1):k=!0):C=!1;let M=E;for(s.push(e.bMarks[m]),e.bMarks[m]=i;i=o,u.push(e.bsCount[m]),e.bsCount[m]=e.sCount[m]+1+(C?1:0),l.push(e.sCount[m]),e.sCount[m]=M-E,c.push(e.tShift[m]),e.tShift[m]=i-e.bMarks[m];continue}if(p)break;let O=!1;for(let E=0,C=f.length;E";const w=[t,0];b.map=w,e.md.block.tokenize(e,t,m);const x=e.push("blockquote_close","blockquote",-1);x.markup=">",e.lineMax=a,e.parentType=h,w[1]=e.line;for(let S=0;S=4)return!1;let o=e.bMarks[t]+e.tShift[t];const a=e.src.charCodeAt(o++);if(a!==42&&a!==45&&a!==95)return!1;let s=1;for(;o=r)return-1;let o=e.src.charCodeAt(i++);if(o<48||o>57)return-1;for(;;){if(i>=r)return-1;if(o=e.src.charCodeAt(i++),o>=48&&o<=57){if(i-n>=10)return-1;continue}if(o===41||o===46)break;return-1}return i=4||e.listIndent>=0&&e.sCount[u]-e.listIndent>=4&&e.sCount[u]=e.blkIndent&&(c=!0);let f,h,p;if((p=cN(e,u))>=0){if(f=!0,a=e.bMarks[u]+e.tShift[u],h=Number(e.src.slice(a,p-1)),c&&h!==1)return!1}else if((p=lN(e,u))>=0)f=!1;else return!1;if(c&&e.skipSpaces(p)>=e.eMarks[u])return!1;if(r)return!0;const m=e.src.charCodeAt(p-1),v=e.tokens.length;f?(s=e.push("ordered_list_open","ol",1),h!==1&&(s.attrs=[["start",h]])):s=e.push("bullet_list_open","ul",1);const b=[u,0];s.map=b,s.markup=String.fromCharCode(m);let w=!1;const x=e.md.block.ruler.getRules("list"),S=e.parentType;for(e.parentType="list";u=i?k=1:k=E-O,k>4&&(k=1);const M=O+k;s=e.push("list_item_open","li",1),s.markup=String.fromCharCode(m);const N=[u,0];s.map=N,f&&(s.info=e.src.slice(a,p-1));const z=e.tight,H=e.tShift[u],V=e.sCount[u],ne=e.listIndent;if(e.listIndent=e.blkIndent,e.blkIndent=M,e.tight=!0,e.tShift[u]=C-e.bMarks[u],e.sCount[u]=E,C>=i&&e.isEmpty(u+1)?e.line=Math.min(e.line+2,n):e.md.block.tokenize(e,u,n,!0),(!e.tight||w)&&(l=!1),w=e.line-u>1&&e.isEmpty(e.line-1),e.blkIndent=e.listIndent,e.listIndent=ne,e.tShift[u]=H,e.sCount[u]=V,e.tight=z,s=e.push("list_item_close","li",-1),s.markup=String.fromCharCode(m),u=e.line,N[1]=u,u>=n||e.sCount[u]=4)break;let Z=!1;for(let G=0,q=x.length;G=4||e.src.charCodeAt(i)!==91)return!1;function s(x){const S=e.lineMax;if(x>=S||e.isEmpty(x))return null;let O=!1;if(e.sCount[x]-e.blkIndent>3&&(O=!0),e.sCount[x]<0&&(O=!0),!O){const k=e.md.block.ruler.getRules("reference"),M=e.parentType;e.parentType="reference";let N=!1;for(let z=0,H=k.length;z"u"&&(e.env.references={}),typeof e.env.references[w]>"u"&&(e.env.references[w]={title:b,href:f}),e.line=a),!0):!1}const pqe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],gqe="[a-zA-Z_:][a-zA-Z0-9:._-]*",mqe="[^\"'=<>`\\x00-\\x20]+",vqe="'[^']*'",yqe='"[^"]*"',bqe="(?:"+mqe+"|"+vqe+"|"+yqe+")",xqe="(?:\\s+"+gqe+"(?:\\s*=\\s*"+bqe+")?)",qY="<[A-Za-z][A-Za-z0-9\\-]*"+xqe+"*\\s*\\/?>",GY="<\\/[A-Za-z][A-Za-z0-9\\-]*\\s*>",wqe="",_qe="<[?][\\s\\S]*?[?]>",Sqe="]*>",Cqe="",Eqe=new RegExp("^(?:"+qY+"|"+GY+"|"+wqe+"|"+_qe+"|"+Sqe+"|"+Cqe+")"),Oqe=new RegExp("^(?:"+qY+"|"+GY+")"),Jf=[[/^<(script|pre|style|textarea)(?=(\s|>|$))/i,/<\/(script|pre|style|textarea)>/i,!0],[/^/,!0],[/^<\?/,/\?>/,!0],[/^/,!0],[/^/,!0],[new RegExp("^|$))","i"),/^$/,!0],[new RegExp(Oqe.source+"\\s*$"),/^$/,!1]];function Aqe(e,t,n,r){let i=e.bMarks[t]+e.tShift[t],o=e.eMarks[t];if(e.sCount[t]-e.blkIndent>=4||!e.md.options.html||e.src.charCodeAt(i)!==60)return!1;let a=e.src.slice(i,o),s=0;for(;s=4)return!1;let a=e.src.charCodeAt(i);if(a!==35||i>=o)return!1;let s=1;for(a=e.src.charCodeAt(++i);a===35&&i6||ii&&Hn(e.src.charCodeAt(u-1))&&(o=u),e.line=t+1;const l=e.push("heading_open","h"+String(s),1);l.markup="########".slice(0,s),l.map=[t,e.line];const c=e.push("inline","",0);c.content=e.src.slice(i,o).trim(),c.map=[t,e.line],c.children=[];const f=e.push("heading_close","h"+String(s),-1);return f.markup="########".slice(0,s),!0}function kqe(e,t,n){const r=e.md.block.ruler.getRules("paragraph");if(e.sCount[t]-e.blkIndent>=4)return!1;const i=e.parentType;e.parentType="paragraph";let o=0,a,s=t+1;for(;s3)continue;if(e.sCount[s]>=e.blkIndent){let p=e.bMarks[s]+e.tShift[s];const m=e.eMarks[s];if(p=m))){o=a===61?1:2;break}}if(e.sCount[s]<0)continue;let h=!1;for(let p=0,m=r.length;p3||e.sCount[o]<0)continue;let l=!1;for(let c=0,f=r.length;c=n||e.sCount[a]=o){e.line=n;break}const u=e.line;let l=!1;for(let c=0;c=e.line)throw new Error("block rule didn't increment state.line");break}if(!l)throw new Error("none of the block rules matched");e.tight=!s,e.isEmpty(e.line-1)&&(s=!0),a=e.line,a0&&(this.level++,this._prev_delimiters.push(this.delimiters),this.delimiters=[],i={delimiters:this.delimiters}),this.pendingLevel=this.level,this.tokens.push(r),this.tokens_meta.push(i),r};Gm.prototype.scanDelims=function(e,t){const n=this.posMax,r=this.src.charCodeAt(e),i=e>0?this.src.charCodeAt(e-1):32;let o=e;for(;o0)return!1;const n=e.pos,r=e.posMax;if(n+3>r||e.src.charCodeAt(n)!==58||e.src.charCodeAt(n+1)!==47||e.src.charCodeAt(n+2)!==47)return!1;const i=e.pending.match(Dqe);if(!i)return!1;const o=i[1],a=e.md.linkify.matchAtStart(e.src.slice(n-o.length));if(!a)return!1;let s=a.url;if(s.length<=o.length)return!1;s=s.replace(/\*+$/,"");const u=e.md.normalizeLink(s);if(!e.md.validateLink(u))return!1;if(!t){e.pending=e.pending.slice(0,-o.length);const l=e.push("link_open","a",1);l.attrs=[["href",u]],l.markup="linkify",l.info="auto";const c=e.push("text","",0);c.content=e.md.normalizeLinkText(s);const f=e.push("link_close","a",-1);f.markup="linkify",f.info="auto"}return e.pos+=s.length-o.length,!0}function Iqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==10)return!1;const r=e.pending.length-1,i=e.posMax;if(!t)if(r>=0&&e.pending.charCodeAt(r)===32)if(r>=1&&e.pending.charCodeAt(r-1)===32){let o=r-1;for(;o>=1&&e.pending.charCodeAt(o-1)===32;)o--;e.pending=e.pending.slice(0,o),e.push("hardbreak","br",0)}else e.pending=e.pending.slice(0,-1),e.push("softbreak","br",0);else e.push("softbreak","br",0);for(n++;n?@[]^_`{|}~-".split("").forEach(function(e){PP[e.charCodeAt(0)]=1});function Nqe(e,t){let n=e.pos;const r=e.posMax;if(e.src.charCodeAt(n)!==92||(n++,n>=r))return!1;let i=e.src.charCodeAt(n);if(i===10){for(t||e.push("hardbreak","br",0),n++;n=55296&&i<=56319&&n+1=56320&&s<=57343&&(o+=e.src[n+1],n++)}const a="\\"+o;if(!t){const s=e.push("text_special","",0);i<256&&PP[i]!==0?s.content=o:s.content=a,s.markup=a,s.info="escape"}return e.pos=n+1,!0}function Lqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==96)return!1;const i=n;n++;const o=e.posMax;for(;n=0;r--){const i=t[r];if(i.marker!==95&&i.marker!==42||i.end===-1)continue;const o=t[i.end],a=r>0&&t[r-1].end===i.end+1&&t[r-1].marker===i.marker&&t[r-1].token===i.token-1&&t[i.end+1].token===o.token+1,s=String.fromCharCode(i.marker),u=e.tokens[i.token];u.type=a?"strong_open":"em_open",u.tag=a?"strong":"em",u.nesting=1,u.markup=a?s+s:s,u.content="";const l=e.tokens[o.token];l.type=a?"strong_close":"em_close",l.tag=a?"strong":"em",l.nesting=-1,l.markup=a?s+s:s,l.content="",a&&(e.tokens[t[r-1].token].content="",e.tokens[t[i.end+1].token].content="",r--)}}function zqe(e){const t=e.tokens_meta,n=e.tokens_meta.length;dN(e,e.delimiters);for(let r=0;r=f)return!1;if(u=m,i=e.md.helpers.parseLinkDestination(e.src,m,e.posMax),i.ok){for(a=e.md.normalizeLink(i.str),e.md.validateLink(a)?m=i.pos:a="",u=m;m=f||e.src.charCodeAt(m)!==41)&&(l=!0),m++}if(l){if(typeof e.env.references>"u")return!1;if(m=0?r=e.src.slice(u,m++):m=p+1):m=p+1,r||(r=e.src.slice(h,p)),o=e.env.references[b2(r)],!o)return e.pos=c,!1;a=o.href,s=o.title}if(!t){e.pos=h,e.posMax=p;const v=e.push("link_open","a",1),b=[["href",a]];v.attrs=b,s&&b.push(["title",s]),e.linkLevel++,e.md.inline.tokenize(e),e.linkLevel--,e.push("link_close","a",-1)}return e.pos=m,e.posMax=f,!0}function Vqe(e,t){let n,r,i,o,a,s,u,l,c="";const f=e.pos,h=e.posMax;if(e.src.charCodeAt(e.pos)!==33||e.src.charCodeAt(e.pos+1)!==91)return!1;const p=e.pos+2,m=e.md.helpers.parseLinkLabel(e,e.pos+1,!1);if(m<0)return!1;if(o=m+1,o=h)return!1;for(l=o,s=e.md.helpers.parseLinkDestination(e.src,o,e.posMax),s.ok&&(c=e.md.normalizeLink(s.str),e.md.validateLink(c)?o=s.pos:c=""),l=o;o=h||e.src.charCodeAt(o)!==41)return e.pos=f,!1;o++}else{if(typeof e.env.references>"u")return!1;if(o=0?i=e.src.slice(l,o++):o=m+1):o=m+1,i||(i=e.src.slice(p,m)),a=e.env.references[b2(i)],!a)return e.pos=f,!1;c=a.href,u=a.title}if(!t){r=e.src.slice(p,m);const v=[];e.md.inline.parse(r,e.md,e.env,v);const b=e.push("image","img",0),w=[["src",c],["alt",""]];b.attrs=w,b.children=v,b.content=r,u&&w.push(["title",u])}return e.pos=o,e.posMax=h,!0}const Wqe=/^([a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)$/,Hqe=/^([a-zA-Z][a-zA-Z0-9+.-]{1,31}):([^<>\x00-\x20]*)$/;function Kqe(e,t){let n=e.pos;if(e.src.charCodeAt(n)!==60)return!1;const r=e.pos,i=e.posMax;for(;;){if(++n>=i)return!1;const a=e.src.charCodeAt(n);if(a===60)return!1;if(a===62)break}const o=e.src.slice(r+1,n);if(Hqe.test(o)){const a=e.md.normalizeLink(o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}if(Wqe.test(o)){const a=e.md.normalizeLink("mailto:"+o);if(!e.md.validateLink(a))return!1;if(!t){const s=e.push("link_open","a",1);s.attrs=[["href",a]],s.markup="autolink",s.info="auto";const u=e.push("text","",0);u.content=e.md.normalizeLinkText(o);const l=e.push("link_close","a",-1);l.markup="autolink",l.info="auto"}return e.pos+=o.length+2,!0}return!1}function qqe(e){return/^\s]/i.test(e)}function Gqe(e){return/^<\/a\s*>/i.test(e)}function Yqe(e){const t=e|32;return t>=97&&t<=122}function Zqe(e,t){if(!e.md.options.html)return!1;const n=e.posMax,r=e.pos;if(e.src.charCodeAt(r)!==60||r+2>=n)return!1;const i=e.src.charCodeAt(r+1);if(i!==33&&i!==63&&i!==47&&!Yqe(i))return!1;const o=e.src.slice(r).match(Eqe);if(!o)return!1;if(!t){const a=e.push("html_inline","",0);a.content=o[0],qqe(a.content)&&e.linkLevel++,Gqe(a.content)&&e.linkLevel--}return e.pos+=o[0].length,!0}const Xqe=/^&#((?:x[a-f0-9]{1,6}|[0-9]{1,7}));/i,Qqe=/^&([a-z][a-z0-9]{1,31});/i;function Jqe(e,t){const n=e.pos,r=e.posMax;if(e.src.charCodeAt(n)!==38||n+1>=r)return!1;if(e.src.charCodeAt(n+1)===35){const o=e.src.slice(n).match(Xqe);if(o){if(!t){const a=o[1][0].toLowerCase()==="x"?parseInt(o[1].slice(1),16):parseInt(o[1],10),s=e.push("text_special","",0);s.content=OP(a)?wx(a):wx(65533),s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}else{const o=e.src.slice(n).match(Qqe);if(o){const a=UY(o[0]);if(a!==o[0]){if(!t){const s=e.push("text_special","",0);s.content=a,s.markup=o[0],s.info="entity"}return e.pos+=o[0].length,!0}}}return!1}function hN(e){const t={},n=e.length;if(!n)return;let r=0,i=-2;const o=[];for(let a=0;au;l-=o[l]+1){const f=e[l];if(f.marker===s.marker&&f.open&&f.end<0){let h=!1;if((f.close||s.open)&&(f.length+s.length)%3===0&&(f.length%3!==0||s.length%3!==0)&&(h=!0),!h){const p=l>0&&!e[l-1].open?o[l-1]+1:0;o[a]=a-l+p,o[l]=p,s.open=!1,f.end=a,f.close=!1,c=-1,i=-2;break}}}c!==-1&&(t[s.marker][(s.open?3:0)+(s.length||0)%3]=c)}}function eGe(e){const t=e.tokens_meta,n=e.tokens_meta.length;hN(e.delimiters);for(let r=0;r0&&r++,i[t].type==="text"&&t+1=e.pos)throw new Error("inline rule didn't increment state.pos");break}}else e.pos=e.posMax;a||e.pos++,o[t]=e.pos};Ym.prototype.tokenize=function(e){const t=this.ruler.getRules(""),n=t.length,r=e.posMax,i=e.md.options.maxNesting;for(;e.pos=e.pos)throw new Error("inline rule didn't increment state.pos");break}}if(a){if(e.pos>=r)break;continue}e.pending+=e.src[e.pos++]}e.pending&&e.pushPending()};Ym.prototype.parse=function(e,t,n,r){const i=new this.State(e,t,n,r);this.tokenize(i);const o=this.ruler2.getRules(""),a=o.length;for(let s=0;s|$))",t.tpl_email_fuzzy="(^|"+n+'|"|\\(|'+t.src_ZCc+")("+t.src_email_name+"@"+t.tpl_host_fuzzy_strict+")",t.tpl_link_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_fuzzy_strict+t.src_path+")",t.tpl_link_no_ip_fuzzy="(^|(?![.:/\\-_@])(?:[$+<=>^`||]|"+t.src_ZPCc+"))((?![$+<=>^`||])"+t.tpl_host_port_no_ip_fuzzy_strict+t.src_path+")",t}function _4(e){return Array.prototype.slice.call(arguments,1).forEach(function(n){n&&Object.keys(n).forEach(function(r){e[r]=n[r]})}),e}function w2(e){return Object.prototype.toString.call(e)}function rGe(e){return w2(e)==="[object String]"}function iGe(e){return w2(e)==="[object Object]"}function oGe(e){return w2(e)==="[object RegExp]"}function pN(e){return w2(e)==="[object Function]"}function aGe(e){return e.replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}const XY={fuzzyLink:!0,fuzzyEmail:!0,fuzzyIP:!1};function sGe(e){return Object.keys(e||{}).reduce(function(t,n){return t||XY.hasOwnProperty(n)},!1)}const uGe={"http:":{validate:function(e,t,n){const r=e.slice(t);return n.re.http||(n.re.http=new RegExp("^\\/\\/"+n.re.src_auth+n.re.src_host_port_strict+n.re.src_path,"i")),n.re.http.test(r)?r.match(n.re.http)[0].length:0}},"https:":"http:","ftp:":"http:","//":{validate:function(e,t,n){const r=e.slice(t);return n.re.no_http||(n.re.no_http=new RegExp("^"+n.re.src_auth+"(?:localhost|(?:(?:"+n.re.src_domain+")\\.)+"+n.re.src_domain_root+")"+n.re.src_port+n.re.src_host_terminator+n.re.src_path,"i")),n.re.no_http.test(r)?t>=3&&e[t-3]===":"||t>=3&&e[t-3]==="/"?0:r.match(n.re.no_http)[0].length:0}},"mailto:":{validate:function(e,t,n){const r=e.slice(t);return n.re.mailto||(n.re.mailto=new RegExp("^"+n.re.src_email_name+"@"+n.re.src_host_strict,"i")),n.re.mailto.test(r)?r.match(n.re.mailto)[0].length:0}}},lGe="a[cdefgilmnoqrstuwxz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvwxyz]|d[ejkmoz]|e[cegrstu]|f[ijkmor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdeghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eosuw]|s[abcdeghijklmnortuvxyz]|t[cdfghjklmnortvwz]|u[agksyz]|v[aceginu]|w[fs]|y[et]|z[amw]",cGe="biz|com|edu|gov|net|org|pro|web|xxx|aero|asia|coop|info|museum|name|shop|рф".split("|");function fGe(e){e.__index__=-1,e.__text_cache__=""}function dGe(e){return function(t,n){const r=t.slice(n);return e.test(r)?r.match(e)[0].length:0}}function gN(){return function(e,t){t.normalize(e)}}function _x(e){const t=e.re=nGe(e.__opts__),n=e.__tlds__.slice();e.onCompile(),e.__tlds_replaced__||n.push(lGe),n.push(t.src_xn),t.src_tlds=n.join("|");function r(s){return s.replace("%TLDS%",t.src_tlds)}t.email_fuzzy=RegExp(r(t.tpl_email_fuzzy),"i"),t.link_fuzzy=RegExp(r(t.tpl_link_fuzzy),"i"),t.link_no_ip_fuzzy=RegExp(r(t.tpl_link_no_ip_fuzzy),"i"),t.host_fuzzy_test=RegExp(r(t.tpl_host_fuzzy_test),"i");const i=[];e.__compiled__={};function o(s,u){throw new Error('(LinkifyIt) Invalid schema "'+s+'": '+u)}Object.keys(e.__schemas__).forEach(function(s){const u=e.__schemas__[s];if(u===null)return;const l={validate:null,link:null};if(e.__compiled__[s]=l,iGe(u)){oGe(u.validate)?l.validate=dGe(u.validate):pN(u.validate)?l.validate=u.validate:o(s,u),pN(u.normalize)?l.normalize=u.normalize:u.normalize?o(s,u):l.normalize=gN();return}if(rGe(u)){i.push(s);return}o(s,u)}),i.forEach(function(s){e.__compiled__[e.__schemas__[s]]&&(e.__compiled__[s].validate=e.__compiled__[e.__schemas__[s]].validate,e.__compiled__[s].normalize=e.__compiled__[e.__schemas__[s]].normalize)}),e.__compiled__[""]={validate:null,normalize:gN()};const a=Object.keys(e.__compiled__).filter(function(s){return s.length>0&&e.__compiled__[s]}).map(aGe).join("|");e.re.schema_test=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","i"),e.re.schema_search=RegExp("(^|(?!_)(?:[><|]|"+t.src_ZPCc+"))("+a+")","ig"),e.re.schema_at_start=RegExp("^"+e.re.schema_search.source,"i"),e.re.pretest=RegExp("("+e.re.schema_test.source+")|("+e.re.host_fuzzy_test.source+")|@","i"),fGe(e)}function hGe(e,t){const n=e.__index__,r=e.__last_index__,i=e.__text_cache__.slice(n,r);this.schema=e.__schema__.toLowerCase(),this.index=n+t,this.lastIndex=r+t,this.raw=i,this.text=i,this.url=i}function S4(e,t){const n=new hGe(e,t);return e.__compiled__[n.schema].normalize(n,e),n}function Wo(e,t){if(!(this instanceof Wo))return new Wo(e,t);t||sGe(e)&&(t=e,e={}),this.__opts__=_4({},XY,t),this.__index__=-1,this.__last_index__=-1,this.__schema__="",this.__text_cache__="",this.__schemas__=_4({},uGe,e),this.__compiled__={},this.__tlds__=cGe,this.__tlds_replaced__=!1,this.re={},_x(this)}Wo.prototype.add=function(t,n){return this.__schemas__[t]=n,_x(this),this};Wo.prototype.set=function(t){return this.__opts__=_4(this.__opts__,t),this};Wo.prototype.test=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return!1;let n,r,i,o,a,s,u,l,c;if(this.re.schema_test.test(t)){for(u=this.re.schema_search,u.lastIndex=0;(n=u.exec(t))!==null;)if(o=this.testSchemaAt(t,n[2],u.lastIndex),o){this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+o;break}}return this.__opts__.fuzzyLink&&this.__compiled__["http:"]&&(l=t.search(this.re.host_fuzzy_test),l>=0&&(this.__index__<0||l=0&&(i=t.match(this.re.email_fuzzy))!==null&&(a=i.index+i[1].length,s=i.index+i[0].length,(this.__index__<0||athis.__last_index__)&&(this.__schema__="mailto:",this.__index__=a,this.__last_index__=s))),this.__index__>=0};Wo.prototype.pretest=function(t){return this.re.pretest.test(t)};Wo.prototype.testSchemaAt=function(t,n,r){return this.__compiled__[n.toLowerCase()]?this.__compiled__[n.toLowerCase()].validate(t,r,this):0};Wo.prototype.match=function(t){const n=[];let r=0;this.__index__>=0&&this.__text_cache__===t&&(n.push(S4(this,r)),r=this.__last_index__);let i=r?t.slice(r):t;for(;this.test(i);)n.push(S4(this,r)),i=i.slice(this.__last_index__),r+=this.__last_index__;return n.length?n:null};Wo.prototype.matchAtStart=function(t){if(this.__text_cache__=t,this.__index__=-1,!t.length)return null;const n=this.re.schema_at_start.exec(t);if(!n)return null;const r=this.testSchemaAt(t,n[2],n[0].length);return r?(this.__schema__=n[2],this.__index__=n.index+n[1].length,this.__last_index__=n.index+n[0].length+r,S4(this,0)):null};Wo.prototype.tlds=function(t,n){return t=Array.isArray(t)?t:[t],n?(this.__tlds__=this.__tlds__.concat(t).sort().filter(function(r,i,o){return r!==o[i-1]}).reverse(),_x(this),this):(this.__tlds__=t.slice(),this.__tlds_replaced__=!0,_x(this),this)};Wo.prototype.normalize=function(t){t.schema||(t.url="http://"+t.url),t.schema==="mailto:"&&!/^mailto:/i.test(t.url)&&(t.url="mailto:"+t.url)};Wo.prototype.onCompile=function(){};const Fd=2147483647,ws=36,kP=1,lm=26,pGe=38,gGe=700,QY=72,JY=128,eZ="-",mGe=/^xn--/,vGe=/[^\0-\x7F]/,yGe=/[\x2E\u3002\uFF0E\uFF61]/g,bGe={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},$3=ws-kP,_s=Math.floor,I3=String.fromCharCode;function Ju(e){throw new RangeError(bGe[e])}function xGe(e,t){const n=[];let r=e.length;for(;r--;)n[r]=t(e[r]);return n}function tZ(e,t){const n=e.split("@");let r="";n.length>1&&(r=n[0]+"@",e=n[1]),e=e.replace(yGe,".");const i=e.split("."),o=xGe(i,t).join(".");return r+o}function nZ(e){const t=[];let n=0;const r=e.length;for(;n=55296&&i<=56319&&nString.fromCodePoint(...e),_Ge=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:ws},mN=function(e,t){return e+22+75*(e<26)-((t!=0)<<5)},rZ=function(e,t,n){let r=0;for(e=n?_s(e/gGe):e>>1,e+=_s(e/t);e>$3*lm>>1;r+=ws)e=_s(e/$3);return _s(r+($3+1)*e/(e+pGe))},iZ=function(e){const t=[],n=e.length;let r=0,i=JY,o=QY,a=e.lastIndexOf(eZ);a<0&&(a=0);for(let s=0;s=128&&Ju("not-basic"),t.push(e.charCodeAt(s));for(let s=a>0?a+1:0;s=n&&Ju("invalid-input");const h=_Ge(e.charCodeAt(s++));h>=ws&&Ju("invalid-input"),h>_s((Fd-r)/c)&&Ju("overflow"),r+=h*c;const p=f<=o?kP:f>=o+lm?lm:f-o;if(h_s(Fd/m)&&Ju("overflow"),c*=m}const l=t.length+1;o=rZ(r-u,l,u==0),_s(r/l)>Fd-i&&Ju("overflow"),i+=_s(r/l),r%=l,t.splice(r++,0,i)}return String.fromCodePoint(...t)},oZ=function(e){const t=[];e=nZ(e);const n=e.length;let r=JY,i=0,o=QY;for(const u of e)u<128&&t.push(I3(u));const a=t.length;let s=a;for(a&&t.push(eZ);s=r&&c_s((Fd-i)/l)&&Ju("overflow"),i+=(u-r)*l,r=u;for(const c of e)if(cFd&&Ju("overflow"),c===r){let f=i;for(let h=ws;;h+=ws){const p=h<=o?kP:h>=o+lm?lm:h-o;if(f=0))try{t.hostname=aZ.toASCII(t.hostname)}catch{}return qm(_P(t))}function DGe(e){const t=SP(e,!0);if(t.hostname&&(!t.protocol||sZ.indexOf(t.protocol)>=0))try{t.hostname=aZ.toUnicode(t.hostname)}catch{}return Oh(_P(t),Oh.defaultChars+"%")}function es(e,t){if(!(this instanceof es))return new es(e,t);t||EP(e)||(t=e||{},e="default"),this.inline=new Ym,this.block=new x2,this.core=new AP,this.renderer=new ip,this.linkify=new Wo,this.validateLink=MGe,this.normalizeLink=RGe,this.normalizeLinkText=DGe,this.utils=IKe,this.helpers=y2({},jKe),this.options={},this.configure(e),t&&this.set(t)}es.prototype.set=function(e){return y2(this.options,e),this};es.prototype.configure=function(e){const t=this;if(EP(e)){const n=e;if(e=PGe[n],!e)throw new Error('Wrong `markdown-it` preset "'+n+'", check name')}if(!e)throw new Error("Wrong `markdown-it` preset, can't be empty");return e.options&&t.set(e.options),e.components&&Object.keys(e.components).forEach(function(n){e.components[n].rules&&t[n].ruler.enableOnly(e.components[n].rules),e.components[n].rules2&&t[n].ruler2.enableOnly(e.components[n].rules2)}),this};es.prototype.enable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.enable(e,!0))},this),n=n.concat(this.inline.ruler2.enable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to enable unknown rule(s): "+r);return this};es.prototype.disable=function(e,t){let n=[];Array.isArray(e)||(e=[e]),["core","block","inline"].forEach(function(i){n=n.concat(this[i].ruler.disable(e,!0))},this),n=n.concat(this.inline.ruler2.disable(e,!0));const r=e.filter(function(i){return n.indexOf(i)<0});if(r.length&&!t)throw new Error("MarkdownIt. Failed to disable unknown rule(s): "+r);return this};es.prototype.use=function(e){const t=[this].concat(Array.prototype.slice.call(arguments,1));return e.apply(e,t),this};es.prototype.parse=function(e,t){if(typeof e!="string")throw new Error("Input data should be a String");const n=new this.core.State(e,this,t);return this.core.process(n),n.tokens};es.prototype.render=function(e,t){return t=t||{},this.renderer.render(this.parse(e,t),this.options,t)};es.prototype.parseInline=function(e,t){const n=new this.core.State(e,this,t);return n.inlineMode=!0,this.core.process(n),n.tokens};es.prototype.renderInline=function(e,t){return t=t||{},this.renderer.render(this.parseInline(e,t),this.options,t)};var uZ={exports:{}};(function(e){(function(t){var n=function(T){var D,$=new Float64Array(16);if(T)for(D=0;D>24&255,T[D+1]=$>>16&255,T[D+2]=$>>8&255,T[D+3]=$&255,T[D+4]=A>>24&255,T[D+5]=A>>16&255,T[D+6]=A>>8&255,T[D+7]=A&255}function v(T,D,$,A,L){var ee,re=0;for(ee=0;ee>>8)-1}function b(T,D,$,A){return v(T,D,$,A,16)}function w(T,D,$,A){return v(T,D,$,A,32)}function x(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;Je=Je+L|0,ut=ut+ee|0,Qe=Qe+re|0,Fe=Fe+he|0,Ke=Ke+Ce|0,Ge=Ge+Be|0,ve=ve+He|0,ge=ge+ct|0,De=De+Ne|0,Pe=Pe+rt|0,Te=Te+bt|0,ze=ze+Ot|0,vt=vt+gt|0,Lt=Lt+ht|0,Ft=Ft+xt|0,$t=$t+wt|0,T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=ut>>>0&255,T[5]=ut>>>8&255,T[6]=ut>>>16&255,T[7]=ut>>>24&255,T[8]=Qe>>>0&255,T[9]=Qe>>>8&255,T[10]=Qe>>>16&255,T[11]=Qe>>>24&255,T[12]=Fe>>>0&255,T[13]=Fe>>>8&255,T[14]=Fe>>>16&255,T[15]=Fe>>>24&255,T[16]=Ke>>>0&255,T[17]=Ke>>>8&255,T[18]=Ke>>>16&255,T[19]=Ke>>>24&255,T[20]=Ge>>>0&255,T[21]=Ge>>>8&255,T[22]=Ge>>>16&255,T[23]=Ge>>>24&255,T[24]=ve>>>0&255,T[25]=ve>>>8&255,T[26]=ve>>>16&255,T[27]=ve>>>24&255,T[28]=ge>>>0&255,T[29]=ge>>>8&255,T[30]=ge>>>16&255,T[31]=ge>>>24&255,T[32]=De>>>0&255,T[33]=De>>>8&255,T[34]=De>>>16&255,T[35]=De>>>24&255,T[36]=Pe>>>0&255,T[37]=Pe>>>8&255,T[38]=Pe>>>16&255,T[39]=Pe>>>24&255,T[40]=Te>>>0&255,T[41]=Te>>>8&255,T[42]=Te>>>16&255,T[43]=Te>>>24&255,T[44]=ze>>>0&255,T[45]=ze>>>8&255,T[46]=ze>>>16&255,T[47]=ze>>>24&255,T[48]=vt>>>0&255,T[49]=vt>>>8&255,T[50]=vt>>>16&255,T[51]=vt>>>24&255,T[52]=Lt>>>0&255,T[53]=Lt>>>8&255,T[54]=Lt>>>16&255,T[55]=Lt>>>24&255,T[56]=Ft>>>0&255,T[57]=Ft>>>8&255,T[58]=Ft>>>16&255,T[59]=Ft>>>24&255,T[60]=$t>>>0&255,T[61]=$t>>>8&255,T[62]=$t>>>16&255,T[63]=$t>>>24&255}function S(T,D,$,A){for(var L=A[0]&255|(A[1]&255)<<8|(A[2]&255)<<16|(A[3]&255)<<24,ee=$[0]&255|($[1]&255)<<8|($[2]&255)<<16|($[3]&255)<<24,re=$[4]&255|($[5]&255)<<8|($[6]&255)<<16|($[7]&255)<<24,he=$[8]&255|($[9]&255)<<8|($[10]&255)<<16|($[11]&255)<<24,Ce=$[12]&255|($[13]&255)<<8|($[14]&255)<<16|($[15]&255)<<24,Be=A[4]&255|(A[5]&255)<<8|(A[6]&255)<<16|(A[7]&255)<<24,He=D[0]&255|(D[1]&255)<<8|(D[2]&255)<<16|(D[3]&255)<<24,ct=D[4]&255|(D[5]&255)<<8|(D[6]&255)<<16|(D[7]&255)<<24,Ne=D[8]&255|(D[9]&255)<<8|(D[10]&255)<<16|(D[11]&255)<<24,rt=D[12]&255|(D[13]&255)<<8|(D[14]&255)<<16|(D[15]&255)<<24,bt=A[8]&255|(A[9]&255)<<8|(A[10]&255)<<16|(A[11]&255)<<24,Ot=$[16]&255|($[17]&255)<<8|($[18]&255)<<16|($[19]&255)<<24,gt=$[20]&255|($[21]&255)<<8|($[22]&255)<<16|($[23]&255)<<24,ht=$[24]&255|($[25]&255)<<8|($[26]&255)<<16|($[27]&255)<<24,xt=$[28]&255|($[29]&255)<<8|($[30]&255)<<16|($[31]&255)<<24,wt=A[12]&255|(A[13]&255)<<8|(A[14]&255)<<16|(A[15]&255)<<24,Je=L,ut=ee,Qe=re,Fe=he,Ke=Ce,Ge=Be,ve=He,ge=ct,De=Ne,Pe=rt,Te=bt,ze=Ot,vt=gt,Lt=ht,Ft=xt,$t=wt,te,Yt=0;Yt<20;Yt+=2)te=Je+vt|0,Ke^=te<<7|te>>>25,te=Ke+Je|0,De^=te<<9|te>>>23,te=De+Ke|0,vt^=te<<13|te>>>19,te=vt+De|0,Je^=te<<18|te>>>14,te=Ge+ut|0,Pe^=te<<7|te>>>25,te=Pe+Ge|0,Lt^=te<<9|te>>>23,te=Lt+Pe|0,ut^=te<<13|te>>>19,te=ut+Lt|0,Ge^=te<<18|te>>>14,te=Te+ve|0,Ft^=te<<7|te>>>25,te=Ft+Te|0,Qe^=te<<9|te>>>23,te=Qe+Ft|0,ve^=te<<13|te>>>19,te=ve+Qe|0,Te^=te<<18|te>>>14,te=$t+ze|0,Fe^=te<<7|te>>>25,te=Fe+$t|0,ge^=te<<9|te>>>23,te=ge+Fe|0,ze^=te<<13|te>>>19,te=ze+ge|0,$t^=te<<18|te>>>14,te=Je+Fe|0,ut^=te<<7|te>>>25,te=ut+Je|0,Qe^=te<<9|te>>>23,te=Qe+ut|0,Fe^=te<<13|te>>>19,te=Fe+Qe|0,Je^=te<<18|te>>>14,te=Ge+Ke|0,ve^=te<<7|te>>>25,te=ve+Ge|0,ge^=te<<9|te>>>23,te=ge+ve|0,Ke^=te<<13|te>>>19,te=Ke+ge|0,Ge^=te<<18|te>>>14,te=Te+Pe|0,ze^=te<<7|te>>>25,te=ze+Te|0,De^=te<<9|te>>>23,te=De+ze|0,Pe^=te<<13|te>>>19,te=Pe+De|0,Te^=te<<18|te>>>14,te=$t+Ft|0,vt^=te<<7|te>>>25,te=vt+$t|0,Lt^=te<<9|te>>>23,te=Lt+vt|0,Ft^=te<<13|te>>>19,te=Ft+Lt|0,$t^=te<<18|te>>>14;T[0]=Je>>>0&255,T[1]=Je>>>8&255,T[2]=Je>>>16&255,T[3]=Je>>>24&255,T[4]=Ge>>>0&255,T[5]=Ge>>>8&255,T[6]=Ge>>>16&255,T[7]=Ge>>>24&255,T[8]=Te>>>0&255,T[9]=Te>>>8&255,T[10]=Te>>>16&255,T[11]=Te>>>24&255,T[12]=$t>>>0&255,T[13]=$t>>>8&255,T[14]=$t>>>16&255,T[15]=$t>>>24&255,T[16]=ve>>>0&255,T[17]=ve>>>8&255,T[18]=ve>>>16&255,T[19]=ve>>>24&255,T[20]=ge>>>0&255,T[21]=ge>>>8&255,T[22]=ge>>>16&255,T[23]=ge>>>24&255,T[24]=De>>>0&255,T[25]=De>>>8&255,T[26]=De>>>16&255,T[27]=De>>>24&255,T[28]=Pe>>>0&255,T[29]=Pe>>>8&255,T[30]=Pe>>>16&255,T[31]=Pe>>>24&255}function O(T,D,$,A){x(T,D,$,A)}function E(T,D,$,A){S(T,D,$,A)}var C=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function k(T,D,$,A,L,ee,re){var he=new Uint8Array(16),Ce=new Uint8Array(64),Be,He;for(He=0;He<16;He++)he[He]=0;for(He=0;He<8;He++)he[He]=ee[He];for(;L>=64;){for(O(Ce,he,re,C),He=0;He<64;He++)T[D+He]=$[A+He]^Ce[He];for(Be=1,He=8;He<16;He++)Be=Be+(he[He]&255)|0,he[He]=Be&255,Be>>>=8;L-=64,D+=64,A+=64}if(L>0)for(O(Ce,he,re,C),He=0;He=64;){for(O(re,ee,L,C),Ce=0;Ce<64;Ce++)T[D+Ce]=re[Ce];for(he=1,Ce=8;Ce<16;Ce++)he=he+(ee[Ce]&255)|0,ee[Ce]=he&255,he>>>=8;$-=64,D+=64}if($>0)for(O(re,ee,L,C),Ce=0;Ce<$;Ce++)T[D+Ce]=re[Ce];return 0}function N(T,D,$,A,L){var ee=new Uint8Array(32);E(ee,A,L,C);for(var re=new Uint8Array(8),he=0;he<8;he++)re[he]=A[he+16];return M(T,D,$,re,ee)}function z(T,D,$,A,L,ee,re){var he=new Uint8Array(32);E(he,ee,re,C);for(var Ce=new Uint8Array(8),Be=0;Be<8;Be++)Ce[Be]=ee[Be+16];return k(T,D,$,A,L,Ce,he)}var H=function(T){this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0;var D,$,A,L,ee,re,he,Ce;D=T[0]&255|(T[1]&255)<<8,this.r[0]=D&8191,$=T[2]&255|(T[3]&255)<<8,this.r[1]=(D>>>13|$<<3)&8191,A=T[4]&255|(T[5]&255)<<8,this.r[2]=($>>>10|A<<6)&7939,L=T[6]&255|(T[7]&255)<<8,this.r[3]=(A>>>7|L<<9)&8191,ee=T[8]&255|(T[9]&255)<<8,this.r[4]=(L>>>4|ee<<12)&255,this.r[5]=ee>>>1&8190,re=T[10]&255|(T[11]&255)<<8,this.r[6]=(ee>>>14|re<<2)&8191,he=T[12]&255|(T[13]&255)<<8,this.r[7]=(re>>>11|he<<5)&8065,Ce=T[14]&255|(T[15]&255)<<8,this.r[8]=(he>>>8|Ce<<8)&8191,this.r[9]=Ce>>>5&127,this.pad[0]=T[16]&255|(T[17]&255)<<8,this.pad[1]=T[18]&255|(T[19]&255)<<8,this.pad[2]=T[20]&255|(T[21]&255)<<8,this.pad[3]=T[22]&255|(T[23]&255)<<8,this.pad[4]=T[24]&255|(T[25]&255)<<8,this.pad[5]=T[26]&255|(T[27]&255)<<8,this.pad[6]=T[28]&255|(T[29]&255)<<8,this.pad[7]=T[30]&255|(T[31]&255)<<8};H.prototype.blocks=function(T,D,$){for(var A=this.fin?0:2048,L,ee,re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe=this.h[0],Ke=this.h[1],Ge=this.h[2],ve=this.h[3],ge=this.h[4],De=this.h[5],Pe=this.h[6],Te=this.h[7],ze=this.h[8],vt=this.h[9],Lt=this.r[0],Ft=this.r[1],$t=this.r[2],te=this.r[3],Yt=this.r[4],sn=this.r[5],un=this.r[6],jt=this.r[7],ln=this.r[8],rn=this.r[9];$>=16;)L=T[D+0]&255|(T[D+1]&255)<<8,Fe+=L&8191,ee=T[D+2]&255|(T[D+3]&255)<<8,Ke+=(L>>>13|ee<<3)&8191,re=T[D+4]&255|(T[D+5]&255)<<8,Ge+=(ee>>>10|re<<6)&8191,he=T[D+6]&255|(T[D+7]&255)<<8,ve+=(re>>>7|he<<9)&8191,Ce=T[D+8]&255|(T[D+9]&255)<<8,ge+=(he>>>4|Ce<<12)&8191,De+=Ce>>>1&8191,Be=T[D+10]&255|(T[D+11]&255)<<8,Pe+=(Ce>>>14|Be<<2)&8191,He=T[D+12]&255|(T[D+13]&255)<<8,Te+=(Be>>>11|He<<5)&8191,ct=T[D+14]&255|(T[D+15]&255)<<8,ze+=(He>>>8|ct<<8)&8191,vt+=ct>>>5|A,Ne=0,rt=Ne,rt+=Fe*Lt,rt+=Ke*(5*rn),rt+=Ge*(5*ln),rt+=ve*(5*jt),rt+=ge*(5*un),Ne=rt>>>13,rt&=8191,rt+=De*(5*sn),rt+=Pe*(5*Yt),rt+=Te*(5*te),rt+=ze*(5*$t),rt+=vt*(5*Ft),Ne+=rt>>>13,rt&=8191,bt=Ne,bt+=Fe*Ft,bt+=Ke*Lt,bt+=Ge*(5*rn),bt+=ve*(5*ln),bt+=ge*(5*jt),Ne=bt>>>13,bt&=8191,bt+=De*(5*un),bt+=Pe*(5*sn),bt+=Te*(5*Yt),bt+=ze*(5*te),bt+=vt*(5*$t),Ne+=bt>>>13,bt&=8191,Ot=Ne,Ot+=Fe*$t,Ot+=Ke*Ft,Ot+=Ge*Lt,Ot+=ve*(5*rn),Ot+=ge*(5*ln),Ne=Ot>>>13,Ot&=8191,Ot+=De*(5*jt),Ot+=Pe*(5*un),Ot+=Te*(5*sn),Ot+=ze*(5*Yt),Ot+=vt*(5*te),Ne+=Ot>>>13,Ot&=8191,gt=Ne,gt+=Fe*te,gt+=Ke*$t,gt+=Ge*Ft,gt+=ve*Lt,gt+=ge*(5*rn),Ne=gt>>>13,gt&=8191,gt+=De*(5*ln),gt+=Pe*(5*jt),gt+=Te*(5*un),gt+=ze*(5*sn),gt+=vt*(5*Yt),Ne+=gt>>>13,gt&=8191,ht=Ne,ht+=Fe*Yt,ht+=Ke*te,ht+=Ge*$t,ht+=ve*Ft,ht+=ge*Lt,Ne=ht>>>13,ht&=8191,ht+=De*(5*rn),ht+=Pe*(5*ln),ht+=Te*(5*jt),ht+=ze*(5*un),ht+=vt*(5*sn),Ne+=ht>>>13,ht&=8191,xt=Ne,xt+=Fe*sn,xt+=Ke*Yt,xt+=Ge*te,xt+=ve*$t,xt+=ge*Ft,Ne=xt>>>13,xt&=8191,xt+=De*Lt,xt+=Pe*(5*rn),xt+=Te*(5*ln),xt+=ze*(5*jt),xt+=vt*(5*un),Ne+=xt>>>13,xt&=8191,wt=Ne,wt+=Fe*un,wt+=Ke*sn,wt+=Ge*Yt,wt+=ve*te,wt+=ge*$t,Ne=wt>>>13,wt&=8191,wt+=De*Ft,wt+=Pe*Lt,wt+=Te*(5*rn),wt+=ze*(5*ln),wt+=vt*(5*jt),Ne+=wt>>>13,wt&=8191,Je=Ne,Je+=Fe*jt,Je+=Ke*un,Je+=Ge*sn,Je+=ve*Yt,Je+=ge*te,Ne=Je>>>13,Je&=8191,Je+=De*$t,Je+=Pe*Ft,Je+=Te*Lt,Je+=ze*(5*rn),Je+=vt*(5*ln),Ne+=Je>>>13,Je&=8191,ut=Ne,ut+=Fe*ln,ut+=Ke*jt,ut+=Ge*un,ut+=ve*sn,ut+=ge*Yt,Ne=ut>>>13,ut&=8191,ut+=De*te,ut+=Pe*$t,ut+=Te*Ft,ut+=ze*Lt,ut+=vt*(5*rn),Ne+=ut>>>13,ut&=8191,Qe=Ne,Qe+=Fe*rn,Qe+=Ke*ln,Qe+=Ge*jt,Qe+=ve*un,Qe+=ge*sn,Ne=Qe>>>13,Qe&=8191,Qe+=De*Yt,Qe+=Pe*te,Qe+=Te*$t,Qe+=ze*Ft,Qe+=vt*Lt,Ne+=Qe>>>13,Qe&=8191,Ne=(Ne<<2)+Ne|0,Ne=Ne+rt|0,rt=Ne&8191,Ne=Ne>>>13,bt+=Ne,Fe=rt,Ke=bt,Ge=Ot,ve=gt,ge=ht,De=xt,Pe=wt,Te=Je,ze=ut,vt=Qe,D+=16,$-=16;this.h[0]=Fe,this.h[1]=Ke,this.h[2]=Ge,this.h[3]=ve,this.h[4]=ge,this.h[5]=De,this.h[6]=Pe,this.h[7]=Te,this.h[8]=ze,this.h[9]=vt},H.prototype.finish=function(T,D){var $=new Uint16Array(10),A,L,ee,re;if(this.leftover){for(re=this.leftover,this.buffer[re++]=1;re<16;re++)this.buffer[re]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(A=this.h[1]>>>13,this.h[1]&=8191,re=2;re<10;re++)this.h[re]+=A,A=this.h[re]>>>13,this.h[re]&=8191;for(this.h[0]+=A*5,A=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=A,A=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=A,$[0]=this.h[0]+5,A=$[0]>>>13,$[0]&=8191,re=1;re<10;re++)$[re]=this.h[re]+A,A=$[re]>>>13,$[re]&=8191;for($[9]-=8192,L=(A^1)-1,re=0;re<10;re++)$[re]&=L;for(L=~L,re=0;re<10;re++)this.h[re]=this.h[re]&L|$[re];for(this.h[0]=(this.h[0]|this.h[1]<<13)&65535,this.h[1]=(this.h[1]>>>3|this.h[2]<<10)&65535,this.h[2]=(this.h[2]>>>6|this.h[3]<<7)&65535,this.h[3]=(this.h[3]>>>9|this.h[4]<<4)&65535,this.h[4]=(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14)&65535,this.h[5]=(this.h[6]>>>2|this.h[7]<<11)&65535,this.h[6]=(this.h[7]>>>5|this.h[8]<<8)&65535,this.h[7]=(this.h[8]>>>8|this.h[9]<<5)&65535,ee=this.h[0]+this.pad[0],this.h[0]=ee&65535,re=1;re<8;re++)ee=(this.h[re]+this.pad[re]|0)+(ee>>>16)|0,this.h[re]=ee&65535;T[D+0]=this.h[0]>>>0&255,T[D+1]=this.h[0]>>>8&255,T[D+2]=this.h[1]>>>0&255,T[D+3]=this.h[1]>>>8&255,T[D+4]=this.h[2]>>>0&255,T[D+5]=this.h[2]>>>8&255,T[D+6]=this.h[3]>>>0&255,T[D+7]=this.h[3]>>>8&255,T[D+8]=this.h[4]>>>0&255,T[D+9]=this.h[4]>>>8&255,T[D+10]=this.h[5]>>>0&255,T[D+11]=this.h[5]>>>8&255,T[D+12]=this.h[6]>>>0&255,T[D+13]=this.h[6]>>>8&255,T[D+14]=this.h[7]>>>0&255,T[D+15]=this.h[7]>>>8&255},H.prototype.update=function(T,D,$){var A,L;if(this.leftover){for(L=16-this.leftover,L>$&&(L=$),A=0;A=16&&(L=$-$%16,this.blocks(T,D,L),D+=L,$-=L),$){for(A=0;A<$;A++)this.buffer[this.leftover+A]=T[D+A];this.leftover+=$}};function V(T,D,$,A,L,ee){var re=new H(ee);return re.update($,A,L),re.finish(T,D),0}function ne(T,D,$,A,L,ee){var re=new Uint8Array(16);return V(re,0,$,A,L,ee),b(T,D,re,0)}function Z(T,D,$,A,L){var ee;if($<32)return-1;for(z(T,0,D,0,$,A,L),V(T,16,T,32,$-32,T),ee=0;ee<16;ee++)T[ee]=0;return 0}function G(T,D,$,A,L){var ee,re=new Uint8Array(32);if($<32||(N(re,0,32,A,L),ne(D,16,D,32,$-32,re)!==0))return-1;for(z(T,0,D,0,$,A,L),ee=0;ee<32;ee++)T[ee]=0;return 0}function q(T,D){var $;for($=0;$<16;$++)T[$]=D[$]|0}function W(T){var D,$,A=1;for(D=0;D<16;D++)$=T[D]+A+65535,A=Math.floor($/65536),T[D]=$-A*65536;T[0]+=A-1+37*(A-1)}function j(T,D,$){for(var A,L=~($-1),ee=0;ee<16;ee++)A=L&(T[ee]^D[ee]),T[ee]^=A,D[ee]^=A}function K(T,D){var $,A,L,ee=n(),re=n();for($=0;$<16;$++)re[$]=D[$];for(W(re),W(re),W(re),A=0;A<2;A++){for(ee[0]=re[0]-65517,$=1;$<15;$++)ee[$]=re[$]-65535-(ee[$-1]>>16&1),ee[$-1]&=65535;ee[15]=re[15]-32767-(ee[14]>>16&1),L=ee[15]>>16&1,ee[14]&=65535,j(re,ee,1-L)}for($=0;$<16;$++)T[2*$]=re[$]&255,T[2*$+1]=re[$]>>8}function Y(T,D){var $=new Uint8Array(32),A=new Uint8Array(32);return K($,T),K(A,D),w($,0,A,0)}function oe(T){var D=new Uint8Array(32);return K(D,T),D[0]&1}function Q(T,D){var $;for($=0;$<16;$++)T[$]=D[2*$]+(D[2*$+1]<<8);T[15]&=32767}function J(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]+$[A]}function ue(T,D,$){for(var A=0;A<16;A++)T[A]=D[A]-$[A]}function de(T,D,$){var A,L,ee=0,re=0,he=0,Ce=0,Be=0,He=0,ct=0,Ne=0,rt=0,bt=0,Ot=0,gt=0,ht=0,xt=0,wt=0,Je=0,ut=0,Qe=0,Fe=0,Ke=0,Ge=0,ve=0,ge=0,De=0,Pe=0,Te=0,ze=0,vt=0,Lt=0,Ft=0,$t=0,te=$[0],Yt=$[1],sn=$[2],un=$[3],jt=$[4],ln=$[5],rn=$[6],Gn=$[7],mn=$[8],kn=$[9],Yn=$[10],Zn=$[11],xr=$[12],$r=$[13],Ir=$[14],Nr=$[15];A=D[0],ee+=A*te,re+=A*Yt,he+=A*sn,Ce+=A*un,Be+=A*jt,He+=A*ln,ct+=A*rn,Ne+=A*Gn,rt+=A*mn,bt+=A*kn,Ot+=A*Yn,gt+=A*Zn,ht+=A*xr,xt+=A*$r,wt+=A*Ir,Je+=A*Nr,A=D[1],re+=A*te,he+=A*Yt,Ce+=A*sn,Be+=A*un,He+=A*jt,ct+=A*ln,Ne+=A*rn,rt+=A*Gn,bt+=A*mn,Ot+=A*kn,gt+=A*Yn,ht+=A*Zn,xt+=A*xr,wt+=A*$r,Je+=A*Ir,ut+=A*Nr,A=D[2],he+=A*te,Ce+=A*Yt,Be+=A*sn,He+=A*un,ct+=A*jt,Ne+=A*ln,rt+=A*rn,bt+=A*Gn,Ot+=A*mn,gt+=A*kn,ht+=A*Yn,xt+=A*Zn,wt+=A*xr,Je+=A*$r,ut+=A*Ir,Qe+=A*Nr,A=D[3],Ce+=A*te,Be+=A*Yt,He+=A*sn,ct+=A*un,Ne+=A*jt,rt+=A*ln,bt+=A*rn,Ot+=A*Gn,gt+=A*mn,ht+=A*kn,xt+=A*Yn,wt+=A*Zn,Je+=A*xr,ut+=A*$r,Qe+=A*Ir,Fe+=A*Nr,A=D[4],Be+=A*te,He+=A*Yt,ct+=A*sn,Ne+=A*un,rt+=A*jt,bt+=A*ln,Ot+=A*rn,gt+=A*Gn,ht+=A*mn,xt+=A*kn,wt+=A*Yn,Je+=A*Zn,ut+=A*xr,Qe+=A*$r,Fe+=A*Ir,Ke+=A*Nr,A=D[5],He+=A*te,ct+=A*Yt,Ne+=A*sn,rt+=A*un,bt+=A*jt,Ot+=A*ln,gt+=A*rn,ht+=A*Gn,xt+=A*mn,wt+=A*kn,Je+=A*Yn,ut+=A*Zn,Qe+=A*xr,Fe+=A*$r,Ke+=A*Ir,Ge+=A*Nr,A=D[6],ct+=A*te,Ne+=A*Yt,rt+=A*sn,bt+=A*un,Ot+=A*jt,gt+=A*ln,ht+=A*rn,xt+=A*Gn,wt+=A*mn,Je+=A*kn,ut+=A*Yn,Qe+=A*Zn,Fe+=A*xr,Ke+=A*$r,Ge+=A*Ir,ve+=A*Nr,A=D[7],Ne+=A*te,rt+=A*Yt,bt+=A*sn,Ot+=A*un,gt+=A*jt,ht+=A*ln,xt+=A*rn,wt+=A*Gn,Je+=A*mn,ut+=A*kn,Qe+=A*Yn,Fe+=A*Zn,Ke+=A*xr,Ge+=A*$r,ve+=A*Ir,ge+=A*Nr,A=D[8],rt+=A*te,bt+=A*Yt,Ot+=A*sn,gt+=A*un,ht+=A*jt,xt+=A*ln,wt+=A*rn,Je+=A*Gn,ut+=A*mn,Qe+=A*kn,Fe+=A*Yn,Ke+=A*Zn,Ge+=A*xr,ve+=A*$r,ge+=A*Ir,De+=A*Nr,A=D[9],bt+=A*te,Ot+=A*Yt,gt+=A*sn,ht+=A*un,xt+=A*jt,wt+=A*ln,Je+=A*rn,ut+=A*Gn,Qe+=A*mn,Fe+=A*kn,Ke+=A*Yn,Ge+=A*Zn,ve+=A*xr,ge+=A*$r,De+=A*Ir,Pe+=A*Nr,A=D[10],Ot+=A*te,gt+=A*Yt,ht+=A*sn,xt+=A*un,wt+=A*jt,Je+=A*ln,ut+=A*rn,Qe+=A*Gn,Fe+=A*mn,Ke+=A*kn,Ge+=A*Yn,ve+=A*Zn,ge+=A*xr,De+=A*$r,Pe+=A*Ir,Te+=A*Nr,A=D[11],gt+=A*te,ht+=A*Yt,xt+=A*sn,wt+=A*un,Je+=A*jt,ut+=A*ln,Qe+=A*rn,Fe+=A*Gn,Ke+=A*mn,Ge+=A*kn,ve+=A*Yn,ge+=A*Zn,De+=A*xr,Pe+=A*$r,Te+=A*Ir,ze+=A*Nr,A=D[12],ht+=A*te,xt+=A*Yt,wt+=A*sn,Je+=A*un,ut+=A*jt,Qe+=A*ln,Fe+=A*rn,Ke+=A*Gn,Ge+=A*mn,ve+=A*kn,ge+=A*Yn,De+=A*Zn,Pe+=A*xr,Te+=A*$r,ze+=A*Ir,vt+=A*Nr,A=D[13],xt+=A*te,wt+=A*Yt,Je+=A*sn,ut+=A*un,Qe+=A*jt,Fe+=A*ln,Ke+=A*rn,Ge+=A*Gn,ve+=A*mn,ge+=A*kn,De+=A*Yn,Pe+=A*Zn,Te+=A*xr,ze+=A*$r,vt+=A*Ir,Lt+=A*Nr,A=D[14],wt+=A*te,Je+=A*Yt,ut+=A*sn,Qe+=A*un,Fe+=A*jt,Ke+=A*ln,Ge+=A*rn,ve+=A*Gn,ge+=A*mn,De+=A*kn,Pe+=A*Yn,Te+=A*Zn,ze+=A*xr,vt+=A*$r,Lt+=A*Ir,Ft+=A*Nr,A=D[15],Je+=A*te,ut+=A*Yt,Qe+=A*sn,Fe+=A*un,Ke+=A*jt,Ge+=A*ln,ve+=A*rn,ge+=A*Gn,De+=A*mn,Pe+=A*kn,Te+=A*Yn,ze+=A*Zn,vt+=A*xr,Lt+=A*$r,Ft+=A*Ir,$t+=A*Nr,ee+=38*ut,re+=38*Qe,he+=38*Fe,Ce+=38*Ke,Be+=38*Ge,He+=38*ve,ct+=38*ge,Ne+=38*De,rt+=38*Pe,bt+=38*Te,Ot+=38*ze,gt+=38*vt,ht+=38*Lt,xt+=38*Ft,wt+=38*$t,L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),L=1,A=ee+L+65535,L=Math.floor(A/65536),ee=A-L*65536,A=re+L+65535,L=Math.floor(A/65536),re=A-L*65536,A=he+L+65535,L=Math.floor(A/65536),he=A-L*65536,A=Ce+L+65535,L=Math.floor(A/65536),Ce=A-L*65536,A=Be+L+65535,L=Math.floor(A/65536),Be=A-L*65536,A=He+L+65535,L=Math.floor(A/65536),He=A-L*65536,A=ct+L+65535,L=Math.floor(A/65536),ct=A-L*65536,A=Ne+L+65535,L=Math.floor(A/65536),Ne=A-L*65536,A=rt+L+65535,L=Math.floor(A/65536),rt=A-L*65536,A=bt+L+65535,L=Math.floor(A/65536),bt=A-L*65536,A=Ot+L+65535,L=Math.floor(A/65536),Ot=A-L*65536,A=gt+L+65535,L=Math.floor(A/65536),gt=A-L*65536,A=ht+L+65535,L=Math.floor(A/65536),ht=A-L*65536,A=xt+L+65535,L=Math.floor(A/65536),xt=A-L*65536,A=wt+L+65535,L=Math.floor(A/65536),wt=A-L*65536,A=Je+L+65535,L=Math.floor(A/65536),Je=A-L*65536,ee+=L-1+37*(L-1),T[0]=ee,T[1]=re,T[2]=he,T[3]=Ce,T[4]=Be,T[5]=He,T[6]=ct,T[7]=Ne,T[8]=rt,T[9]=bt,T[10]=Ot,T[11]=gt,T[12]=ht,T[13]=xt,T[14]=wt,T[15]=Je}function Se(T,D){de(T,D,D)}function me(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=253;A>=0;A--)Se($,$),A!==2&&A!==4&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ze(T,D){var $=n(),A;for(A=0;A<16;A++)$[A]=D[A];for(A=250;A>=0;A--)Se($,$),A!==1&&de($,$,D);for(A=0;A<16;A++)T[A]=$[A]}function Ae(T,D,$){var A=new Uint8Array(32),L=new Float64Array(80),ee,re,he=n(),Ce=n(),Be=n(),He=n(),ct=n(),Ne=n();for(re=0;re<31;re++)A[re]=D[re];for(A[31]=D[31]&127|64,A[0]&=248,Q(L,$),re=0;re<16;re++)Ce[re]=L[re],He[re]=he[re]=Be[re]=0;for(he[0]=He[0]=1,re=254;re>=0;--re)ee=A[re>>>3]>>>(re&7)&1,j(he,Ce,ee),j(Be,He,ee),J(ct,he,Be),ue(he,he,Be),J(Be,Ce,He),ue(Ce,Ce,He),Se(He,ct),Se(Ne,he),de(he,Be,he),de(Be,Ce,ct),J(ct,he,Be),ue(he,he,Be),Se(Ce,he),ue(Be,He,Ne),de(he,Be,u),J(he,he,He),de(Be,Be,he),de(he,He,Ne),de(He,Ce,L),Se(Ce,ct),j(he,Ce,ee),j(Be,He,ee);for(re=0;re<16;re++)L[re+16]=he[re],L[re+32]=Be[re],L[re+48]=Ce[re],L[re+64]=He[re];var rt=L.subarray(32),bt=L.subarray(16);return me(rt,rt),de(bt,bt,rt),K(T,bt),0}function Le(T,D){return Ae(T,D,o)}function $e(T,D){return r(D,32),Le(T,D)}function be(T,D,$){var A=new Uint8Array(32);return Ae(A,$,D),E(T,i,A,C)}var yt=Z,lt=G;function Nt(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),yt(T,D,$,A,re)}function yn(T,D,$,A,L,ee){var re=new Uint8Array(32);return be(re,L,ee),lt(T,D,$,A,re)}var nn=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function ie(T,D,$,A){for(var L=new Int32Array(16),ee=new Int32Array(16),re,he,Ce,Be,He,ct,Ne,rt,bt,Ot,gt,ht,xt,wt,Je,ut,Qe,Fe,Ke,Ge,ve,ge,De,Pe,Te,ze,vt=T[0],Lt=T[1],Ft=T[2],$t=T[3],te=T[4],Yt=T[5],sn=T[6],un=T[7],jt=D[0],ln=D[1],rn=D[2],Gn=D[3],mn=D[4],kn=D[5],Yn=D[6],Zn=D[7],xr=0;A>=128;){for(Ke=0;Ke<16;Ke++)Ge=8*Ke+xr,L[Ke]=$[Ge+0]<<24|$[Ge+1]<<16|$[Ge+2]<<8|$[Ge+3],ee[Ke]=$[Ge+4]<<24|$[Ge+5]<<16|$[Ge+6]<<8|$[Ge+7];for(Ke=0;Ke<80;Ke++)if(re=vt,he=Lt,Ce=Ft,Be=$t,He=te,ct=Yt,Ne=sn,rt=un,bt=jt,Ot=ln,gt=rn,ht=Gn,xt=mn,wt=kn,Je=Yn,ut=Zn,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(te>>>14|mn<<18)^(te>>>18|mn<<14)^(mn>>>9|te<<23),ge=(mn>>>14|te<<18)^(mn>>>18|te<<14)^(te>>>9|mn<<23),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=te&Yt^~te&sn,ge=mn&kn^~mn&Yn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=nn[Ke*2],ge=nn[Ke*2+1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=L[Ke%16],ge=ee[Ke%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Qe=Te&65535|ze<<16,Fe=De&65535|Pe<<16,ve=Qe,ge=Fe,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=(vt>>>28|jt<<4)^(jt>>>2|vt<<30)^(jt>>>7|vt<<25),ge=(jt>>>28|vt<<4)^(vt>>>2|jt<<30)^(vt>>>7|jt<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,ve=vt&Lt^vt&Ft^Lt&Ft,ge=jt&ln^jt&rn^ln&rn,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,rt=Te&65535|ze<<16,ut=De&65535|Pe<<16,ve=Be,ge=ht,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=Qe,ge=Fe,De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,Be=Te&65535|ze<<16,ht=De&65535|Pe<<16,Lt=re,Ft=he,$t=Ce,te=Be,Yt=He,sn=ct,un=Ne,vt=rt,ln=bt,rn=Ot,Gn=gt,mn=ht,kn=xt,Yn=wt,Zn=Je,jt=ut,Ke%16===15)for(Ge=0;Ge<16;Ge++)ve=L[Ge],ge=ee[Ge],De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=L[(Ge+9)%16],ge=ee[(Ge+9)%16],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+1)%16],Fe=ee[(Ge+1)%16],ve=(Qe>>>1|Fe<<31)^(Qe>>>8|Fe<<24)^Qe>>>7,ge=(Fe>>>1|Qe<<31)^(Fe>>>8|Qe<<24)^(Fe>>>7|Qe<<25),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Qe=L[(Ge+14)%16],Fe=ee[(Ge+14)%16],ve=(Qe>>>19|Fe<<13)^(Fe>>>29|Qe<<3)^Qe>>>6,ge=(Fe>>>19|Qe<<13)^(Qe>>>29|Fe<<3)^(Fe>>>6|Qe<<26),De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,L[Ge]=Te&65535|ze<<16,ee[Ge]=De&65535|Pe<<16;ve=vt,ge=jt,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[0],ge=D[0],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[0]=vt=Te&65535|ze<<16,D[0]=jt=De&65535|Pe<<16,ve=Lt,ge=ln,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[1],ge=D[1],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[1]=Lt=Te&65535|ze<<16,D[1]=ln=De&65535|Pe<<16,ve=Ft,ge=rn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[2],ge=D[2],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[2]=Ft=Te&65535|ze<<16,D[2]=rn=De&65535|Pe<<16,ve=$t,ge=Gn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[3],ge=D[3],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[3]=$t=Te&65535|ze<<16,D[3]=Gn=De&65535|Pe<<16,ve=te,ge=mn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[4],ge=D[4],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[4]=te=Te&65535|ze<<16,D[4]=mn=De&65535|Pe<<16,ve=Yt,ge=kn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[5],ge=D[5],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[5]=Yt=Te&65535|ze<<16,D[5]=kn=De&65535|Pe<<16,ve=sn,ge=Yn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[6],ge=D[6],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[6]=sn=Te&65535|ze<<16,D[6]=Yn=De&65535|Pe<<16,ve=un,ge=Zn,De=ge&65535,Pe=ge>>>16,Te=ve&65535,ze=ve>>>16,ve=T[7],ge=D[7],De+=ge&65535,Pe+=ge>>>16,Te+=ve&65535,ze+=ve>>>16,Pe+=De>>>16,Te+=Pe>>>16,ze+=Te>>>16,T[7]=un=Te&65535|ze<<16,D[7]=Zn=De&65535|Pe<<16,xr+=128,A-=128}return A}function pe(T,D,$){var A=new Int32Array(8),L=new Int32Array(8),ee=new Uint8Array(256),re,he=$;for(A[0]=1779033703,A[1]=3144134277,A[2]=1013904242,A[3]=2773480762,A[4]=1359893119,A[5]=2600822924,A[6]=528734635,A[7]=1541459225,L[0]=4089235720,L[1]=2227873595,L[2]=4271175723,L[3]=1595750129,L[4]=2917565137,L[5]=725511199,L[6]=4215389547,L[7]=327033209,ie(A,L,D,$),$%=128,re=0;re<$;re++)ee[re]=D[he-$+re];for(ee[$]=128,$=256-128*($<112?1:0),ee[$-9]=0,m(ee,$-8,he/536870912|0,he<<3),ie(A,L,ee,$),re=0;re<8;re++)m(T,8*re,A[re],L[re]);return 0}function ye(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n(),Be=n(),He=n();ue($,T[1],T[0]),ue(He,D[1],D[0]),de($,$,He),J(A,T[0],T[1]),J(He,D[0],D[1]),de(A,A,He),de(L,T[3],D[3]),de(L,L,c),de(ee,T[2],D[2]),J(ee,ee,ee),ue(re,A,$),ue(he,ee,L),J(Ce,ee,L),J(Be,A,$),de(T[0],re,he),de(T[1],Be,Ce),de(T[2],Ce,he),de(T[3],re,Be)}function Ue(T,D,$){var A;for(A=0;A<4;A++)j(T[A],D[A],$)}function je(T,D){var $=n(),A=n(),L=n();me(L,D[2]),de($,D[0],L),de(A,D[1],L),K(T,A),T[31]^=oe($)<<7}function ke(T,D,$){var A,L;for(q(T[0],a),q(T[1],s),q(T[2],s),q(T[3],a),L=255;L>=0;--L)A=$[L/8|0]>>(L&7)&1,Ue(T,D,A),ye(D,T),ye(T,T),Ue(T,D,A)}function nt(T,D){var $=[n(),n(),n(),n()];q($[0],f),q($[1],h),q($[2],s),de($[3],f,h),ke(T,$,D)}function mt(T,D,$){var A=new Uint8Array(64),L=[n(),n(),n(),n()],ee;for($||r(D,32),pe(A,D,32),A[0]&=248,A[31]&=127,A[31]|=64,nt(L,A),je(T,L),ee=0;ee<32;ee++)D[ee+32]=T[ee];return 0}var xn=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function Ht(T,D){var $,A,L,ee;for(A=63;A>=32;--A){for($=0,L=A-32,ee=A-12;L>4)*xn[L],$=D[L]>>8,D[L]&=255;for(L=0;L<32;L++)D[L]-=$*xn[L];for(A=0;A<32;A++)D[A+1]+=D[A]>>8,T[A]=D[A]&255}function wn(T){var D=new Float64Array(64),$;for($=0;$<64;$++)D[$]=T[$];for($=0;$<64;$++)T[$]=0;Ht(T,D)}function Ii(T,D,$,A){var L=new Uint8Array(64),ee=new Uint8Array(64),re=new Uint8Array(64),he,Ce,Be=new Float64Array(64),He=[n(),n(),n(),n()];pe(L,A,32),L[0]&=248,L[31]&=127,L[31]|=64;var ct=$+64;for(he=0;he<$;he++)T[64+he]=D[he];for(he=0;he<32;he++)T[32+he]=L[32+he];for(pe(re,T.subarray(32),$+32),wn(re),nt(He,re),je(T,He),he=32;he<64;he++)T[he]=A[he];for(pe(ee,T,$+64),wn(ee),he=0;he<64;he++)Be[he]=0;for(he=0;he<32;he++)Be[he]=re[he];for(he=0;he<32;he++)for(Ce=0;Ce<32;Ce++)Be[he+Ce]+=ee[he]*L[Ce];return Ht(T.subarray(32),Be),ct}function br(T,D){var $=n(),A=n(),L=n(),ee=n(),re=n(),he=n(),Ce=n();return q(T[2],s),Q(T[1],D),Se(L,T[1]),de(ee,L,l),ue(L,L,T[2]),J(ee,T[2],ee),Se(re,ee),Se(he,re),de(Ce,he,re),de($,Ce,L),de($,$,ee),Ze($,$),de($,$,L),de($,$,ee),de($,$,ee),de(T[0],$,ee),Se(A,T[0]),de(A,A,ee),Y(A,L)&&de(T[0],T[0],p),Se(A,T[0]),de(A,A,ee),Y(A,L)?-1:(oe(T[0])===D[31]>>7&&ue(T[0],a,T[0]),de(T[3],T[0],T[1]),0)}function yi(T,D,$,A){var L,ee=new Uint8Array(32),re=new Uint8Array(64),he=[n(),n(),n(),n()],Ce=[n(),n(),n(),n()];if($<64||br(Ce,A))return-1;for(L=0;L<$;L++)T[L]=D[L];for(L=0;L<32;L++)T[L+32]=A[L];if(pe(re,T,$),wn(re),ke(he,Ce,re),nt(Ce,D.subarray(32)),ye(he,Ce),je(ee,he),$-=64,w(D,0,ee,0)){for(L=0;L<$;L++)T[L]=0;return-1}for(L=0;L<$;L++)T[L]=D[L+64];return $}var sr=32,si=24,bi=32,Rr=16,Xi=32,yo=32,xi=32,Dr=32,Sa=32,_t=si,hn=bi,_n=Rr,qn=64,ur=32,Xr=64,bo=32,Zl=64;t.lowlevel={crypto_core_hsalsa20:E,crypto_stream_xor:z,crypto_stream:N,crypto_stream_salsa20_xor:k,crypto_stream_salsa20:M,crypto_onetimeauth:V,crypto_onetimeauth_verify:ne,crypto_verify_16:b,crypto_verify_32:w,crypto_secretbox:Z,crypto_secretbox_open:G,crypto_scalarmult:Ae,crypto_scalarmult_base:Le,crypto_box_beforenm:be,crypto_box_afternm:yt,crypto_box:Nt,crypto_box_open:yn,crypto_box_keypair:$e,crypto_hash:pe,crypto_sign:Ii,crypto_sign_keypair:mt,crypto_sign_open:yi,crypto_secretbox_KEYBYTES:sr,crypto_secretbox_NONCEBYTES:si,crypto_secretbox_ZEROBYTES:bi,crypto_secretbox_BOXZEROBYTES:Rr,crypto_scalarmult_BYTES:Xi,crypto_scalarmult_SCALARBYTES:yo,crypto_box_PUBLICKEYBYTES:xi,crypto_box_SECRETKEYBYTES:Dr,crypto_box_BEFORENMBYTES:Sa,crypto_box_NONCEBYTES:_t,crypto_box_ZEROBYTES:hn,crypto_box_BOXZEROBYTES:_n,crypto_sign_BYTES:qn,crypto_sign_PUBLICKEYBYTES:ur,crypto_sign_SECRETKEYBYTES:Xr,crypto_sign_SEEDBYTES:bo,crypto_hash_BYTES:Zl,gf:n,D:l,L:xn,pack25519:K,unpack25519:Q,M:de,A:J,S:Se,Z:ue,pow2523:Ze,add:ye,set25519:q,modL:Ht,scalarmult:ke,scalarbase:nt};function Sf(T,D){if(T.length!==sr)throw new Error("bad key size");if(D.length!==si)throw new Error("bad nonce size")}function ae(T,D){if(T.length!==xi)throw new Error("bad public key size");if(D.length!==Dr)throw new Error("bad secret key size")}function le(){for(var T=0;T=0},t.sign.keyPair=function(){var T=new Uint8Array(ur),D=new Uint8Array(Xr);return mt(T,D),{publicKey:T,secretKey:D}},t.sign.keyPair.fromSecretKey=function(T){if(le(T),T.length!==Xr)throw new Error("bad secret key size");for(var D=new Uint8Array(ur),$=0;$"u"?typeof Buffer.from<"u"?(t.encodeBase64=function(r){return Buffer.from(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(Buffer.from(r,"base64"),0))}):(t.encodeBase64=function(r){return new Buffer(r).toString("base64")},t.decodeBase64=function(r){return n(r),new Uint8Array(Array.prototype.slice.call(new Buffer(r,"base64"),0))}):(t.encodeBase64=function(r){var i,o=[],a=r.length;for(i=0;i{const{__scopeCheckbox:n,name:r,checked:i,defaultChecked:o,required:a,disabled:s,value:u="on",onCheckedChange:l,form:c,...f}=e,[h,p]=y.useState(null),m=Gt(t,O=>p(O)),v=y.useRef(!1),b=h?c||!!h.closest("form"):!0,[w=!1,x]=Za({prop:i,defaultProp:o,onChange:l}),S=y.useRef(w);return y.useEffect(()=>{const O=h?.form;if(O){const E=()=>x(S.current);return O.addEventListener("reset",E),()=>O.removeEventListener("reset",E)}},[h,x]),I.jsxs(IGe,{scope:n,state:w,disabled:s,children:[I.jsx(pt.button,{type:"button",role:"checkbox","aria-checked":Sl(w)?"mixed":w,"aria-required":a,"data-state":hZ(w),"data-disabled":s?"":void 0,disabled:s,value:u,...f,ref:m,onKeyDown:Ye(e.onKeyDown,O=>{O.key==="Enter"&&O.preventDefault()}),onClick:Ye(e.onClick,O=>{x(E=>Sl(E)?!0:!E),b&&(v.current=O.isPropagationStopped(),v.current||O.stopPropagation())})}),b&&I.jsx(LGe,{control:h,bubbles:!v.current,name:r,value:u,checked:w,required:a,disabled:s,form:c,style:{transform:"translateX(-100%)"},defaultChecked:Sl(o)?!1:o})]})});cZ.displayName=TP;var fZ="CheckboxIndicator",dZ=y.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...i}=e,o=NGe(fZ,n);return I.jsx(Gr,{present:r||Sl(o.state)||o.state===!0,children:I.jsx(pt.span,{"data-state":hZ(o.state),"data-disabled":o.disabled?"":void 0,...i,ref:t,style:{pointerEvents:"none",...e.style}})})});dZ.displayName=fZ;var LGe=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:i,...o}=e,a=y.useRef(null),s=j5(n),u=lA(t);y.useEffect(()=>{const c=a.current,f=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(f,"checked").set;if(s!==n&&p){const m=new Event("click",{bubbles:r});c.indeterminate=Sl(n),p.call(c,Sl(n)?!1:n),c.dispatchEvent(m)}},[s,n,r]);const l=y.useRef(Sl(n)?!1:n);return I.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:i??l.current,...o,tabIndex:-1,ref:a,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Sl(e){return e==="indeterminate"}function hZ(e){return Sl(e)?"indeterminate":e?"checked":"unchecked"}var zQe=cZ,UQe=dZ;export{PZe as $,HGe as A,the as B,BYe as C,zYe as D,VYe as E,jYe as F,tge as G,ige as H,cYe as I,oge as J,vz as K,eZe as L,sge as M,nge as N,jGe as O,WGe as P,MYe as Q,F as R,Al as S,age as T,rge as U,nYe as V,hZe as W,kge as X,Tge as Y,AZe as Z,XYe as _,qGe as a,XXe as a$,yZe as a0,bZe as a1,_Ze as a2,SZe as a3,EZe as a4,qYe as a5,CZe as a6,nZe as a7,wZe as a8,OZe as a9,wYe as aA,EYe as aB,hYe as aC,tYe as aD,NZe as aE,aZe as aF,pXe as aG,CXe as aH,SXe as aI,EXe as aJ,pYe as aK,xYe as aL,AXe as aM,PXe as aN,kXe as aO,KGe as aP,$Xe as aQ,IXe as aR,NXe as aS,DXe as aT,FXe as aU,BXe as aV,jXe as aW,zXe as aX,YYe as aY,ZXe as aZ,QYe as a_,mZe as aa,vZe as ab,xZe as ac,TZe as ad,$Ze as ae,MZe as af,RZe as ag,FYe as ah,UGe as ai,eYe as aj,iYe as ak,bYe as al,YGe as am,oYe as an,gYe as ao,rYe as ap,lYe as aq,yYe as ar,vYe as as,fYe as at,mYe as au,JGe as av,XGe as aw,aYe as ax,CYe as ay,SYe as az,mm as b,IYe as b$,UXe as b0,VXe as b1,WXe as b2,KXe as b3,qXe as b4,YXe as b5,GXe as b6,QXe as b7,HXe as b8,tQe as b9,lQe as bA,cQe as bB,fQe as bC,HUe as bD,XUe as bE,sQe as bF,cXe as bG,LZe as bH,zZe as bI,jZe as bJ,JXe as bK,Ui as bL,hQe as bM,pQe as bN,uXe as bO,vXe as bP,hXe as bQ,tXe as bR,ZZe as bS,YZe as bT,gQe as bU,QGe as bV,_Ye as bW,dYe as bX,ZGe as bY,vQe as bZ,yQe as b_,ZYe as ba,oQe as bb,aQe as bc,rQe as bd,iQe as be,c3 as bf,$Ye as bg,_f as bh,WZe as bi,TXe as bj,MXe as bk,I5 as bl,N5 as bm,eLe as bn,Js as bo,xf as bp,tp as bq,eQe as br,FZe as bs,UZe as bt,lXe as bu,VZe as bv,wXe as bw,xXe as bx,nXe as by,bXe as bz,dn as c,dXe as c0,rZe as c1,iZe as c2,EQe as c3,AQe as c4,XZe as c5,BZe as c6,RQe as c7,DQe as c8,NQe as c9,FQe as cA,jQe as cB,gXe as cC,JZe as cD,rXe as cE,fXe as cF,eXe as cG,mXe as cH,oXe as cI,zQe as cJ,UQe as cK,JYe as cL,fZe as cM,GYe as cN,tZe as cO,cZe as cP,iXe as cQ,VGe as cR,KZe as cS,BUe as cT,sZe as cU,QZe as cV,HZe as cW,LQe as ca,$Qe as cb,IQe as cc,kQe as cd,TQe as ce,MQe as cf,oZe as cg,uZe as ch,yXe as ci,OQe as cj,bQe as ck,_Qe as cl,SQe as cm,CQe as cn,sXe as co,qZe as cp,GZe as cq,_Xe as cr,es as cs,yr as ct,aXe as cu,xQe as cv,wQe as cw,lZe as cx,Jc as cy,DZe as cz,BGe as d,qr as e,kYe as f,AYe as g,PYe as h,OYe as i,I as j,Yi as k,LYe as l,Vk as m,DYe as n,zGe as o,TYe as p,WYe as q,y as r,zO as s,GGe as t,UF as u,uYe as v,sYe as w,KYe as x,HYe as y,UYe as z};